PluginProbe
ShortBuild / trunk
ShortBuild vtrunk
shortbuild / inc / init.php

init.php in ShortBuild trunk, at inc/init.php

55 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class Shortbuild_Bu {
4
5 private $theme_author = 'themeansar';
6
7
8 public static function instance() {
9
10 static $instance = null;
11
12 if ( null === $instance ) {
13 $instance = new Shortbuild_Bu;
14 }
15
16 return $instance;
17 }
18
19 public function run() {
20 $this->load_dependencies();
21
22 if ( shortbuild_bu_get_current_theme_author() == $this->theme_author ) {
23 $this->hooks();
24 }
25
26 }
27
28 private function load_dependencies() {
29
30 require_once SBP_PLUGIN_DIR . 'inc/functions.php';
31 require_once SBP_PLUGIN_DIR . 'inc/hooks.php';
32
33 }
34
35 /**
36 * Register all of the hooks related to the admin area functionality
37 * of the plugin.
38 *
39 * @since 1.0.2
40 * @access private
41 */
42 private function hooks() {
43
44 $plugin_admin = shortbuild_bu_hooks();
45 add_filter( 'advanced_import_demo_lists', array( $plugin_admin, 'add_demo_lists' ), 10, 1 );
46 add_filter( 'admin_menu', array( $plugin_admin, 'import_menu' ), 10, 1 );
47 add_filter( 'wp_ajax_shortbuild_bu_getting_started', array( $plugin_admin, 'install_advanced_import' ), 10, 1 );
48 add_filter( 'admin_enqueue_scripts', array( $plugin_admin, 'enqueue_styles' ), 10, 1 );
49 add_filter( 'admin_enqueue_scripts', array( $plugin_admin, 'enqueue_scripts' ), 10, 1 );
50
51 /*Replace terms and post ids*/
52 add_action( 'advanced_import_replace_term_ids', array( $plugin_admin, 'replace_term_ids' ), 20 );
53 }
54
55 }