* @copyright Copyright (c) 2013-2014, Arthur Gareginyan
* @link http://mycyberuniverse.com/anarcho-notepad.html
* @license http://www.gnu.org/licenses/gpl-3.0.html
*/
// Ladies, Gentalmen, boys and girls let's start our engine
add_action('after_setup_theme', 'anarcho_notepad_setup');
function anarcho_notepad_setup() {
global $content_width;
// Localization Init
load_theme_textdomain( 'anarcho-notepad', get_template_directory() . '/languages' );
// This feature enables Custom Backgrounds.
add_theme_support( 'custom-background', array(
'default-image' => get_template_directory_uri() . '/images/background.jpg', ) );
// This feature enables Custom Header.
add_theme_support( 'custom-header', array(
'flex-width' => true,
'width' => 500,
'flex-height' => true,
'height' => 150,
//'default-text-color' => '#e5e5e5',
'header-text' => true,
//'default-image' => get_template_directory_uri() . '/images/logotype.jpg',
'uploads' => true,
) );
// This feature enables Featured Images (also known as post thumbnails).
add_theme_support('post-thumbnails');
set_post_thumbnail_size(540,230,!1);
// This feature enables post and comment RSS feed links to
.
add_theme_support('automatic-feed-links');
// Add HTML5 elements
add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', ) );
// This feature enables menu.
register_nav_menus( array(
'primary' => __( 'Primary', 'anarcho-notepad' ) ));
// This feature enables Link Manager in Admin page.
add_filter( 'pre_option_link_manager_enabled', '__return_true' );
// Add Callback for Custom TinyMCE editor stylesheets. (editor-style.css)
add_editor_style();
}
// Add Theme Information Page.
require get_template_directory() . '/inc/theme_info.php';
// Add Theme Customizer functionality.
require get_template_directory() . '/inc/customizer.php';
// Add IE conditional HTML5 shim to header
function anarcho_add_ie_html5_shim () {
global $is_IE;
if ($is_IE)
echo '';
}
add_action('wp_head', 'anarcho_add_ie_html5_shim');
// This feature enables widgets area in the sidebar.
function anarcho_widgets_init() {
register_sidebar(array(
'name' => __('Sidebar Area 1', 'anarcho-notepad'),
'id' => 'sidebar-1',
'description' => __('Widgets in this area will be shown below "Pages".', 'anarcho-notepad'),
'before_widget' => '',
'before_title' => '
',
'after_title' => '
',
));
register_sidebar(array(
'name' => __('Sidebar Area 2', 'anarcho-notepad'),
'id' => 'sidebar-2',
'description' => __('Widgets in this area will be shown below "What is this place".', 'anarcho-notepad'),
'before_widget' => '',
'before_title' => '
',
'after_title' => '
',
));
register_sidebar(array(
'name' => __('Sidebar Area 3', 'anarcho-notepad'),
'id' => 'sidebar-3',
'description' => __('Widgets in this area will be shown below "Frends & Links".', 'anarcho-notepad'),
'before_widget' => '',
'before_title' => '
',
'after_title' => '
',
));
register_sidebar(array(
'name' => __('Sidebar Area 4', 'anarcho-notepad'),
'id' => 'sidebar-4',
'description' => __('Widgets in this area will be shown below "Recent Posts".', 'anarcho-notepad'),
'before_widget' => '',
'before_title' => '
',
'after_title' => '
',
));
}
add_action( 'widgets_init', 'anarcho_widgets_init' );
// This feature enables widgets area in the footer.
function anarcho_widgets_footer_init() {
register_sidebar(array(
'name' => __('Footer Area 1', 'anarcho-notepad'),
'id' => 'footer-1',
'description' => __('Widgets in this area will be shown left.', 'anarcho-notepad'),
'before_widget' => '',
'before_title' => '
',
'after_title' => '
',
));
register_sidebar(array(
'name' => __('Footer Area 2', 'anarcho-notepad'),
'id' => 'footer-2',
'description' => __('Widgets in this area will be shown center.', 'anarcho-notepad'),
'before_widget' => '',
'before_title' => '
',
'after_title' => '
',
));
register_sidebar(array(
'name' => __('Footer Area 3', 'anarcho-notepad'),
'id' => 'footer-3',
'description' => __('Widgets in this area will be shown right.', 'anarcho-notepad'),
'before_widget' => '',
'before_title' => '