Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
lynchestinegroup.com
/
wp-content
/
themes
/
koncrete
/
inc
/
Editing: rdtheme.php
<?php /** * @author RadiusTheme * @since 1.0 * @version 1.0 */ namespace radiustheme\Koncrete; use \Redux; use \ReduxFrameworkPlugin; class RDTheme { protected static $instance; // Sitewide static variables public static $options; // Template specific variables public static $layout; public static $sidebar; public static $has_top_bar; public static $top_bar_style; public static $header_style; public static $has_banner; public static $has_breadcrumb; public static $bgtype; public static $bgimg; public static $bgcolor; public static $transparent_header; public static $content_top_padding = 0; public static $content_bottom_padding = 0; public static $page_menu; public static $menu_button = 'default'; private function __construct() { add_action( 'after_setup_theme', array( $this, 'set_options' ) ); add_action( 'after_setup_theme', array( $this, 'set_redux_compability_options' ) ); $this->redux_init(); $this->layerslider_init(); } public static function instance() { if ( null == self::$instance ) { self::$instance = new self; } return self::$instance; } public function redux_init() { $options = Constants::$theme_options; add_action( 'admin_menu', array( $this, 'remove_redux_menu' ), 12 ); // Remove Redux Menu add_filter( "redux/{$options}/aURL_filter", '__return_empty_string' ); // Remove Redux Ads add_action( 'redux/loaded', array( $this, 'remove_redux_demo' ) ); // If Redux is running as a plugin, this will remove the demo notice and links } public function set_options(){ include Constants::$theme_inc_dir . 'redux-predefined-data.php'; $options = json_decode( $predefined_options, true ); if ( class_exists( 'Redux' ) && isset( $GLOBALS[Constants::$theme_options] ) ) { $options = wp_parse_args( $GLOBALS[Constants::$theme_options], $options ); } self::$options = $options; } public function remove_redux_menu() { remove_submenu_page( 'tools.php','redux-about' ); } public function remove_redux_demo() { if ( class_exists( 'ReduxFrameworkPlugin' ) ) { add_filter( 'plugin_row_meta', array( $this, 'redux_remove_extra_meta' ), 12, 2 ); remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) ); } } public function redux_remove_extra_meta( $links, $file ){ if ( strpos( $file, 'redux-framework.php' ) !== false ) { $links = array_slice( $links, 0, 3 ); } return $links; } public function layerslider_init() { if( function_exists( 'layerslider_set_as_theme' ) ) { layerslider_set_as_theme(); } if( function_exists( 'layerslider_hide_promotions' ) ) { layerslider_hide_promotions(); } // Add more skins if ( class_exists( '\LS_Sources' ) ) { \LS_Sources::addSkins( Constants::$theme_inc_dir. 'layerslider-skins/' ); } // Remove purchase notice from plugins page add_action( 'admin_init', function(){ if ( defined( 'LS_PLUGIN_BASE' ) ) { remove_action( 'after_plugin_row_' . LS_PLUGIN_BASE, 'layerslider_plugins_purchase_notice', 10, 3 ); } } ); } // Backward compability for newly added options public function default_layout_option_value( $prefix ) { return array( $prefix. '_layout' => 'right-sidebar', $prefix. '_sidebar' => 'sidebar', $prefix. '_top_bar' => 'default', $prefix. '_top_bar_style' => 'default', $prefix. '_transparent_header' => 'default', $prefix. '_header_style' => 'default', $prefix . '_menu_button' => 'default', $prefix . '_content_top_padding' => '100px', $prefix . '_content_bottom_padding' => '80px', $prefix. '_banner' => 'default', $prefix. '_breadcrumb' => 'default', $prefix. '_bgtype' => 'default', $prefix. '_bgimg' => '', $prefix. '_bgcolor' => '', ); } public function set_redux_compability_options(){ $new_options = array( 'search_icon' => true, 'cart_icon' => false, 'logo_image_max_height' => '40px', 'service_archive_title' => 'Archives: Services', 'project_archive_title' => 'Archives: Projects', 'team_archive_title' => 'Archives: Teams', 'service_page_title' => 'Services', 'project_page_title' => 'Projects', 'team_page_title' => 'Teams', 'icon_area_width' => '2', 'footer_column' => '4', // Menu button 'menu_button' => 'false', 'menu_button_text' => '', 'menu_button_url' => '', 'page_menu_button' => false, 'blog_menu_button' => false, 'single_post_menu_button' => false, 'search_menu_button' => false, 'error_menu_button' => false, 'project_archive_menu_button' => false, 'team_archive_menu_button' => false, 'service_archive_menu_button' => false, 'project_single_menu_button' => false, 'team_single_menu_button' => false, 'service_single_menu_button' => false, 'shop_menu_button' => false, 'product_menu_button' => false, 'phone_text' => 'Phone', 'office_time_text' => 'Opening Hours', 'email_text' => 'Mail Us', // WooCommerce 'wc_num_product' => 9, 'wc_wishlist_icon' => true, 'wc_quickview_icon' => true, 'wc_sec_product' => true, 'wc_show_excerpt' => true, 'wc_cats' => true, 'wc_tags' => true, 'wc_related' => true, 'wc_description' => true, 'wc_reviews' => true, 'wc_additional_info' => true, 'wc_sec_cart' => true, 'wc_cross_sell' => true, // testimonial 'testimony_list_title' => "All Testimonials", 'testimony_list_subtitle' => "Sorem Ipsum is simply dummy text of the rinting and typesetting industry aeorem Ipsum has been the industry standard dummy text ever sincer they Nullam", 'testimony_has_star' => "on", ); $testimony_archive_options = $this->default_layout_option_value('testimony_archive'); $new_options = $new_options + $testimony_archive_options; foreach ( $new_options as $key => $value ) { if ( !isset( self::$options[$key] ) ) { self::$options[$key] = $value; } } } } RDTheme::instance();
Save
Cancel