Robin Cornett
3ec0be7c0b
fixed ajax
...
widget will not display if taxonomy is changed and new term is not
selected. for some reason, the term doesn't select with ajax so the
$instance['term'] may end up mismatching with the $instance['taxonomy'],
which can throw lots of errors. for now, I'm dealing with this by
making the entire widget disappear if there is a problem.
2015-01-06 11:42:37 -05:00
Robin Cornett
891363618c
remove unnecessary markup
2015-01-05 23:27:08 -05:00
Robin Cornett
920e782609
fixing js conflicts
...
ajax still is not working, although at this point it is doing something.
just exchanges for an empty list. also still conflicts with jo.
2015-01-05 23:26:44 -05:00
Robin Cornett
37cbcc7210
update tax widget to select tax, then term
...
js needs work
2015-01-05 20:32:18 -05:00
Robin Cornett
1b2c90c872
add featured taxonomy widget
2015-01-05 17:54:56 -05:00
Robin Cornett
606bfc8075
integrate apply_filters to relevant places
...
reduces number of functions created
2015-01-05 11:04:44 -05:00
Robin Cornett
8d357c56ae
simplify post_types array for filters
...
(call just once)
2015-01-04 22:39:12 -05:00
Robin Cornett
289f0e5a6e
set cpt/tax images to be backstretch only
2015-01-04 18:15:32 -05:00
Robin Cornett
3268052c73
fix sanitization return for cpt images
...
previous valid value is now returned here as well.
2015-01-04 17:45:32 -05:00
Robin Cornett
83e46c5e31
move tax save function to settings class
...
this cuts redundancy, since the image validation function is already in
this class. having the taxonomy save in its own class required
duplicating the validation functions.
2015-01-04 16:05:25 -05:00
Robin Cornett
4e923f99ac
add filter to move large image to after header on single posts
2015-01-04 16:03:18 -05:00
Robin Cornett
83d8233dc5
remove image from page 2+ on blogs/archives
2015-01-04 16:02:16 -05:00
Robin Cornett
ad325cd07f
fixed tax/cpt image variable settings
2015-01-04 16:01:11 -05:00
Robin Cornett
0f6d537c40
fixed cpt image setting for output
2015-01-03 18:38:22 -05:00
Robin Cornett
86c4b6920a
fix taxonomy buttons for js
2015-01-03 18:27:03 -05:00
Robin Cornett
6710a5707d
simplify button text
2015-01-03 18:26:31 -05:00
Robin Cornett
1ec79fded2
update settings page, better validation for cpt images
...
As of this moment, cpt images will return empty if the value is invalid.
Better than resetting to fallback, but still not ideal.
2015-01-03 18:08:27 -05:00
Robin Cornett
37c2c6418c
remove unnecessary includes
2015-01-03 17:56:25 -05:00
Robin Cornett
a475716d5a
working cpt archive images
...
including sanitization! although the sanitized images all revert to the
last valid fallback value, which is not correct. May be better to revert
to blank?
2015-01-03 17:43:18 -05:00
Robin Cornett
a64d5c68ee
retrieve js for all relevant admin pages
2015-01-03 15:42:20 -05:00
Robin Cornett
1897557a3b
simplify columns calls
2015-01-03 15:41:49 -05:00
Robin Cornett
3b5c5344fd
update text strings for consistency
2015-01-03 11:57:06 -05:00
Robin Cornett
3e341912fc
add cpt image to available images
2015-01-03 09:10:38 -05:00
Robin Cornett
3592082abf
functional setting for cpt featured image
...
at this point, a featured image can be set and retrieved for the cpt
archive. creates a new setting, though, not sure if this is desirable.
could we just add on to the existing displayfeaturedimage setting, since
it is already serialized?
also, at this point, no validation is happening for the cpt images.
2015-01-03 09:10:16 -05:00
Robin Cornett
df532a6a20
add size to featured image description
2015-01-03 09:07:40 -05:00
Robin Cornett
12ad667b5f
add class for cpt featured image setting
2015-01-02 20:28:33 -05:00
Robin Cornett
d233ca773f
add break after a taxonomy image is found
...
(we only need one, even if a post has multiple terms)
2015-01-02 17:47:28 -05:00
Robin Cornett
1481511e4e
preemptively set backstretch variable
...
this may be unnecessary as it appears to return false if empty anyway
2015-01-02 17:03:27 -05:00
Robin Cornett
f400a7cc57
fixed returned value for taxonomy images
...
The taxonomy option is not updated if the image is invalid or too small.
If the image is deleted (the field is empty), that's OK.
2015-01-02 16:40:46 -05:00
Robin Cornett
88f18fd6c0
add a new filter to use taxonomy image instead of post thumbnail
2015-01-02 16:35:26 -05:00
Robin Cornett
96e7823208
fix where fallback filter is applied on single posts
2015-01-02 16:34:42 -05:00
Robin Cornett
4c1a9495db
remove useless variables
2015-01-01 23:13:27 -05:00
Robin Cornett
e828b948bc
update validation
...
returns empty string if invalid value. would prefer for it to return
previous value instead.
2015-01-01 19:55:39 -05:00
Robin Cornett
b04bbb81c6
add condition for new post type columns
...
post_type must be public && support featured image
2015-01-01 19:18:24 -05:00
Robin Cornett
7ff9accb71
add documentation
2015-01-01 19:17:41 -05:00
Robin Cornett
58d67e89e2
add doc blocks
2015-01-01 18:55:13 -05:00
Robin Cornett
adb2ab6d3e
create admin class for custom featured image column
2015-01-01 18:38:59 -05:00
Robin Cornett
7160b7cdaa
add featured image column to posts, pages, post types
2015-01-01 18:05:23 -05:00
Robin Cornett
f8777553dc
add featured image column to taxonomies
...
also changed how hooks were called to use "{$taxonomy->name}_etc
2015-01-01 17:28:19 -05:00
Robin Cornett
ee62bdb52a
remove priority/args from function call
2015-01-01 17:26:51 -05:00
Robin Cornett
21786d2f03
change get_object_terms to get the image from most used taxonomy
2015-01-01 10:56:51 -05:00
Robin Cornett
4dcd3896da
add description class to <p>
2014-12-31 17:03:54 -05:00
Robin Cornett
faa88f04f3
add sort taxonomies by taxonomy, then term
...
need to decide if this is helpful for items with multiple terms/taxes
assigned. Think in this case, the user will have to pick a featured
image for the singular post anyway if they really care which one gets
assigned.
2014-12-31 17:03:35 -05:00
Robin Cornett
2ec2fdee26
change button text to be the same for settings and taxonomies
2014-12-31 17:02:14 -05:00
Robin Cornett
f29cfcba9b
use get_post only for checking post_content
2014-12-31 11:00:36 -05:00
Robin Cornett
6221d8d0a9
change to get_the_ID instead of $post
2014-12-31 11:00:15 -05:00
Robin Cornett
6fa66873db
remove global $post
2014-12-31 10:51:39 -05:00
Robin Cornett
1a4adac350
fix image selection for is_singular()
...
if there is no post thumbnail, but a taxonomy has a featured image, then
use that. otherwise, if a fallback image exists.
2014-12-31 10:41:39 -05:00
Robin Cornett
c5acb81938
add tax image if there is no featured image
...
needs checking to see what happens if there is no tax image, but there
is a fallback image
2014-12-31 10:02:02 -05:00
Robin Cornett
42f98531a8
validate image in taxonomy upload
...
no way to add error message?
2014-12-31 08:32:55 -05:00