Add filter to shortcode template meta box

This commit is contained in:
Brian Miyaji
2015-02-09 13:43:17 +11:00
parent 440e00ecf3
commit 1e35d206fa
8 changed files with 51 additions and 9 deletions

View File

@@ -19,6 +19,17 @@ add_shortcode( 'league-table', 'SP_Shortcodes::league_table' );
add_shortcode( 'player-list', 'SP_Shortcodes::player_list' );
add_shortcode( 'player-gallery', 'SP_Shortcodes::player_gallery' );
/* Actions */
function sportspress_before_template_part_action( $template_name, $template_path, $located, $args ) {
do_action( 'sportspress_before_template_part', $template_name, $template_path, $located, $args );
}
add_action( 'sportspress_before_template', 'sportspress_before_template_part_action', 10, 4 );
function sportspress_after_template_part_action( $template_name, $template_path, $located, $args ) {
do_action( 'sportspress_after_template_part', $template_name, $template_path, $located, $args );
}
add_action( 'sportspress_after_template', 'sportspress_after_template_part_action', 10, 4 );
/* Functions */
function sportspress_flush_rewrite_rules() {
return sp_flush_rewrite_rules();