Sid Gifari File Manager
🏠 Root
/
home
/
ailwtbdh
/
lynchestinegroup.com
/
wp-content
/
plugins
/
koncrete-core_2
/
Editing: koncrete-core.php
<?php use radiustheme\Koncrete_Core\Constants; /* Plugin Name: Koncrete Core Plugin URI: https://www.radiustheme.com Description: Koncrete Core Plugin for Koncrete Theme Version: 1.5.5 Author: RadiusTheme Author URI: https://www.radiustheme.com */ if ( ! defined( 'ABSPATH' ) ) exit; if ( ! defined( 'KONCREATE_CORE' ) ) { define( 'KONCREATE_CORE', ( WP_DEBUG ) ? time() : '1.0' ); } class Koncrete_Core { public $plugin = 'koncrete-core'; public $action = 'koncrete_theme_init'; public $rt_dir; public function __construct() { $this->rt_dir = __DIR__; $this->includes(); $prefix = Constants::$theme_prefix; add_action( 'plugins_loaded', array( $this, 'load_textdomain' ), 15 ); add_action( 'plugins_loaded', array( $this, 'demo_importer' ), 15 ); add_action( 'after_setup_theme', array( $this, 'post_types' ), 15 ); add_action( 'after_setup_theme', array( $this, 'elementor_widgets' ) ); add_action( 'after_setup_theme', array( $this, 'fix_layerslider_tgm_compability' ) ); // Redux Flash permalink after options changed add_action( "redux/options/{$prefix}/saved", array( $this, 'flush_redux_saved' ), 10, 2 ); add_action( "redux/options/{$prefix}/section/reset", array( $this, 'flush_redux_reset' ) ); add_action( "redux/options/{$prefix}/reset", array( $this, 'flush_redux_reset' ) ); add_action( 'init', array( $this, 'rewrite_flush_check' ) ); } public function includes() { require $this->rt_dir . '/inc/constants.php'; require $this->rt_dir . '/koncrete-widget/init.php'; require $this->rt_dir . '/koncrete-templates/init.php'; require $this->rt_dir . '/inc/sidebar-generator.php'; require $this->rt_dir . '/inc/lib/wp-svg/init.php'; require $this->rt_dir . '/inc/socials.php'; } public function demo_importer() { require $this->rt_dir . '/inc/demo-importer.php'; } public function load_textdomain() { load_plugin_textdomain( $this->plugin , false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); } public function post_types(){ if ( !did_action( $this->action ) || ! defined( 'RT_FRAMEWORK_VERSION' ) ) { return; } require_once Constants::$plugin_inc_dir . 'post-types.php'; require_once Constants::$plugin_inc_dir . 'post-meta.php'; } public function elementor_widgets(){ if ( did_action( $this->action ) && did_action( 'elementor/loaded' ) ) { require_once 'elementor/init.php'; } } // Flush rewrites public function flush_redux_saved( $saved_options, $changed_options ){ if ( empty( $changed_options ) ) { return; } $prefix = Constants::$theme_prefix; $flush = false; $slugs = array( 'team_slug', 'project_slug' ); foreach ( $slugs as $slug ) { if ( array_key_exists( $slug, $changed_options ) ) { $flush = true; } } if ( $flush ) { update_option( "{$prefix}_rewrite_flash", true ); } } public function fix_layerslider_tgm_compability(){ if ( !is_admin() || !apply_filters( 'rdtheme_disable_layerslider_autoupdate', true ) || get_option( 'layerslider-authorized-site' ) ) return; global $LS_AutoUpdate; if ( isset( $LS_AutoUpdate ) && defined( 'LS_ROOT_FILE' ) ) { remove_filter( 'pre_set_site_transient_update_plugins', array( $LS_AutoUpdate, 'set_update_transient' ) ); remove_filter( 'plugins_api', array( $LS_AutoUpdate, 'set_updates_api_results'), 10, 3 ); remove_filter( 'upgrader_pre_download', array( $LS_AutoUpdate, 'pre_download_filter' ), 10, 4 ); remove_filter( 'in_plugin_update_message-'.plugin_basename( LS_ROOT_FILE ), array( $LS_AutoUpdate, 'update_message' ) ); remove_filter( 'wp_ajax_layerslider_authorize_site', array( $LS_AutoUpdate, 'handleActivation' ) ); remove_filter( 'wp_ajax_layerslider_deauthorize_site', array( $LS_AutoUpdate, 'handleDeactivation' ) ); } } public function flush_redux_reset(){ $prefix = Constants::$theme_prefix; update_option( "{$prefix}_rewrite_flash", true ); } public function rewrite_flush_check() { $prefix = Constants::$theme_prefix; if ( get_option( "{$prefix}_rewrite_flash" ) == true ) { flush_rewrite_rules(); update_option( "{$prefix}_rewrite_flash", false ); } } } function koncrete_core_admin_notice() { $msg = sprintf( esc_html__( 'Error: Your current PHP version is %1$s. You need at least PHP version 5.3+" to work. Please ask your hosting provider to upgrade your PHP version into 5.3+', 'koncrete-core' ), PHP_VERSION ); echo '<div class="error"><p>' . $msg . '</p></div>'; } if ( version_compare( PHP_VERSION, '5.6', '>=' ) ) { new Koncrete_Core; } else { add_action( 'admin_notices', 'koncrete_core_admin_notice' ); }
Save
Cancel