For the complete documentation index, see llms.txt. This page is also available as Markdown.
Actions list and usage
Actions are triggered by specific events that take place in the plugin code.
Usage examples
/**
* Example 1
*
* This function will save the search phrase to the database
*/
add_action( 'asp_before_search', 'asp_change_phrase', 10, 1);
function asp_change_phrase( $phrase ) {
update_option('asp_search_phrase', $phrase);
}
/**
* Example 2
*
* This function will print "Hi!" header before the search shortcode.
*/
add_action( 'asp_layout_before_shortcode', 'asp_print_before_shortcode');
function asp_print_before_shortcode() {
echo "<h3>Hi!</h3>";
}