From: Zachary Vance Date: Sun, 4 Oct 2015 01:06:14 +0000 (-0700) Subject: Add twentytwelve X-Git-Url: https://git.za3k.com/?a=commitdiff_plain;h=24ddeffe080703d518ca6477fb4ae3cdac365a3b;p=za3k_blog.git Add twentytwelve --- diff --git a/wp-content/themes/twentytwelve/404.php b/wp-content/themes/twentytwelve/404.php new file mode 100644 index 0000000..db3ef81 --- /dev/null +++ b/wp-content/themes/twentytwelve/404.php @@ -0,0 +1,29 @@ + + +
+
+ +
+
+

+
+ +
+

+ +
+
+ +
+
+ + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/archive.php b/wp-content/themes/twentytwelve/archive.php new file mode 100644 index 0000000..2d442bd --- /dev/null +++ b/wp-content/themes/twentytwelve/archive.php @@ -0,0 +1,63 @@ + + +
+
+ + +
+

' . get_the_date() . '' ); + elseif ( is_month() ) : + printf( __( 'Monthly Archives: %s', 'twentytwelve' ), '' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '' ); + elseif ( is_year() ) : + printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '' ); + else : + _e( 'Archives', 'twentytwelve' ); + endif; + ?>

+
+ + + + + + + +
+
+ + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/author.php b/wp-content/themes/twentytwelve/author.php new file mode 100644 index 0000000..6570108 --- /dev/null +++ b/wp-content/themes/twentytwelve/author.php @@ -0,0 +1,84 @@ + + +
+
+ + + + + +
+

' . get_the_author() . '' ); ?>

+
+ + + + + + +
+
+ +
+
+

+

+
+
+ + + + + + + + + + + + + +
+
+ + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/category.php b/wp-content/themes/twentytwelve/category.php new file mode 100644 index 0000000..0376977 --- /dev/null +++ b/wp-content/themes/twentytwelve/category.php @@ -0,0 +1,51 @@ + + +
+
+ + +
+

' . single_cat_title( '', false ) . '' ); ?>

+ + +
+ +
+ + + + + + + +
+
+ + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/comments.php b/wp-content/themes/twentytwelve/comments.php new file mode 100644 index 0000000..d6a733e --- /dev/null +++ b/wp-content/themes/twentytwelve/comments.php @@ -0,0 +1,60 @@ + + +
+ + + + +

+ ' . get_the_title() . '' ); + ?> +

+ +
    + 'twentytwelve_comment', 'style' => 'ol' ) ); ?> +
+ + 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> + + + + +

+ + + + + + +
\ No newline at end of file diff --git a/wp-content/themes/twentytwelve/content-aside.php b/wp-content/themes/twentytwelve/content-aside.php new file mode 100644 index 0000000..4a84ae7 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-aside.php @@ -0,0 +1,28 @@ + + +
> +
+

+
+ →', 'twentytwelve' ) ); ?> +
+
+ +
+ + + + + ', '' ); ?> +
+
diff --git a/wp-content/themes/twentytwelve/content-image.php b/wp-content/themes/twentytwelve/content-image.php new file mode 100644 index 0000000..a683b83 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-image.php @@ -0,0 +1,28 @@ + + +
> +
+ →', 'twentytwelve' ) ); ?> +
+ +
+ +

+

+
+ + + + ', '' ); ?> +
+
diff --git a/wp-content/themes/twentytwelve/content-link.php b/wp-content/themes/twentytwelve/content-link.php new file mode 100644 index 0000000..31e4ec9 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-link.php @@ -0,0 +1,26 @@ + + +
> +
+
+ →', 'twentytwelve' ) ); ?> +
+ +
+ + + + + ', '' ); ?> +
+
diff --git a/wp-content/themes/twentytwelve/content-none.php b/wp-content/themes/twentytwelve/content-none.php new file mode 100644 index 0000000..b775782 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-none.php @@ -0,0 +1,20 @@ + + +
+
+

+
+ +
+

+ +
+
diff --git a/wp-content/themes/twentytwelve/content-page.php b/wp-content/themes/twentytwelve/content-page.php new file mode 100644 index 0000000..0abcbf7 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-page.php @@ -0,0 +1,26 @@ + + +
> +
+ + + +

+
+ +
+ + '' ) ); ?> +
+
+ ', '' ); ?> +
+
diff --git a/wp-content/themes/twentytwelve/content-quote.php b/wp-content/themes/twentytwelve/content-quote.php new file mode 100644 index 0000000..0a98a96 --- /dev/null +++ b/wp-content/themes/twentytwelve/content-quote.php @@ -0,0 +1,25 @@ + + +
> +
+ →', 'twentytwelve' ) ); ?> +
+ +
+ + + + + ', '' ); ?> +
+
diff --git a/wp-content/themes/twentytwelve/content-status.php b/wp-content/themes/twentytwelve/content-status.php new file mode 100644 index 0000000..55b72db --- /dev/null +++ b/wp-content/themes/twentytwelve/content-status.php @@ -0,0 +1,42 @@ + + +
> +
+
+

+

+
+ +
+ +
+ →', 'twentytwelve' ) ); ?> +
+ +
+ + + + ', '' ); ?> +
+
diff --git a/wp-content/themes/twentytwelve/content.php b/wp-content/themes/twentytwelve/content.php new file mode 100644 index 0000000..56493ed --- /dev/null +++ b/wp-content/themes/twentytwelve/content.php @@ -0,0 +1,73 @@ + + +
> + +
+ +
+ +
+ + + +

+ +

+ +

+ + + + +
+ + +
+ +
+ +
+ →', 'twentytwelve' ) ); ?> + '' ) ); ?> +
+ + + +
diff --git a/wp-content/themes/twentytwelve/css/ie.css b/wp-content/themes/twentytwelve/css/ie.css new file mode 100644 index 0000000..4d4f542 --- /dev/null +++ b/wp-content/themes/twentytwelve/css/ie.css @@ -0,0 +1,258 @@ +/* +Styles for older IE versions (previous to IE9). +*/ + +body { + background-color: #e6e6e6; +} +body.custom-background-empty { + background-color: #fff; +} +body.custom-background-empty .site, +body.custom-background-white .site { + box-shadow: none; + margin-bottom: 0; + margin-top: 0; + padding: 0; +} +.assistive-text, +.site .screen-reader-text { + clip: rect(1px 1px 1px 1px); /* IE7 */ +} +.full-width .site-content { + float: none; + width: 100%; +} +img.size-full, +img.size-large, +img.header-image, +img.wp-post-image, +img[class*="align"], +img[class*="wp-image-"], +img[class*="attachment-"] { + width: auto; /* Prevent stretching of full-size and large-size images with height and width attributes in IE8 */ +} +.author-avatar { + float: left; + margin-top: 8px; + margin-top: 0.571428571rem; +} +.author-description { + float: right; + width: 80%; +} +.site { + box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); + margin: 48px auto; + max-width: 960px; + overflow: hidden; + padding: 0 40px; +} +.site-content { + float: left; + width: 65.104166667%; +} +body.template-front-page .site-content, +body.attachment .site-content, +body.full-width .site-content { + width: 100%; +} +.widget-area { + float: right; + width: 26.041666667%; +} +.site-header h1, +.site-header h2 { + text-align: left; +} +.site-header h1 { + font-size: 26px; + line-height: 1.846153846; +} +.main-navigation ul.nav-menu, +.main-navigation div.nav-menu > ul { + border-bottom: 1px solid #ededed; + border-top: 1px solid #ededed; + display: inline-block !important; + text-align: left; + width: 100%; +} +.main-navigation ul { + margin: 0; + text-indent: 0; +} +.main-navigation li a, +.main-navigation li { + display: inline-block; + text-decoration: none; +} +.ie7 .main-navigation li a, +.ie7 .main-navigation li { + display: inline; +} +.main-navigation li a { + border-bottom: 0; + color: #6a6a6a; + line-height: 3.692307692; + text-transform: uppercase; +} +.main-navigation li a:hover { + color: #000; +} +.main-navigation li { + margin: 0 40px 0 0; + position: relative; +} +.main-navigation li ul { + margin: 0; + padding: 0; + position: absolute; + top: 100%; + z-index: 1; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); +} +.ie7 .main-navigation li ul { + clip: inherit; + display: none; + left: 0; + overflow: visible; +} +.main-navigation li ul ul, +.ie7 .main-navigation li ul ul { + top: 0; + left: 100%; +} +.main-navigation ul li:hover > ul, +.main-navigation ul li:focus > ul, +.main-navigation .focus > ul { + border-left: 0; + clip: inherit; + overflow: inherit; + height: inherit; + width: inherit; +} +.ie7 .main-navigation ul li:hover > ul, +.ie7 .main-navigation ul li:focus > ul { + display: block; +} +.main-navigation li ul li a { + background: #efefef; + border-bottom: 1px solid #ededed; + display: block; + font-size: 11px; + line-height: 2.181818182; + padding: 8px 10px; + width: 180px; +} +.main-navigation li ul li a:hover { + background: #e3e3e3; + color: #444; +} +.main-navigation .current-menu-item > a, +.main-navigation .current-menu-ancestor > a, +.main-navigation .current_page_item > a, +.main-navigation .current_page_ancestor > a { + color: #636363; + font-weight: bold; +} +.menu-toggle { + display: none; +} +.entry-header .entry-title { + font-size: 22px; +} +#respond form input[type="text"] { + width: 46.333333333%; +} +#respond form textarea.blog-textarea { + width: 79.666666667%; +} +.template-front-page .site-content, +.template-front-page article { + overflow: hidden; +} +.template-front-page.has-post-thumbnail article { + float: left; + width: 47.916666667%; +} +.entry-page-image { + float: right; + margin-bottom: 0; + width: 47.916666667%; +} +.template-front-page .widget-area .widget, +.template-front-page.two-sidebars .widget-area .front-widgets { + float: left; + margin-bottom: 24px; + width: 51.875%; +} +.template-front-page .widget-area .widget:nth-child(odd) { + clear: right; +} +.template-front-page .widget-area .widget:nth-child(even), +.template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets { + float: right; + margin: 0 0 24px; + width: 39.0625%; +} +.template-front-page.two-sidebars .widget, +.template-front-page.two-sidebars .widget:nth-child(even) { + float: none; + width: auto; +} + +/* =RTL overrides for IE7 and IE8 +-------------------------------------------------------------- */ +.rtl .site-header h1, +.rtl .site-header h2 { + text-align: right; +} +.rtl .widget-area, +.rtl .author-description { + float: left; +} +.rtl .author-avatar, +.rtl .site-content { + float: right; +} +.rtl .main-navigation ul.nav-menu, +.rtl .main-navigation div.nav-menu > ul { + text-align: right; +} +.rtl .main-navigation ul li ul li, +.rtl .main-navigation ul li ul li ul li { + margin-left: 40px; + margin-right: auto; +} +.rtl .main-navigation li ul ul { + position: absolute; + bottom: 0; + right: 100%; + z-index: 1; +} +.ie7 .rtl .main-navigation li ul ul { + position: absolute; + bottom: 0; + right: 100%; + z-index: 1; +} +.ie7 .rtl .main-navigation ul li { + z-index: 99; +} +.ie7 .rtl .main-navigation li ul { + position: absolute; + bottom: 100%; + right: 0; + z-index: 1; +} +.ie7 .rtl .main-navigation li { + margin-right: auto; + margin-left: 40px; +} +.ie7 .rtl .main-navigation li ul ul ul { + position: relative; + z-index: 1; +} \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/editor-style-rtl.css b/wp-content/themes/twentytwelve/editor-style-rtl.css new file mode 100644 index 0000000..5fd832c --- /dev/null +++ b/wp-content/themes/twentytwelve/editor-style-rtl.css @@ -0,0 +1,28 @@ +/* +Theme Name: Twenty Twelve +Description: Used to style the TinyMCE editor for RTL languages. +See also rtl.css file. +*/ + +html .mceContentBody { + direction: rtl; + unicode-bidi: embed; +} +li { + margin: 0 24px 0 0; + margin: 0 1.714285714rem 0 0; +} +dl { + margin: 0 24px; + margin: 0 1.714285714rem; +} +tr th { + text-align: right; +} +td { + padding: 6px 0 6px 10px; + text-align: right; +} +.wp-caption { + text-align: right; +} \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/editor-style.css b/wp-content/themes/twentytwelve/editor-style.css new file mode 100644 index 0000000..24e9b24 --- /dev/null +++ b/wp-content/themes/twentytwelve/editor-style.css @@ -0,0 +1,342 @@ +/* +Theme Name: Twenty Twelve +Description: Used to style the TinyMCE editor. +*/ + +html { + font-size: 87.5%; +} +html .mceContentBody { + max-width: 625px; +} +body { + color: #444; + font-family: "Open Sans", Helvetica, Arial, sans-serif; + font-size: 14px; + font-size: 1rem; + line-height: 1; + text-rendering: optimizeLegibility; + vertical-align: baseline; +} + + +/* =Headings +-------------------------------------------------------------- */ + +h1, +h2, +h3, +h4, +h5, +h6 { + clear: both; + line-height: 1.846153846; + margin: 24px 0; + margin: 1.714285714rem 0; +} +h1 { + font-size: 21px; + font-size: 1.5rem; + line-height: 1.5; +} +h2 { + font-size: 18px; + font-size: 1.285714286rem; + line-height: 1.6; +} +h3 { + font-size: 16px; + font-size: 1.142857143rem; +} +h4 { + font-size: 14px; + font-size: 1rem; +} +h5 { + font-size: 13px; + font-size: 0.928571429rem; +} +h6 { + font-size: 12px; + font-size: 0.857142857rem; +} +hr { + background-color: #ccc; + border: 0; + height: 1px; + margin: 24px; + margin-bottom: 1.714285714rem; +} + + +/* =Text elements +-------------------------------------------------------------- */ + +p { + line-height: 1.714285714; + margin: 0 0 24px; + margin: 0 0 1.714285714rem; +} +ul, +ol { + margin: 0 0 24px; + margin: 0 0 1.714285714rem; + line-height: 1.714285714; + padding: 0; +} +ul { + list-style: disc outside; +} +ol { + list-style: decimal outside; +} +ul ul, +ol ol, +ul ol, +ol ul { + margin-bottom: 0; +} +li { + margin: 0 0 0 24px; + margin: 0 0 0 1.714285714rem; +} +dl { + margin: 0 24px; + margin: 0 1.714285714rem; +} +dt { + font-weight: bold; + margin-bottom: 24px; + margin-bottom: 1.714285714rem; +} +dd { + line-height: 1.714285714; + margin: 0 0 24px; + margin: 0 0 1.714285714rem; +} +strong { + font-weight: bold; +} +cite, +em, +i { + font-style: italic; +} +cite { + border: none; +} +big { + font-size: 128.571429%; +} +.mceContentBody blockquote { + font-style: italic !important; + font-weight: normal; + margin: 0; + padding: 24px; + padding: 1.714285714rem; +} +pre { + border: 1px solid #ededed; + color: #666; + font-family: Consolas, Monaco, Lucida Console, monospace; + font-size: 12px; + font-size: 0.857142857rem; + line-height: 1.714285714; + margin: 24px 0; + margin: 1.714285714rem 0; + overflow: auto; + padding: 24px; + padding: 1.714285714rem; +} +code, +kbd, +samp, +var { + font-family: Consolas, Monaco, Lucida Console, monospace; + font-size: 12px; + font-size: 0.857142857rem; + line-height: 2; +} +abbr, +acronym, +dfn { + border-bottom: 1px dotted #666; + cursor: help; +} +address { + display: block; + line-height: 1.714285714; + margin: 0 0 24px; + margin: 0 0 1.714285714rem; +} +del { + color: #333; +} +ins { + background: #fff9c0; + border: none; + color: #333; + text-decoration: none; +} +sup, +sub { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +input[type="text"] { + border: 1px solid #ccc; + border-radius: 3px; + font-family: inherit; + padding: 6px; + padding: 0.428571429rem; +} +textarea { + border: 1px solid #d5d2ca; + border-radius: 3px; + font-family: inherit; + font-size: 12px; + font-size: 0.857142857rem; + line-height: 1.714285714; + padding: 10px; + padding: 0.714285714rem; + width: 96%; +} + + +/* =Links +-------------------------------------------------------------- */ + +a, +a em, +a strong { + color: #21759b; + outline: none; +} +a:focus, +a:active, +a:hover { + color: #0f3647; +} + + +/* =Alignment +-------------------------------------------------------------- */ + +.alignleft { + display: inline; + float: left; + margin: 12px 24px 12px 0; + margin: 0.857142857rem 1.714285714rem 0.857142857rem 0; +} +.alignright { + display: inline; + float: right; + margin: 12px 0 12px 24px; + margin: 0.857142857rem 0 0.857142857rem 1.714285714rem; +} +.aligncenter { + clear: both; + display: block; + margin-top: 12px; + margin-top: 0.857142857rem; + margin-bottom: 12px; + margin-bottom: 0.857142857rem; +} + + +/* =Tables +-------------------------------------------------------------- */ + +table { + border-bottom: 1px solid #ededed; + border-collapse: collapse; + border-spacing: 0; + color: #757575; + font-size: 12px; + font-size: 0.857142857rem; + line-height: 2; + margin: 0 0 24px; + margin: 0 0 1.714285714rem; + width: 100%; +} +tr th { + color: #636363; + font-size: 11px; + font-size: 0.785714286rem; + font-weight: bold; + line-height: 2.181818182; + text-align: left; + text-transform: uppercase; +} +td { + border-top: 1px solid #ededed !important; + color: #757575; + font-size: inherit; + font-weight: normal; + padding: 6px 10px 6px 0; + text-align: left; +} + + +/* =Images +-------------------------------------------------------------- */ + +img, +.editor-attachment { + border: 0; + border-radius: 3px; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); + max-width: 100%; +} +img.size-full { + width: auto/9; /* Prevent stretching of full-size images in IE8 */ +} +img[class*="wp-image-"] { + height: auto; + max-width: 100%; +} +img[class*="align"], +img[class*="wp-image-"], +img[class*="attachment-"] { + height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */ +} +img.mce-wp-nextpage { + border-radius: 0; + box-shadow: none; +} +img.wp-smiley { + border: 0; + border-radius: 0; + box-shadow: none; + margin-bottom: 0; + margin-top: 0; + padding: 0; +} +.wp-caption { + background: transparent; + border: none; + margin: 0; + padding: 4px; + text-align: left; +} +.wp-caption-dt { + margin: 0; +} +.wp-caption .wp-caption-text, +.wp-caption-dd { + color: #757575; + font-style: italic; + font-size: 12px; + font-size: 0.857142857rem; + line-height: 2; + margin: 0 0 24px; + margin: 0 0 1.71429rem; +} diff --git a/wp-content/themes/twentytwelve/footer.php b/wp-content/themes/twentytwelve/footer.php new file mode 100644 index 0000000..79848d3 --- /dev/null +++ b/wp-content/themes/twentytwelve/footer.php @@ -0,0 +1,23 @@ + + + + + + + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/functions.php b/wp-content/themes/twentytwelve/functions.php new file mode 100644 index 0000000..c4055ba --- /dev/null +++ b/wp-content/themes/twentytwelve/functions.php @@ -0,0 +1,499 @@ + 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', 'twentytwelve' ) ); + + /* + * 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( 624, 9999 ); // Unlimited height, soft crop +} +add_action( 'after_setup_theme', 'twentytwelve_setup' ); + +/** + * Add support for a custom header image. + */ +require( get_template_directory() . '/inc/custom-header.php' ); + +/** + * Return the Google font stylesheet URL if available. + * + * The use of Open Sans by default is localized. For languages that use + * characters not supported by the font, the font can be disabled. + * + * @since Twenty Twelve 1.2 + * + * @return string Font stylesheet or empty string if disabled. + */ +function twentytwelve_get_font_url() { + $font_url = ''; + + /* translators: If there are characters in your language that are not supported + * by Open Sans, translate this to 'off'. Do not translate into your own language. + */ + if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) { + $subsets = 'latin,latin-ext'; + + /* translators: To add an additional Open Sans character subset specific to your language, + * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. + */ + $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'twentytwelve' ); + + if ( 'cyrillic' == $subset ) + $subsets .= ',cyrillic,cyrillic-ext'; + elseif ( 'greek' == $subset ) + $subsets .= ',greek,greek-ext'; + elseif ( 'vietnamese' == $subset ) + $subsets .= ',vietnamese'; + + $protocol = is_ssl() ? 'https' : 'http'; + $query_args = array( + 'family' => 'Open+Sans:400italic,700italic,400,700', + 'subset' => $subsets, + ); + $font_url = add_query_arg( $query_args, "$protocol://fonts.googleapis.com/css" ); + } + + return $font_url; +} + +/** + * Enqueue scripts and styles for front-end. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_scripts_styles() { + global $wp_styles; + + /* + * Adds JavaScript to pages with the comment form to support + * sites with threaded comments (when in use). + */ + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) + wp_enqueue_script( 'comment-reply' ); + + // Adds JavaScript for handling the navigation menu hide-and-show behavior. + wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20140318', true ); + + $font_url = twentytwelve_get_font_url(); + if ( ! empty( $font_url ) ) + wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null ); + + // Loads our main stylesheet. + wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() ); + + // Loads the Internet Explorer specific stylesheet. + wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' ); + $wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' ); +} +add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); + +/** + * Filter TinyMCE CSS path to include Google Fonts. + * + * Adds additional stylesheets to the TinyMCE editor if needed. + * + * @uses twentytwelve_get_font_url() To get the Google Font stylesheet URL. + * + * @since Twenty Twelve 1.2 + * + * @param string $mce_css CSS path to load in TinyMCE. + * @return string Filtered CSS path. + */ +function twentytwelve_mce_css( $mce_css ) { + $font_url = twentytwelve_get_font_url(); + + if ( empty( $font_url ) ) + return $mce_css; + + if ( ! empty( $mce_css ) ) + $mce_css .= ','; + + $mce_css .= esc_url_raw( str_replace( ',', '%2C', $font_url ) ); + + return $mce_css; +} +add_filter( 'mce_css', 'twentytwelve_mce_css' ); + +/** + * Filter the page title. + * + * Creates a nicely formatted and more specific title element text + * for output in head of document, based on current view. + * + * @since Twenty Twelve 1.0 + * + * @param string $title Default title text for current view. + * @param string $sep Optional separator. + * @return string Filtered title. + */ +function twentytwelve_wp_title( $title, $sep ) { + global $paged, $page; + + if ( is_feed() ) + return $title; + + // Add the site name. + $title .= get_bloginfo( 'name', 'display' ); + + // Add the site description for the home/front page. + $site_description = get_bloginfo( 'description', 'display' ); + if ( $site_description && ( is_home() || is_front_page() ) ) + $title = "$title $sep $site_description"; + + // Add a page number if necessary. + if ( $paged >= 2 || $page >= 2 ) + $title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) ); + + return $title; +} +add_filter( 'wp_title', 'twentytwelve_wp_title', 10, 2 ); + +/** + * Filter the page menu arguments. + * + * Makes our wp_nav_menu() fallback -- wp_page_menu() -- show a home link. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_page_menu_args( $args ) { + if ( ! isset( $args['show_home'] ) ) + $args['show_home'] = true; + return $args; +} +add_filter( 'wp_page_menu_args', 'twentytwelve_page_menu_args' ); + +/** + * Register sidebars. + * + * Registers our main widget area and the front page widget areas. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_widgets_init() { + register_sidebar( array( + 'name' => __( 'Main Sidebar', 'twentytwelve' ), + 'id' => 'sidebar-1', + 'description' => __( 'Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve' ), + 'before_widget' => '', + 'before_title' => '

', + 'after_title' => '

', + ) ); + + register_sidebar( array( + 'name' => __( 'First Front Page Widget Area', 'twentytwelve' ), + 'id' => 'sidebar-2', + 'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ), + 'before_widget' => '', + 'before_title' => '

', + 'after_title' => '

', + ) ); + + register_sidebar( array( + 'name' => __( 'Second Front Page Widget Area', 'twentytwelve' ), + 'id' => 'sidebar-3', + 'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ), + 'before_widget' => '', + 'before_title' => '

', + 'after_title' => '

', + ) ); +} +add_action( 'widgets_init', 'twentytwelve_widgets_init' ); + +if ( ! function_exists( 'twentytwelve_content_nav' ) ) : +/** + * Displays navigation to next/previous pages when applicable. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_content_nav( $html_id ) { + global $wp_query; + + $html_id = esc_attr( $html_id ); + + if ( $wp_query->max_num_pages > 1 ) : ?> + + 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', 'twentytwelve' ) . '' : '' + ); + printf( '', + esc_url( get_comment_link( $comment->comment_ID ) ), + get_comment_time( 'c' ), + /* translators: 1: date, 2: time */ + sprintf( __( '%1$s at %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() ) + ); + ?> +
    + + comment_approved ) : ?> +

    + + +
    + + ', '

    ' ); ?> +
    + +
    + __( 'Reply', 'twentytwelve' ), 'after' => ' ', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> +
    +
    + ', + esc_url( get_permalink() ), + esc_attr( get_the_time() ), + esc_attr( get_the_date( 'c' ) ), + esc_html( get_the_date() ) + ); + + $author = sprintf( '', + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), + esc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ), + get_the_author() + ); + + // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. + if ( $tag_list ) { + $utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s by %4$s.', 'twentytwelve' ); + } elseif ( $categories_list ) { + $utility_text = __( 'This entry was posted in %1$s on %3$s by %4$s.', 'twentytwelve' ); + } else { + $utility_text = __( 'This entry was posted on %3$s by %4$s.', 'twentytwelve' ); + } + + printf( + $utility_text, + $categories_list, + $tag_list, + $date, + $author + ); +} +endif; + +/** + * Extend the default WordPress body classes. + * + * Extends the default WordPress body class to denote: + * 1. Using a full-width layout, when no active widgets in the sidebar + * or full-width template. + * 2. Front Page template: thumbnail in use and number of sidebars for + * widget areas. + * 3. White or empty background color to change the layout and spacing. + * 4. Custom fonts enabled. + * 5. Single or multiple authors. + * + * @since Twenty Twelve 1.0 + * + * @param array $classes Existing class values. + * @return array Filtered class values. + */ +function twentytwelve_body_class( $classes ) { + $background_color = get_background_color(); + $background_image = get_background_image(); + + if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) ) + $classes[] = 'full-width'; + + if ( is_page_template( 'page-templates/front-page.php' ) ) { + $classes[] = 'template-front-page'; + if ( has_post_thumbnail() ) + $classes[] = 'has-post-thumbnail'; + if ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) ) + $classes[] = 'two-sidebars'; + } + + if ( empty( $background_image ) ) { + if ( empty( $background_color ) ) + $classes[] = 'custom-background-empty'; + elseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) ) + $classes[] = 'custom-background-white'; + } + + // Enable custom font class only if the font CSS is queued to load. + if ( wp_style_is( 'twentytwelve-fonts', 'queue' ) ) + $classes[] = 'custom-font-enabled'; + + if ( ! is_multi_author() ) + $classes[] = 'single-author'; + + return $classes; +} +add_filter( 'body_class', 'twentytwelve_body_class' ); + +/** + * Adjust content width in certain contexts. + * + * Adjusts content_width value for full-width and single image attachment + * templates, and when there are no active widgets in the sidebar. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_content_width() { + if ( is_page_template( 'page-templates/full-width.php' ) || is_attachment() || ! is_active_sidebar( 'sidebar-1' ) ) { + global $content_width; + $content_width = 960; + } +} +add_action( 'template_redirect', 'twentytwelve_content_width' ); + +/** + * Register postMessage support. + * + * Add postMessage support for site title and description for the Customizer. + * + * @since Twenty Twelve 1.0 + * + * @param WP_Customize_Manager $wp_customize Customizer object. + */ +function twentytwelve_customize_register( $wp_customize ) { + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; +} +add_action( 'customize_register', 'twentytwelve_customize_register' ); + +/** + * Enqueue Javascript postMessage handlers for the Customizer. + * + * Binds JS handlers to make the Customizer preview reload changes asynchronously. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_customize_preview_js() { + wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130301', true ); +} +add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' ); diff --git a/wp-content/themes/twentytwelve/header.php b/wp-content/themes/twentytwelve/header.php new file mode 100644 index 0000000..eb64b68 --- /dev/null +++ b/wp-content/themes/twentytwelve/header.php @@ -0,0 +1,53 @@ + section and everything up till
    + * + * @package WordPress + * @subpackage Twenty_Twelve + * @since Twenty Twelve 1.0 + */ +?> + + + +> + + + + +<?php wp_title( '|', true, 'right' ); ?> + + + + + + + +> +
    + + +
    \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/image.php b/wp-content/themes/twentytwelve/image.php new file mode 100644 index 0000000..285e453 --- /dev/null +++ b/wp-content/themes/twentytwelve/image.php @@ -0,0 +1,116 @@ + + +
    +
    + + + +
    > +
    +

    + +
    + Published at %4$s × %5$s in %8$s.', 'twentytwelve' ), + esc_attr( get_the_date( 'c' ) ), + esc_html( get_the_date() ), + esc_url( wp_get_attachment_url() ), + $metadata['width'], + $metadata['height'], + esc_url( get_permalink( $post->post_parent ) ), + esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ), + get_the_title( $post->post_parent ) + ); + ?> + ', '' ); ?> +
    + + +
    + +
    + +
    +
    + $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); +foreach ( $attachments as $k => $attachment ) : + if ( $attachment->ID == $post->ID ) + break; +endforeach; + +$k++; +// If there is more than 1 attachment in a gallery +if ( count( $attachments ) > 1 ) : + if ( isset( $attachments[ $k ] ) ) : + // get the URL of the next image attachment + $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); + else : + // or get the URL of the first image attachment + $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); + endif; +else : + // or, if there's only 1 image, get the URL of the image + $next_attachment_url = wp_get_attachment_url(); +endif; +?> + ID, $attachment_size ); + ?> + + post_excerpt ) ) : ?> +
    + +
    + +
    + +
    + +
    + + '' ) ); ?> +
    + +
    + +
    + + + + + +
    +
    + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/inc/custom-header.php b/wp-content/themes/twentytwelve/inc/custom-header.php new file mode 100644 index 0000000..1657eff --- /dev/null +++ b/wp-content/themes/twentytwelve/inc/custom-header.php @@ -0,0 +1,165 @@ + '515151', + 'default-image' => '', + + // Set height and width, with a maximum value for the width. + 'height' => 250, + 'width' => 960, + 'max-width' => 2000, + + // Support flexible height and width. + 'flex-height' => true, + 'flex-width' => true, + + // Random image rotation off by default. + 'random-default' => false, + + // Callbacks for styling the header and the admin preview. + 'wp-head-callback' => 'twentytwelve_header_style', + 'admin-head-callback' => 'twentytwelve_admin_header_style', + 'admin-preview-callback' => 'twentytwelve_admin_header_image', + ); + + add_theme_support( 'custom-header', $args ); +} +add_action( 'after_setup_theme', 'twentytwelve_custom_header_setup' ); + +/** + * Load our special font CSS file. + * + * @since Twenty Twelve 1.2 + */ +function twentytwelve_custom_header_fonts() { + $font_url = twentytwelve_get_font_url(); + if ( ! empty( $font_url ) ) + wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null ); +} +add_action( 'admin_print_styles-appearance_page_custom-header', 'twentytwelve_custom_header_fonts' ); + +/** + * Style the header text displayed on the blog. + * + * get_header_textcolor() options: 515151 is default, hide text (returns 'blank'), or any hex value. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_header_style() { + $text_color = get_header_textcolor(); + + // If no custom options for text are set, let's bail + if ( $text_color == get_theme_support( 'custom-header', 'default-text-color' ) ) + return; + + // If we get this far, we have custom styles. + ?> + + Header admin panel. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_admin_header_style() { +?> + + Header admin panel. + * + * This callback overrides the default markup displayed there. + * + * @since Twenty Twelve 1.0 + */ +function twentytwelve_admin_header_image() { + ?> + + + +
    +
    + + + + + + + + + + + +
    + + +
    +

    +
    + +
    +

    Get started here.', 'twentytwelve' ), admin_url( 'post-new.php' ) ); ?>

    +
    + + +
    +

    +
    + +
    +

    + +
    + + +
    + + + +
    +
    + + + \ No newline at end of file diff --git a/wp-content/themes/twentytwelve/js/html5.js b/wp-content/themes/twentytwelve/js/html5.js new file mode 100644 index 0000000..6168aac --- /dev/null +++ b/wp-content/themes/twentytwelve/js/html5.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); +if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d