sqhendr
Forum Replies Created
-
Forum: Hacks
In reply to: Is wp_get_sidebars_widgets deprecated?Yeah, I found is_active_sidebar after sifting through others including is_dynamic_sidebar (also recommended by someone, but not really applicable here). I certainly understand the reason for not being intended for themes/plugins because of its private access. However, if it’s not intended to be used, it shouldn’t be listed on a page that lists functions to be used by developers. Especially if the page for wp_get_sidebars_widgets directs people to that page for alternatives.
Seems like needless confusion and run-around, to me.
Forum: Plugins
In reply to: [Custom User Profile Photo] Searching by GUID not reliableSeems to work quite well. Thanks for the update!
Forum: Plugins
In reply to: [Custom User Profile Photo] Searching by GUID not reliableHey,
Glad to do so. All I changed was the get_cupp_meta function:
/** * Retrieve the appropriate image size * * @param $user_id Default: $post->post_author. Will accept any valid user ID passed into this parameter. * @param $size Default: 'thumbnail'. Accepts all default WordPress sizes and any custom sizes made by the add_image_size() function. * @return {url} Use this inside the src attribute of an image tag or where you need to call the image url. */ function get_cupp_meta( $user_id, $size ) { //allow the user to specify the image size if (!$size){ $size = 'thumbnail'; // Default image size if not specified. } if(!$user_id){ $user_id = $post->post_author; } // get the custom uploaded image $attachment_upload_url = esc_url( get_the_author_meta( 'cupp_upload_meta', $user_id ) ); // get the external image $attachment_ext_url = esc_url( get_the_author_meta( 'cupp_meta', $user_id ) ); $attachment_url = ''; $image_url = ''; if($attachment_upload_url){ $attachment_url = $attachment_upload_url; // grabs the id from the URL a WordPress function instead of the one originally proposed $attachment_id = attachment_url_to_postid( $attachment_url ); // retrieve the thumbnail size of our image $image_thumb = wp_get_attachment_image_src( $attachment_id, $size ); $image_url = $image_thumb[0]; } elseif($attachment_ext_url) { $image_url = $attachment_ext_url; } if ( empty($image_url) ) return; // return the image thumbnail return $image_url; }
Essentially, I just changed the original call to get_attachment_image_by_url to attachment_url_to_postid. It seems like a pretty obscure WordPress function, so I hope it’s got good staying power.
Forum: Plugins
In reply to: [Custom User Profile Photo] Searching by GUID not reliableHey,
Sorry, I would have responded earlier, but apparently WordPress’ email notifications aren’t working as I expected. I’m not sure what the etiquette is here. I’d be glad to send anyone a copy of the main plugin file that I changed. You’d just need to replace the 3five_cupp.php file with that one.
The main thing to remember is that if the plugin is ever updated, that file will get overwritten. I’ve also not run a ton of tests on this change, so your mileage may vary, but it seems to be working well for me.
I wanted to use multi-file upload in Gravity forms using this plugin, but it seems to be greyed out. Single file works just fine. Is this related?
Forum: Fixing WordPress
In reply to: Undefined offset in custom content type capabilityOk, looks like WordPress doesn’t like post types that are mass nouns rather than count nouns. I had capabilities for which the singular and plural were the same. Thus, the capability type was an array (‘mytype’,’mytype’). I changed it so that it actually has an “s” plural in the capabilities, and it works. It makes my inner grammarian squirm, but it works.
Forum: Networking WordPress
In reply to: Site URLs of subsites after moveThis was done using XCloner, to package up the database and files. However, we’ve recently found that some of its database functions are little questionable. That may be part of the issue, and we’re going to try to do just a straight mysqldump and tar of the production files and then set it up on the dev server. I’m not really thinking that’s the issue, but at this point, who knows?
Generally, we’ve got the virtualhosts all set up, and they work well for what we’re doing, which is not all that sophisticated. It’s just a clone of the site on a different server/domain. I modified the wp-config.php to use the new DB and modified it with the appropriate domain.
I’ve also used Velvet Blues Update URLs to update the post and page content urls, which works as expected.
Forum: Plugins
In reply to: [Intagrate Lite] automatic posting…isn't?I’m having the same issue, it seems. I’m not even getting any new posts created at all.
Forum: Plugins
In reply to: [Groups] Attachment Details in WP 4.0Good to know, I’ll let my content editors know. Thanks!
Forum: Plugins
In reply to: [Groups] Attachment Details in WP 4.0Brilliant! Thanks for getting to that so quickly. I’ll get that on our next update cycle!
Forum: Plugins
In reply to: [Groups] Attachment Details in WP 4.0I guess what I mean is that the scripts that initialize selectize and chosen are enqueued with jquery as a dependency. Seems like the trick will be enqueueing them with the appropriate selectors or just having the script call on any of the possible selectors, even if they’re not necessary.
Forum: Plugins
In reply to: [Groups] Attachment Details in WP 4.0It looks as if jQuery is being loaded after this script, rather than before. I wonder if it might be better to put this in a script that runs on document.ready(), rather than at the moment the interface is created.
Forum: Plugins
In reply to: [Gravity PDF] Fillable FieldsThat’s great! I’ll update the plugin and give that a try. Thanks!
Forum: Plugins
In reply to: [Gravity PDF] Fillable FieldsJust an update: it appears that the filter does not work. It would be great if there was a way to change that setting somewhere so that it wasn’t necessary to update the code manually every time there’s an update for the plugin.
Forum: Plugins
In reply to: [Gravity PDF] Fillable FieldsGreat, thanks! I’ll use the filter to get that active.