* @copyright Copyright (c) 2013, Arthur Gareginyan * @link http://mycyberuniverse.tk/anarcho-notepad.html * @license http://opensource.org/licenses/AGPL-3.0 */ // Localization Init function load_language() { $currentLocale = get_locale(); if (!empty($currentLocale)) { load_theme_textdomain( 'anarcho-notepad', get_template_directory() . '/languages' ); } } load_language(); // Ladies, Gentalmen, boys and girls let's start our engine add_action('after_setup_theme', 'anarcho_notepad_setup'); if (!function_exists('anarcho_notepad_setup')): function anarcho_notepad_setup() { global $content_width; // 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' ); // 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 sidebar. if ( function_exists('register_sidebar') ) register_sidebar(array( 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); // This feature enables menu. function register_anarcho_menus() { register_nav_menus( array( 'anarcho-menu-in-sidbar' => __( 'Anarcho Menu in sidbar', 'anarcho-notepad' ) )); } if (function_exists('register_nav_menus')) { add_action( 'init', 'register_anarcho_menus' ); } if ( !is_nav_menu('anarcho-menu') ) { $menu_id = wp_create_nav_menu('anarcho-menu'); wp_update_nav_menu_item($menu_id, 1); } // This feature enables Link Manager in Admin page. global $wp_version; if ( version_compare( $wp_version, '3.5', '>=' ) ) add_filter( 'pre_option_link_manager_enabled', '__return_true' ); // Add Callback for Custom TinyMCE editor stylesheets. (editor-style.css) add_editor_style(); } endif; // Redirect to the theme options page after theme is activated if ( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) wp_redirect(admin_url( 'customize.php?' )); /******************Theme Customizer*******************************/ add_action('customize_register', function($wp_customize){ //class Customize_Textarea_Control class Customize_Textarea_Control extends WP_Customize_Control { public $type = 'textarea'; public function render_content() { ?> remove_section( 'colors' ); // META SECTION $wp_customize->add_section( 'meta_section', array( 'title' => __( 'Meta', 'anarcho-notepad' ), 'priority' => 1, )); // Adding Google Analytics to the Theme $wp_customize->add_setting( 'google_analytics_setting', array( 'default' => 'For example "UA-9338113-X"', )); $wp_customize->add_control( new Customize_Textarea_Control( $wp_customize, 'analytics_control', array( 'priority' => 5, 'label' => __( 'Enter Your Google Analytics Code', 'anarcho-notepad' ), 'section' => 'meta_section', 'settings' => 'google_analytics_setting', ))); // Adding Webmaster Tools to the Theme $wp_customize->add_setting( 'google_webmaster_tool_setting', array( 'default' => 'For example "gN9drVvyyDUFQzMSBL8Y8-EttW3pUDtnUypD-331Kqh"', )); $wp_customize->add_control( new Customize_Textarea_Control( $wp_customize, 'google_webmaster_tool_control', array( 'priority' => 6, 'label' => __( 'Enter Your Google Webmaster Verification Code', 'anarcho-notepad' ), 'section' => 'meta_section', 'settings' => 'google_webmaster_tool_setting', ))); // About Box in column on Russian $wp_customize->add_setting( 'about_box_ru', array( 'default' => 'Впишите сюда небольшой текст о себе и/или о сайте', )); $wp_customize->add_control( new Customize_Textarea_Control( $wp_customize, 'about_box_ru', array( 'priority' => 2, 'label' => 'About box (Русский)', 'section' => 'meta_section', 'settings' => 'about_box_ru', ))); // About Box in column on English $wp_customize->add_setting( 'about_box_eng', array( 'default' => 'Paste here small text about You and/or about site', )); $wp_customize->add_control( new Customize_Textarea_Control( $wp_customize, 'about_box_eng', array( 'priority' => 1, 'label' => 'About box (English)', 'section' => 'meta_section', 'settings' => 'about_box_eng', ))); // Copyright after post $wp_customize->add_setting( 'copyright_post', array( 'default' => 'Copyright © 2013. All rights reserved.', )); $wp_customize->add_control( new Customize_Textarea_Control( $wp_customize, 'copyright_post', array( 'priority' => 3, 'label' => __( 'Copyright after post', 'anarcho-notepad' ), 'section' => 'meta_section', 'settings' => 'copyright_post', ))); // Site-info in footer $wp_customize->add_setting( 'site-info', array( 'default' => 'Copyright © 2013. All rights reserved.')); $wp_customize->add_control( new Customize_Textarea_Control( $wp_customize, 'site-info', array( 'priority' => 4, 'label' => __( 'Site-info in footer', 'anarcho-notepad' ), 'section' => 'meta_section', 'settings' => 'site-info', ))); // STUFF SECTION $wp_customize->add_section( 'stuff_section', array( 'title' => __( 'Stuff', 'anarcho-notepad' ), 'priority' => 2, )); $wp_customize->add_setting('enable_title_animation'); //'default' => '1', $wp_customize->add_control( 'enable_title_animation', array( 'priority' => 1, 'type' => 'checkbox', 'label' => __( 'Enable "Title animation"', 'anarcho-notepad' ), 'section' => 'stuff_section', )); $wp_customize->add_setting('enable_breadcrumbs'); $wp_customize->add_control( 'enable_breadcrumbs', array( 'priority' => 2, 'type' => 'checkbox', 'label' => __( 'Enable "Breadcrumbs"', 'anarcho-notepad' ), 'section' => 'stuff_section', )); $wp_customize->add_setting('enable_page-nav'); $wp_customize->add_control( 'enable_page-nav', array( 'priority' => 3, 'type' => 'checkbox', 'label' => __( 'Enable "Page Navigation"', 'anarcho-notepad' ), 'section' => 'stuff_section', )); $wp_customize->add_setting('hide_info_line'); $wp_customize->add_control( 'hide_info_line', array( 'priority' => 5, 'type' => 'checkbox', 'label' => __( 'Hide info line in footer', 'anarcho-notepad' ), 'section' => 'stuff_section', )); // SCRYPTS SECTION $wp_customize->add_section( 'scrypts_section', array( 'title' => __( 'Scrypts', 'anarcho-notepad' ), 'description' => __( 'Put here your scripts', 'anarcho-notepad' ), 'priority' => 3, )); $wp_customize->add_setting( 'scrypt_header'); $wp_customize->add_control( new Customize_Textarea_Control( $wp_customize, 'scrypt_header', array( 'priority' => 1, 'label' => __( 'Scrypts in to header', 'anarcho-notepad' ), 'section' => 'scrypts_section', 'settings' => 'scrypt_header', ))); $wp_customize->add_setting( 'scrypt_before_post'); $wp_customize->add_control( new Customize_Textarea_Control( $wp_customize, 'scrypt_before_post', array( 'priority' => 2, 'label' => __( 'Scrypts before post', 'anarcho-notepad' ), 'section' => 'scrypts_section', 'settings' => 'scrypt_before_post', ))); $wp_customize->add_setting( 'scrypt_after_post'); $wp_customize->add_control( new Customize_Textarea_Control( $wp_customize, 'scrypt_after_post', array( 'priority' => 3, 'label' => __( 'Scrypts after post', 'anarcho-notepad' ), 'section' => 'scrypts_section', 'settings' => 'scrypt_after_post', ))); $wp_customize->add_setting( 'scrypt_footer'); $wp_customize->add_control( new Customize_Textarea_Control( $wp_customize, 'scrypt_footer', array( 'priority' => 4, 'label' => __( 'Scrypts in to footer', 'anarcho-notepad' ), 'section' => 'scrypts_section', 'settings' => 'scrypt_footer', ))); // HEADER SECTION // TITLE SECTION // Create an Array with a ton of Google Fonts $google_font_array = array( 'Default' => 'Default', 'Questrial' => 'Questrial', 'Astloch' => 'Astloch', 'IM+Fell+English+SC' => 'IM+Fell+English+SC', 'Lekton' => 'Lekton', 'Nova+Round' => 'Nova+Round', 'Nova+Oval' => 'Nova+Oval', 'League+Script' => 'League+Script', 'Caudex' => 'Caudex', 'IM+Fell+DW+Pica' => 'IM+Fell+DW+Pica', 'Nova+Script' => 'Nova+Script', 'Nixie+One' => 'Nixie+One', 'IM+Fell+DW+Pica+SC' => 'IM+Fell+DW+Pica+SC', 'Puritan' => 'Puritan', 'Prociono' => 'Prociono', 'Abel' => 'Abel', 'Snippet' => 'Snippet', 'Kristi' => 'Kristi', 'Mako' => 'Mako', 'Ubuntu+Mono' => 'Ubuntu+Mono', 'Nova+Slim' => 'Nova+Slim', 'Patrick+Hand' => 'Patrick+Hand', 'Crafty+Girls' => 'Crafty+Girls', 'Brawler' => 'Brawler', 'Droid+Sans' => 'Droid+Sans', 'Geostar' => 'Geostar', 'Yellowtail' => 'Yellowtail', 'Permanent+Marker' => 'Permanent+Marker', 'Just+Another+Hand' => 'Just+Another+Hand', 'Unkempt' => 'Unkempt', 'Jockey+One' => 'Jockey+One', 'Lato' => 'Lato', 'Arvo' => 'Arvo', 'Cabin' => 'Cabin', 'Playfair+Display' => 'Playfair+Display', 'Crushed' => 'Crushed', 'Asset' => 'Asset', 'Sue+Ellen+Francisco' => 'Sue+Ellen+Francisco', 'Julee' => 'Julee', 'Judson' => 'Judson', 'Neuton' => 'Neuton', 'Sorts+Mill+Goudy' => 'Sorts+Mill+Goudy', 'Mate' => 'Mate', 'News+Cycle' => 'News+Cycle', 'Michroma' => 'Michroma', 'Lora' => 'Lora', 'Give+You+Glory' => 'Give+You+Glory', 'Rammetto+One' => 'Rammetto+One', 'Pompiere' => 'Pompiere', 'PT+Sans' => 'PT+Sans', 'Andika' => 'Andika', 'Cabin+Sketch' => 'Cabin+Sketch', 'Delius+Swash+Caps' => 'Delius+Swash+Caps', 'Coustard' => 'Coustard', 'Cherry+Cream+Soda' => 'Cherry+Cream+Soda', 'Maiden+Orange' => 'Maiden+Orange', 'Syncopate' => 'Syncopate', 'PT+Sans+Narrow' => 'PT+Sans+Narrow', 'Montez' => 'Montez', 'Short+Stack' => 'Short+Stack', 'Poller+One' => 'Poller+One', 'Tinos' => 'Tinos', 'Philosopher' => 'Philosopher', 'Neucha' => 'Neucha', 'Gravitas+One' => 'Gravitas+One', 'Corben' => 'Corben', 'Istok+Web' => 'Istok+Web', 'Federo' => 'Federo', 'Yeseva+One' => 'Yeseva+One', 'Petrona' => 'Petrona', 'Arimo' => 'Arimo', 'Irish+Grover' => 'Irish+Grover', 'Quicksand' => 'Quicksand', 'Paytone+One' => 'Paytone+One', 'Kelly+Slab' => 'Kelly+Slab', 'Nova+Flat' => 'Nova+Flat', 'Vast+Shadow' => 'Vast+Shadow', 'Ubuntu' => 'Ubuntu', 'Smokum' => 'Smokum', 'Ruslan+Display' => 'Ruslan+Display', 'La+Belle+Aurore' => 'La+Belle+Aurore', 'Federant' => 'Federant', 'Podkova' => 'Podkova', 'IM+Fell+French+Canon' => 'IM+Fell+French+Canon', 'PT+Serif+Caption' => 'PT+Serif+Caption', 'The+Girl+Next+Door' => 'The+Girl+Next+Door', 'Artifika' => 'Artifika', 'Marck+Script' => 'Marck+Script', 'Droid+Sans+Mono' => 'Droid+Sans+Mono', 'Contrail+One' => 'Contrail+One', 'Swanky+and+Moo+Moo' => 'Swanky+and+Moo+Moo', 'Wire+One' => 'Wire+One', 'Tenor+Sans' => 'Tenor+Sans', 'Nova+Mono' => 'Nova+Mono', 'Josefin+Sans' => 'Josefin+Sans', 'Bitter' => 'Bitter', 'Supermercado+One' => 'Supermercado+One', 'PT+Serif' => 'PT+Serif', 'Limelight' => 'Limelight', 'Coda+Caption:800' => 'Coda+Caption:800', 'Lobster' => 'Lobster', 'Gentium+Basic' => 'Gentium+Basic', 'Atomic+Age' => 'Atomic+Age', 'Mate+SC' => 'Mate+SC', 'Eater+Caps' => 'Eater+Caps', 'Bigshot+One' => 'Bigshot+One', 'Kreon' => 'Kreon', 'Rationale' => 'Rationale', 'Sniglet:800' => 'Sniglet:800', 'Smythe' => 'Smythe', 'Waiting+for+the+Sunrise' => 'Waiting+for+the+Sunrise', 'Gochi+Hand' => 'Gochi+Hand', 'Reenie+Beanie' => 'Reenie+Beanie', 'Kameron' => 'Kameron', 'Anton' => 'Anton', 'Holtwood+One+SC' => 'Holtwood+One+SC', 'Schoolbell' => 'Schoolbell', 'Tulpen+One' => 'Tulpen+One', 'Redressed' => 'Redressed', 'Ovo' => 'Ovo', 'Shadows+Into+Light' => 'Shadows+Into+Light', 'Rokkitt' => 'Rokkitt', 'Josefin+Slab' => 'Josefin+Slab', 'Passero+One' => 'Passero+One', 'Copse' => 'Copse', 'Walter+Turncoat' => 'Walter+Turncoat', 'Sigmar+One' => 'Sigmar+One', 'Convergence' => 'Convergence', 'Gloria+Hallelujah' => 'Gloria+Hallelujah', 'Fontdiner+Swanky' => 'Fontdiner+Swanky', 'Tienne' => 'Tienne', 'Calligraffitti' => 'Calligraffitti', 'UnifrakturCook:700' => 'UnifrakturCook:700', 'Tangerine' => 'Tangerine', 'Days+One' => 'Days+One', 'Cantarell' => 'Cantarell', 'IM+Fell+Great+Primer' => 'IM+Fell+Great+Primer', 'Antic' => 'Antic', 'Muli' => 'Muli', 'Monofett' => 'Monofett', 'Just+Me+Again+Down+Here' => 'Just+Me+Again+Down+Here', 'Geostar+Fill' => 'Geostar+Fill', 'Candal' => 'Candal', 'Cousine' => 'Cousine', 'Merienda+One' => 'Merienda+One', 'Goblin+One' => 'Goblin+One', 'Monoton' => 'Monoton', 'Ubuntu+Condensed' => 'Ubuntu+Condensed', 'EB+Garamond' => 'EB+Garamond', 'Droid+Serif' => 'Droid+Serif', 'Lancelot' => 'Lancelot', 'Cookie' => 'Cookie', 'Fjord+One' => 'Fjord+One', 'Arapey' => 'Arapey', 'Rancho' => 'Rancho', 'Sancreek' => 'Sancreek', 'Butcherman+Caps' => 'Butcherman+Caps', 'Salsa' => 'Salsa', 'Amatic+SC' => 'Amatic+SC', 'Creepster+Caps' => 'Creepster+Caps', 'Chivo' => 'Chivo', 'Linden+Hill' => 'Linden+Hill', 'Nosifer+Caps' => 'Nosifer+Caps', 'Marvel' => 'Marvel', 'Alice' => 'Alice', 'Love+Ya+Like+A+Sister' => 'Love+Ya+Like+A+Sister', 'Pinyon+Script' => 'Pinyon+Script', 'Stardos+Stencil' => 'Stardos+Stencil', 'Leckerli+One' => 'Leckerli+One', 'Nothing+You+Could+Do' => 'Nothing+You+Could+Do', 'Sansita+One' => 'Sansita+One', 'Poly' => 'Poly', 'Alike' => 'Alike', 'Fanwood+Text' => 'Fanwood+Text', 'Bowlby+One+SC' => 'Bowlby+One+SC', 'Actor' => 'Actor', 'Terminal+Dosis' => 'Terminal+Dosis', 'Aclonica' => 'Aclonica', 'Gentium+Book+Basic' => 'Gentium+Book+Basic', 'Rosario' => 'Rosario', 'Satisfy' => 'Satisfy', 'Sunshiney' => 'Sunshiney', 'Aubrey' => 'Aubrey', 'Jura' => 'Jura', 'Ultra' => 'Ultra', 'Zeyada' => 'Zeyada', 'Changa+One' => 'Changa+One', 'Varela' => 'Varela', 'Black+Ops+One' => 'Black+Ops+One', 'Open+Sans' => 'Open+Sans', 'Alike+Angular' => 'Alike+Angular', 'Prata' => 'Prata', 'Bowlby+One' => 'Bowlby+One', 'Megrim' => 'Megrim', 'Damion' => 'Damion', 'Coda' => 'Coda', 'Vidaloka' => 'Vidaloka', 'Radley' => 'Radley', 'Indie+Flower' => 'Indie+Flower', 'Over+the+Rainbow' => 'Over+the+Rainbow', 'Open+Sans+Condensed:300' => 'Open+Sans+Condensed:300', 'Abril+Fatface' => 'Abril+Fatface', 'Miltonian' => 'Miltonian', 'Delius' => 'Delius', 'Six+Caps' => 'Six+Caps', 'Francois+One' => 'Francois+One', 'Dorsa' => 'Dorsa', 'Aldrich' => 'Aldrich', 'Buda:300' => 'Buda:300', 'Rochester' => 'Rochester', 'Allerta' => 'Allerta', 'Bevan' => 'Bevan', 'Wallpoet' => 'Wallpoet', 'Quattrocento' => 'Quattrocento', 'Dancing+Script' => 'Dancing+Script', 'Amaranth' => 'Amaranth', 'Unna' => 'Unna', 'PT+Sans+Caption' => 'PT+Sans+Caption', 'Geo' => 'Geo', 'Quattrocento+Sans' => 'Quattrocento+Sans', 'Oswald' => 'Oswald', 'Carme' => 'Carme', 'Spinnaker' => 'Spinnaker', 'MedievalSharp' => 'MedievalSharp', 'Nova+Square' => 'Nova+Square', 'IM+Fell+French+Canon+SC' => 'IM+Fell+French+Canon+SC', 'Voltaire' => 'Voltaire', 'Raleway:100' => 'Raleway:100', 'Delius+Unicase' => 'Delius+Unicase', 'Shanti' => 'Shanti', 'Expletus+Sans' => 'Expletus+Sans', 'Crimson+Text' => 'Crimson+Text', 'Nunito' => 'Nunito', 'Numans' => 'Numans', 'Hammersmith+One' => 'Hammersmith+One', 'Miltonian+Tattoo' => 'Miltonian+Tattoo', 'Allerta+Stencil' => 'Allerta+Stencil', 'Vollkorn' => 'Vollkorn', 'Pacifico' => 'Pacifico', 'Cedarville+Cursive' => 'Cedarville+Cursive', 'Cardo' => 'Cardo', 'Merriweather' => 'Merriweather', 'Loved+by+the+King' => 'Loved+by+the+King', 'Slackey' => 'Slackey', 'Nova+Cut' => 'Nova+Cut', 'Rock+Salt' => 'Rock+Salt', 'Yanone+Kaffeesatz' => 'Yanone+Kaffeesatz', 'Molengo' => 'Molengo', 'Nobile' => 'Nobile', 'Goudy+Bookletter+1911' => 'Goudy+Bookletter+1911', 'Bangers' => 'Bangers', 'Old+Standard+TT' => 'Old+Standard+TT', 'Orbitron' => 'Orbitron', 'Comfortaa' => 'Comfortaa', 'Varela+Round' => 'Varela+Round', 'Forum' => 'Forum', 'Maven+Pro' => 'Maven+Pro', 'Volkhov' => 'Volkhov', 'Allan:700' => 'Allan:700', 'Luckiest+Guy' => 'Luckiest+Guy', 'Gruppo' => 'Gruppo', 'Cuprum' => 'Cuprum', 'Anonymous+Pro' => 'Anonymous+Pro', 'UnifrakturMaguntia' => 'UnifrakturMaguntia', 'Covered+By+Your+Grace' => 'Covered+By+Your+Grace', 'Homemade+Apple' => 'Homemade+Apple', 'Lobster+Two' => 'Lobster+Two', 'Coming+Soon' => 'Coming+Soon', 'Mountains+of+Christmas' => 'Mountains+of+Christmas', 'Architects+Daughter' => 'Architects+Daughter', 'Dawning+of+a+New+Day' => 'Dawning+of+a+New+Day', 'Kranky' => 'Kranky', 'Adamina' => 'Adamina', 'Carter+One' => 'Carter+One', 'Bentham' => 'Bentham', 'IM+Fell+Great+Primer+SC' => 'IM+Fell+Great+Primer+SC', 'Chewy' => 'Chewy', 'IM+Fell+English' => 'IM+Fell+English', 'Inconsolata' => 'Inconsolata', 'Vibur' => 'Vibur', 'Andada' => 'Andada', 'IM+Fell+Double+Pica' => 'IM+Fell+Double+Pica', 'Kenia' => 'Kenia', 'Meddon' => 'Meddon', 'Metrophobic' => 'Metrophobic', 'Play' => 'Play', 'Special+Elite' => 'Special+Elite', 'IM+Fell+Double+Pica+SC' => 'IM+Fell+Double+Pica+SC', 'Didact+Gothic' => 'Didact+Gothic', 'Modern+Antiqua' => 'Modern+Antiqua', 'VT323' => 'VT323', 'Annie+Use+Your+Telescope' => 'Annie+Use+Your+Telescope'); // Enable Google Fonts for Title $wp_customize->add_setting( 'titlefontstyle_setting', array( 'Default' => 'Permanent+Marker', 'control' => 'select',)); $wp_customize->add_control( 'titlefontstyle_control', array( 'label' => __('Site Title font (Google Webfonts)', 'anarcho-notepad'), 'priority' => 10, 'section' => 'title_tagline', 'settings' => 'titlefontstyle_setting', 'type' => 'select', 'choices' => $google_font_array, )); // Enable Google Fonts for Tagline $wp_customize->add_setting( 'taglinefontstyle_setting', array( 'Default' => 'Permanent+Marker', 'control' => 'select',)); $wp_customize->add_control( 'taglinefontstyle_control', array( 'label' => __('Site Tagline font (Google Webfonts)', 'anarcho-notepad'), 'priority' => 11, 'section' => 'title_tagline', 'settings' => 'taglinefontstyle_setting', 'type' => 'select', 'choices' => $google_font_array, )); // Title color $wp_customize->add_setting( 'title_color', array( 'default' => '#000000', 'transport' => 'postMessage', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'title_color', array( 'label' => __('Site Title color', 'anarcho-notepad'), 'section' => 'title_tagline', 'settings' => 'title_color', 'priority' => 12, ))); // Tagline color $wp_customize->add_setting( 'tagline_color', array( 'default' => '#000000', 'transport' => 'postMessage', 'type' => 'option', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'tagline_color', array( 'label' => __('Site Tagline color', 'anarcho-notepad'), 'section' => 'title_tagline', 'settings' => 'tagline_color', 'priority' => 13, ))); // BACKGROUND SECTION $wp_customize->get_section( 'background_image' ); // Background color $wp_customize->add_setting( 'background_color' , array( 'default' => '000000', 'transport' => 'postMessage', )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'background_color', array( 'label' => __('Background Color', 'anarcho-notepad'), 'section' => 'background_image', ))); // Add the option to use the CSS3 property Background-size $wp_customize->add_setting( 'backgroundsize_setting', array( 'default' => 'auto', 'control' => 'select',)); $wp_customize->add_control( 'backgroundsize_control', array( 'label' => __('Background Size', 'anarcho-notepad'), 'section' => 'background_image', 'settings' => 'backgroundsize_setting', 'priority' => 10, 'type' => 'radio', 'choices' => array( 'auto' => __('Auto (Default)', 'anarcho-notepad'), 'contain' => __('Contain', 'anarcho-notepad'), 'cover' => __('Cover', 'anarcho-notepad'),), )); }); // Inject the Customizer Choices into the Theme add_action('wp_head', 'anarcho_notepad_inline_css'); function anarcho_notepad_inline_css() { if ( ( get_theme_mod('enable_title_animation') != '0' ) ) echo '' . "\n"; /* Google Analytics & Webtool */ if ( ( ( get_theme_mod('google_webmaster_tool_setting') != '' ) && ( get_theme_mod('google_webmaster_tool_setting') != 'For example mine is "gN9drVvyyDUFQzMSBL8Y8-EttW1pUDtnUypP-331Kqh"' ) ) || ( ( get_theme_mod('google_analytics_setting') != '' ) && ( get_theme_mod('google_analytics_setting') != 'For example mine is "UA-9335180-X"' ) ) ) { if ( ( get_theme_mod('google_webmaster_tool_setting') != '' ) && ( get_theme_mod('google_webmaster_tool_setting') != 'For example mine is "gN9drVvyyDUFQzMSBL8Y8-EttW1pUDtnUypP-331Kqh"' ) ) echo '' . "\n"; if ( ( get_theme_mod('google_analytics_setting') != '' ) && ( get_theme_mod('google_analytics_setting') != 'For example mine is "UA-9335180-X"' ) ) { echo '" . "\n"; } } /* End Google Analytics & Webtool */ /* Custom Font Styles */ if ( ( get_theme_mod('titlefontstyle_setting') != 'Default' ) && ( get_theme_mod('titlefontstyle_setting') != '' ) ) { echo "" . "\n"; $q = get_theme_mod('titlefontstyle_setting'); $q = preg_replace('/[^a-zA-Z0-9]+/', ' ', $q); echo '' . "\n"; } if ( ( get_theme_mod('taglinefontstyle_setting') != 'Default' ) && ( get_theme_mod('taglinefontstyle_setting') != '' ) ) { echo "" . "\n"; echo '' . "\n"; } /* End Custom Font Styles */ ?>

Responsive Design
Clean and Beautiful Stylized HTML, CSS, JavaScript
Change the site Title and Slogan Colors
Upload Your Own Background Image
Easy Selection of Fonts from Font Library "Googl Fonts".
Automatically Scaling the Width Properties of Images, Video etc (Fluid Images etc.).
Use Conditional Units of Measurements.
CSS3 Font Flags.
HTML5 Semantic Markup.
RTL Styles for Hebrew or Arabic.
Prepared to Translate to Other Languages.
Box "About the author" Below
Your Copyright Box Under Each Post.

* added : russian translation.
* added : (css) rtl styles for hebrew or arabic.
* added : (css) comment navigation styling, similar to post navigation
* added : (php) (css) author box styling (if bio field not empty)
* added : (js) smooth transition for "back to top" link.
* added : (css) font-icons to title of archive, search, 404
* fixed : many more minor fixes and changes.


add_menu( array( 'id' => 'Anarcho_Customizer', 'title' => 'Theme Customizer', 'href' => admin_url( 'customize.php' ) )); $wp_admin_bar->add_menu( array( 'id' => 'Anarcho_Information', 'title' => 'Theme Information', 'href' => admin_url( 'themes.php?page=theme_options' ) )); } add_action( 'admin_bar_menu', 'anarcho_admin_link', 113 ); /*****************END-Theme Information Page****************************/ // Adds a custom default avatar if ( !function_exists('anarcho_avatar') ) { function anarcho_avatar( $avatar_defaults ) { $myavatar = get_stylesheet_directory_uri() . '/images/anarchy-symbol.png'; $avatar_defaults[$myavatar] = 'Anarcho symbol'; return $avatar_defaults; } add_filter( 'avatar_defaults', 'anarcho_avatar' ); } // Enable smoothscroll.js function include_smoothscroll_script() { wp_enqueue_script( 'back-top', get_template_directory_uri() . '/js/smoothscroll.js', array( 'jquery' ), '', true ); } add_action( 'wp_enqueue_scripts', 'include_smoothscroll_script' ); // Enable breadcrumbs if ( ( get_theme_mod('enable_breadcrumbs') != '0' ) ) get_template_part('breadcrumbs'); // Page Navigation function anarcho_page_nav() { if(get_theme_mod('enable_page-nav') == '1') { global $wp_query, $wp_rewrite; $pages = ''; $max = $wp_query->max_num_pages; if (!$current = get_query_var('paged')) $current = 1; $a['base'] = str_replace(999999999, '%#%', get_pagenum_link(999999999)); $a['total'] = $max; $a['current'] = $current; $total = 0; $a['mid_size'] = 3; $a['end_size'] = 1; $a['prev_text'] = __('Previous page', 'anarcho-notepad'); $a['next_text'] = __('Next page', 'anarcho-notepad'); if ($max > 0) echo '
'; } } // END-Page Navigation // Comments if ( ! function_exists( 'anarcho_comment' ) ) : /** * Template for comments and pingbacks. * * Used as a callback by wp_list_comments() for displaying the comments. */ function anarcho_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', '' ); ?>

  • id="li-comment-">
    %1$s %2$s', get_comment_author_link(), // If current post author is also comment author, make it known visually. ( $comment->user_id === $post->post_author ) ? '' . __( 'Post author', 'anarcho-notepad' ) . '' : '' ); printf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'anarcho-notepad' ), get_comment_date(), get_comment_time() ) ); ?>
    comment_approved ) : ?>

    ', '

    ' ); ?>
    __( 'Reply', 'anarcho-notepad' ), 'after' => ' ', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    '

    ' . ' ' . ( $req ? '*' : '' ) . '

    ', 'email' => '

    ' . ( $req ? '*' : '' ) . '

    ', 'url' => '

    ' . '

    ', ); $anarcho_defaults['fields'] = apply_filters( 'comment_form_default_fields', $anarcho_fields); $anarcho_defaults['comment_field'] = '

    '; $anarcho_defaults['title_reply'] = __('Leave a Comment', 'anarcho-notepad'); return $anarcho_defaults; } add_filter('comment_form_defaults', 'anarcho_comment_form'); // END-Comments-Form ?>