Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function get_sidebar( $name = null, $subfolder = null ) {
- do_action( 'get_sidebar', $name );
- $templates = array();
- if ( ! empty( $subfolder ) ) {
- if ( isset( $name ) )
- $templates[] = "$subfolder/sidebar-{$name}.php";
- $templates[] = "$subfolder/sidebar.php";
- }
- if ( isset( $name ) )
- $templates[] = "sidebar-{$name}.php";
- $templates[] = 'sidebar.php';
- // Backward compat code will be removed in a future release
- if ('' == locate_template($templates, true))
- load_template( ABSPATH . WPINC . '/theme-compat/sidebar.php');
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement