add_theme_support();
$this->add_image_size();
}
/**
* Add Image Size
* @return void
*/
private function add_image_size() {
$sizes = [
'wtbigshop-size1' => [ 1115, 560, true ],
'wtbigshop-size2' => [ 960, 520, true ],
'wtbigshop-size3' => [ 550, 375, true ],
];
$sizes = apply_filters( 'wtbigshop_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 );
}
public function rdtheme_edd_theme_updater(){
$theme_data = wp_get_theme( get_template() );
// Config settings
$config = array(
'remote_api_url' => 'https://www.radiustheme.com', // Site where EDD is hosted
'item_id' => '252855', // ID of item in site where EDD is hosted
'theme_slug' => '_rt_wtbigshop', // Theme slug
'version' => $theme_data->get( 'Version' ), // The current version of this theme
'author' => $theme_data->get( 'Author' ), // The author of this theme
'download_id' => '', // Optional, used for generating a license renewal link
'renew_url' => '' // Optional, allows for a custom license renewal link
);
// Strings
$strings = array(
'theme-license' => __( 'Theme License', 'bigshop' ),
'enter-key' => __( 'Enter your theme license key.', 'bigshop' ),
'license-key' => __( 'License Key', 'bigshop' ),
'license-action' => __( 'License Action', 'bigshop' ),
'deactivate-license' => __( 'Deactivate License', 'bigshop' ),
'activate-license' => __( 'Activate License', 'bigshop' ),
'status-unknown' => __( 'License status is unknown.', 'bigshop' ),
'renew' => __( 'Renew?', 'bigshop' ),
'unlimited' => __( 'unlimited', 'bigshop' ),
'license-key-is-active' => __( 'License key is active.', 'bigshop' ),
'expires%s' => __( 'Expires %s.', 'bigshop' ),
'%1$s/%2$-sites' => __( 'You have %1$s / %2$s sites activated.', 'bigshop' ),
'license-key-expired-%s' => __( 'License key expired %s.', 'bigshop' ),
'license-key-expired' => __( 'License key has expired.', 'bigshop' ),
'license-keys-do-not-match' => __( 'License keys do not match.', 'bigshop' ),
'license-is-inactive' => __( 'License is inactive.', 'bigshop' ),
'license-key-is-disabled' => __( 'License key is disabled.', 'bigshop' ),
'site-is-inactive' => __( 'Site is inactive.', 'bigshop' ),
'license-status-unknown' => __( 'License status is unknown.', 'bigshop' ),
'update-notice' => __( "Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.", 'bigshop' ),
'update-available' => __('%1$s %2$s is available. Check out what\'s new or update now.', 'bigshop' )
);
$updater = new ThemeUpdaterAdmin( $config, $strings );
}
}