public static function get_instance() { if (!self::$instance) { self::$instance = new Toolset_Admin_Bar_Menu(); } return self::$instance; }
private static function get_post_create_layout_archive() { $tool_admin_bar = Toolset_Admin_Bar_Menu::get_instance(); // change name to 'home-blog' for build-in "Posts" $post_type = self::$post_type->name == 'post' ? 'home-blog' : self::$post_type->name; return $tool_admin_bar->get_edit_link('layouts', true, $post_type, 'archive', 0); }
private static function get_post_create_layout_archive() { if (self::$post_type_create_layout_archive === null) { $tool_admin_bar = Toolset_Admin_Bar_Menu::get_instance(); self::$post_type_create_layout_archive = $tool_admin_bar->get_edit_link('layouts', true, self::$post_type->name, 'archive', 0); } return self::$post_type_create_layout_archive; }
public function register_inc() { $sections_loaded = self::$sections_loaded; if (!in_array('toolset_inc', $sections_loaded)) { $sections_loaded[] = 'toolset_inc'; if (!class_exists('Toolset_Settings')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.settings.class.php'; $this->settings = Toolset_Settings::get_instance(); } if (!class_exists('Toolset_Localization')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.localization.class.php'; $this->localization = new Toolset_Localization(); } if (!class_exists('Toolset_WPLogger')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.wplogger.class.php'; } if (!class_exists('Toolset_Object_Relationship')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.object.relationship.class.php'; $this->object_relationship = Toolset_Object_Relationship::get_instance(); } if (!class_exists('Toolset_Settings_Screen')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.settings.screen.class.php'; $this->settings_screen = new Toolset_Settings_Screen(); } if (!class_exists('Toolset_Export_Import_Screen')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.export.import.screen.class.php'; $this->export_import_screen = new Toolset_Export_Import_Screen(); } if (!class_exists('Toolset_Menu')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.menu.class.php'; $this->menu = new Toolset_Menu(); } if (!class_exists('Toolset_Promotion')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.promotion.class.php'; $this->promotion = new Toolset_Promotion(); } if (!class_exists('Toolset_Admin_Bar_Menu')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.admin.bar.menu.class.php'; global $toolset_admin_bar_menu; $toolset_admin_bar_menu = Toolset_Admin_Bar_Menu::get_instance(); } if (!class_exists('Toolset_WPML_Compatibility')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.wpml.compatibility.class.php'; $this->wpml_compatibility = new Toolset_WPML_Compatibility(); } require_once TOOLSET_COMMON_PATH . '/inc/toolset.compatibility.php'; require_once TOOLSET_COMMON_PATH . '/inc/toolset.function.helpers.php'; require_once TOOLSET_COMMON_PATH . '/deprecated.php'; self::$sections_loaded = $sections_loaded; } }
public function register_inc() { if (!$this->is_section_loaded(self::TOOLSET_INCLUDES)) { $this->add_section_loaded(self::TOOLSET_INCLUDES); if (!class_exists('Toolset_Settings')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.settings.class.php'; $this->settings = Toolset_Settings::get_instance(); } if (!class_exists('Toolset_Localization')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.localization.class.php'; $this->localization = new Toolset_Localization(); } if (!class_exists('Toolset_WPLogger')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.wplogger.class.php'; } if (!class_exists('Toolset_Object_Relationship')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.object.relationship.class.php'; $this->object_relationship = Toolset_Object_Relationship::get_instance(); } if (!class_exists('Toolset_Settings_Screen')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.settings.screen.class.php'; $this->settings_screen = new Toolset_Settings_Screen(); } if (!class_exists('Toolset_Export_Import_Screen')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.export.import.screen.class.php'; $this->export_import_screen = new Toolset_Export_Import_Screen(); } if (!class_exists('Toolset_Menu')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.menu.class.php'; $this->menu = new Toolset_Menu(); } if (!class_exists('Toolset_Promotion')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.promotion.class.php'; $this->promotion = new Toolset_Promotion(); } if (!class_exists('Toolset_Admin_Bar_Menu')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.admin.bar.menu.class.php'; global $toolset_admin_bar_menu; $toolset_admin_bar_menu = Toolset_Admin_Bar_Menu::get_instance(); } if (!class_exists('Toolset_Internal_Compatibility')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.internal.compatibility.class.php'; $this->internal_compatibility = new Toolset_Internal_Compatibility(); } if (!class_exists('Toolset_WPML_Compatibility')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.wpml.compatibility.class.php'; $this->wpml_compatibility = new Toolset_WPML_Compatibility(); } if (!class_exists('Toolset_Relevanssi_Compatibility')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.relevanssi.compatibility.class.php'; $this->relevanssi_compatibility = new Toolset_Relevanssi_Compatibility(); } if (!class_exists('Toolset_CssComponent')) { require_once TOOLSET_COMMON_PATH . '/inc/toolset.css.component.class.php'; $toolset_bs_component = Toolset_CssComponent::getInstance(); } require_once TOOLSET_COMMON_PATH . '/inc/toolset.compatibility.php'; require_once TOOLSET_COMMON_PATH . '/inc/toolset.function.helpers.php'; require_once TOOLSET_COMMON_PATH . '/deprecated.php'; $this->apply_filters_on_sections_loaded('toolset_register_include_section'); } }