本文整理汇总了PHP中load_theme_textdomain函数的典型用法代码示例。如果您正苦于以下问题:PHP load_theme_textdomain函数的具体用法?PHP load_theme_textdomain怎么用?PHP load_theme_textdomain使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了load_theme_textdomain函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lwfitness_setup
function lwfitness_setup()
{
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
*/
load_theme_textdomain('lwfitness', get_template_directory() . '/languages');
// Add default posts and comments RSS feed links to head.
add_theme_support('automatic-feed-links');
/*
* Let WordPress manage the document title.
*/
add_theme_support('title-tag');
/*
* Enable support for Post Thumbnails on posts and pages.
*/
add_theme_support('post-thumbnails');
set_post_thumbnail_size(825, 510, true);
// Add menus.
register_nav_menus(array('primary' => __('Primary Menu', 'lwfitness'), 'social' => __('Social Links Menu', 'lwfitness')));
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
/*
* Enable support for Post Formats.
*/
add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'));
}
示例2: twentyeleven_setup
/**
* Set 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 post thumbnails.
*
* To override twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's
* functions.php file.
*
* @uses load_theme_textdomain() For translation/localization support.
* @uses add_editor_style() To style the visual editor.
* @uses add_theme_support() To add support for post thumbnails, automatic feed links, custom headers
* and backgrounds, and post formats.
* @uses register_nav_menus() To add support for navigation menus.
* @uses register_default_headers() To register the default custom header images provided with the theme.
* @uses set_post_thumbnail_size() To set a custom post thumbnail size.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_setup()
{
/*
* Make Twenty Eleven available for translation.
* Translations can be added to the /languages/ directory.
* If you're building a theme based on Twenty Eleven, use
* a find and replace to change 'twentyeleven' to the name
* of your theme in all the template files.
*/
load_theme_textdomain('twentyeleven', get_template_directory() . '/languages');
// This theme styles the visual editor with editor-style.css to match the theme style.
add_editor_style();
// Load up our theme options page and related code.
require get_template_directory() . '/inc/theme-options.php';
// Grab Twenty Eleven's Ephemera widget.
require get_template_directory() . '/inc/widgets.php';
// Add default posts and comments RSS feed links to <head>.
add_theme_support('automatic-feed-links');
// This theme uses wp_nav_menu() in one location.
register_nav_menu('primary', __('Primary Menu', 'twentyeleven'));
// Add support for a variety of post formats
add_theme_support('post-formats', array('aside', 'link', 'gallery', 'status', 'quote', 'image'));
$theme_options = twentyeleven_get_theme_options();
if ('dark' == $theme_options['color_scheme']) {
$default_background_color = '1d1d1d';
} else {
$default_background_color = 'e2e2e2';
}
// Add support for custom backgrounds.
add_theme_support('custom-background', array('default-color' => $default_background_color));
// This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images
add_theme_support('post-thumbnails');
// Add support for custom headers.
$custom_header_support = array('default-text-color' => '000', 'width' => apply_filters('twentyeleven_header_image_width', 1000), 'height' => apply_filters('twentyeleven_header_image_height', 288), 'flex-height' => true, 'random-default' => true, 'wp-head-callback' => 'twentyeleven_header_style', 'admin-head-callback' => 'twentyeleven_admin_header_style', 'admin-preview-callback' => 'twentyeleven_admin_header_image');
add_theme_support('custom-header', $custom_header_support);
if (!function_exists('get_custom_header')) {
// This is all for compatibility with versions of WordPress prior to 3.4.
define('HEADER_TEXTCOLOR', $custom_header_support['default-text-color']);
define('HEADER_IMAGE', '');
define('HEADER_IMAGE_WIDTH', $custom_header_support['width']);
define('HEADER_IMAGE_HEIGHT', $custom_header_support['height']);
add_custom_image_header($custom_header_support['wp-head-callback'], $custom_header_support['admin-head-callback'], $custom_header_support['admin-preview-callback']);
add_custom_background();
}
/*
* We'll be using post thumbnails for custom header images on posts and pages.
* We want them to be the size of the header image that we just defined.
* Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
*/
set_post_thumbnail_size($custom_header_support['width'], $custom_header_support['height'], true);
/*
* Add Twenty Eleven's custom image sizes.
* Used for large feature (header) images.
*/
add_image_size('large-feature', $custom_header_support['width'], $custom_header_support['height'], true);
// Used for featured posts if a large-feature doesn't exist.
add_image_size('small-feature', 500, 300);
// Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
register_default_headers(array('wheel' => array('url' => '%s/images/headers/wheel.jpg', 'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg', 'description' => __('Wheel', 'twentyeleven')), 'shore' => array('url' => '%s/images/headers/shore.jpg', 'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg', 'description' => __('Shore', 'twentyeleven')), 'trolley' => array('url' => '%s/images/headers/trolley.jpg', 'thumbnail_url' => '%s/images/headers/trolley-thumbnail.jpg', 'description' => __('Trolley', 'twentyeleven')), 'pine-cone' => array('url' => '%s/images/headers/pine-cone.jpg', 'thumbnail_url' => '%s/images/headers/pine-cone-thumbnail.jpg', 'description' => __('Pine Cone', 'twentyeleven')), 'chessboard' => array('url' => '%s/images/headers/chessboard.jpg', 'thumbnail_url' => '%s/images/headers/chessboard-thumbnail.jpg', 'description' => __('Chessboard', 'twentyeleven')), 'lanterns' => array('url' => '%s/images/headers/lanterns.jpg', 'thumbnail_url' => '%s/images/headers/lanterns-thumbnail.jpg', 'description' => __('Lanterns', 'twentyeleven')), 'willow' => array('url' => '%s/images/headers/willow.jpg', 'thumbnail_url' => '%s/images/headers/willow-thumbnail.jpg', 'description' => __('Willow', 'twentyeleven')), 'hanoi' => array('url' => '%s/images/headers/hanoi.jpg', 'thumbnail_url' => '%s/images/headers/hanoi-thumbnail.jpg', 'description' => __('Hanoi Plant', 'twentyeleven'))));
}
示例3: activello_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 activello_setup()
{
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
*/
load_theme_textdomain('activello', get_template_directory() . '/languages');
// Add default posts and comments RSS feed links to head.
add_theme_support('automatic-feed-links');
/**
* Enable support for Post Thumbnails on posts and pages.
*
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support('post-thumbnails');
add_image_size('activello-featured', 1170, 550, true);
add_image_size('activello-slider', 1920, 550, true);
add_image_size('activello-thumbnail', 330, 220, true);
add_image_size('activello-medium', 640, 480, true);
// This theme uses wp_nav_menu() in one location.
register_nav_menus(array('primary' => esc_html__('Primary Menu', 'activello')));
// Enable support for Post Formats.
add_theme_support('post-formats', array('video', 'audio'));
// Setup the WordPress core custom background feature.
add_theme_support('custom-background', apply_filters('activello_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', 'caption'));
/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support('title-tag');
}
示例4: bavotasan_setup
/**
* Initial setup
*
* This function is attached to the 'after_setup_theme' action hook.
*
* @uses load_theme_textdomain()
* @uses get_locale()
* @uses BAVOTASAN_THEME_TEMPLATE
* @uses add_theme_support()
* @uses add_editor_style()
* @uses add_custom_background()
* @uses add_custom_image_header()
* @uses register_default_headers()
*
* @since 1.0.0
*/
function bavotasan_setup()
{
load_theme_textdomain('arcade', BAVOTASAN_THEME_TEMPLATE . '/library/languages');
// Add default posts and comments RSS feed links to <head>.
add_theme_support('automatic-feed-links');
// This theme styles the visual editor with editor-style.css to match the theme style.
add_editor_style('library/css/admin/editor-style.css');
// This theme uses wp_nav_menu() in two location.
register_nav_menu('primary', __('Primary Menu', 'arcade'));
// Add support for a variety of post formats
add_theme_support('post-formats', array('gallery', 'image', 'video', 'audio', 'quote', 'link', 'status', 'aside'));
// This theme uses Featured Images (also known as post thumbnails) for archive pages
add_theme_support('post-thumbnails');
add_image_size('half', 570, 220, true);
add_image_size('square100', 100, 100, true);
// Add a filter to bavotasan_header_image_width and bavotasan_header_image_height to change the width and height of your custom header.
add_theme_support('custom-header', array('header-text' => false, 'flex-height' => true, 'flex-width' => true, 'random-default' => true, 'width' => apply_filters('bavotasan_header_image_width', 1800), 'height' => apply_filters('bavotasan_header_image_height', 1200)));
// Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
register_default_headers(array('header01' => array('url' => '%s/library/images/header01.jpg', 'thumbnail_url' => '%s/library/images/header01-thumbnail.jpg', 'description' => __('Default Header 1', 'arcade'))));
// Add support for custom backgrounds
add_theme_support('custom-background');
// Add HTML5 elements
add_theme_support('html5', array('comment-list', 'comment-form'));
// Add title tag support
add_theme_support('title-tag');
// Remove default gallery styles
add_filter('use_default_gallery_style', '__return_false');
// Infinite scroll
add_theme_support('infinite-scroll', array('type' => 'scroll', 'container' => 'primary', 'wrapper' => false, 'footer' => false));
// Add Woocommerce support
add_theme_support('woocommerce');
}
示例5: exclusive_setup
function exclusive_setup()
{
add_theme_support('custom-header', array('default-image' => '', 'header-text' => false, 'wp-head-callback' => 'exclusive_header_style'));
$exclusive_defaults = array('default-color' => 'E3E1E2', 'default-image' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '');
add_theme_support('custom-background', $exclusive_defaults);
if (!get_theme_mod('background_color', false)) {
set_theme_mod('background_color', 'e3e1e2');
}
load_theme_textdomain('wd_exclusive', get_template_directory() . '/languages');
add_editor_style();
global $exclusive_layout_page;
foreach ($exclusive_layout_page->options_themeoptions as $value) {
if (isset($value['id'])) {
if (get_theme_mod($value['id']) === FALSE) {
${$value}['var_name'] = $value['std'];
} else {
${$value}['var_name'] = get_theme_mod($value['id']);
}
}
}
global $content_width;
if (!isset($content_width)) {
$content_width = $content_area;
}
}
示例6: actions_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 actions_setup()
{
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on actions, use a find and replace
* to change 'actions' to the name of your theme in all the template files.
*/
load_theme_textdomain('actions');
/**
* Add default posts and comments RSS feed links to head.
*/
add_theme_support('automatic-feed-links');
add_theme_support('customize-selective-refresh-widgets');
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support('post-thumbnails');
set_post_thumbnail_size(640, 300);
// This theme uses wp_nav_menu() in one locations.
register_nav_menus(array('primary' => esc_html__('Primary Menu', 'actions')));
/*
* Switch default core markup for search form, comment form, comments, galleries, captions and widgets
* to output valid HTML5.
*/
add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption', 'widgets'));
/*
* Enable support for site logo.
*/
add_theme_support('custom-logo', array('height' => 150, 'width' => 250, 'flex-height' => true, 'header-text' => array('site-title', 'site-description')));
// Declare support for title theme feature
add_theme_support('title-tag');
}
示例7: wp_grade_start
function wp_grade_start()
{
//load the translations
load_theme_textdomain(wpGrade_txtd, get_template_directory() . '/library/languages');
// clean the head
add_action('init', 'wpgrade_head_cleanup');
// no Wordpress version in the RSS feed
add_filter('the_generator', 'wpgrade_rss_version');
// remove inline css for the recent comments widget
add_filter('wp_head', 'wpgrade_remove_recent_comments_widget_style', 1);
// clean up comment styles in the head
add_action('wp_head', 'wpgrade_remove_recent_comments_style', 1);
// clean up gallery output - remove the inline css
add_filter('gallery_style', 'wpgrade_gallery_style');
// enqueue base scripts and styles
add_action('wp_enqueue_scripts', 'wpgrade_scripts_and_styles', 1);
// custom javascript
add_action('wp_head', 'wpgrade_load_custom_js');
// Register theme Features
add_action('after_setup_theme', 'custom_theme_features');
// cleaning up <p>s around images
add_filter('the_content', 'wpgrade_filter_ptags_on_images');
// cleaning up excerpt - replace [..] with a Read more link
add_filter('excerpt_more', 'wpgrade_excerpt_more');
// Add theme support for Post Formats
$formats = array('quote', 'video', 'audio');
add_theme_support('post-formats', $formats);
}
示例8: toolbox_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 post thumbnails.
*
* To override toolbox_setup() in a child theme, add your own toolbox_setup to your child theme's
* functions.php file.
*/
function toolbox_setup()
{
/**
* Make theme available for translation
* Translations can be filed in the /languages/ directory
* If you're building a theme based on toolbox, use a find and replace
* to change 'toolbox' to the name of your theme in all the template files
*/
load_theme_textdomain('toolbox', get_template_directory() . '/languages');
$locale = get_locale();
$locale_file = get_template_directory() . "/languages/{$locale}.php";
if (is_readable($locale_file)) {
require_once $locale_file;
}
/**
* Add default posts and comments RSS feed links to head
*/
add_theme_support('automatic-feed-links');
/**
* This theme uses wp_nav_menu() in one location.
*/
register_nav_menus(array('primary' => __('Primary Menu', 'toolbox')));
/**
* Add support for the Aside and Gallery Post Formats
*/
add_theme_support('post-formats', array('aside', 'image', 'gallery'));
}
示例9: cartel_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 cartel_setup()
{
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on Cartel, use a find and replace
* to change 'cartel' to the name of your theme in all the template files
*/
load_theme_textdomain('cartel', get_template_directory() . '/languages');
// Add default posts and comments RSS feed links to head.
add_theme_support('automatic-feed-links');
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support('post-thumbnails');
// This theme uses wp_nav_menu() in one location.
register_nav_menus(array('primary' => __('Primary Menu', 'cartel')));
// Enable support for Post Formats.
//add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
// Setup the WordPress core custom background feature.
/*
add_theme_support( 'custom-background', apply_filters( 'cartel_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', 'caption'));
}
示例10: themeInit
function themeInit()
{
// allow editor style
add_editor_style(get_stylesheet_directory_uri() . '/library/css/editor-style.css');
// let's get language support going, if you need it
load_theme_textdomain('bonestheme', get_template_directory() . '/library/translation');
// a better title (library/bones.php)
add_filter('wp_title', 'rw_title', 10, 3);
// remove wp version from rss (library/bones.php)
add_filter('the_generator', 'bones_rss_version');
// remove pesky injected css for recent comments widget (library/bones.php)
add_filter('wp_head', 'bones_remove_wp_widget_recent_comments_style', 1);
// clean up comment styles in the head (library/bones.php)
add_action('wp_head', 'bones_remove_recent_comments_style', 1);
// clean up gallery output in wp (library/bones.php)
add_filter('gallery_style', 'bones_gallery_style');
// launching this stuff after theme setup (library/bones.php)
bones_theme_support();
// cleaning up random code around images
add_filter('the_content', 'bones_filter_ptags_on_images');
// cleaning up excerpt
add_filter('excerpt_more', 'bones_excerpt_more');
// add filter to prevent "slack.png" from occupying the "slack" slug
add_filter('wp_unique_post_slug_is_bad_attachment_slug', '__return_true');
}
示例11: portfilo_portfolio_theme_setup
function portfilo_portfolio_theme_setup()
{
add_theme_support('title-tag');
add_theme_support('custom-background');
$args = array('flex-width' => true, 'width' => 1400, 'flex-height' => true, 'height' => 600, 'default-image' => get_template_directory_uri() . '/images/overlay.jpg');
add_theme_support('custom-header', $args);
/* ---------------------------------------------------------------------------
* Loads Theme Textdomain
* --------------------------------------------------------------------------- */
load_theme_textdomain('portfilo', PORTFILO_LANG_DIR);
add_theme_support('automatic-feed-links');
add_theme_support('woocommerce');
add_theme_support('post-thumbnails');
set_post_thumbnail_size(260, 146, false);
// admin - featured image
add_image_size('portfilo_50x50', 50, 50, false);
// admin - lists
add_image_size('portfilo-aboutus-thumbnail', 1140, 640, true);
add_image_size('portfilo-blog-listing-thumbnail', 458, 244, true);
add_image_size('portfilo-blog-detail-thumbnail', 750, 400, true);
add_image_size('portfilo-slider-thumbnail', 1400, 786, true);
/* ---------------------------------------------------------------------------
* Registers a menu location to use with navigation menus.
* --------------------------------------------------------------------------- */
/*register_nav_menu('primary', __('Main menu', 'portfilo'));
register_nav_menu('footer', __('Footer menu', 'portfilo'));*/
register_nav_menus(array('primary' => __('Primary Navigation', 'portfilo'), 'secondary' => __('Secondary Navigation', 'portfilo')));
add_action('add_meta_boxes', 'portfilo_Slider');
add_action('save_post', 'PortfiloSaveHomePageSlider');
}
示例12: avenue_setup
function avenue_setup()
{
if (!isset($content_width)) {
global $content_width;
$content_width = 1060;
}
define('SC_BYBLOS_VERSION', '2.0');
load_theme_textdomain('avenue', get_template_directory() . '/languages');
// Add default posts and comments RSS feed links to head.
add_theme_support('automatic-feed-links');
add_theme_support('post-thumbnails');
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
register_nav_menus(array('primary' => __('Primary Menu', 'avenue')));
// Enable support for Post Formats.
add_theme_support('post-formats', array('aside', 'image', 'video', 'quote', 'link'));
// Setup the WordPress core custom background feature.
add_theme_support('custom-background', apply_filters('avenue_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', 'caption'));
add_filter('widget_text', 'do_shortcode');
}
示例13: flexy_setup
/**
* Flexy setup.
*
* Sets up theme defaults and registers the various WordPress features that
* Flexy supports.
*
* @uses load_theme_textdomain() For translation/localization support.
* @uses add_editor_style() To add a Visual Editor stylesheet.
* @uses add_theme_support() To add support for post thumbnails, automatic feed links,
* custom background, and post formats.
* @uses register_nav_menu() To add support for navigation menus.
* @uses set_post_thumbnail_size() To set a custom post thumbnail size.
*
* @since Flexy 1.0
*/
function flexy_setup()
{
add_theme_support('title-tag');
// Set up the content width value based on the theme's design and stylesheet.
if (!isset($content_width)) {
global $content_width;
$content_width = 625;
}
/*
* Makes Flexy available for translation.
*
* Translations can be added to the /languages/ directory.
* If you're building a theme based on Flexy , use a find and replace
* to change 'flexy' to the name of your theme in all the template files.
*/
load_theme_textdomain('flexy', get_template_directory() . '/languages');
// This theme styles the visual editor with editor-style.css to match the theme style.
add_editor_style();
// Adds RSS feed links to <head> for posts and comments.
add_theme_support('automatic-feed-links');
// This theme supports a variety of post formats.
add_theme_support('post-formats', array('aside', 'image', 'link', 'quote', 'status'));
// This theme uses wp_nav_menu() in one location.
register_nav_menu('primary', __('Primary Menu', 'flexy'));
/*
* This theme supports custom background color and image,
* and here we also set up the default background color.
*/
add_theme_support('custom-background', array('default-color' => 'e6e6e6'));
// This theme uses a custom image size for featured images, displayed on "standard" posts.
add_theme_support('post-thumbnails');
set_post_thumbnail_size(350, 350);
// Unlimited height, soft crop
}
示例14: exclusive_setup
function exclusive_setup()
{
add_theme_support('custom-header', array('default-image' => '', 'header-text' => false, 'wp-head-callback' => 'exclusive_header_style'));
$exclusive_defaults = array('default-color' => 'E3E1E2', 'default-image' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '');
add_theme_support('custom-background', $exclusive_defaults);
if (!get_theme_mod('background_color', false)) {
set_theme_mod('background_color', 'e3e1e2');
}
add_theme_support('title-tag');
//Enable post and comments RSS feed links to head
add_theme_support('automatic-feed-links');
// Enable post thumbnails
add_theme_support('post-thumbnails');
set_post_thumbnail_size(150, 150);
load_theme_textdomain('exclusive', get_template_directory() . '/languages');
add_editor_style();
global $exclusive_layout_page;
foreach ($exclusive_layout_page->options_themeoptions as $value) {
if (isset($value['id'])) {
if (get_theme_mod($value['id']) === FALSE) {
${$value}['var_name'] = $value['std'];
} else {
${$value}['var_name'] = get_theme_mod($value['id']);
}
}
}
global $content_width;
if (!isset($content_width)) {
$content_width = $content_area;
}
}
示例15: setup
/**
* Theme setup
*/
function setup()
{
// Make theme available for translation
// Community translations can be found at https://github.com/roots/rubi-translations
load_theme_textdomain('rubi', get_template_directory() . '/lang');
// Enable plugins to manage the document title
// http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
add_theme_support('title-tag');
// Register wp_nav_menu() menus
// http://codex.wordpress.org/Function_Reference/register_nav_menus
register_nav_menus(['primary_navigation' => __('Primary Navigation', 'rubi')]);
// Add post thumbnails
// http://codex.wordpress.org/Post_Thumbnails
// http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
// http://codex.wordpress.org/Function_Reference/add_image_size
add_theme_support('post-thumbnails');
// Add post formats
// http://codex.wordpress.org/Post_Formats
add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
// Add HTML5 markup for captions
// http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
add_theme_support('html5', ['caption', 'comment-form', 'comment-list']);
// Tell the TinyMCE editor to use a custom stylesheet
add_editor_style(Assets\asset_path('styles/editor-style.css'));
}