Yasr Filters and Actions


File: lib/yasr-ajax-functions.php

This is called before save the Overall Rating
do_action('yasr_action_on_overall_rating', $post_id, $rating);

This add new tabs in the Yasr Shortcode Creator
do_action( 'yasr_add_tabs_on_tinypopupform');

Add content for Yasr Shortcode Creator
do_action( 'yasr_add_content_on_tinypopupform')

Called before saving the visitor vote
do_action('yasr_action_on_visitor_vote', $post_id, $rating);

File: lib/yasr-functions.php

Run after default css are loaded
do_action( 'yasr_add_front_script_css' );

Run after yasr-front.js is loaded

For admin side: run before yasr-admin.css is loaded

For admin side: run after yasr-admin.css is loaded
do_action('yasr_add_admin_scripts_end' );

File: yasr-settings-functions.php

Add settings field in Aspect & Style page
do_action('yasr_style_options_add_settings_field', $style_options);

File: yasr-settings-page.php

Add new tab in the Yasr Settings
do_action( 'yasr_add_settings_tab', $active_tab )

Add content here for new page, the callback function must begin with
if ($active_tab == ‘YOURNEWPAGE’) {
do_action( 'yasr_settings_check_active_tab', $active_tab );

File: yasr-metabox-top-right.php

Add content at the bottom of the top right metabox used in the edit screen
do_action( 'yasr_add_content_bottom_topright_metabox', $post_id );


File: lib/yasr-functions.php

Use this filter to use your own rich snippets
$filtered_schema = apply_filters( 'yasr_filter_schema_jsonld', $review_choosen );

Filter the store ip address

File: yasr-settings-functions.php
Add content to the array $style_options used in the Aspect & Styles tab
apply_filters('yasr_filter_style_options', $style_options);

What do you think about this?
[Total: 0 Average: 0]

Leave a Reply

Your email address will not be published. Required fields are marked *