Dargno
Forum Replies Created
-
Forum: Plugins
In reply to: [Getwid - Gutenberg Blocks] Instagram block has suddenly stopped workingNoticed the same issue. A new instagram API should be used according to https://forums.mobirise.com/discussion/25139/error-type-oauthexception-code-400-error-message-invalid-scope-field-s-basic
Hope it can be fixed soon since it’s the only reason why i currently use Getwid 🙂
I’ve noticed the same issue… With trial and error i noticed the filter uses the output which you can filter. So you have to manipulate the html itself…
My working example:
add_filter('wp_tag_cloud','set_tag_cloud_sizes'); function set_tag_cloud_sizes($args) { $links = explode('</a>', $args); // add classes foreach($links as $key => $link) { if(strpos($link, 'style="font-size: 8pt;"')) $link = preg_replace('/(class\w?=\w?".*?)"/', '$1 small"', $link); if(strpos($link, 'style="font-size: 22pt;"')) $link = preg_replace('/(class\w?=\w?".*?)"/', '$1 large"', $link); $links[$key] = $link; } $result = implode('</a>', $links); // remove inline styling $patterns = '/style=".*?"/'; $replacements = ''; $result = preg_replace($patterns, $replacements, $result); return $result; }- This reply was modified 6 years, 2 months ago by Dargno.
Forum: Plugins
In reply to: [Ajax Load More – Infinite Scroll, Load More, & Lazy Load] Feature RequestsI added a preload line to add another custom function next to the ALM Empty function. This way i can clear/alter the div or do other custom jQuery before adding the content. An alternative would be to add a checkbox to refresh instead of add posts (adding would be nice too but with random posts i get doubles).
Maybe it would be nice to implement in a future version 😉 Keep up the nice work.
// ALM Empty - triggers if zero results were returned if(!alm.data.length > 0){ if ($.isFunction($.fn.almEmpty)) { $.fn.almEmpty(alm); } } else { // ALM NOT EMPTY - do BEFORE LOADING CONTENT if ($.isFunction($.fn.almPreload)) { $.fn.almPreload(alm); } }