Simon Barnett
Forum Replies Created
-
Forum: Plugins
In reply to: [Gravity Forms No CAPTCHA reCAPTCHA] CAPTCHA failed. Please try again!This fixed it.
public/class-gf-no-captcha-recaptcha-public.php, line 280:
$json_response = file_get_contents( $verify_url );
Replace with
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $verify_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $json_response = curl_exec($ch); curl_close($ch);
Please update this, Folkhack. Thanks.
Forum: Plugins
In reply to: [WP YouTube Lyte] Multiple Custom Thumbnailsok, and the filter fires every time httpv fires..
hmm.. ok, I’m learning, and appreciate it : )Forum: Plugins
In reply to: [WP YouTube Lyte] Multiple Custom ThumbnailsThanks Frank. Still stumped about how/why that works, but if/when I figure it out I’ll post more detail here.
Forum: Plugins
In reply to: [WP YouTube Lyte] Multiple Custom ThumbnailsCan I formulate my question another way? How would I modify the code below:
add_filter('lyte_match_thumburl','lyte_my_own_thumburl'); function lyte_my_own_thumburl($thumb) { return "https://www.kevinlikes.com/wp-content/uploads/2014/09/jonah-745.jpg"; } add_filter('lyte_match_thumburl','lyte_my_other_thumburl'); function lyte_my_other_thumburl($thumb) { return "https://i.ytimg.com/vi/ArqoaJq3fXU/sddefault.jpg"; }
..to separately target videos added to a post with:
httpv://www.youtube.com/watch?v=_zzrf8KK2FU httpv://www.youtube.com/watch?v=ArqoaJq3fXU
..so the first video has the first thumbnail, and the second video has the second thumbnail.
I still can’t get my head around how the filter / function actually hooks into specific video IDs. How it catches different httpv links at the point at which they execute.
Forum: Plugins
In reply to: [WP YouTube Lyte] Multiple Custom ThumbnailsThanks Frank, ok let’s take this for a test drive..
Forum: Plugins
In reply to: [WP YouTube Lyte] Multiple Custom Thumbnails“when using “lyte_match_thumburl” you’ll have the URL to the original thumbnail as input, which contains the ID”
add_filter('lyte_match_thumburl','lyte_my_own_thumburl'); function lyte_my_own_thumburl($thumb) { return "https://www.kevinlikes.com/wp-content/uploads/2014/09/jonah-745.jpg"; }
I’m still not understanding where the filter accepts the video ID to link it to the correct video. Sorry if I’m missing something really obvious, Frank.
Forum: Plugins
In reply to: [WP YouTube Lyte] Multiple Custom ThumbnailsPerhaps I’m not understanding the filter / function.
If I use this in functions.php:
add_filter('lyte_match_thumburl','lyte_my_own_thumburl'); function lyte_my_own_thumburl($thumb) { return "https://www.kevinlikes.com/wp-content/uploads/2014/09/jonah-745.jpg"; }
It replaces the thumbnails of all videos on a page. But where does the ID go to make it selective?
I could do it something like this:
add_filter('lyte_match_thumburl','lyte_my_own_thumburl'); function lyte_my_own_thumburl($thumb) { $video_id = '_zzrf8KK2FU'; $video_image = get_post_meta(get_the_id(), $video_id, true); return $video_image; }
I know that’s not complete (needs to step through all custom fields to obtain keys), but it’s to explain my other two issues:
1. WordPress doesn’t like _zzrf8KK2FU as a custom field key. Won’t store it.
2. We are already using custom fields for other things on the website, so obtaining only the video ID keys gets tricky.So now my thinking is towards using Advanced Custom Fields plugin to create a more “dedicated area” for video IDs and thumb URLs.
But perhaps I’m going on a tangent when the answer is simpler?
Forum: Plugins
In reply to: [WP YouTube Lyte] Multiple Custom ThumbnailsHello again, Frank.
For videos added to posts with httpv, how do I grab the ID of a video just before lyte_parse() executes?
This would be in order to get the value of the corresponding Custom Field key and apply it to the filter.
Many thanks
Forum: Plugins
In reply to: [Image Teleporter] Fatal Error on line 136 (php 559)Bump
Forum: Plugins
In reply to: [WP YouTube Lyte] Multiple Custom ThumbnailsThat sounds like the one! Thanks, Frank.. will try it out.
I logged out and in again which solved the problem.
Forum: Plugins
In reply to: [WP Favorite Posts] Display the full post contentIn my test case I think it was literally replacing the section:
while ( have_posts() ) : the_post(); echo "<li><a href='".get_permalink()."' title='". get_the_title() ."'>" . get_the_title() . "</a> "; wpfp_remove_favorite_link(get_the_ID()); echo "</li>"; endwhile;
with:
while ( have_posts() ) : the_post(); echo "<li><a href='".get_permalink()."' title='". get_the_title() ."'>" . get_the_title() . "</a> "; the_content(); the_post_thumbnail(); wpfp_remove_favorite_link(get_the_ID()); echo "</li>"; endwhile;
My client no longer has need for this functionality so I deleted the test site (and plugin), which means I can’t offer much help beyond that.
Forum: Plugins
In reply to: [FBF Facebook page Feed Widget] A feed could not be found at ….Same here.
Forum: Plugins
In reply to: [WP Favorite Posts] Display the full post contentCool ?? I think this plugin is a great starting point for various things.
Forum: Plugins
In reply to: [WP Favorite Posts] Display the full post contentI did this by editing the plugin file: wpfp-page-template.php
Search for the line
while ( have_posts() ) : the_post();
Then add WordPress functions like:
the_content();
the_post_thumbnail();