Changeset 202012 in webkit
- Timestamp:
- Jun 13, 2016 3:53:57 PM (8 years ago)
- Location:
- trunk/Websites/webkit.org
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Websites/webkit.org/ChangeLog
r201625 r202012 1 2016-06-13 Jon Davis <jond@apple.com> 2 3 Adds support for foreword custom meta and display styles on blog posts. 4 https://bugs.webkit.org/show_bug.cgi?id=158707. 5 6 Reviewed by Timothy Hatcher. 7 8 * wp-content/themes/webkit/functions.php: 9 * wp-content/themes/webkit/style.css: 10 (article .foreword): 11 1 12 2016-06-02 Dean Jackson <dino@apple.com> 2 13 -
trunk/Websites/webkit.org/wp-content/themes/webkit/functions.php
r198816 r202012 136 136 }); 137 137 138 add_action('the_post', function($post) { 139 global $pages; 140 141 if (!(is_single() || is_page())) return; 142 143 $foreword = get_post_meta(get_the_ID(), 'foreword', true); 144 if ( ! $foreword ) return; 145 146 $content = $post->post_content; 147 // Transform Markdown 148 $Markdown = WPCom_Markdown::get_instance(); 149 $foreword = wp_unslash( $Markdown->transform($foreword) ); 150 151 $post->post_content = '<div class="foreword">' . $foreword . '</div>' . $content; 152 $pages = array($post->post_content); 153 }); 154 138 155 function before_the_title() { 139 156 $post = get_post(); -
trunk/Websites/webkit.org/wp-content/themes/webkit/style.css
r199488 r202012 1012 1012 } 1013 1013 1014 article .foreword { 1015 padding: 3rem; 1016 background-color: #f0f0f0; 1017 border: 1px solid #e6e6e6; 1018 color: #8E8E93; 1019 border-radius: 3px; 1020 margin-bottom: 3rem; 1021 box-sizing: normal; 1022 font-size: 1.6rem; 1023 font-style: italic; 1024 } 1025 1014 1026 article .two-columns { 1015 1027 columns: 2;
Note: See TracChangeset
for help on using the changeset viewer.