esc_html__( 'Primary', 'manta' ), 'header' => esc_html__( 'Header', 'manta' ), 'footer' => esc_html__( 'Footer', 'manta' ), ) ); /** * Filter custom background args. * * @since 1.0.0 */ $manta_custom_background_args = apply_filters( 'manta_custom_background_args', array( 'default-color' => 'f2f2f2', 'default-image' => '', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', $manta_custom_background_args ); /** * Filter custom logo args. * * @since 1.0.0 */ $manta_custom_logo_args = apply_filters( 'manta_custom_logo_args', array( 'flex-width' => true, 'flex-height' => true, 'width' => 56, 'height' => 56, ) ); // Set up the WordPress core custom logo feature. add_theme_support( 'custom-logo', $manta_custom_logo_args ); /** * Filter custom header args. * * @since 1.0.0 */ $manta_custom_header_args = apply_filters( 'manta_custom_header_args', array( 'default-image' => '', 'width' => 1680, 'height' => 440, 'flex-width' => false, 'flex-height' => true, 'header-text' => false, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ) ); // Set up the WordPress core custom header feature. add_theme_support( 'custom-header', $manta_custom_header_args ); /** * Filter support for manta theme specific features. * * @since 1.0.0 */ $manta_theme_support = apply_filters( 'manta_theme_support', array( 'schema', 'featured', 'fonticons' ) ); foreach ( $manta_theme_support as $support ) { // Custom addon support for manta theme. add_theme_support( "manta_{$support}" ); } $manta_dir = trailingslashit( get_template_directory() ); // Load theme specific functions files. require_once( "{$manta_dir}lib/functions/markup.php" ); require_once( "{$manta_dir}lib/functions/defaults.php" ); require_once( "{$manta_dir}lib/functions/inline-css.php" ); require_once( "{$manta_dir}lib/functions/backcompat.php" ); require_once( "{$manta_dir}lib/functions/template-tags.php" ); // Load theme specific classes files. require_once( "{$manta_dir}lib/classes/plugin-support.php" ); require_once( "{$manta_dir}lib/classes/display.php" ); require_once( "{$manta_dir}lib/classes/filters.php" ); require_once( "{$manta_dir}lib/classes/layouts.php" ); require_once( "{$manta_dir}lib/classes/recent-posts.php" ); // Load theme customizer files. require_once( "{$manta_dir}lib/customizer/active-callback.php" ); require_once( "{$manta_dir}lib/customizer/data.php" ); require_once( "{$manta_dir}lib/customizer/sanitization.php" ); require_once( "{$manta_dir}lib/customizer/front/front.php" ); require_once( "{$manta_dir}lib/customizer/front/front-css.php" ); require_once( "{$manta_dir}lib/customizer/front/front-php.php" ); require_once( "{$manta_dir}lib/customizer/refresh/selective-refresh.php" ); // Load theme features files. require_if_theme_supports( 'manta_schema' , "{$manta_dir}lib/addon/schema/schema.php" ); require_if_theme_supports( 'manta_featured' , "{$manta_dir}lib/addon/featured/featured-post.php" ); require_if_theme_supports( 'manta_fonticons' , "{$manta_dir}lib/addon/fonticons/svg-icons.php" ); // Load theme customizer initiation file at last. require_once( "{$manta_dir}lib/customizer/init.php" ); } add_action( 'after_setup_theme' , 'manta_setup', 5 ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * @since 1.0.0 * * @global int $content_width */ function manta_content_width() { $content_width = $GLOBALS['content_width']; /** * Filter content width of the theme. * * @since 1.0.0 * * @param $content_width integer */ $GLOBALS['content_width'] = apply_filters( 'manta_content_width', $content_width ); } add_action( 'template_redirect' , 'manta_content_width', 0 ); /** * Register widget area. * * @since 1.0.0 * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function manta_widgets_init() { $secondary_sidebar_text1 = esc_html__( 'Add widgets here to appear in your secondary sidebar.', 'manta' ); $secondary_sidebar_text2 = esc_html__( 'This is the secondary sidebar if you are using a three column site layout option. This widget area is not suitable to display every type of widget due to its narrow width.', 'manta' ); /** * Filter register widgets args. * * @since 1.0.0 */ $widgets = apply_filters( 'manta_register_sidebar', array( array( 'name' => esc_html__( 'Primary Sidebar', 'manta' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'This is the primary sidebar if you are using a two or three column site layout option.', 'manta' ), ), array( 'name' => esc_html__( 'Secondary Sidebar', 'manta' ), 'id' => 'sidebar-2', 'description' => is_active_sidebar( 'sidebar-1' ) ? $secondary_sidebar_text1 : $secondary_sidebar_text2, ), array( 'name' => esc_html__( 'Header', 'manta' ), 'id' => 'header', 'description' => esc_html__( 'The header widget appears next to your site title or logo. This widget area is not suitable to display every type of widget, and works best with a custom menu, search form, or text widget.', 'manta' ), ), array( 'name' => esc_html__( 'Footer Widget 1', 'manta' ), 'id' => 'footer-1', 'description' => '', ), array( 'name' => esc_html__( 'Footer Widget 2', 'manta' ), 'id' => 'footer-2', 'description' => '', ), array( 'name' => esc_html__( 'Footer Widget 3', 'manta' ), 'id' => 'footer-3', 'description' => '', ), array( 'name' => esc_html__( 'Footer Widget 4', 'manta' ), 'id' => 'footer-4', 'description' => '', ), array( 'name' => esc_html__( 'Footer Widget 5', 'manta' ), 'id' => 'footer-5', 'description' => '', ), ) ); $defaults = array( 'description' => esc_html__( 'Add widgets here.', 'manta' ), 'before_widget' => '
', 'before_title' => '