Copied over full independent_publisher_setup() code to avoid error

This commit is contained in:
Hippo 2019-08-04 14:26:10 +05:30
parent e47590b7bb
commit 1493d32a8b
1 changed files with 109 additions and 0 deletions

View File

@ -145,9 +145,118 @@ function independent_publisher_posted_author_card() {
}
function independent_publisher_setup() {
/**
* Custom template tags for this theme.
*/
require( get_template_directory() . '/inc/template-tags.php' );
/**
* Customizer additions.
*/
require( get_template_directory() . '/inc/customizer.php' );
/**
* Load support for Microformats 2
*
* @since 1.7.5
*/
require( get_template_directory() . '/inc/mf2.php' );
/**
* Make theme available for translation
* Translations can be filed in the /languages/ directory
*/
load_theme_textdomain( 'independent-publisher', get_template_directory() . '/languages' );
/**
* Add default posts and comments RSS feed links to head
*/
add_theme_support( 'automatic-feed-links' );
/**
* Enable Custom Backgrounds
*/
add_theme_support(
'custom-background', apply_filters(
'independent_publisher_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
)
)
);
// Enable support for HTML5 markup.
add_theme_support(
'html5', array(
'comment-list',
'search-form',
'comment-form',
'gallery',
)
);
/**
* Enable Post Thumbnails
*/
add_theme_support( 'post-thumbnails' );
/*
* Add custom thumbnail size for use with featured images
*/
add_image_size( 'independent_publisher_post_thumbnail', 700, 700 );
/**
* Enable editor style
*/
add_editor_style();
/**
* Set max width of full screen visual editor to match content width
*/
set_user_setting( 'dfw_width', 700 );
/**
* Set default value for Show Post Word Count theme option
*/
add_option( 'independent_publisher_general_options', array( 'show_post_word_count' => true ) );
/**
* Set default value for Show Author Card theme option
*/
add_option( 'independent_publisher_general_options', array( 'show_author_card' => true ) );
/**
* Set default value for Show Post Thumbnails theme option
*/
add_option( 'independent_publisher_excerpt_options', array( 'show_post_thumbnails' => false ) );
/**
* This theme uses wp_nav_menu() in two locations.
*/
register_nav_menus(
array(
'primary' => __( 'Primary Menu', 'independent-publisher' ),
'single' => __( 'Single Posts Menu', 'independent-publisher' ),
'social' => __( 'Social', 'independent-publisher' ),
'topbar' => __( 'Topbar Menu', 'independent-snipette' ),
)
);
/**
* Add support for the Aside Post Formats
*/
add_theme_support(
'post-formats', array(
'aside',
'link',
'gallery',
'status',
'quote',
'chat',
'image',
'video',
'audio'
)
);
}