khaihihi
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* KeyDesign Theme Admin Panel
|
||||
* The KeyDesign_Admin_Dashboard base class
|
||||
*/
|
||||
|
||||
if( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
class KeyDesign_Admin_Dashboard extends KeyDesign_Admin_Page {
|
||||
|
||||
public function __construct() {
|
||||
|
||||
$this->id = 'ekko-dashboard';
|
||||
$this->page_title = 'Ekko Dashboard';
|
||||
$this->menu_title = 'Ekko';
|
||||
$this->position = '50';
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function display() {
|
||||
include_once( plugin_dir_path( __FILE__ ).'views/keydesign-dashboard.php' );
|
||||
}
|
||||
}
|
||||
new KeyDesign_Admin_Dashboard;
|
||||
148
wp-content/plugins/keydesign-addon/theme/admin/admin-init.php
Normal file
148
wp-content/plugins/keydesign-addon/theme/admin/admin-init.php
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
/**
|
||||
* KeyDesign Theme Admin Panel
|
||||
* Initiate the theme admin pages
|
||||
*/
|
||||
|
||||
if( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
class KeyDesign_Admin {
|
||||
public function __construct() {
|
||||
$this->add_action( 'init', 'init', 7 );
|
||||
$this->add_action( 'admin_menu', 'keydesign_dashboard_menu', 999 );
|
||||
$this->add_action( 'admin_bar_menu', 'keydesign_admin_bar', 999 );
|
||||
$this->add_action( 'redux/loaded', 'keydesign_remove_redux_demo' );
|
||||
$this->add_filter( 'tgmpa_admin_menu_args', 'keydesign_required_plugins_menu', 10, 1 );
|
||||
}
|
||||
|
||||
public function add_action( $hook, $function_to_add, $priority = 10, $accepted_args = 1 ) {
|
||||
add_action( $hook, array( &$this, $function_to_add ), $priority, $accepted_args );
|
||||
}
|
||||
|
||||
public function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
|
||||
add_filter( $tag, array( &$this, $function_to_add ), $priority, $accepted_args );
|
||||
}
|
||||
|
||||
public function init() {
|
||||
include_once ( plugin_dir_path( __FILE__ ).'admin-page.php' );
|
||||
include_once ( plugin_dir_path( __FILE__ ).'admin-dashboard.php' );
|
||||
}
|
||||
|
||||
public function keydesign_dashboard_menu() {
|
||||
|
||||
if ( !current_user_can( 'edit_theme_options' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
global $submenu;
|
||||
$submenu['ekko-dashboard'][0][0] = esc_html__( 'Dashboard', 'ekko' );
|
||||
|
||||
remove_submenu_page( 'tools.php', 'redux-about' );
|
||||
}
|
||||
|
||||
// Add TGMPA menu item in the Dashboard menu dropdown
|
||||
public function keydesign_required_plugins_menu($args) {
|
||||
$args['parent_slug'] = 'ekko-dashboard';
|
||||
return $args;
|
||||
}
|
||||
|
||||
public function keydesign_admin_bar( $wp_admin_bar ) {
|
||||
|
||||
if ( !current_user_can( 'edit_theme_options' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
//Add parent shortcut link
|
||||
$args = array(
|
||||
'id' => 'ekko-dashboard',
|
||||
'title' => 'Ekko',
|
||||
'href' => admin_url( 'admin.php?page=ekko-dashboard' ),
|
||||
'meta' => array(
|
||||
'class' => 'ekko-toolbar-page',
|
||||
'title' => 'ekko Options',
|
||||
)
|
||||
);
|
||||
$wp_admin_bar->add_node( $args );
|
||||
|
||||
//Add dashboard shortcut link
|
||||
$args = array(
|
||||
'id' => 'ekko-admin',
|
||||
'title' => 'Dashboard',
|
||||
'href' => admin_url( 'admin.php?page=ekko-dashboard' ),
|
||||
'parent' => 'ekko-dashboard',
|
||||
'meta' => array(
|
||||
'class' => 'ekko-dashboard',
|
||||
'title' => 'ekko Dashboard',
|
||||
),
|
||||
);
|
||||
$wp_admin_bar->add_node( $args );
|
||||
|
||||
//Add import-demos shortcut link
|
||||
$args = array(
|
||||
'id' => 'import-demos',
|
||||
'title' => 'Import Demos',
|
||||
'href' => admin_url( 'admin.php?page=import-demos' ),
|
||||
'parent' => 'ekko-dashboard',
|
||||
'meta' => array(
|
||||
'class' => 'import-demos',
|
||||
'title' => 'Import Demos',
|
||||
),
|
||||
);
|
||||
$wp_admin_bar->add_node( $args );
|
||||
|
||||
//Add theme-options shortcut link
|
||||
if( class_exists( 'ReduxFrameworkPlugin' ) ) {
|
||||
$args = array(
|
||||
'id' => 'ekko-theme-options',
|
||||
'title' => 'Theme Options',
|
||||
'href' => admin_url( 'admin.php?page=theme-options' ),
|
||||
'parent' => 'ekko-dashboard',
|
||||
'meta' => array(
|
||||
'class' => 'ekko-theme-options',
|
||||
'title' => 'Theme Options',
|
||||
),
|
||||
);
|
||||
$wp_admin_bar->add_node( $args );
|
||||
}
|
||||
|
||||
//Add install-required-plugins shortcut link
|
||||
$args = array(
|
||||
'id' => 'install-required-plugins',
|
||||
'title' => 'Install Plugins',
|
||||
'href' => admin_url( 'themes.php?page=install-required-plugins' ),
|
||||
'parent' => 'ekko-dashboard',
|
||||
'meta' => array(
|
||||
'class' => 'install-required-plugins',
|
||||
'title' => 'Install Plugins',
|
||||
),
|
||||
);
|
||||
$wp_admin_bar->add_node( $args );
|
||||
|
||||
//Add envato-market shortcut link
|
||||
if( class_exists( 'Envato_Market' ) ) {
|
||||
$args = array(
|
||||
'id' => 'ekko-envato-market',
|
||||
'title' => 'Envato Market',
|
||||
'href' => admin_url( 'admin.php?page=envato-market' ),
|
||||
'parent' => 'ekko-dashboard',
|
||||
'meta' => array(
|
||||
'class' => 'ekko-envato-market',
|
||||
'title' => 'Envato Market',
|
||||
),
|
||||
);
|
||||
$wp_admin_bar->add_node( $args );
|
||||
}
|
||||
}
|
||||
|
||||
public function display() {
|
||||
echo 'default';
|
||||
}
|
||||
|
||||
function keydesign_remove_redux_demo() {
|
||||
if ( class_exists( 'ReduxFramework' ) ) {
|
||||
remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::instance(), 'plugin_metalinks' ), null, 2);
|
||||
remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
new KeyDesign_Admin;
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* KeyDesign Theme Admin Panel
|
||||
* The KeyDesign_Admin_Page base class
|
||||
*/
|
||||
|
||||
if( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
class KeyDesign_Admin_Page extends KeyDesign_Admin {
|
||||
|
||||
public $parent = null;
|
||||
public $capability = 'manage_options';
|
||||
public $icon = 'dashicons-art';
|
||||
public $position;
|
||||
|
||||
public function __construct() {
|
||||
|
||||
$priority = -1;
|
||||
if ( isset( $this->parent ) && $this->parent ) {
|
||||
$priority = intval( $this->position );
|
||||
}
|
||||
$this->position = 2;
|
||||
$this->add_action( 'admin_menu', 'register_page', $priority );
|
||||
|
||||
if( !isset( $_GET['page'] ) || empty( $_GET['page'] ) || ! $this->id === $_GET['page'] ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if( method_exists( $this, 'save' ) ) {
|
||||
$this->add_action( 'admin_init', 'save' );
|
||||
}
|
||||
}
|
||||
|
||||
public function register_page() {
|
||||
|
||||
if( ! $this->parent ) {
|
||||
add_menu_page(
|
||||
$this->page_title,
|
||||
$this->menu_title,
|
||||
$this->capability,
|
||||
$this->id,
|
||||
array( $this, 'display' ),
|
||||
'dashicons-welcome-widgets-menus',
|
||||
$this->position
|
||||
);
|
||||
}
|
||||
else {
|
||||
add_submenu_page(
|
||||
$this->parent,
|
||||
$this->page_title,
|
||||
$this->menu_title,
|
||||
$this->capability,
|
||||
$this->id,
|
||||
array( $this, 'display' )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function display() {
|
||||
echo 'default';
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"blog-sidebar":{"search-2":{"title":""},"categories-2":{"title":"","count":0,"hierarchical":0,"dropdown":0},"tag_cloud-1":{"title":"","count":0,"taxonomy":"post_tag"},"redux-social-icons-display-1":{"title":"Social"}},"shop-sidebar":{"woocommerce_product_search-1":{"title":"Search Products"},"woocommerce_product_categories-1":{"title":"Product categories","orderby":"name","dropdown":0,"count":0,"hierarchical":1,"show_children_only":0,"hide_empty":0,"max_depth":""},"woocommerce_price_filter-1":{"title":"Filter by price"},"woocommerce_product_tag_cloud-1":{"title":"Product tags"},"woocommerce_top_rated_products-1":{"title":"Top rated products","number":5}},"page-sidebar":{"search-3":{"title":"Search site"},"nav_menu-1":{"title":"Navigation","nav_menu":50},"categories-3":{"title":"","count":0,"hierarchical":0,"dropdown":0},"tag_cloud-2":{"title":"Tags","count":0,"taxonomy":"post_tag"},"text-1":{"title":"About us","text":"Our theme will take your workflow to all-new levels of high productivity. We know you\u2019ll find everything you need \u2013 and more!","filter":true,"visual":true},"redux-social-icons-display-2":{"title":"Social"},"text-2":{"title":"Subscribe to newsletter","text":"[contact-form-7 id=\"4151\" title=\"Subscribe Form\"]","filter":true,"visual":true}},"footer-first-widget-area":{"nav_menu-2":{"title":"About","nav_menu":49}},"footer-second-widget-area":{"nav_menu-3":{"title":"Additional links","nav_menu":50}},"footer-third-widget-area":{"categories-4":{"title":"Categories","count":0,"hierarchical":0,"dropdown":0}},"footer-fourth-widget-area":{"text-3":{"title":"Ekko","text":"Making a positive first impression is essential to developing a strong customer relationship. Ekko is powerful enough to assist any small businesses.","filter":true,"visual":true}}}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user