setup_hooks(); } /** * Define hooks. * * @return void */ public function setup_hooks( ) { add_action( 'after_setup_theme', array( $this, 'colormag_setup' ) ); } /** * All theme setup functionalities. * * @since 1.0 */ function colormag_setup() { /** * Make theme available for translation. * Translations can be filed in the /languages/ directory. */ load_theme_textdomain( 'colormag', get_template_directory() . '/languages' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page. add_theme_support( 'post-thumbnails' ); // Registering navigation menu. register_nav_menus( array( 'primary' => esc_html__( 'Primary Menu', 'colormag' ), ) ); // Cropping the images to different sizes to be used in the theme. add_image_size( 'colormag-highlighted-post', 392, 272, true ); add_image_size( 'colormag-featured-post-medium', 390, 205, true ); add_image_size( 'colormag-featured-post-small', 130, 90, true ); add_image_size( 'colormag-featured-image', 800, 445, true ); // Pro required image sizes. add_image_size( 'colormag-default-news', 150, 150, true ); add_image_size( 'colormag-featured-image-large', 1400, 600, true ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'colormag_custom_background_args', array( 'default-color' => 'eaeaea', ) ) ); /** * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded