private function init() { // Add the options page and menu item. global $cherry_page_builder; $document_link = cherry_get_documentation_link(); $cherry_page_builder->add_child_menu_item(array('parent_slug' => 'cherry', 'page_title' => __('Static Area Builder', 'cherry'), 'menu_title' => __('Static Area Builder', 'cherry'), 'capability' => 'edit_theme_options', 'menu_slug' => 'statics', 'function' => array(__CLASS__, 'cherry_statics_page_build'), 'before_content' => ' <div class="cherry-info-box"> <div class="documentation-link">' . __('Feel free to view detailed ', 'cherry') . $document_link . '</div> </div> <div class="cherry-info-box">' . __("Use static area builder to arrange static blocks. You can drag-n-drop static blocks to arrange them or add new ones.", 'cherry') . '</div>')); // Settings need to be registered after admin_init //add_action( 'admin_init', array( $this, 'settings_init' ) ); }
private function init() { global $cherry_options_framework, $submenu, $cherry_page_builder; /*$this->option_inteface_builder = new Cherry_Interface_Builder( array( 'pattern' => 'grid', 'hidden_items' => apply_filters( 'cherry-hidden-options', array() ), ) );*/ // Gets a WP_Theme object for a theme. $current_theme_obj = wp_get_theme(); $cherry_page_builder->add_parent_menu_item(apply_filters('cherry_menu_item_args', array('page_title' => sprintf(__('Theme %s', 'cherry'), $current_theme_obj->get('Name')), 'menu_title' => __('Cherry', 'cherry'), 'capability' => 'edit_theme_options', 'menu_slug' => 'cherry', 'function' => array(__CLASS__, 'cherry_options_page_build'), 'icon_url' => PARENT_URI . '/lib/admin/assets/images/svg/cherry-icon.svg', 'position' => 62))); /** * Filters a link to the framework/theme documentation. * * @since 4.0.2 * @var string */ $document_link = cherry_get_documentation_link(); $before_content = ''; if (!empty($document_link)) { $before_content = '<div class="cherry-info-box"> <div class="documentation-link">' . __('Feel free to view detailed ', 'cherry') . $document_link . '</div> </div>'; } $cherry_page_builder->add_child_menu_item(array('parent_slug' => 'cherry', 'page_title' => sprintf(__('Theme %s', 'cherry'), $current_theme_obj->get('Name')), 'menu_title' => __('Options', 'cherry'), 'capability' => 'edit_theme_options', 'menu_slug' => 'options', 'function' => array(__CLASS__, 'cherry_options_page_build'), 'before_content' => $before_content)); // Settings need to be registered after admin_init add_action('admin_init', array($this, 'settings_init')); add_action('admin_head', array($this, 'admin_head')); //************* Sanitize Utility Filters ************************************// // Utility sanitize text add_filter('utility_sanitize_text', array($this, 'utility_sanitize_text')); // Utility sanitize textarea add_filter('utility_sanitize_textarea', array($this, 'utility_sanitize_textarea')); // Utility sanitize checkbox add_filter('utility_sanitize_checkbox', array($this, 'utility_sanitize_checkbox')); // Utility sanitize lider add_filter('utility_sanitize_slider', array($this, 'utility_sanitize_slider')); // Utility sanitize editor add_filter('utility_sanitize_editor', array($this, 'utility_sanitize_editor')); // Utility sanitize editor add_filter('utility_sanitize_image', array($this, 'utility_sanitize_image')); // Utility sanitize color picker add_filter('utility_sanitize_colorpicker', array($this, 'utility_sanitize_colorpicker')); }