| @@ 22-67 (lines=46) @@ | ||
| 19 | /** |
|
| 20 | * ALNP_Make class. |
|
| 21 | */ |
|
| 22 | class ALNP_Make { |
|
| 23 | ||
| 24 | /** |
|
| 25 | * Initlize Theme. |
|
| 26 | * |
|
| 27 | * @access public |
|
| 28 | * @static |
|
| 29 | */ |
|
| 30 | public static function init() { |
|
| 31 | // Filters the repeater template location. |
|
| 32 | add_filter( 'alnp_template_redirect', array( __CLASS__, 'alnp_make_template_redirect' ) ); |
|
| 33 | ||
| 34 | // Add theme support and preset the theme selectors. |
|
| 35 | add_action( 'after_setup_theme', array( __CLASS__, 'add_theme_support' ) ); |
|
| 36 | } // END init() |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Filters the location of the repeater template. |
|
| 40 | * |
|
| 41 | * @access public |
|
| 42 | * @static |
|
| 43 | * @return string |
|
| 44 | */ |
|
| 45 | public static function alnp_make_template_redirect() { |
|
| 46 | return AUTO_LOAD_NEXT_POST_FILE_PATH . '/template/theme-support/make/content-alnp.php'; |
|
| 47 | } // END alnp_make_template_redirect() |
|
| 48 | ||
| 49 | /** |
|
| 50 | * Add theme support by providing the theme selectors |
|
| 51 | * to be applied once the theme is activated. |
|
| 52 | * |
|
| 53 | * @access public |
|
| 54 | * @static |
|
| 55 | */ |
|
| 56 | public static function add_theme_support() { |
|
| 57 | add_theme_support( 'auto-load-next-post', array( |
|
| 58 | 'content_container' => 'main.site-main', |
|
| 59 | 'title_selector' => 'h1.entry-title', |
|
| 60 | 'navigation_container' => 'nav.post-navigation', |
|
| 61 | 'comments_container' => 'div#comments', |
|
| 62 | 'load_js_in_footer' => 'no', |
|
| 63 | 'lock_js_in_footer' => 'no', |
|
| 64 | ) ); |
|
| 65 | } // END add_theme_support() |
|
| 66 | ||
| 67 | } // END class |
|
| 68 | ||
| 69 | ALNP_Make::init(); |
|
| 70 | ||
| @@ 22-67 (lines=46) @@ | ||
| 19 | /** |
|
| 20 | * ALNP_Twenty_Nineteen class. |
|
| 21 | */ |
|
| 22 | class ALNP_Twenty_Nineteen { |
|
| 23 | ||
| 24 | /** |
|
| 25 | * Initlize Theme. |
|
| 26 | * |
|
| 27 | * @access public |
|
| 28 | * @static |
|
| 29 | */ |
|
| 30 | public static function init() { |
|
| 31 | // Add theme support and preset the theme selectors. |
|
| 32 | add_action( 'after_setup_theme', array( __CLASS__, 'add_theme_support' ) ); |
|
| 33 | ||
| 34 | // Filters the repeater template location. |
|
| 35 | add_filter( 'alnp_template_redirect', array( __CLASS__, 'alnp_make_template_redirect' ) ); |
|
| 36 | } // END init() |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Add theme support by providing the theme selectors |
|
| 40 | * to be applied once the theme is activated. |
|
| 41 | * |
|
| 42 | * @access public |
|
| 43 | * @static |
|
| 44 | */ |
|
| 45 | public static function add_theme_support() { |
|
| 46 | add_theme_support( 'auto-load-next-post', array( |
|
| 47 | 'content_container' => 'main.site-main', |
|
| 48 | 'title_selector' => 'h1.entry-title', |
|
| 49 | 'navigation_container' => 'nav.post-navigation', |
|
| 50 | 'comments_container' => 'section#comments', |
|
| 51 | 'load_js_in_footer' => 'no', |
|
| 52 | 'lock_js_in_footer' => 'no', |
|
| 53 | ) ); |
|
| 54 | } // END add_theme_support() |
|
| 55 | ||
| 56 | /** |
|
| 57 | * Filters the location of the repeater template. |
|
| 58 | * |
|
| 59 | * @access public |
|
| 60 | * @static |
|
| 61 | * @return string |
|
| 62 | */ |
|
| 63 | public static function alnp_make_template_redirect() { |
|
| 64 | return AUTO_LOAD_NEXT_POST_FILE_PATH . '/template/theme-support/twentynineteen/content-alnp.php'; |
|
| 65 | } // END alnp_make_template_redirect() |
|
| 66 | ||
| 67 | } // END class |
|
| 68 | ||
| 69 | ALNP_Twenty_Nineteen::init(); |
|
| 70 | ||
| @@ 22-67 (lines=46) @@ | ||
| 19 | /** |
|
| 20 | * ALNP_Twenty_Ten class. |
|
| 21 | */ |
|
| 22 | class ALNP_Twenty_Ten { |
|
| 23 | ||
| 24 | /** |
|
| 25 | * Initlize Theme. |
|
| 26 | * |
|
| 27 | * @access public |
|
| 28 | * @static |
|
| 29 | */ |
|
| 30 | public static function init() { |
|
| 31 | // Filters the repeater template location. |
|
| 32 | add_filter( 'alnp_template_redirect', array( __CLASS__, 'alnp_twentyten_template_redirect' ) ); |
|
| 33 | ||
| 34 | // Add theme support and preset the theme selectors. |
|
| 35 | add_action( 'after_setup_theme', array( __CLASS__, 'add_theme_support' ) ); |
|
| 36 | } // END init() |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Filters the location of the repeater template. |
|
| 40 | * |
|
| 41 | * @access public |
|
| 42 | * @static |
|
| 43 | * @return string |
|
| 44 | */ |
|
| 45 | public static function alnp_twentyten_template_redirect() { |
|
| 46 | return AUTO_LOAD_NEXT_POST_FILE_PATH . '/template/theme-support/twentyten/content-alnp.php'; |
|
| 47 | } // END alnp_twentyten_template_redirect() |
|
| 48 | ||
| 49 | /** |
|
| 50 | * Add theme support by providing the theme selectors |
|
| 51 | * to be applied once the theme is activated. |
|
| 52 | * |
|
| 53 | * @access public |
|
| 54 | * @static |
|
| 55 | */ |
|
| 56 | public static function add_theme_support() { |
|
| 57 | add_theme_support( 'auto-load-next-post', array( |
|
| 58 | 'content_container' => '#content', |
|
| 59 | 'title_selector' => 'h1.entry-title', |
|
| 60 | 'navigation_container' => '#nav-below', |
|
| 61 | 'comments_container' => 'div#comments', |
|
| 62 | 'load_js_in_footer' => 'no', |
|
| 63 | 'lock_js_in_footer' => 'no', |
|
| 64 | ) ); |
|
| 65 | } // END add_theme_support() |
|
| 66 | ||
| 67 | } // END class |
|
| 68 | ||
| 69 | ALNP_Twenty_Ten::init(); |
|
| 70 | ||