Best action hook for placing ical requests
Best action hook for placing ical requests
Best action hook for placing ical requests
You tried ‘comment_author’, so maybe you are aware of ‘comments_array’ filter hook? It hands you all the content information in an array. Maybe you could use the array and add your info to it. Or maybe try using the comment_form hook to redirect to your own form.
@Hi Beau Simensen: The hook plugsin_loaded is one option, but you can use the plugin I posted for this question to see what plugins are run and in which order and use it to find the hook that works best for you: Where Can I Find a List of WordPress Hooks? Given your goal, you … Read more
The @wordpress/hooks package only gives you a JS-like equivalent to the PHP-based hook system in WordPress – they are entirely separate, and don’t bring any native WP PHP functions to the table. What you need (most likely) is an AJAX request to the WordPress REST API. Specifically, the GET posts endpoint, which by default is: … Read more
WP CLI will run plugins by default, so any hooks used in active plugins would be run. You can tell WP CLI to not run the active plugins, though. To get the full list of plugins, even if a malicious plugin tries to hide itself, the following should work: wp plugin list –skip-plugins (Caveat: any … Read more
I would use a custom walker and then extend the Walker_Page::start_el() method, like so: // Based on Walker_Page for WordPress v6.0 // @link https://github.com/WordPress/wordpress-develop/blob/6.0/src/wp-includes/class-walker-page.php#L105-L219 class My_Walker_Page extends Walker_Page { public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) { /* This checks if the current page in the list … Read more
I’m not the most experienced in block themes, but from what I’ve seen of them so far I feel pretty confident in saying that the functionality you describe should be implemented as a block. But it’s wrong to say that absolutely everything needs to be HTML and JS. There is still a place for PHP. … Read more
I found this on the codex You can only use conditional query tags on or after the init action hook in WordPress. For themes, this means the conditional tag will never work properly if you are using it in the body of functions.php, i.e. outside of a function. update you don’t need to hook the … Read more
The activate_plugin() function accepts three parameters, but it emits the activate_plugin action with only one parameter. This can be confusing, but hooks sometimes use the same name as the function they come from, without passing the same parameters. One way to get the difference between a network activation and a regular activation is to monitor … Read more
You should look into having your sidebars utilize the remove action function. Then you can remove a sidebar and replace it in a function any number of ways. For instance (this examples using a conditional based on a page called some-page. function change_sidebar_yay() { if ( is_single(‘some-page’) ) { remove_action( ‘old_sidebar’, ‘your_function’ ); //this is … Read more