| Server IP : 38.190.208.107 / Your IP : 216.73.217.1 Web Server : nginx/1.28.1 System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64 User : root ( 0) PHP Version : 8.2.28 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/wp.9/wp-content/themes/dt-the7/inc/mods/bundled-content/ |
Upload File : |
<?php
/**
* @package The7
*/
namespace The7\Mods\Bundled_Content;
defined( 'ABSPATH' ) || exit;
/**
* WPB class.
*/
class WPB extends Abstract_Bundled_Plugin {
/**
* @var string
*/
protected static $field_prefix = 'wpb_js_';
/**
* @return void
*/
public function activate_plugin() {
if ( $this->is_activated_plugin() ) {
return;
}
if ( ! defined( 'JS_COMPOSER_THE7' ) && ! $this->is_bundled_plugin( 'js_composer' ) ) {
$this->deactivate_plugin();
return;
}
$this->disable_composer_notification();
if ( $this->is_activated_by_theme() ) {
add_filter( 'vc_page-welcome-slugs-list', [ $this, 'the7_vc_page_welcome_slugs_list' ], 30 );
return;
}
update_site_option( self::$field_prefix . 'the7_js_composer_purchase_code', presscore_get_purchase_code() );
}
/**
* @return void
*/
public function deactivate_plugin() {
$this->disable_composer_notification();
if ( $this->is_activated_by_theme() ) {
update_site_option( self::$field_prefix . 'the7_js_composer_purchase_code', '' );
}
}
/**
* @return bool
*/
public function is_activated_plugin() {
return (bool) get_site_option( self::$field_prefix . 'js_composer_purchase_code' );
}
/**
* @return bool
*/
public function is_active() {
return the7_wpb_is_active();
}
/**
* @return string|false
*/
public function get_bundled_plugin_code() {
return get_site_option( self::$field_prefix . 'the7_js_composer_purchase_code', '' );
}
/**
* @return void
*/
private function disable_composer_notification() {
if ( ! function_exists( 'vc_manager' ) ) {
return;
}
if ( version_compare( WPB_VC_VERSION, '5.5.4', '>' ) ) {
return;
}
if ( ! $this->is_activated_plugin() && $this->is_activated_by_theme() ) {
// Disable updater.
vc_manager()->disableUpdater();
}
}
/**
* @param array $dashboard_array Dashboard elements.
*
* @return array
*/
public function the7_vc_page_welcome_slugs_list( $dashboard_array ) {
foreach ( [ 'vc-resources' ] as $element ) {
unset( $dashboard_array[ $element ] );
}
return $dashboard_array;
}
}