add_theme_support(); $this->add_image_size(); } /** * Add Image Size * @return void */ private function add_image_size() { $sizes = [ 'bigshop-size1' => [ 1115, 560, true ], 'bigshop-size2' => [ 960, 520, true ], 'bigshop-size3' => [ 550, 375, true ], ]; $sizes = apply_filters( 'bigshop_image_size', $sizes ); foreach ( $sizes as $size => $value ) { add_image_size( $size, $value[0], $value[1], $value[2] ); } } /** * Add Theme Support * @return void */ private function add_theme_support() { /* * Default Theme Support options better have */ add_theme_support( 'automatic-feed-links' ); add_theme_support( 'title-tag' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'customize-selective-refresh-widgets' ); add_theme_support( 'align-wide' ); add_theme_support( 'html5', [ 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' ] ); add_theme_support( 'wp-block-styles' ); add_theme_support( 'editor-styles' ); add_theme_support( 'custom-logo' ); add_theme_support( "custom-header" ); add_theme_support( "custom-background" ); remove_theme_support('widgets-block-editor'); /** * Add woocommerce support and woocommerce override */ /* * Activate Post formats if you need */ add_theme_support( 'post-formats', [ 'aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat', ] ); } /* Define a max content width to allow WordPress to properly resize your images */ public function content_width() { $GLOBALS['content_width'] = apply_filters( 'content_width', 1440 ); } }