How to filter the URL of thumbnail size in the Media Grid and admin pages
How to filter the URL of thumbnail size in the Media Grid and admin pages
How to filter the URL of thumbnail size in the Media Grid and admin pages
If I understand correctly, you want to do this: add_action(‘upgrader_process_complete’, ‘my_clear_elementor_cache’); function my_clear_elementor_cache() { // Make sure that Elementor loaded and the hook fired if (did_action(‘elementor/loaded’)) { // Automatically purge and regenerate the Elementor CSS cache \Elementor\Plugin::instance()->files_manager->clear_cache(); } }
I ended up using the updated_option hook and checking if a widget or sidebar has been updated. When a widget is added, removed or saved, the update_option hook is fired. All widget option names start with “widget_“. By checking if the option name starts with “widget_” we can determine if a widget was added, removed … Read more
Note: Revised because that ‘__FILE__’ as in dirname(plugin_basename(‘__FILE__’)), was just a typo in the post/question. But one thing you did not include in your post, is about how are you loading the Bootstrapping class, and where is the file located? Is it in a subfolder like includes, i.e. your-plugin/ includes/ class-bootstraping.php languages/ your-plugin.pot your-plugin.php (main … Read more
Fatal error Class-wp-hook, again, but not sure what’s triggering it
Add text when displying attribute with a hook on single product page
Change password reqts with NO plugin without breaking resetpass link?
I am trying to find a hook to be able to set a datalayer.push everytime a document is opened. It could even be something that runs after the document is opened ex: https://proximite-courtage.fr/wp-content/uploads/2022/06/LISTE_PARTENAIRES_PC_22062022.pdf No. WP isn’t running when you visit PDF files directly via their URL, so there is no PHP loaded and no opportunities … Read more
Create section wit form
None of those functions are JavaScript functions. They’re PHP functions. You need to run them outside the <script> tag in the PHP: add_action( ‘wp_footer’, function () { if ( is_archive() || is_category() || is_author() || is_date() ) { ?> <script> // etc. </script> <?php } } ); You were also missing the () on is_archive.