D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
homehopshortterm
/
public_html
/
wp-content
/
plugins
/
pixwell-core
/
Filename :
pixwell-core.php
back
Copy
<?php /** * Plugin Name: Pixwell Core * Plugin URI: https://themeforest.net/user/theme-ruby/ * Description: Features for Pixwell, this is the required plugin (important) for this theme. * Version: 10.7 * Requires at least: 6.1 * Requires PHP: 5.6 * Text Domain: pixwell-core * Domain Path: /languages/ * Author: Theme-Ruby * Author URI: https://themeforest.net/user/theme-ruby/ * * @package pixwell-core */ defined( 'ABSPATH' ) || exit; define( 'PIXWELL_CORE_VERSION', '10.7' ); define( 'PIXWELL_CORE_URL', plugin_dir_url( __FILE__ ) ); define( 'PIXWELL_CORE_PATH', plugin_dir_path( __FILE__ ) ); if ( ! function_exists( 'is_plugin_active' ) ) { include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); } if ( ! is_plugin_active( 'redux-framework/redux-framework.php' ) ) { include_once PIXWELL_CORE_PATH . 'lib/redux-framework/framework.php'; } include_once PIXWELL_CORE_PATH . 'includes/core.php'; if ( ! class_exists( 'Ruby_GTM_Integration' ) ) { include_once PIXWELL_CORE_PATH . 'lib/simple-gtm-ga4/simple-gtm-ga4.php'; } if ( ! class_exists( 'Pixwell_Post_Elements' ) ) { include_once PIXWELL_CORE_PATH . 'lib/pixwell-elements/pixwell-elements.php'; } if ( is_plugin_active( 'elementor/elementor.php' ) ) { include_once PIXWELL_CORE_PATH . 'elementor/base.php'; } include_once PIXWELL_CORE_PATH . 'lib/taxonomy-meta.php'; include_once PIXWELL_CORE_PATH . 'lib/rb-meta/rb-meta.php'; include_once PIXWELL_CORE_PATH . 'includes/amp.php'; include_once PIXWELL_CORE_PATH . 'composer/setup.php'; include_once PIXWELL_CORE_PATH . 'rb-gallery/rb-gallery.php'; include_once PIXWELL_CORE_PATH . 'rb-portfolio/rb-portfolio.php'; include_once PIXWELL_CORE_PATH . 'amp/helpers.php'; include_once PIXWELL_CORE_PATH . 'includes/reaction.php'; include_once PIXWELL_CORE_PATH . 'includes/info.php'; include_once PIXWELL_CORE_PATH . 'includes/actions.php'; include_once PIXWELL_CORE_PATH . 'includes/seo.php'; include_once PIXWELL_CORE_PATH . 'includes/advertising.php'; include_once PIXWELL_CORE_PATH . 'includes/social.php'; include_once PIXWELL_CORE_PATH . 'includes/newsletter.php'; include_once PIXWELL_CORE_PATH . 'includes/share.php'; include_once PIXWELL_CORE_PATH . 'includes/bookmark.php'; include_once PIXWELL_CORE_PATH . 'includes/extras.php'; include_once PIXWELL_CORE_PATH . 'includes/shortcodes.php'; include_once PIXWELL_CORE_PATH . 'includes/table-contents.php'; include_once PIXWELL_CORE_PATH . 'membership/membership.php'; include_once PIXWELL_CORE_PATH . 'e-template/init.php'; include_once PIXWELL_CORE_PATH . 'widgets/advertising.php'; include_once PIXWELL_CORE_PATH . 'widgets/fw-instagram.php'; include_once PIXWELL_CORE_PATH . 'widgets/fw-instagram.php'; include_once PIXWELL_CORE_PATH . 'widgets/sb-facebook.php'; include_once PIXWELL_CORE_PATH . 'widgets/sb-flickr.php'; include_once PIXWELL_CORE_PATH . 'widgets/sb-follower.php'; include_once PIXWELL_CORE_PATH . 'widgets/sb-instagram.php'; include_once PIXWELL_CORE_PATH . 'widgets/sb-social-icon.php'; include_once PIXWELL_CORE_PATH . 'widgets/sb-address.php'; include_once PIXWELL_CORE_PATH . 'widgets/sb-youtube.php'; include_once PIXWELL_CORE_PATH . 'widgets/sb-post.php'; include_once PIXWELL_CORE_PATH . 'widgets/newsletter.php'; include_once PIXWELL_CORE_PATH . 'widgets/banner.php'; include_once PIXWELL_CORE_PATH . 'widgets/header-strip.php'; include_once PIXWELL_CORE_PATH . 'widgets/fw-mc.php'; add_action( 'init', 'pixwell_core_language', 10 ); add_action( 'init', 'pixwell_register_shortcodes', 99 ); add_action( 'init', [ 'Pixwell_Table_Contents', 'get_instance' ] ); add_action( 'admin_init', [ 'Ruby_RW_Taxonomy_Meta', 'get_instance' ], 1 ); if ( is_plugin_active( 'simple-membership/simple-wp-membership.php' ) ) { add_action( 'init', [ 'Pixwell_Membership', 'get_instance' ] ); } add_action( 'admin_enqueue_scripts', 'pixwell_core_admin_enqueue', 10 ); add_action( 'wp_enqueue_scripts', 'pixwell_core_enqueue', 1 ); add_action( 'widgets_init', 'pixwell_register_widgets' ); add_action( 'wp_footer', 'pixwell_enqueue_shortcode', 1 ); /** load translate */ if ( ! function_exists( 'pixwell_core_language' ) ) { function pixwell_core_language() { $loaded = load_plugin_textdomain( 'pixwell-core', false, PIXWELL_CORE_PATH . 'languages/' ); if ( ! $loaded ) { $locale = apply_filters( 'plugin_locale', get_locale(), 'pixwell-core' ); $mofile = PIXWELL_CORE_PATH . 'languages/pixwell-core-' . $locale . '.mo'; load_textdomain( 'pixwell-core', $mofile ); } } } /** enqueue script */ if ( ! function_exists( 'pixwell_core_enqueue' ) ) { function pixwell_core_enqueue() { if ( pixwell_is_amp() ) { return false; } wp_register_style( 'pixwell-shortcode', false, [], PIXWELL_CORE_VERSION, 'all' ); wp_register_script( 'imagesloaded', PIXWELL_CORE_URL . 'assets/imagesloaded.min.js', [ 'jquery' ], '4.1.4', true ); wp_register_script( 'jquery-isotope', PIXWELL_CORE_URL . 'assets/jquery.isotope.min.js', [ 'jquery' ], '3.0.6', true ); wp_register_script( 'jquery-magnific-popup', PIXWELL_CORE_URL . 'assets/jquery.mp.min.js', [ 'jquery' ], '1.1.0', true ); wp_register_script( 'rbcookie', PIXWELL_CORE_URL . 'assets/rbcookie.min.js', [ 'jquery' ], '1.0.3', true ); wp_enqueue_script( 'pixwell-core-script', PIXWELL_CORE_URL . 'assets/core.js', [ 'jquery', 'imagesloaded', 'jquery-isotope', 'rbcookie', 'jquery-magnific-popup', ], PIXWELL_CORE_VERSION, true ); $js_params = [ 'ajaxurl' => admin_url( 'admin-ajax.php' ) ]; $js_params['darkModeID'] = pixwell_get_dark_mode_id(); wp_localize_script( 'pixwell-core-script', 'pixwellCoreParams', $js_params ); } } if ( ! function_exists( 'pixwell_enqueue_shortcode' ) ) { function pixwell_enqueue_shortcode() { wp_enqueue_style( 'pixwell-shortcode' ); } } if ( ! function_exists( 'pixwell_core_admin_enqueue' ) ) { function pixwell_core_admin_enqueue( $hook ) { if ( $hook == 'widgets.php' ) { wp_enqueue_media(); wp_enqueue_style( 'wp-color-picker' ); wp_register_script( 'pixwell-core-admin', PIXWELL_CORE_URL . 'assets/admin.js', [ 'jquery' ], PIXWELL_CORE_VERSION, true ); wp_enqueue_script( 'pixwell-core-admin' ); } } } /** register widgets */ if ( ! function_exists( 'pixwell_register_widgets' ) ) { function pixwell_register_widgets() { register_widget( 'pixwell_widget_youtube_subscribe' ); register_widget( 'pixwell_widget_facebook' ); register_widget( 'pixwell_widget_social_icon' ); register_widget( 'pixwell_widget_sb_instagram' ); register_widget( 'pixwell_widget_sb_flickr' ); register_widget( 'pixwell_widget_sb_post' ); register_widget( 'pixwell_widget_advertising' ); register_widget( 'pixwell_widget_follower' ); register_widget( 'pixwell_widget_newsletter' ); register_widget( 'pixwell_widget_banner' ); register_widget( 'pixwell_widget_header_strip' ); register_widget( 'pixwell_widget_address' ); register_widget( 'pixwell_widget_fw_instagram' ); register_widget( 'pixwell_widget_mc' ); } }