Changeset 25521
- Timestamp:
- 09/20/2013 07:23:22 PM (11 years ago)
- Location:
- trunk/src/wp-content/themes/twentytwelve
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwelve/404.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The template for displaying 404 pages (Not Found) .3 * The template for displaying 404 pages (Not Found) 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentytwelve/archive.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The template for displaying Archive pages .3 * The template for displaying Archive pages 4 4 * 5 5 * Used to display archive-type pages if nothing more specific matches a query. … … 11 11 * author.php for Author archives. 12 12 * 13 * Learn more:http://codex.wordpress.org/Template_Hierarchy13 * @link http://codex.wordpress.org/Template_Hierarchy 14 14 * 15 15 * @package WordPress -
trunk/src/wp-content/themes/twentytwelve/author.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The template for displaying Author Archive pages .3 * The template for displaying Author Archive pages 4 4 * 5 5 * Used to display archive-type pages for posts by an author. 6 6 * 7 * Learn more:http://codex.wordpress.org/Template_Hierarchy7 * @link http://codex.wordpress.org/Template_Hierarchy 8 8 * 9 9 * @package WordPress … … 48 48 <div class="author-info"> 49 49 <div class="author-avatar"> 50 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 60 ) ); ?> 50 <?php 51 //duplicate_hook 52 $author_bio_avatar_size = apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ); 53 echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size ); 54 ?> 51 55 </div><!-- .author-avatar --> 52 56 <div class="author-description"> -
trunk/src/wp-content/themes/twentytwelve/category.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The template for displaying Category pages .3 * The template for displaying Category pages 4 4 * 5 5 * Used to display archive-type pages for posts in a category. 6 6 * 7 * Learn more:http://codex.wordpress.org/Template_Hierarchy7 * @link http://codex.wordpress.org/Template_Hierarchy 8 8 * 9 9 * @package WordPress -
trunk/src/wp-content/themes/twentytwelve/comments.php
r22620 r25521 1 1 <?php 2 2 /** 3 * The template for displaying Comments .3 * The template for displaying Comments 4 4 * 5 5 * The area of the page that contains both current comments … … 13 13 */ 14 14 15 /* 15 /** 16 16 * If the current post is protected by a password and 17 17 * the visitor has not yet entered the password we will -
trunk/src/wp-content/themes/twentytwelve/content-none.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The template for displaying a "No posts found" message .3 * The template for displaying a "No posts found" message 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentytwelve/content-status.php
r22318 r25521 15 15 <h2><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a></h2> 16 16 </header> 17 <?php echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentytwelve_status_avatar', '48' ) ); ?> 17 <?php 18 /** 19 * Filter the status avatar size. 20 * 21 * @since Twenty Twelve 1.0 22 * 23 * @param int $size The height and width of the avatar in pixels. 24 */ 25 $status_avatar = apply_filters( 'twentytwelve_status_avatar', 48 ); 26 echo get_avatar( get_the_author_meta( 'ID' ), $status_avatar ); 27 ?> 18 28 </div><!-- .entry-header --> 19 29 -
trunk/src/wp-content/themes/twentytwelve/content.php
r24131 r25521 1 1 <?php 2 2 /** 3 * The default template for displaying content. Used for both single and index/archive/search. 3 * The default template for displaying content 4 * 5 * Used for both single and index/archive/search. 4 6 * 5 7 * @package WordPress … … 48 50 <div class="author-info"> 49 51 <div class="author-avatar"> 50 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?> 52 <?php 53 /** 54 * Filter the author bio avatar size. 55 * 56 * @since Twenty Twelve 1.0 57 * 58 * @param int $size The height and width of the avatar in pixels. 59 */ 60 $author_bio_avatar_size = apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ); 61 echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size ); 62 ?> 51 63 </div><!-- .author-avatar --> 52 64 <div class="author-description"> -
trunk/src/wp-content/themes/twentytwelve/footer.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The template for displaying the footer .3 * The template for displaying the footer 4 4 * 5 * Contains footer content and the closing of the 6 * #main and #page div elements. 5 * Contains footer content and the closing of the #main and #page div elements. 7 6 * 8 7 * @package WordPress -
trunk/src/wp-content/themes/twentytwelve/functions.php
r23716 r25521 1 1 <?php 2 2 /** 3 * Twenty Twelve functions and definitions .3 * Twenty Twelve functions and definitions 4 4 * 5 5 * Sets up the theme and provides some helper functions, which are used … … 16 16 * to a filter or action hook. 17 17 * 18 * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.18 * For more information on hooks, actions, and filters, @link http://codex.wordpress.org/Plugin_API 19 19 * 20 20 * @package WordPress … … 24 24 25 25 /** 26 * Set sup the content width value based on the theme's design and stylesheet.26 * Set up the content width value based on the theme's design and stylesheet. 27 27 */ 28 28 if ( ! isset( $content_width ) ) … … 30 30 31 31 /** 32 * Twenty Twelve setup. 33 * 32 34 * Sets up theme defaults and registers the various WordPress features that 33 35 * Twenty Twelve supports. … … 43 45 */ 44 46 function twentytwelve_setup() { 45 /* 47 /** 46 48 * Makes Twenty Twelve available for translation. 47 49 * … … 64 66 register_nav_menu( 'primary', __( 'Primary Menu', 'twentytwelve' ) ); 65 67 66 /* 67 * This theme supports custom background color and image, and here68 * we also set up the default background color.68 /** 69 * This theme supports custom background color and image, 70 * and here we also set up the default background color. 69 71 */ 70 72 add_theme_support( 'custom-background', array( … … 79 81 80 82 /** 81 * Add ssupport for a custom header image.83 * Add support for a custom header image. 82 84 */ 83 85 require( get_template_directory() . '/inc/custom-header.php' ); 84 86 85 87 /** 86 * Return sthe Google font stylesheet URL if available.88 * Return the Google font stylesheet URL if available. 87 89 * 88 90 * The use of Open Sans by default is localized. For languages that use … … 96 98 $font_url = ''; 97 99 98 /* translators: If there are characters in your language that are not supported 99 by Open Sans, translate this to 'off'. Do not translate into your own language. */ 100 /** 101 * translators: If there are characters in your language that are not supported 102 * by Open Sans, translate this to 'off'. Do not translate into your own language. 103 */ 100 104 if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) { 101 105 $subsets = 'latin,latin-ext'; 102 106 103 /* translators: To add an additional Open Sans character subset specific to your language, translate 104 this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. */ 107 /** 108 * translators: To add an additional Open Sans character subset specific to your language, 109 * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. 110 */ 105 111 $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'twentytwelve' ); 106 112 … … 124 130 125 131 /** 126 * Enqueues scripts and styles for front-end. 127 * 128 * @since Twenty Twelve 1.0 132 * Enqueue scripts and styles for front-end. 133 * 134 * @since Twenty Twelve 1.0 135 * 136 * @return void 129 137 */ 130 138 function twentytwelve_scripts_styles() { 131 139 global $wp_styles; 132 140 133 /* 141 /** 134 142 * Adds JavaScript to pages with the comment form to support 135 143 * sites with threaded comments (when in use). … … 138 146 wp_enqueue_script( 'comment-reply' ); 139 147 140 /* 148 /** 141 149 * Adds JavaScript for handling the navigation menu hide-and-show behavior. 142 150 */ … … 147 155 wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null ); 148 156 149 /* 157 /** 150 158 * Loads our main stylesheet. 151 159 */ 152 160 wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() ); 153 161 154 /* 162 /** 155 163 * Loads the Internet Explorer specific stylesheet. 156 164 */ … … 161 169 162 170 /** 171 * Filter TinyMCE CSS path to include Google Fonts. 172 * 163 173 * Adds additional stylesheets to the TinyMCE editor if needed. 164 174 * … … 168 178 * 169 179 * @param string $mce_css CSS path to load in TinyMCE. 170 * @return string 180 * @return string Filtered CSS path. 171 181 */ 172 182 function twentytwelve_mce_css( $mce_css ) { … … 186 196 187 197 /** 198 * Filter the page title. 199 * 188 200 * Creates a nicely formatted and more specific title element text 189 201 * for output in head of document, based on current view. … … 218 230 219 231 /** 232 * Filter the page menu arguments. 233 * 220 234 * Makes our wp_nav_menu() fallback -- wp_page_menu() -- show a home link. 221 235 * … … 230 244 231 245 /** 246 * Register sidebars. 247 * 232 248 * Registers our main widget area and the front page widget areas. 233 249 * … … 298 314 * 299 315 * @since Twenty Twelve 1.0 316 * 317 * @return void 300 318 */ 301 319 function twentytwelve_comment( $comment, $args, $depth ) { … … 354 372 if ( ! function_exists( 'twentytwelve_entry_meta' ) ) : 355 373 /** 374 * Set up post entry meta. 375 * 356 376 * Prints HTML with meta information for current post: categories, tags, permalink, author, and date. 357 377 * … … 359 379 * 360 380 * @since Twenty Twelve 1.0 381 * 382 * @return void 361 383 */ 362 384 function twentytwelve_entry_meta() { … … 400 422 401 423 /** 424 * Extend the default WordPress body classes. 425 * 402 426 * Extends the default WordPress body class to denote: 403 427 * 1. Using a full-width layout, when no active widgets in the sidebar … … 411 435 * @since Twenty Twelve 1.0 412 436 * 413 * @param array Existing class values.437 * @param array $classes Existing class values. 414 438 * @return array Filtered class values. 415 439 */ … … 448 472 449 473 /** 474 * Adjust content width in certain contexts. 475 * 450 476 * Adjusts content_width value for full-width and single image attachment 451 477 * templates, and when there are no active widgets in the sidebar. 452 478 * 453 479 * @since Twenty Twelve 1.0 480 * 481 * @return void 454 482 */ 455 483 function twentytwelve_content_width() { … … 462 490 463 491 /** 464 * Add postMessage support for site title and description for the Theme Customizer. 465 * 466 * @since Twenty Twelve 1.0 467 * 468 * @param WP_Customize_Manager $wp_customize Theme Customizer object. 492 * Register postMessage support. 493 * 494 * Add postMessage support for site title and description for the Customizer. 495 * 496 * @since Twenty Twelve 1.0 497 * 498 * @param WP_Customize_Manager $wp_customize Customizer object. 469 499 * @return void 470 500 */ … … 477 507 478 508 /** 479 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. 480 * 481 * @since Twenty Twelve 1.0 509 * Enqueue Javascript postMessage handlers for the Customizer. 510 * 511 * Binds JS handlers to make the Customizer preview reload changes asynchronously. 512 * 513 * @since Twenty Twelve 1.0 514 * 515 * @return void 482 516 */ 483 517 function twentytwelve_customize_preview_js() { -
trunk/src/wp-content/themes/twentytwelve/header.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The Header for our theme.3 * The Header template for our theme 4 4 * 5 5 * Displays all of the <head> section and everything up till <div id="main"> -
trunk/src/wp-content/themes/twentytwelve/image.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The template for displaying image attachments .3 * The template for displaying image attachments 4 4 * 5 * Learn more:http://codex.wordpress.org/Template_Hierarchy5 * @link http://codex.wordpress.org/Template_Hierarchy 6 6 * 7 7 * @package WordPress … … 75 75 ?> 76 76 <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php 77 /** 78 * Filter the image attachment size to use. 79 * 80 * @since Twenty Twelve 1.0 81 * 82 * @param array $size { 83 * @type int The attachment height in pixels. 84 * @type int The attachment width in pixels. 85 * } 86 */ 77 87 $attachment_size = apply_filters( 'twentytwelve_attachment_size', array( 960, 960 ) ); 78 88 echo wp_get_attachment_image( $post->ID, $attachment_size ); -
trunk/src/wp-content/themes/twentytwelve/inc/custom-header.php
r24050 r25521 1 1 <?php 2 2 /** 3 * Implements an optional custom header for Twenty Twelve. 3 * Implement an optional custom header for Twenty Twelve 4 * 4 5 * See http://codex.wordpress.org/Custom_Headers 5 6 * … … 10 11 11 12 /** 12 * Set sup the WordPress core custom header arguments and settings.13 * Set up the WordPress core custom header arguments and settings. 13 14 * 14 15 * @uses add_theme_support() to register support for 3.4 and up. … … 48 49 49 50 /** 50 * Load sour special font CSS file.51 * Load our special font CSS file. 51 52 * 52 53 * @since Twenty Twelve 1.2 … … 62 63 63 64 /** 64 * Style sthe header text displayed on the blog.65 * Style the header text displayed on the blog. 65 66 * 66 67 * get_header_textcolor() options: 515151 is default, hide text (returns 'blank'), or any hex value. … … 102 103 103 104 /** 104 * Style sthe header image displayed on the Appearance > Header admin panel.105 * Style the header image displayed on the Appearance > Header admin panel. 105 106 * 106 107 * @since Twenty Twelve 1.0 … … 142 143 143 144 /** 144 * Outputs markup to be displayed on the Appearance > Header admin panel. 145 * Output markup to be displayed on the Appearance > Header admin panel. 146 * 145 147 * This callback overrides the default markup displayed there. 146 148 * -
trunk/src/wp-content/themes/twentytwelve/index.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The main template file .3 * The main template file 4 4 * 5 5 * This is the most generic template file in a WordPress theme … … 8 8 * For example, it puts together the home page when no home.php file exists. 9 9 * 10 * Learn more:http://codex.wordpress.org/Template_Hierarchy10 * @link http://codex.wordpress.org/Template_Hierarchy 11 11 * 12 12 * @package WordPress -
trunk/src/wp-content/themes/twentytwelve/page.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The template for displaying all pages .3 * The template for displaying all pages 4 4 * 5 5 * This is the template that displays all pages by default. -
trunk/src/wp-content/themes/twentytwelve/search.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The template for displaying Search Results pages .3 * The template for displaying Search Results pages 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentytwelve/sidebar-front.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The sidebar containing the front page widget areas .3 * The sidebar containing the front page widget areas 4 4 * 5 * If no active widgets in either sidebar, they will be hiddencompletely.5 * If no active widgets are in either sidebar, hide them completely. 6 6 * 7 7 * @package WordPress … … 10 10 */ 11 11 12 /* 12 /** 13 13 * The front page widget area is triggered if any of the areas 14 14 * have widgets. So let's check that first. -
trunk/src/wp-content/themes/twentytwelve/sidebar.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The sidebar containing the main widget area .3 * The sidebar containing the main widget area 4 4 * 5 * If no active widgets in sidebar, let'shide it completely.5 * If no active widgets are in the sidebar, hide it completely. 6 6 * 7 7 * @package WordPress -
trunk/src/wp-content/themes/twentytwelve/single.php
r22615 r25521 1 1 <?php 2 2 /** 3 * The Template for displaying all single posts .3 * The Template for displaying all single posts 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentytwelve/tag.php
r22318 r25521 1 1 <?php 2 2 /** 3 * The template for displaying Tag pages .3 * The template for displaying Tag pages 4 4 * 5 5 * Used to display archive-type pages for posts in a tag. 6 6 * 7 * Learn more:http://codex.wordpress.org/Template_Hierarchy7 * @link http://codex.wordpress.org/Template_Hierarchy 8 8 * 9 9 * @package WordPress … … 30 30 while ( have_posts() ) : the_post(); 31 31 32 /* Include the post format-specific template for the content. If you want to 32 /** 33 * Include the post format-specific template for the content. If you want to 33 34 * this in a child theme then include a file called called content-___.php 34 35 * (where ___ is the post format) and that will be used instead.
Note: See TracChangeset
for help on using the changeset viewer.