Changeset 43571 for trunk/src/wp-admin/includes/template.php
- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/template.php
r43569 r43571 40 40 function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) { 41 41 wp_terms_checklist( 42 $post_id, array( 42 $post_id, 43 array( 43 44 'taxonomy' => 'category', 44 45 'descendants_and_self' => $descendants_and_self, … … 129 130 } else { 130 131 $args['popular_cats'] = get_terms( 131 $taxonomy, array( 132 $taxonomy, 133 array( 132 134 'fields' => 'ids', 133 135 'orderby' => 'count', … … 140 142 if ( $descendants_and_self ) { 141 143 $categories = (array) get_terms( 142 $taxonomy, array( 144 $taxonomy, 145 array( 143 146 'child_of' => $descendants_and_self, 144 147 'hierarchical' => 0, … … 205 208 206 209 $terms = get_terms( 207 $taxonomy, array( 210 $taxonomy, 211 array( 208 212 'orderby' => 'count', 209 213 'order' => 'DESC', … … 263 267 264 268 $categories = get_terms( 265 'link_category', array( 269 'link_category', 270 array( 266 271 'orderby' => 'name', 267 272 'hide_empty' => 0, … … 405 410 */ 406 411 $content = apply_filters( 407 'wp_comment_reply', '', array( 412 'wp_comment_reply', 413 '', 414 array( 408 415 'position' => $position, 409 416 'checkbox' => $checkbox, … … 425 432 } 426 433 427 ?>434 ?> 428 435 <form method="get"> 429 <?php if ( $table_row ) : ?>436 <?php if ( $table_row ) : ?> 430 437 <table style="display:none;"><tbody id="com-reply"><tr id="replyrow" class="inline-edit-row" style="display:none;"><td colspan="<?php echo $wp_list_table->get_column_count(); ?>" class="colspanchange"> 431 438 <?php else : ?> … … 444 451 $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ); 445 452 wp_editor( 446 '', 'replycontent', array( 453 '', 454 'replycontent', 455 array( 447 456 'media_buttons' => false, 448 457 'tinymce' => false, … … 500 509 ?> 501 510 </fieldset> 502 <?php if ( $table_row ) : ?>511 <?php if ( $table_row ) : ?> 503 512 </td></tr></tbody></table> 504 <?php else : ?>513 <?php else : ?> 505 514 </div></div> 506 <?php endif; ?>515 <?php endif; ?> 507 516 </form> 508 <?php517 <?php 509 518 } 510 519 … … 515 524 */ 516 525 function wp_comment_trashnotice() { 517 ?>526 ?> 518 527 <div class="hidden" id="trash-undo-holder"> 519 528 <div class="trash-undo-inside"><?php printf( __( 'Comment by %s moved to the trash.' ), '<strong></strong>' ); ?> <span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span></div> … … 522 531 <div class="spam-undo-inside"><?php printf( __( 'Comment by %s marked as spam.' ), '<strong></strong>' ); ?> <span class="undo unspam"><a href="#"><?php _e( 'Undo' ); ?></a></span></div> 523 532 </div> 524 <?php533 <?php 525 534 } 526 535 … … 550 559 } 551 560 $count = 0; 552 ?>561 ?> 553 562 <table id="list-table"> 554 563 <thead> … … 559 568 </thead> 560 569 <tbody id='the-list' data-wp-lists='list:meta'> 561 <?php562 foreach ( $meta as $entry ) {563 echo _list_meta_row( $entry, $count );564 }565 ?>570 <?php 571 foreach ( $meta as $entry ) { 572 echo _list_meta_row( $entry, $count ); 573 } 574 ?> 566 575 </tbody> 567 576 </table> 568 <?php577 <?php 569 578 } 570 579 … … 677 686 $meta_key_input_id = 'metakeyinput'; 678 687 } 679 ?>688 ?> 680 689 <p><strong><?php _e( 'Add New Custom Field:' ); ?></strong></p> 681 690 <table id="newmeta"> … … 690 699 <tr> 691 700 <td id="newmetaleft" class="left"> 692 <?php if ( $keys ) { ?>701 <?php if ( $keys ) { ?> 693 702 <select id="metakeyselect" name="metakeyselect"> 694 703 <option value="#NONE#"><?php _e( '— Select —' ); ?></option> 695 <?php696 697 foreach ( $keys as $key ) {698 if ( is_protected_meta( $key, 'post' ) || ! current_user_can( 'add_post_meta', $post->ID, $key ) ) {699 continue;700 }701 echo "\n<option value='" . esc_attr( $key ) . "'>" . esc_html( $key ) . '</option>';702 }703 ?>704 <?php 705 706 foreach ( $keys as $key ) { 707 if ( is_protected_meta( $key, 'post' ) || ! current_user_can( 'add_post_meta', $post->ID, $key ) ) { 708 continue; 709 } 710 echo "\n<option value='" . esc_attr( $key ) . "'>" . esc_html( $key ) . '</option>'; 711 } 712 ?> 704 713 </select> 705 714 <input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" value="" /> … … 716 725 <tr><td colspan="2"> 717 726 <div class="submit"> 718 <?php 719 submit_button( 720 __( 'Add Custom Field' ), '', 'addmeta', false, array( 721 'id' => 'newmeta-submit', 722 'data-wp-lists' => 'add:the-list:newmeta', 723 ) 724 ); 725 ?> 727 <?php 728 submit_button( 729 __( 'Add Custom Field' ), 730 '', 731 'addmeta', 732 false, 733 array( 734 'id' => 'newmeta-submit', 735 'data-wp-lists' => 'add:the-list:newmeta', 736 ) 737 ); 738 ?> 726 739 </div> 727 <?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?>740 <?php wp_nonce_field( 'add-meta', '_ajax_nonce-add-meta', false ); ?> 728 741 </td></tr> 729 742 </tbody> 730 743 </table> 731 <?php744 <?php 732 745 733 746 } … … 818 831 echo '<input type="hidden" id="' . $cur_timeunit . '" name="' . $cur_timeunit . '" value="' . $curr . '" />' . "\n"; 819 832 } 820 ?>833 ?> 821 834 822 835 <p> … … 824 837 <a href="#edit_timestamp" class="cancel-timestamp hide-if-no-js button-cancel"><?php _e( 'Cancel' ); ?></a> 825 838 </p> 826 <?php839 <?php 827 840 } 828 841 … … 935 948 <?php 936 949 else : 937 ?>950 ?> 938 951 <form enctype="multipart/form-data" id="import-upload-form" method="post" class="wp-upload-form" action="<?php echo esc_url( wp_nonce_url( $action, 'import-upload' ) ); ?>"> 939 952 <p> … … 943 956 <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" /> 944 957 </p> 945 <?php submit_button( __( 'Upload file and import' ), 'primary' ); ?>958 <?php submit_button( __( 'Upload file and import' ), 'primary' ); ?> 946 959 </form> 947 <?php960 <?php 948 961 endif; 949 962 } … … 1244 1257 $page = $screen->id; 1245 1258 1246 $hidden 1259 $hidden = get_hidden_meta_boxes( $screen ); 1247 1260 ?> 1248 1261 <div id="side-sortables" class="accordion-container"> … … 1318 1331 if ( 'misc' == $page ) { 1319 1332 _deprecated_argument( 1320 __FUNCTION__, '3.0.0', 1333 __FUNCTION__, 1334 '3.0.0', 1321 1335 /* translators: %s: misc */ 1322 1336 sprintf( … … 1330 1344 if ( 'privacy' == $page ) { 1331 1345 _deprecated_argument( 1332 __FUNCTION__, '3.5.0', 1346 __FUNCTION__, 1347 '3.5.0', 1333 1348 /* translators: %s: privacy */ 1334 1349 sprintf( … … 1387 1402 if ( 'misc' == $page ) { 1388 1403 _deprecated_argument( 1389 __FUNCTION__, '3.0.0', 1404 __FUNCTION__, 1405 '3.0.0', 1390 1406 /* translators: %s: misc */ 1391 1407 sprintf( … … 1399 1415 if ( 'privacy' == $page ) { 1400 1416 _deprecated_argument( 1401 __FUNCTION__, '3.5.0', 1417 __FUNCTION__, 1418 '3.5.0', 1402 1419 /* translators: %s: privacy */ 1403 1420 sprintf( … … 1651 1668 */ 1652 1669 function find_posts_div( $found_action = '' ) { 1653 ?>1670 ?> 1654 1671 <div id="find-posts" class="find-box" style="display: none;"> 1655 1672 <div id="find-posts-head" class="find-box-head"> … … 1677 1694 </div> 1678 1695 </div> 1679 <?php1696 <?php 1680 1697 } 1681 1698 … … 1746 1763 @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); 1747 1764 _wp_admin_html_begin(); 1748 ?>1765 ?> 1749 1766 <title><?php bloginfo( 'name' ); ?> › <?php echo $title; ?> — <?php _e( 'WordPress' ); ?></title> 1750 <?php1751 wp_enqueue_style( 'colors' );1752 ?>1767 <?php 1768 wp_enqueue_style( 'colors' ); 1769 ?> 1753 1770 <script type="text/javascript"> 1754 1771 addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}; … … 1762 1779 isRtl = <?php echo (int) is_rtl(); ?>; 1763 1780 </script> 1764 <?php1765 /** This action is documented in wp-admin/admin-header.php */1766 do_action( 'admin_enqueue_scripts', $hook_suffix );1767 1768 /** This action is documented in wp-admin/admin-header.php */1769 do_action( "admin_print_styles-$hook_suffix" );1770 1771 /** This action is documented in wp-admin/admin-header.php */1772 do_action( 'admin_print_styles' );1773 1774 /** This action is documented in wp-admin/admin-header.php */1775 do_action( "admin_print_scripts-$hook_suffix" );1776 1777 /** This action is documented in wp-admin/admin-header.php */1778 do_action( 'admin_print_scripts' );1779 1780 /** This action is documented in wp-admin/admin-header.php */1781 do_action( "admin_head-$hook_suffix" );1782 1783 /** This action is documented in wp-admin/admin-header.php */1784 do_action( 'admin_head' );1785 1786 $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );1787 1788 if ( is_rtl() ) {1789 $admin_body_class .= ' rtl';1790 }1791 1792 ?>1781 <?php 1782 /** This action is documented in wp-admin/admin-header.php */ 1783 do_action( 'admin_enqueue_scripts', $hook_suffix ); 1784 1785 /** This action is documented in wp-admin/admin-header.php */ 1786 do_action( "admin_print_styles-$hook_suffix" ); 1787 1788 /** This action is documented in wp-admin/admin-header.php */ 1789 do_action( 'admin_print_styles' ); 1790 1791 /** This action is documented in wp-admin/admin-header.php */ 1792 do_action( "admin_print_scripts-$hook_suffix" ); 1793 1794 /** This action is documented in wp-admin/admin-header.php */ 1795 do_action( 'admin_print_scripts' ); 1796 1797 /** This action is documented in wp-admin/admin-header.php */ 1798 do_action( "admin_head-$hook_suffix" ); 1799 1800 /** This action is documented in wp-admin/admin-header.php */ 1801 do_action( 'admin_head' ); 1802 1803 $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) ); 1804 1805 if ( is_rtl() ) { 1806 $admin_body_class .= ' rtl'; 1807 } 1808 1809 ?> 1793 1810 </head> 1794 <?php1795 /** This filter is documented in wp-admin/admin-header.php */1796 $admin_body_classes = apply_filters( 'admin_body_class', '' );1797 $admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class );1798 ?>1811 <?php 1812 /** This filter is documented in wp-admin/admin-header.php */ 1813 $admin_body_classes = apply_filters( 'admin_body_class', '' ); 1814 $admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class ); 1815 ?> 1799 1816 <body 1800 <?php1801 /**1802 * @global string $body_id1803 */1804 if ( isset( $GLOBALS['body_id'] ) ) {1805 echo ' id="' . $GLOBALS['body_id'] . '"';1806 }1807 ?>1817 <?php 1818 /** 1819 * @global string $body_id 1820 */ 1821 if ( isset( $GLOBALS['body_id'] ) ) { 1822 echo ' id="' . $GLOBALS['body_id'] . '"'; 1823 } 1824 ?> 1808 1825 class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes; ?>"> 1809 1826 <script type="text/javascript"> … … 1814 1831 })(); 1815 1832 </script> 1816 <?php1833 <?php 1817 1834 } 1818 1835 … … 1835 1852 ?> 1836 1853 <div class="hidden"> 1837 <?php1854 <?php 1838 1855 /** This action is documented in wp-admin/admin-footer.php */ 1839 1856 do_action( 'admin_footer', $hook_suffix ); … … 1844 1861 /** This action is documented in wp-admin/admin-footer.php */ 1845 1862 do_action( 'admin_print_footer_scripts' ); 1846 ?>1863 ?> 1847 1864 </div> 1848 1865 <script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script> 1849 1866 </body> 1850 1867 </html> 1851 <?php1868 <?php 1852 1869 } 1853 1870 … … 2014 2031 */ 2015 2032 function compression_test() { 2016 ?>2033 ?> 2017 2034 <script type="text/javascript"> 2018 2035 var compressionNonce = <?php echo wp_json_encode( wp_create_nonce( 'update_can_compress_scripts' ) ); ?>; … … 2064 2081 testCompression.check(); 2065 2082 </script> 2066 <?php2083 <?php 2067 2084 } 2068 2085 … … 2174 2191 } 2175 2192 2176 ?>2193 ?> 2177 2194 <!DOCTYPE html> 2178 2195 <!--[if IE 8]> … … 2202 2219 <head> 2203 2220 <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php echo get_option( 'blog_charset' ); ?>" /> 2204 <?php2221 <?php 2205 2222 } 2206 2223
Note: See TracChangeset
for help on using the changeset viewer.