Changeset 9908
- Timestamp:
- 05/24/2020 07:27:02 PM (5 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/functions.php
r9865 r9908 14 14 remove_action( 'customize_preview_init', 'breathe_customize_preview_js' ); 15 15 remove_filter( 'wp_head', 'breathe_color_styles' ); 16 17 16 add_action( 'customize_register', __NAMESPACE__ . '\customize_register' ); 17 18 add_filter( 'o2_filtered_content', __NAMESPACE__ . '\append_last_updated', 10, 2 ); 18 19 } 19 20 add_action( 'after_setup_theme', __NAMESPACE__ . '\after_setup_theme', 11 ); … … 236 237 237 238 /** 239 * Appends a 'Last updated' to handbook pages. 240 * 241 * @param string $content Content of the current post. 242 * @return Content of the current post. 243 */ 244 function append_last_updated( $content, $post ) { 245 if ( ! function_exists( 'wporg_is_handbook' ) || ! wporg_is_handbook( $post->post_type ) ) { 246 return $content; 247 } 248 249 $content .= sprintf( 250 /* translators: %s: Date of last update. */ 251 '<p class="handbook-last-updated">' . __( 'Last updated: %s', 'wporg' ) . '</p>', 252 sprintf( 253 '<time datetime="%s">%s</time>', 254 esc_attr( get_the_modified_date( DATE_W3C ) ), 255 esc_html( get_the_modified_date() ) 256 ) 257 ); 258 259 return $content; 260 } 261 262 /** 238 263 * Register translations for plugins without their own GlotPress project. 239 264 */ -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/single-handbook.php
r7917 r9908 32 32 </header><!-- .handbook-header --> 33 33 34 <?php the_content(); ?> 34 <?php 35 the_content(); 35 36 36 <?php \WPorg_Handbook_Navigation::show_nav_links(); ?> 37 printf( 38 /* translators: %s: Date of last update. */ 39 '<p class="handbook-last-updated">' . __( 'Last updated: %s', 'wporg' ) . '</p>', 40 sprintf( 41 '<time datetime="%s">%s</time>', 42 esc_attr( get_the_modified_date( DATE_W3C ) ), 43 esc_html( get_the_modified_date() ) 44 ) 45 ); 46 47 \WPorg_Handbook_Navigation::show_nav_links(); 48 ?> 37 49 38 50 <?php endwhile; // end of the loop. ?> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/style.css
r9882 r9908 1038 1038 } 1039 1039 1040 .handbook-last-updated { 1041 font-size: 1.25rem; 1042 color: #555; 1043 margin: 2.4em 0 0; 1044 font-weight: 300; 1045 } 1046 1040 1047 /* 1041 1048 * Callout boxes
Note: See TracChangeset
for help on using the changeset viewer.