Last active
January 25, 2018 07:11
-
-
Save codeiscode-dev/f3b171c01634b966814152b05ad58463 to your computer and use it in GitHub Desktop.
wpep_after_template_part
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
do_action( 'wpep_after_template_part', $template_name, $template_path, $located, $args ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function load_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) { | |
if ( $args && is_array( $args ) ) { | |
extract( $args ); | |
} | |
$located = $this->locate_template( $template_name, $template_path, $default_path ); | |
if ( ! file_exists( $located ) ) { | |
_doing_it_wrong( __FUNCTION__, sprintf( '%s does not exist.', $located ), '1.0.0' ); | |
return; | |
} | |
// Allow 3rd party plugin filter template file from their plugin | |
$located = apply_filters( 'wpep_get_template', $located, $template_name, $args, $template_path, $default_path ); | |
do_action( 'wpep_before_template_part', $template_name, $template_path, $located, $args ); | |
include( $located ); | |
do_action( 'wpep_after_template_part', $template_name, $template_path, $located, $args ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment