<?php
* _mbbasetheme theme init setup
*
* @package _mbbasetheme
*/
* Set the content width based on the theme's design and stylesheet.
*/
if ( ! isset( $content_width ) ) {
$content_width = 900;
}
if ( ! function_exists( '_mbbasetheme_setup' ) ) :
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*/
function _mbbasetheme_setup() {
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on _mbbasetheme, use a find and replace
* to change '_mbbasetheme' to the name of your theme in all the template files
*/
load_theme_textdomain( '_mbbasetheme', get_template_directory() . '/languages' );
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'wp_shortlink_wp_head' );
add_theme_support( 'automatic-feed-links' );
register_nav_menus( array(
'primary' => __( 'Primary Menu', '_mbbasetheme' ),
) );
add_action( 'widgets_init', 'mb_widgets_init' );
add_editor_style();
if ( ! defined( 'DISALLOW_FILE_EDIT' ) ) {
define( 'DISALLOW_FILE_EDIT', true );
}
add_theme_support( 'post-thumbnails' );
add_theme_support( 'custom-background', apply_filters( '_mbbasetheme_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
add_action( 'wp_dashboard_setup', 'mb_remove_dashboard_widgets' );
add_filter( 'custom_menu_order', '__return_true' );
add_filter( 'menu_order', 'mb_custom_menu_order' );
add_action( 'admin_menu', 'mb_remove_menu_pages' );
add_action( 'admin_init', 'mb_imagelink_setup', 10 );
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
) );
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link',
) );
add_action( 'wp_enqueue_scripts', 'mb_scripts' );
add_filter( 'script_loader_src', 'mb_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', 'mb_remove_script_version', 15, 1 );
add_filter( 'the_content_more_link', 'mb_remove_more_jump_link' );
}
endif;
add_action( 'after_setup_theme', '_mbbasetheme_setup' );