OwlCyberSecurity - MANAGER
Edit File: index.php
<?php if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } if( !class_exists( 'MetaboxSidebar' ) ) { class MetaboxSidebar { private static $_instance = null; public static function instance() { if ( is_null( self::$_instance ) ) { self::$_instance = new self(); } return self::$_instance; } function __construct() { add_filter( 'cs_metabox_options', array( $this, 'layout' ) ); } function layout( $options ) { $post_types = apply_filters( 'neytri_layout_posts', array( 'post', 'page' ) ); $options[] = array( 'id' => '_neytri_layout_settings', 'title' => esc_html('Layout', 'neytri-pro'), 'post_type' => $post_types, 'context' => 'advanced', 'priority' => 'high', 'sections' => array( array( 'name' => 'layout_section', 'fields' => array( array( 'id' => 'layout', 'type' => 'image_select', 'title' => esc_html__('Sidebar Layout?', 'neytri-pro'), 'options' => array( 'global-sidebar-layout' => NEYTRI_PRO_DIR_URL . 'modules/sidebar/customizer/images/global-sidebar.png', 'content-full-width' => NEYTRI_PRO_DIR_URL . 'modules/sidebar/customizer/images/without-sidebar.png', 'with-left-sidebar' => NEYTRI_PRO_DIR_URL . 'modules/sidebar/customizer/images/left-sidebar.png', 'with-right-sidebar' => NEYTRI_PRO_DIR_URL . 'modules/sidebar/customizer/images/right-sidebar.png', ), 'default' => 'global-sidebar-layout', 'attributes' => array( 'data-depend-id' => 'page-layout' ) ), array( 'id' => 'sidebars', 'type' => 'select', 'title' => esc_html__('Select sidebar(s)?', 'neytri-pro'), 'class' => 'chosen', 'options' => $this->registered_widget_areas(), 'attributes' => array( 'multiple' => 'multiple', 'data-placeholder' => esc_html__('Select Widget Area(s)','neytri-pro'), 'style' => 'width: 400px;' ), 'dependency' => array( 'page-layout', 'any', 'with-left-sidebar,with-right-sidebar' ), ), array( 'id' => 'sticky_sidebar', 'type' => 'switcher', 'title' => esc_html__('Sticky Side Bar', 'neytri-pro' ), 'info' => esc_html__('YES! to sticky side bar content.','neytri-pro') ), ) ) ) ); return $options; } function registered_widget_areas() { $widgets = array (); $widgets['neytri-standard-sidebar-1'] = esc_html__( 'Standard Sidebar', 'neytri-pro' ); $widget_areas = get_option( 'neytri-widget-areas' ); if( $widget_areas ) { $widget_areas = $widget_areas['widget-areas']; if( is_array( $widget_areas ) && count( $widget_areas ) > 0 ) { foreach ( $widget_areas as $widget ){ $id = mb_convert_case($widget, MB_CASE_LOWER, "UTF-8"); $id = str_replace(" ", "", $id); $widgets[$id] = $widget; } return $widgets; } } return $widgets; } } } MetaboxSidebar::instance();