| Server IP : 38.190.208.107 / Your IP : 216.73.216.187 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/demo-content/ |
Upload File : |
<?php
/**
* @package The7
*/
defined( 'ABSPATH' ) || exit;
/**
* The core plugin class that is used to define internationalization,
* dashboard-specific hooks, and public-facing site hooks.
*/
require_once __DIR__ . '/class-the7-demo-content.php';
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 1.0.0
*/
function the7_demo_content() {
static $instance = null;
if ( null === $instance ) {
$instance = new The7_Demo_Content();
}
return $instance;
}
the7_demo_content();
/**
* @return array
*/
function the7_demo_get_quick_search_tags_list() {
$tags = [
'fse' => 'Block Editor (FSE)',
'elementor' => 'Elementor',
'wpbakery' => 'WPBakery',
'store' => 'Shop',
];
$demo_has_been_imported = false;
foreach ( the7_demo_content()->get_demos() as $demo ) {
if ( $demo->partially_imported() ) {
$demo_has_been_imported = true;
}
}
if ( $demo_has_been_imported ) {
$tags['imported'] = 'Imported';
}
return $tags;
}
/**
* Prevent default WC pages creation during demo install.
*
* @param array $pages WC pages definition array.
*
* @return array
*/
function the7_demo_prevent_default_wc_pages_creation( $pages ) {
if ( isset( $_GET['page'], $_POST['action'], $_POST['context'] ) && $_GET['page'] === 'the7-plugins' && $_POST['action'] === 'tgmpa-bulk-activate' && $_POST['context'] === 'demo_install' ) {
return [];
}
return $pages;
}
add_filter( 'woocommerce_create_pages', 'the7_demo_prevent_default_wc_pages_creation' );