Nicscott01
Forum Replies Created
-
Forum: Plugins
In reply to: [Forget Spam Comment] Doesn’t work with BedrockThank you! v1.1.6 does the trick!
Forum: Plugins
In reply to: [Forget Spam Comment] Doesn’t work with BedrockThanks for making that change. It didn’t work, and I know why. It’s because I never changed the function
get_site_url()
in line 78. That function actually should stayget_site_url()
becausewp-comments-post.php
is located in the folderwp/
when using Bedrock. So, in that case the URL should stay/wp/wp-comments-post.php?unique_key
.The change in line 105 is required. That function should be
get_home_url()
Can you test that configuration in a standard WP install and see if it will work?I never knew those 2 functions were different before I started using Bedrock. ??
Forum: Plugins
In reply to: [Clover Payments for WooCommerce] jquery errorTheir JS code uses jQuery, however it does not list that as a dependency in wp_register_script.
You can use the following snippet to dequeue their JS, and then enqueue it later, in the footer for example. You may need to play with the priority to make it work in your install.
/** * Clover Plugin Patch * make sure JS gets loaded after jQuery * */ add_action( 'wp_enqueue_scripts', function() { wp_dequeue_script( 'custom_scripts' ); }, 11 ); /** * I load jQuery in the footer, so the priority here is an * experiment, based on your implementation. */ add_action( 'wp_footer', function() { wp_enqueue_script( 'custom_scripts' ); }, 1 );
The Real Fix is Simple:
The developer needs to change line 356 in class-woo-clv-admin.php to read:
wp_register_script('custom_scripts', plugins_url('../public/js/woo-clv-custom.js', __FILE__), array('jquery', 'clover_js'), '1.0.0', false);
It’s as simple as adding jQuery to the list of dependencies in the enqueue code. Actually a rookie error; hard to believe this made it through QA.
Forum: Plugins
In reply to: [Automatic Featured Images from Videos] Stopped working with latest WPInteresting that perhaps WP 5.8 will be able to import WebP?
In any case, I think your regex is going to have to change because there’s not any extension provided by the Vimeo thumbnail URL. Here’s a sample response when you query for all video thumbnails now:
Cache-Control: private, no-store, no-cache Content-Type: application/vnd.vimeo.picture+json X-Ratelimit-Limit: 1000 X-Ratelimit-Remaining: 977 X-Ratelimit-Reset: 2021-05-26T15:46:21+00:00 { "total": 3, "page": 1, "per_page": 25, "paging": { "next": null, "previous": null, "first": "/videos/548451126/pictures?page=1", "last": "/videos/548451126/pictures?page=1" }, "data": [ { "uri": "/videos/548451126/pictures/1135511065", "active": true, "type": "custom", "sizes": [ { "width": 100, "height": 75, "link": "https://i.vimeocdn.com/video/1135511065_100x75?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135511065_100x75&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 200, "height": 150, "link": "https://i.vimeocdn.com/video/1135511065_200x150?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135511065_200x150&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 295, "height": 166, "link": "https://i.vimeocdn.com/video/1135511065_295x166?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135511065_295x166&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 640, "height": 360, "link": "https://i.vimeocdn.com/video/1135511065_640x360?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135511065_640x360&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 832, "height": 540, "link": "https://i.vimeocdn.com/video/1135511065_832x540?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135511065_832x540&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 832, "height": 540, "link": "https://i.vimeocdn.com/video/1135511065_832x540?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135511065_832x540&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 832, "height": 540, "link": "https://i.vimeocdn.com/video/1135511065_832x540?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135511065_832x540&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 832, "height": 540, "link": "https://i.vimeocdn.com/video/1135511065_832x540?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135511065_832x540&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 1280, "height": 720, "link": "https://i.vimeocdn.com/video/1135511065_1280x720?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135511065_1280x720&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 1920, "height": 1080, "link": "https://i.vimeocdn.com/video/1135511065_1920x1080?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135511065_1920x1080&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" } ], "resource_key": "b07e2bab2953206d60b12c468ff074db572c7b5f", "default_picture": false }, { "uri": "/videos/548451126/pictures/1135500631", "active": false, "type": "custom", "sizes": [ { "width": 100, "height": 75, "link": "https://i.vimeocdn.com/video/1135500631_100x75?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135500631_100x75&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 200, "height": 150, "link": "https://i.vimeocdn.com/video/1135500631_200x150?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135500631_200x150&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 295, "height": 166, "link": "https://i.vimeocdn.com/video/1135500631_295x166?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135500631_295x166&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 640, "height": 360, "link": "https://i.vimeocdn.com/video/1135500631_640x360?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135500631_640x360&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 640, "height": 416, "link": "https://i.vimeocdn.com/video/1135500631_640x416?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135500631_640x416&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 960, "height": 624, "link": "https://i.vimeocdn.com/video/1135500631_960x624?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135500631_960x624&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 1280, "height": 720, "link": "https://i.vimeocdn.com/video/1135500631_1280x720?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135500631_1280x720&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 1280, "height": 832, "link": "https://i.vimeocdn.com/video/1135500631_1280x832?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135500631_1280x832&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 1920, "height": 1080, "link": "https://i.vimeocdn.com/video/1135500631_1920x1080?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135500631_1920x1080&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" }, { "width": 1920, "height": 1248, "link": "https://i.vimeocdn.com/video/1135500631_1920x1248?r=pad", "link_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1135500631_1920x1248&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png" } ], "resource_key": "c7992883aeebbf246e59912d96c76e33d009cbcd", "default_picture": false } ] }
I just tested getting the image “link_with_play_button” instead of “link” and that one is still a png/jpeg, so it will work. Maybe that can be the workaround for now? In my application, I wrote my own function to get Vimeo details (instead of wds_get_vimeo_details() ) so I’m able to change to the different URL.
- This reply was modified 3 years, 9 months ago by Nicscott01.
Forum: Plugins
In reply to: [Automatic Featured Images from Videos] Stopped working with latest WPSo looking into it deeper, it seems as though Vimeo is now serving webp images, so I think this side load function is going to need to be tweaked.
Forum: Plugins
In reply to: [Automatic Featured Images from Videos] Stopped working with latest WPI’ve been debugging this code and I’m having trouble saving Vimeo thumbs all of the sudden. I think that Vimeo changed their response thumbnail URLs to not include a file extension. This messes up around line 283 in automatic-featured-images-from-videos.php. It cannot find any matches w/ an extension. Then everything goes to crap. ??
It feels like your lightbox is based on Photoswipe.js…is that true?
I’ve been recently burned by malware and so I’m trying to be extra cautious here. This is open source software, so you really should have the source published.
Forum: Plugins
In reply to: [InfiniteWP Client] WARNING!!! Plugin gets hacked!!!I’ve spent the better part of the previous week cleaning up dozens of websites that used this plugin. I looked in my past emails, and never received a notification from InfiniteWP about this issue when it was discovered.
On sites that were on shared hosting, the bad actor was able to traverse directories of all the other sites (because of the way permissions at my web host are set up) and plant scripts within many files which drop cookies in your browser and redirect you to all sorts of bad places. On sites I host via SpinupWP & AWS, the permissions are each site has its own user, so there was no cross contamination there. However, one of the symptoms of one of the attacks I received was cron tasks never ending and piling up, pinning my CPUs at 100% and consuming all my RAM, which would eventually bring down the server with the bunch of sites.
In addition to writing scripts and other PHP files (and planting backdoors), the malware attack this past week edited certain databases, also adding redirect scripts in the post_content column. Luckily I had daily backups of databases for most sites.
I’ve had to re-install WP, plugins and clean out custom themes, etc. WP CLI made my life a lot easier. To re-install WP, use :
wp core download --skip-content --force
but before you do that, remove the wp-admin and wp-includes folders because the wp core download command won’t remove any files, just overwrite WP files (and the hackers plant .ico files and other scripts in these folders):
rm -r wp-includes
rm -r wp-admin
To reinstall plugins on the WP plugin repository, use:
wp plugin install plugin-folder-name-here --force
For premium plugins, upload the zip file to the plugins folder and then run:
wp plugin install plugin-zip-folder.zip --force
Remember to check the uploads folder for malicious files that are probably *.php files. There’s never a good reason to have any PHP files in uploads. And that led me to search out how to protect the uploads folder from being able to execute php files. In my searches, I stumbled across a support forum on www.ads-software.com.
This was for a plugin called WP Cerber which I’ve now installed on a bunch of sites to help combat nasty traffic. So far, its been helpful and informative. They have a remote management tool that seems to work similarly to InfiniteWP, but I’m gun shy to try it. After this pain wears off, perhaps I will.
I hope this help other people currently pulling their hair out on the verge of mental breakdowns…
EDIT:
Make sure to add
( ! is_admin() ) &&
in the if and elseif statements of the above code! I realized that the filter runs during admin, and that makes for a pretty wacky UI!
@Ron_Rennick thanks for the reply. After the .htaccess worked correctly, I lost all my css styles in wp-admin. This led me to discover that they were all calling https://www.primarydomain.com. And when they were redirected they couldn’t find their assets (even though both www & non-www domains are configured to look at the same set of web files).
Then I double checked my primary site URL (and home URL) which ended up being the www version! Because you can’t edit that url in the sites list, I manually changed it in the DB, and that fixed the ajax problem.
My original intent was to have www and non-www serve up different stuff. But I guess that really doesn’t make sense since site id 1 is the same as site admin.
If anybody is interested in how to easily add your repeater/flexible fonts to the enqueued list handled by the acfgfs plugin:
add_filter('acfgfs/enqueued_fonts', 'cc_additional_fonts'); function cc_additional_fonts( $font_list ) { $additional_fonts = get_field('additional_fonts', 'options'); //this is where you get your field(s) of font(s) in the repeater/flexible content field. $add_fonts = array(); //initialize the new array foreach ( $additional_fonts as $font ) { //go through the array and pull out the sub field that has your font (here it's named "font"); $add_fonts[] = $font['font']; //add each one to the new list } $font_list = array_merge( $font_list, $add_fonts); return $font_list; }
Doesn’t look like this has been resolved. I looked at the code, and in the functions.php file, the function acfgfs_get_fonts_to_enqueue() needs to traverse deeper than the first level to look into repeaters.
For now, I’ll use the filter acfgfs/enqueued_fonts as a workaround, and add my own fields to the array.
Please let me know if you would like help with this fix.
Forum: Plugins
In reply to: [Perfect Images] Issue with crop positionNo prob! Thanks for rolling into the plugin, Jordy!
Forum: Plugins
In reply to: [Perfect Images] Issue with crop positionFunny, I’ve been working on this and just figured out a way to fix this. Its actually pretty simple:
Add an additional $crop parameter to wr2x_vt_resize.php:
function wr2x_vt_resize( $file_path, $width, $height, $crop, $newfile )
If crop = 1, make sure its a logical “true” (this may or may not be necessary). Otherwise, pass along the crop array. I added the following after line 18:if ($crop == '1') { $crop_params = true; } else { $crop_params = $crop; }
Pass $crop_params to the resize class:
$image->resize( $width, $height, $crop_params );
Then, in wp-retina-2x.php, after line 484 (before the foreach going through all the image sizes), initialize:
global $_wp_additional_image_sizes;
Edit the lines after the following comment to pass the crop info of the particular image size through to the wr2x_vt_resize() function:
// Otherwise let's resize (if the original size is big enough). else if ( $meta['sizes'][$name]['width'] * 2 <= $meta['width'] && $meta['sizes'][$name]['height'] * 2 <= $meta['height'] ) { $image = wr2x_vt_resize( $originalfile, $meta['sizes'][$name]['width'] * 2, $meta['sizes'][$name]['height'] * 2, $_wp_additional_image_sizes[$name]['crop'], $retina_file ); }
I haven’t done extensive testing, but for one of the sites I’ve been working on, this works.
Please roll this into the next version!Thanks for a great plugin, Jordy!
Forum: Plugins
In reply to: [Ajax BootModal Login] captcha not workingv1.4.3 of the Plugin; Testing on FireFox Mac v33.
Just want to let you know that the plugin is great otherwise.