Chris Huff
Forum Replies Created
-
Forum: Reviews
In reply to: [Auto Featured Image from Title] Your plugin is garbage!I updated the plugin today, and was able to fix the “hide notice” link. Thanks for pointing it out!
Forum: Plugins
In reply to: [Auto Featured Image from Title] i want to user can change background image ?No, sorry, this is not a feature of the plugin and it would take quite a bit of coding to make that happen.
Forum: Plugins
In reply to: [Auto Featured Image from Title] i want to user can change background image ?The plugin includes the ability to select from a few background images, or you may opt to select a background color instead. You can adjust these options on the plugin’s settings page.
The PRO version of the plugin gives you even more options to customize the image, including the ability to upload your own images to be used as the background.
Check it out, it may be what you’re looking for: http://designsbychris.com/auto-featured-image-from-title
Forum: Hacks
In reply to: Add admin notices when using WordPress filtersIt’s not pretty, but I did figure out a method that will work for now.
I embedded an iframe at the bottom of the page (via admin_footer) that displays any errors logged (via get_option), and it also includes a button to refresh the iframe after you upload files. If I can figure out how to auto-refresh the iframe when a file is uploaded, it would work so much better, but this is good enough for now.
Thanks for all your help!
Forum: Hacks
In reply to: Add admin notices when using WordPress filtersReally hoped this would work, but it looks like the save_post action isn’t fired when media is first uploaded, only if it is subsequently edited.
I definitely think that using update_option and get_option is the way to go, though. Maybe I could somehow add javascript to the media-new.php page that checks for the option and displays it if it’s added?
Forum: Reviews
In reply to: [Auto Featured Image from Title] Your plugin is garbage!Sorry that the notice is not going away for you. Not sure the reason for that, it goes away in all of my testing.
If you’re comfortable editing the plugin’s code, you can simply delete this chunk of code from the plugin, and the notice will go away.
// Display a notice that can be dismissed function afift_lite_admin_notice() { global $current_user; $user_id = $current_user->ID; // Check that the user hasn't already clicked to ignore the message if ( ! get_user_meta($user_id, 'afift_lite2pro_ignore_notice') ) { echo '<div class="updated"><p>'; printf(__('<strong>Thanks for using Auto Featured Image from Title LITE!</strong><br />Use discount code LITE2PRO to get 30% off the <a href="http://designsbychris.com/auto-featured-image-from-title">PRO version</a>! | <a href="%1$s" rel="nofollow">Hide Notice</a>'), '?' . http_build_query(array_merge($params, array('afift_lite2pro_ignore_notice'=>'0')))); echo "</p></div>"; } } add_action('admin_notices', 'afift_lite_admin_notice');Again, sorry for the trouble.
Forum: Hacks
In reply to: Add admin notices when using WordPress filtersWhat hook could I use at that fires after the file has finished uploading? I’ve been trying to use add_attachment, or edit_attachment, but these actually interrupt the upload and saving process, so that it gets stuck on “Crunching…”
Forum: Hacks
In reply to: Add admin notices when using WordPress filtersI thought of another possible solution. When a file is uploaded normally, it writes the filename back to the screen. Is there any way to filter this line so that it writes not only the filename, but anything else I want it to say?
Forum: Hacks
In reply to: Add admin notices when using WordPress filtersThanks for the suggestion. When I tried your code, it then cancels the upload as well because it sees there is an error.
Basically, I want my plugin to upload the media file to a remote server, but give an error if that upload fails (whether because it’s an unsupported file type, or because the remote server is down, etc), and then continue the upload the normal way if it failed. All of that works fine, except that there’s no way of knowing why it failed unless I can throw a notice back to the user somehow.
Is there some way to tell WordPress to continue to process an upload, even when there’s an error?
Forum: Hacks
In reply to: Add admin notices when using WordPress filtersEven just a nudge in the right direction would be helpful, lol. I’m really at a loss at this point.
It’s not ideal, but I might just take the error reporting out of the plugin, and release a first version without that part. Although I’m worried if I do, I’ll get lots of questions I can’t answer, but would be able to address very easily if I were able to ask for the error they received.
Forum: Plugins
In reply to: [Auto Featured Image from Title] Prevent Pages.. only postsYou should be able to turn it off for pages in the plugin’s settings. It’s one of the first options at the top of the plugin’s settings page. Let me know if you have any problems with that.
Forum: Hacks
In reply to: Adding post Custom Field to content.phpTry this where you want to display the custom field.
<?php $img = get_post_meta( get_the_ID(), 'RoR', true); if( ! empty( $img ) ) { echo '<img src="' . $img . '" />'; } ?>Haven’t tested it, but it should work. Let me know.
Forum: Hacks
In reply to: Add admin notices when using WordPress filtersI’ve yet to figure this out…any ideas?
It seems like there should be a way to, instead of writing an error immediately, tell WordPress to write the error at the proper time. Does this exist in some fashion?
Forum: Plugins
In reply to: [Auto Featured Image from Title] Warning ErrorSorry, take this out too, then it should work.
// Display a notice that can be dismissed function afift_lite_admin_notice() { global $current_user; $user_id = $current_user->ID;Forum: Plugins
In reply to: [Auto Featured Image from Title] Warning ErrorI’m home, sorry for the delay.
You can safely delete or comment out that line. It is simply a notice that you can receive 30% off if you upgrade to the PRO version.
In fact, if I were you, I’d delete this whole chunk:
// Check that the user hasn't already clicked to ignore the message if ( ! get_user_meta($user_id, 'afift_lite2pro_ignore_notice') ) { echo '<div class="updated"><p>'; printf(__('<strong>Thanks for using Auto Featured Image from Title LITE!</strong><br />Use discount code LITE2PRO to get 30% off the <a href="http://designsbychris.com/auto-featured-image-from-title">PRO version</a>! | <a href="%1$s" rel="nofollow">Hide Notice</a>'), '?' . http_build_query(array_merge($params, array('afift_lite2pro_ignore_notice'=>'0')))); echo "</p></div>"; } } add_action('admin_notices', 'afift_lite_admin_notice');Hope this helps!