eclev91
Forum Replies Created
-
Forum: Plugins
In reply to: [Alpine Photo Tile for Instagram] PHP 7This plugin is no longer maintained. I’ve reached out to the dev and hope to gain ownership to at least keep up with bugs.
Forum: Plugins
In reply to: [Alpine Photo Tile for Instagram] PHP 7Seconded. There’s even error suppression on the call because the dev was aware it was deprecated.
Fix is to swap line 58 of
alpinebot-display.phpfor the following, almost identical code:$name = preg_replace('/:cntrl:/', '', $name ); // remove ASCII's control charactersI hate to fork the plugin, though. Hopefully we’ll see a response from the dev.
Forum: Plugins
In reply to: [Related Posts for WordPress] How to turn off display of items below content?Er, it is documented on the plugin’s site, not on its WordPress repo listing
Forum: Plugins
In reply to: [Related Posts for WordPress] How to turn off display of items below content?https://www.relatedpostsforwp.com/documentation/disable-related-posts-under-posts/
Found that in a resolved post a few down. Should probably be documented, or perhaps even have a plugin setting available in the admin.
Forum: Plugins
In reply to: [Job Manager] Deprecated Widget constructorsI’m not particularly interested in doing any large, long-term maintenance, as I’m only using this on one project.
That being said, if you can get a mirror up on GitHub I’d be happy to put in a PR for this particular issue! Let me know.
Cheers!
Forum: Plugins
In reply to: [Job Manager] Checkboxes not working for custom job fieldsNo problem! Thanks for looking into this, it’s greatly appreciated.
Forum: Plugins
In reply to: [Job Manager] Checkboxes not working for custom job fieldsYeah, didn’t mean for it to come off that way. Here’s the bug I originally outlined and the solution:
In the jobman_updatedb() function, data for checkbox custom fields for a given job is saved to the database by imploding on ‘, ‘.
However, database data is read by exploding on the newline character (\n).
Therefore, if you’ve checked more than one box, it’ll save to the database as “Foo, Bar”. When you try to explode, you get an array with one item: “Foo, Bar”. When it checks to see if the value should be checked or not against the array of all possible options, neither “Foo” nor “Bar” are found in the array of saved data (“Foo, Bar”).
The explosion for the database data ($data) in jobman_edit_job() should be on a comma, rather than the newline character. Or implode on the newline character rather than a comma when saving. The latter would make it uniform with how all the possible values from the settings page are saved and read.
To replicate: Spin up a fresh WordPress. Install your plugin.
1. Under Job Form Settings, create a checkbox field. Create at least two options, separated by newlines.
2. Create a new job. Check one option from the checkbox field that was just created. Save.
3. Edit job. You’ll see the option is selected. Select at least one other option for a total of 2+ selected. Save.
4. Edit job. You’ll see it now shows no options as selected.
And then you asked me to provide a use case for checkboxes, which I did.
If any of that doesn’t make sense, let me know and I’ll try to clarify.
Thanks
Forum: Plugins
In reply to: [Job Manager] Checkboxes not working for custom job fieldsNo no no, though I can see where someone might want sub-categories. That was simply an example of a feature that WordPress taxonomies come with out of the box that your plugin has obscured and made inaccessible by implementing its own interface.
What I required was an entirely separate taxonomy. “Category” being, say, a type of insurance that the job would be in (Property/Casualty versus Health versus Financial, for example) while “Discipline” being what you’d actually be doing (Claims, Accounting, IT, etc).
The greater point being that both child terms and multiple taxonomies are things that WordPress post types support out of the box that your interface has left out. The perfect solution would be dropping your interface for the default WordPress post interface, but that would likely be quite the to-do. In the meantime, I’ve spoofed a solution to my problem using a checkbox custom field. My first note specifically outlines the bug in the handling of checkbox custom fields, as well as a solution (that I’m aware would be overwritten in my code if I were to update the plugin). I’d be happy to open a PR when it hits GitHub.
Forum: Plugins
In reply to: [Job Manager] Checkboxes not working for custom job fieldsI’m not sure I understand, what’s a “Job Details posting”? I’m using checkboxes for a secondary taxonomy. I’ll try to explain it as best I can.
Your plugin uses post types and taxonomies and post meta, but totally abandons the WordPress interface for these things, so unless you’ve rebuilt the functionality yourself, it isn’t there.
For example, taxonomies – you’ve created one called “Categories” and built out an interface for it. What if I want child terms? A second taxonomy? You haven’t built out an interface for those, even though the jobs are WordPress posts, which out of the box support as many taxonomies as I assign with terms that may have children.
In this specific case, my client has “Categories” and “Disciplines” as taxonomies for jobs. Your interface only supports one taxonomy for the entire post type, conveniently also named “Categories”, but both of these could be considered taxonomies and also function as so. So I created a checkbox field with several options for “Disciplines” and wrote my own code for the front end to grab the possible values for this field, spit them all out as checkboxes, and then use the input to filter the jobs being displayed.
Forum: Plugins
In reply to: [Job Manager] Checkboxes not working for custom job fieldsYep. So spin up a fresh WordPress. Install your plugin.
1. Under Job Form Settings, create a checkbox field. Create at least two options, separated by newlines.
2. Create a new job. Check one option from the checkbox field that was just created. Save.
3. Edit job. You’ll see the option is selected. Select at least one other option for a total of 2+ selected. Save.
4. Edit job. You’ll see it now shows no options as selected.
Forum: Plugins
In reply to: [Staff Directory] Reordering staffRight now, you can order by any of the stuff built into WP_Query using the shortcode:
[staff-directory orderby="title" order="ASC"]For a totally custom order, Custom Post Types support menu order out of the box if you define it as such.
Since that isn’t already happening when Adam defines the CPT (this is your brainstorming!), you’ll need to add it yourself using add_post_type_support. Drop the following into the functions.php file in your theme (or, if the site has a custom plugin you’re maintaining, it’ll work there, too):
add_action( 'init', 'unique_prefix_add_staff_order' ); function unique_prefix_add_staff_order() { add_post_type_support( 'staff', 'page-attributes' ); }You should now see “Order” in the right column of the edit staff member page.
This will allow you to use the
orderbyandorderparameters that Andy built into the plugin to order by menu order:[staff-directory orderby="menu_order" order="ASC"]If you’re not using the shortcode, but rather using the WordPress post type archives, and are therefore using a PHP template (if you have pretty permalinks on, it’ll be
http://mysite.com/staff), you’ll need to make sure that the query is being ordered by menu order. You’ll need to force that yourself using another filter called pre_get_posts:add_filter('pre_get_posts', 'unique_prefix_order_by_menu_order'); function unique_prefix_order_by_menu_order($query) { $post_types = array('staff'); if($query->is_main_query() && in_array($query->get('post_type'), $post_types)) { $query->set('orderby', 'menu_order'); $query->set('order', 'ASC'); } }And those will work as well. Drop that wherever you dropped the
add_post_type_support(), but again – only if you aren’t using the shortcode.Forum: Plugins
In reply to: [Spam Comments Cleaner] Doesn't workI’ll follow up on this guys behalf:
Not getting an error, it simply says there are no spam comments, but I’ve got > 4,000. WordPress 4.4, latest version of the plugin.
Thanks!
Forum: Plugins
In reply to: [Post Thumbnail Editor] Crop tool bugWhich plugin? I may have time to do a PR
I seem to be having the identical issue. Let me know of any details that would be helpful.
Declaring image size:
add_image_size('slider', 1900, 500, array('center', 'center'));Forum: Fixing WordPress
In reply to: WP_CONTENT_URLAlready did that via the instructions here, so
get_option('siteurl')results inhttp://example/wp, but this is not wherewp_contentis located.wp-contentis located atget_option('home')–http://example. It could potentially make sense for the originalWP_CONTENT_URLdefinition to usehomeinstead ofsiteurl, since this is the same in most cases, but I would wager there are alternative use cases where this would break other things.