Ticket #38545: 38545.patch
File 38545.patch, 22.3 KB (added by , 8 years ago) |
---|
-
.idea/workspace.xml
diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 32e3c2a..94dcdc5 100644
a b 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <project version="4"> 3 3 <component name="ChangeListManager"> 4 <list default="true" id="f82a182f-5e21-4059-9d7e-b5cf59e8f007" name="Default" comment="" /> 4 <list default="true" id="f82a182f-5e21-4059-9d7e-b5cf59e8f007" name="Default" comment=""> 5 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> 6 </list> 5 7 <ignored path="wordpress-develop.iws" /> 6 8 <ignored path=".idea/workspace.xml" /> 7 9 <ignored path=".idea/dataSources.local.xml" /> … … 21 23 <favorites_list name="wordpress-develop" /> 22 24 </component> 23 25 <component name="FileEditorManager"> 24 <leaf /> 26 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> 27 <file leaf-file-name="general-template.php" pinned="false" current-in-tab="true"> 28 <entry file="file://$PROJECT_DIR$/src/wp-includes/general-template.php"> 29 <provider selected="true" editor-type-id="text-editor"> 30 <state relative-caret-position="-45"> 31 <caret line="1508" column="34" selection-start-line="1508" selection-start-column="34" selection-end-line="1508" selection-end-column="34" /> 32 <folding> 33 <marker date="1485185771000" expanded="true" signature="28837:28850" placeholder="..." /> 34 <marker date="1485185771000" expanded="true" signature="55478:55660" placeholder="SELECT YEAR(... " /> 35 <marker date="1485185771000" expanded="true" signature="56552:56687" placeholder="SELECT YEAR(... " /> 36 <marker date="1485185771000" expanded="true" signature="57452:57696" placeholder="SELECT YEAR(... " /> 37 <marker date="1485185771000" expanded="true" signature="58667:58905" placeholder="SELECT DISTI... " /> 38 <marker date="1485185771000" expanded="true" signature="60309:60367" placeholder="SELECT * FRO... ${$wpdb->posts}" /> 39 <marker date="1485185771000" expanded="true" signature="62670:62765" placeholder="SELECT 1 as ${$wpdb->posts}" /> 40 <marker date="1485185771000" expanded="true" signature="64003:64217" placeholder="SELECT MONTH... " /> 41 <marker date="1485185771000" expanded="true" signature="64246:64477" placeholder="SELECT MONTH... " /> 42 <marker date="1485185771000" expanded="true" signature="64653:64794" placeholder="..." /> 43 <marker date="1485185771000" expanded="true" signature="64788:64794" placeholder="..." /> 44 <marker date="1485185771000" expanded="true" signature="65239:65245" placeholder="..." /> 45 <marker date="1485185771000" expanded="true" signature="66048:66054" placeholder="..." /> 46 <marker date="1485185771000" expanded="true" signature="66147:66382" placeholder="SELECT DISTI... ${$wpdb->posts}" /> 47 </folding> 48 </state> 49 </provider> 50 </entry> 51 </file> 52 </leaf> 25 53 </component> 26 54 <component name="Git.Settings"> 27 55 <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> … … 30 58 <option name="CHANGED_PATHS"> 31 59 <list> 32 60 <option value="$PROJECT_DIR$/.gitignore" /> 61 <option value="$PROJECT_DIR$/src/wp-includes/general-template.php" /> 33 62 </list> 34 63 </option> 35 64 </component> … … 39 68 <detection-done>true</detection-done> 40 69 <sorting>DEFINITION_ORDER</sorting> 41 70 </component> 71 <component name="PhpServers"> 72 <servers /> 73 </component> 42 74 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> 43 75 <component name="ProjectFrameBounds"> 44 76 <option name="width" value="1440" /> … … 69 101 <foldersAlwaysOnTop value="true" /> 70 102 </navigator> 71 103 <panes> 104 <pane id="Scratches" /> 72 105 <pane id="ProjectPane"> 73 106 <subPane> 74 107 <PATH> … … 121 154 </PATH> 122 155 </subPane> 123 156 </pane> 124 <pane id="Scratches" /> 125 <pane id="Scope" /> 157 <pane id="Scope"> 158 <subPane subId="Project Files" /> 159 </pane> 126 160 </panes> 127 161 </component> 128 162 <component name="PropertiesComponent"> 129 163 <property name="WebServerToolWindowFactoryState" value="false" /> 130 164 <property name="FullScreen" value="true" /> 165 <property name="js-jscs-nodeInterpreter" value="/usr/local/bin/node" /> 166 </component> 167 <component name="RunManager"> 168 <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug"> 169 <method /> 170 </configuration> 171 <configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir=""> 172 <method /> 173 </configuration> 174 <configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit"> 175 <TestRunner /> 176 <method /> 177 </configuration> 178 <configuration default="true" type="PhpBehatConfigurationType" factoryName="Behat"> 179 <BehatRunner /> 180 <method /> 181 </configuration> 182 <configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console"> 183 <method /> 184 </configuration> 185 <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js"> 186 <method /> 187 </configuration> 188 <configuration default="true" type="js.build_tools.npm" factoryName="npm"> 189 <command value="run-script" /> 190 <scripts /> 191 <node-interpreter value="project" /> 192 <envs /> 193 <method /> 194 </configuration> 195 <configuration default="true" type="mocha-javascript-test-runner" factoryName="Mocha"> 196 <node-interpreter>project</node-interpreter> 197 <node-options /> 198 <working-directory>$PROJECT_DIR$</working-directory> 199 <pass-parent-env>true</pass-parent-env> 200 <envs /> 201 <ui>bdd</ui> 202 <extra-mocha-options /> 203 <test-kind>DIRECTORY</test-kind> 204 <test-directory /> 205 <recursive>false</recursive> 206 <method /> 207 </configuration> 131 208 </component> 132 209 <component name="ShelveChangesManager" show_recycled="false"> 133 210 <option name="remove_strategy" value="false" /> 134 211 </component> 212 <component name="SvnConfiguration"> 213 <configuration /> 214 </component> 135 215 <component name="TaskManager"> 136 216 <task active="true" id="Default" summary="Default task"> 137 217 <changelist id="f82a182f-5e21-4059-9d7e-b5cf59e8f007" name="Default" comment="" /> … … 140 220 <option name="presentableId" value="Default" /> 141 221 <updated>1485017489997</updated> 142 222 <workItem from="1485017491516" duration="3173000" /> 223 <workItem from="1485031724031" duration="77000" /> 224 <workItem from="1485031827077" duration="1765000" /> 143 225 </task> 144 226 <servers /> 145 227 </component> 146 228 <component name="TimeTrackingManager"> 147 <option name="totallyTimeSpent" value=" 3173000" />229 <option name="totallyTimeSpent" value="5015000" /> 148 230 </component> 149 231 <component name="ToolWindowManager"> 150 232 <frame x="0" y="0" width="1440" height="900" extended-state="0" /> 151 233 <editor active="false" /> 152 234 <layout> 153 <window_info id="Project" active=" true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2532189" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />235 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25608012" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> 154 236 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> 155 <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order=" -1" side_tool="true" content_ui="tabs" />156 <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order=" -1" side_tool="false" content_ui="tabs" />157 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order=" -1" side_tool="false" content_ui="tabs" />158 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2 5" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />159 <window_info id="Terminal" active=" false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32891566" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />160 <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order=" -1" side_tool="true" content_ui="tabs" />237 <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> 238 <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> 239 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> 240 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> 241 <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2807229" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> 242 <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> 161 243 <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> 162 <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />163 244 <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> 164 245 <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> 165 <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />166 246 <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> 167 247 <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> 248 <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> 249 <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> 168 250 <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> 169 251 <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> 170 252 </layout> 171 253 </component> 254 <component name="Vcs.Log.UiProperties"> 255 <option name="RECENTLY_FILTERED_USER_GROUPS"> 256 <collection /> 257 </option> 258 <option name="RECENTLY_FILTERED_BRANCH_GROUPS"> 259 <collection /> 260 </option> 261 </component> 172 262 <component name="VcsContentAnnotationSettings"> 173 263 <option name="myLimit" value="2678400000" /> 174 264 </component> … … 177 267 <watches-manager /> 178 268 </component> 179 269 <component name="editorHistoryManager"> 270 <entry file="file://$PROJECT_DIR$/src/wp-includes/general-template.php"> 271 <provider selected="true" editor-type-id="text-editor"> 272 <state relative-caret-position="0"> 273 <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> 274 <folding> 275 <marker date="1485185771000" expanded="true" signature="28837:28850" placeholder="..." /> 276 <marker date="1485185771000" expanded="true" signature="55478:55660" placeholder="SELECT YEAR(... " /> 277 <marker date="1485185771000" expanded="true" signature="56552:56687" placeholder="SELECT YEAR(... " /> 278 <marker date="1485185771000" expanded="true" signature="57452:57696" placeholder="SELECT YEAR(... " /> 279 <marker date="1485185771000" expanded="true" signature="58667:58905" placeholder="SELECT DISTI... " /> 280 <marker date="1485185771000" expanded="true" signature="60309:60367" placeholder="SELECT * FRO... ${$wpdb->posts}" /> 281 <marker date="1485185771000" expanded="true" signature="62670:62765" placeholder="SELECT 1 as ${$wpdb->posts}" /> 282 <marker date="1485185771000" expanded="true" signature="64003:64217" placeholder="SELECT MONTH... " /> 283 <marker date="1485185771000" expanded="true" signature="64246:64477" placeholder="SELECT MONTH... " /> 284 <marker date="1485185771000" expanded="true" signature="64653:64794" placeholder="..." /> 285 <marker date="1485185771000" expanded="true" signature="64788:64794" placeholder="..." /> 286 <marker date="1485185771000" expanded="true" signature="65239:65245" placeholder="..." /> 287 <marker date="1485185771000" expanded="true" signature="66048:66054" placeholder="..." /> 288 <marker date="1485185771000" expanded="true" signature="66147:66382" placeholder="SELECT DISTI... ${$wpdb->posts}" /> 289 </folding> 290 </state> 291 </provider> 292 </entry> 180 293 <entry file="file://$PROJECT_DIR$/.gitignore"> 181 294 <provider selected="true" editor-type-id="text-editor"> 182 295 <state relative-caret-position="30"> 183 296 <caret line="2" column="0" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" /> 184 <folding /> 297 </state> 298 </provider> 299 </entry> 300 <entry file="file://$PROJECT_DIR$/src/wp-includes/general-template.php"> 301 <provider selected="true" editor-type-id="text-editor"> 302 <state relative-caret-position="-45"> 303 <caret line="1508" column="34" selection-start-line="1508" selection-start-column="34" selection-end-line="1508" selection-end-column="34" /> 304 <folding> 305 <marker date="1485185771000" expanded="true" signature="28837:28850" placeholder="..." /> 306 <marker date="1485185771000" expanded="true" signature="55478:55660" placeholder="SELECT YEAR(... " /> 307 <marker date="1485185771000" expanded="true" signature="56552:56687" placeholder="SELECT YEAR(... " /> 308 <marker date="1485185771000" expanded="true" signature="57452:57696" placeholder="SELECT YEAR(... " /> 309 <marker date="1485185771000" expanded="true" signature="58667:58905" placeholder="SELECT DISTI... " /> 310 <marker date="1485185771000" expanded="true" signature="60309:60367" placeholder="SELECT * FRO... ${$wpdb->posts}" /> 311 <marker date="1485185771000" expanded="true" signature="62670:62765" placeholder="SELECT 1 as ${$wpdb->posts}" /> 312 <marker date="1485185771000" expanded="true" signature="64003:64217" placeholder="SELECT MONTH... " /> 313 <marker date="1485185771000" expanded="true" signature="64246:64477" placeholder="SELECT MONTH... " /> 314 <marker date="1485185771000" expanded="true" signature="64653:64794" placeholder="..." /> 315 <marker date="1485185771000" expanded="true" signature="64788:64794" placeholder="..." /> 316 <marker date="1485185771000" expanded="true" signature="65239:65245" placeholder="..." /> 317 <marker date="1485185771000" expanded="true" signature="66048:66054" placeholder="..." /> 318 <marker date="1485185771000" expanded="true" signature="66147:66382" placeholder="SELECT DISTI... ${$wpdb->posts}" /> 319 </folding> 185 320 </state> 186 321 </provider> 187 322 </entry> -
src/wp-includes/general-template.php
diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index fea6c5b..715dab7 100644
a b function the_archive_title( $before = '', $after = '' ) { 1460 1460 * @return string Archive title. 1461 1461 */ 1462 1462 function get_the_archive_title() { 1463 if ( is_category() || is_tag() || is_author() || is_year() || is_month() || is_day() || is_post_type_archive() || ( is_tax() && ! is_tax( 'post_format') ) ) { 1464 $title_classes = 'archive-title'; 1465 if ( is_category() ) { 1466 /* translators: Category archive title. 1: Category name */ 1467 $type = __( 'Category: ' ); 1468 $name = single_cat_title( '', false ); 1469 } elseif ( is_tag() ) { 1470 /* translators: Tag archive title. 1: Tag name */ 1471 $type = __( 'Tag: ' ); 1472 $name = single_tag_title( '', false ); 1473 } elseif ( is_author() ) { 1474 /* translators: Author archive title. 1: Author name */ 1475 $type = __( 'Author: ' ); 1476 $name = get_the_author(); 1477 $title_classes .= ' vcard'; 1478 } elseif ( is_year() ) { 1479 /* translators: Yearly archive title. 1: Year */ 1480 $type = __( 'Year: ' ); 1481 $name = get_the_date( _x( 'Y', 'yearly archives date format' ) ); 1482 } elseif ( is_month() ) { 1483 /* translators: Monthly archive title. 1: Month name and year */ 1484 $type = __( 'Month: ' ); 1485 $name = get_the_date( _x( 'F Y', 'monthly archives date format' ) ); 1486 } elseif ( is_day() ) { 1487 /* translators: Daily archive title. 1: Date */ 1488 $type =__( 'Day: ' ); 1489 $name = get_the_date( _x( 'F j, Y', 'daily archives date format' ) ); 1490 } elseif ( is_post_type_archive() ) { 1491 /* translators: Post type archive title. 1: Post type name */ 1492 $type = __( 'Archives: ' ); 1493 $name = post_type_archive_title( '', false ); 1494 } elseif ( is_tax() ) { 1495 $tax = get_taxonomy( get_queried_object()->taxonomy ); 1496 /* translators: Taxonomy term archive title. 1: Taxonomy singular name */ 1497 $type = sprintf( __( '%s: ' ), $tax->labels->singular_name ); 1498 $name = single_term_title( '', false ); 1499 } 1500 $format ='<span class="archive-label">%s</span><span class="%s">%s</span>'; 1501 $title = sprintf( $format, $type, $title_classes, $name ); 1463 if ( is_category() ) { 1464 /* translators: Category archive title. 1: Category name */ 1465 $title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) ); 1466 } elseif ( is_tag() ) { 1467 /* translators: Tag archive title. 1: Tag name */ 1468 $title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) ); 1469 } elseif ( is_author() ) { 1470 /* translators: Author archive title. 1: Author name */ 1471 $title = sprintf( __( 'Author: %s' ), '<span class="vcard">' . get_the_author() . '</span>' ); 1472 } elseif ( is_year() ) { 1473 /* translators: Yearly archive title. 1: Year */ 1474 $title = sprintf( __( 'Year: %s' ), get_the_date( _x( 'Y', 'yearly archives date format' ) ) ); 1475 } elseif ( is_month() ) { 1476 /* translators: Monthly archive title. 1: Month name and year */ 1477 $title = sprintf( __( 'Month: %s' ), get_the_date( _x( 'F Y', 'monthly archives date format' ) ) ); 1478 } elseif ( is_day() ) { 1479 /* translators: Daily archive title. 1: Date */ 1480 $title = sprintf( __( 'Day: %s' ), get_the_date( _x( 'F j, Y', 'daily archives date format' ) ) ); 1502 1481 } elseif ( is_tax( 'post_format' ) ) { 1503 1482 if ( is_tax( 'post_format', 'post-format-aside' ) ) { 1504 1483 $title = _x( 'Asides', 'post format archive title' ); … … function get_the_archive_title() { 1519 1498 } elseif ( is_tax( 'post_format', 'post-format-chat' ) ) { 1520 1499 $title = _x( 'Chats', 'post format archive title' ); 1521 1500 } 1501 } elseif ( is_post_type_archive() ) { 1502 /* translators: Post type archive title. 1: Post type name */ 1503 $title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) ); 1504 } elseif ( is_tax() ) { 1505 $tax = get_taxonomy( get_queried_object()->taxonomy ); 1506 /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term */ 1507 $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) ); 1522 1508 } else { 1523 1509 $title = __( 'Archives' ); 1524 1510 } … … function get_the_archive_title() { 1532 1518 */ 1533 1519 return apply_filters( 'get_the_archive_title', $title ); 1534 1520 } 1521 1535 1522 /** 1536 1523 * Display category, tag, term, or author description. 1537 1524 *