Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r47059 r47122  
    144144        global $avail_post_stati, $wp_query, $per_page, $mode;
    145145
    146         // is going to call wp()
     146        // Is going to call wp().
    147147        $avail_post_stati = wp_edit_posts_query();
    148148
     
    878878                $my_parent  = $page->post_parent;
    879879                while ( $my_parent ) {
    880                     // Get the ID from the list or the attribute if my_parent is an object
     880                    // Get the ID from the list or the attribute if my_parent is an object.
    881881                    $parent_id = $my_parent;
    882882                    if ( is_object( $my_parent ) ) {
     
    907907        }
    908908
    909         unset( $children_pages[ $parent ] ); //required in order to keep track of orphans
     909        unset( $children_pages[ $parent ] ); // Required in order to keep track of orphans.
    910910    }
    911911
     
    14681468        $hierarchical_taxonomies = array();
    14691469        $flat_taxonomies         = array();
     1470
    14701471        foreach ( $taxonomy_names as $taxonomy_name ) {
    14711472
     
    15081509        ?>
    15091510
    1510     <form method="get"><table style="display: none"><tbody id="inlineedit">
     1511        <form method="get">
     1512        <table style="display: none"><tbody id="inlineedit">
    15111513        <?php
    15121514        $hclass              = count( $hierarchical_taxonomies ) ? 'post' : 'page';
     
    15161518
    15171519        $bulk = 0;
    1518         while ( $bulk < 2 ) {
     1520        while ( $bulk < 2 ) :
     1521            $classes  = $inline_edit_classes . ' ';
     1522            $classes .= $bulk ? $bulk_edit_classes : $quick_edit_classes;
    15191523            ?>
    1520 
    1521         <tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="
     1524            <tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="<?php echo $classes; ?>" style="display: none">
     1525            <td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
     1526
     1527            <fieldset class="inline-edit-col-left">
     1528                <legend class="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
     1529                <div class="inline-edit-col">
     1530
     1531                <?php if ( post_type_supports( $screen->post_type, 'title' ) ) : ?>
     1532
     1533                    <?php if ( $bulk ) : ?>
     1534
     1535                        <div id="bulk-title-div">
     1536                            <div id="bulk-titles"></div>
     1537                        </div>
     1538
     1539                    <?php else : // $bulk ?>
     1540
     1541                        <label>
     1542                            <span class="title"><?php _e( 'Title' ); ?></span>
     1543                            <span class="input-text-wrap"><input type="text" name="post_title" class="ptitle" value="" /></span>
     1544                        </label>
     1545
     1546                        <?php if ( is_post_type_viewable( $screen->post_type ) ) : ?>
     1547
     1548                            <label>
     1549                                <span class="title"><?php _e( 'Slug' ); ?></span>
     1550                                <span class="input-text-wrap"><input type="text" name="post_name" value="" /></span>
     1551                            </label>
     1552
     1553                        <?php endif; // is_post_type_viewable() ?>
     1554
     1555                    <?php endif; // $bulk ?>
     1556
     1557                <?php endif; // post_type_supports( ... 'title' ) ?>
     1558
     1559                <?php if ( ! $bulk ) : ?>
     1560                    <fieldset class="inline-edit-date">
     1561                        <legend><span class="title"><?php _e( 'Date' ); ?></span></legend>
     1562                        <?php touch_time( 1, 1, 0, 1 ); ?>
     1563                    </fieldset>
     1564                    <br class="clear" />
     1565                <?php endif; // $bulk ?>
     1566
     1567                <?php
     1568                if ( post_type_supports( $screen->post_type, 'author' ) ) :
     1569                    $authors_dropdown = '';
     1570
     1571                    if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
     1572                        $users_opt = array(
     1573                            'hide_if_only_one_author' => false,
     1574                            'who'                     => 'authors',
     1575                            'name'                    => 'post_author',
     1576                            'class'                   => 'authors',
     1577                            'multi'                   => 1,
     1578                            'echo'                    => 0,
     1579                            'show'                    => 'display_name_with_login',
     1580                        );
     1581
     1582                        if ( $bulk ) {
     1583                            $users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
     1584                        }
     1585
     1586                        $authors = wp_dropdown_users( $users_opt );
     1587                        if ( $authors ) :
     1588                            $authors_dropdown  = '<label class="inline-edit-author">';
     1589                            $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
     1590                            $authors_dropdown .= $authors;
     1591                            $authors_dropdown .= '</label>';
     1592                        endif;
     1593                    endif; // current_user_can( 'edit_others_posts' )
     1594                    ?>
     1595
     1596                    <?php
     1597                    if ( ! $bulk ) {
     1598                        echo $authors_dropdown;
     1599                    }
     1600                endif; // post_type_supports( ... 'author' )
     1601                ?>
     1602
     1603                <?php if ( ! $bulk && $can_publish ) : ?>
     1604
     1605                    <div class="inline-edit-group wp-clearfix">
     1606                        <label class="alignleft">
     1607                            <span class="title"><?php _e( 'Password' ); ?></span>
     1608                            <span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
     1609                        </label>
     1610
     1611                        <em class="alignleft inline-edit-or">
    15221612                            <?php
    1523                             echo $inline_edit_classes . ' ';
    1524                             echo $bulk ? $bulk_edit_classes : $quick_edit_classes;
     1613                            /* translators: Between password field and private checkbox on post quick edit interface. */
     1614                            _e( '&ndash;OR&ndash;' );
    15251615                            ?>
    1526         " style="display: none"><td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange">
    1527 
    1528         <fieldset class="inline-edit-col-left">
    1529             <legend class="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>
    1530             <div class="inline-edit-col">
    1531             <?php
    1532 
    1533             if ( post_type_supports( $screen->post_type, 'title' ) ) :
    1534                 if ( $bulk ) :
    1535                     ?>
    1536             <div id="bulk-title-div">
    1537                 <div id="bulk-titles"></div>
    1538             </div>
    1539 
    1540             <?php else : // $bulk ?>
    1541 
    1542             <label>
    1543                 <span class="title"><?php _e( 'Title' ); ?></span>
    1544                 <span class="input-text-wrap"><input type="text" name="post_title" class="ptitle" value="" /></span>
    1545             </label>
    1546 
    1547                 <?php if ( is_post_type_viewable( $screen->post_type ) ) : // is_post_type_viewable check ?>
    1548 
    1549             <label>
    1550                 <span class="title"><?php _e( 'Slug' ); ?></span>
    1551                 <span class="input-text-wrap"><input type="text" name="post_name" value="" /></span>
    1552             </label>
    1553 
    1554                     <?php
    1555     endif; // is_post_type_viewable check
    1556     endif; // $bulk
    1557     endif; // post_type_supports title
    1558             ?>
    1559 
    1560             <?php if ( ! $bulk ) : ?>
    1561             <fieldset class="inline-edit-date">
    1562             <legend><span class="title"><?php _e( 'Date' ); ?></span></legend>
    1563                 <?php touch_time( 1, 1, 0, 1 ); ?>
     1616                        </em>
     1617                        <label class="alignleft inline-edit-private">
     1618                            <input type="checkbox" name="keep_private" value="private" />
     1619                            <span class="checkbox-title"><?php _e( 'Private' ); ?></span>
     1620                        </label>
     1621                    </div>
     1622
     1623                <?php endif; ?>
     1624
     1625                </div>
    15641626            </fieldset>
    1565             <br class="clear" />
     1627
     1628            <?php if ( count( $hierarchical_taxonomies ) && ! $bulk ) : ?>
     1629
     1630                <fieldset class="inline-edit-col-center inline-edit-categories">
     1631                    <div class="inline-edit-col">
     1632
     1633                    <?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?>
     1634
     1635                        <span class="title inline-edit-categories-label"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
     1636                        <input type="hidden" name="<?php echo ( $taxonomy->name === 'category' ) ? 'post_category[]' : 'tax_input[' . esc_attr( $taxonomy->name ) . '][]'; ?>" value="0" />
     1637                        <ul class="cat-checklist <?php echo esc_attr( $taxonomy->name ); ?>-checklist">
     1638                            <?php wp_terms_checklist( null, array( 'taxonomy' => $taxonomy->name ) ); ?>
     1639                        </ul>
     1640
     1641                    <?php endforeach; // $hierarchical_taxonomies as $taxonomy ?>
     1642
     1643                    </div>
     1644                </fieldset>
     1645
     1646            <?php endif; // count( $hierarchical_taxonomies ) && ! $bulk ?>
     1647
     1648            <fieldset class="inline-edit-col-right">
     1649                <div class="inline-edit-col">
     1650
    15661651                <?php
    1567     endif; // $bulk
    1568 
    1569             if ( post_type_supports( $screen->post_type, 'author' ) ) :
    1570                 $authors_dropdown = '';
    1571 
    1572                 if ( current_user_can( $post_type_object->cap->edit_others_posts ) ) :
    1573                     $users_opt = array(
    1574                         'hide_if_only_one_author' => false,
    1575                         'who'                     => 'authors',
    1576                         'name'                    => 'post_author',
    1577                         'class'                   => 'authors',
    1578                         'multi'                   => 1,
    1579                         'echo'                    => 0,
    1580                         'show'                    => 'display_name_with_login',
    1581                     );
    1582                     if ( $bulk ) {
    1583                         $users_opt['show_option_none'] = __( '&mdash; No Change &mdash;' );
    1584                     }
    1585 
    1586                     $authors = wp_dropdown_users( $users_opt );
    1587                     if ( $authors ) :
    1588                         $authors_dropdown  = '<label class="inline-edit-author">';
    1589                         $authors_dropdown .= '<span class="title">' . __( 'Author' ) . '</span>';
    1590                         $authors_dropdown .= $authors;
    1591                         $authors_dropdown .= '</label>';
    1592                     endif;
    1593                 endif; // authors
    1594                 ?>
    1595 
    1596                 <?php
    1597                 if ( ! $bulk ) {
    1598                     echo $authors_dropdown;}
    1599     endif; // post_type_supports author
    1600 
    1601             if ( ! $bulk && $can_publish ) :
    1602                 ?>
    1603 
    1604         <div class="inline-edit-group wp-clearfix">
    1605             <label class="alignleft">
    1606                 <span class="title"><?php _e( 'Password' ); ?></span>
    1607                 <span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
    1608             </label>
    1609 
    1610             <em class="alignleft inline-edit-or">
    1611                 <?php
    1612                 /* translators: Between password field and private checkbox on post quick edit interface. */
    1613                 _e( '&ndash;OR&ndash;' );
    1614                 ?>
    1615                 </em>
    1616                 <label class="alignleft inline-edit-private">
    1617                 <input type="checkbox" name="keep_private" value="private" />
    1618                 <span class="checkbox-title"><?php _e( 'Private' ); ?></span>
    1619                 </label>
    1620             </div>
    1621 
    1622                 <?php endif; ?>
    1623 
    1624         </div></fieldset>
    1625 
    1626             <?php if ( count( $hierarchical_taxonomies ) && ! $bulk ) : ?>
    1627 
    1628         <fieldset class="inline-edit-col-center inline-edit-categories"><div class="inline-edit-col">
    1629 
    1630                 <?php foreach ( $hierarchical_taxonomies as $taxonomy ) : ?>
    1631 
    1632             <span class="title inline-edit-categories-label"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
    1633             <input type="hidden" name="<?php echo ( $taxonomy->name === 'category' ) ? 'post_category[]' : 'tax_input[' . esc_attr( $taxonomy->name ) . '][]'; ?>" value="0" />
    1634             <ul class="cat-checklist <?php echo esc_attr( $taxonomy->name ); ?>-checklist">
    1635                     <?php wp_terms_checklist( null, array( 'taxonomy' => $taxonomy->name ) ); ?>
    1636             </ul>
    1637 
    1638     <?php endforeach; //$hierarchical_taxonomies as $taxonomy ?>
    1639 
    1640         </div></fieldset>
    1641 
    1642     <?php endif; // count( $hierarchical_taxonomies ) && !$bulk ?>
    1643 
    1644         <fieldset class="inline-edit-col-right"><div class="inline-edit-col">
    1645 
    1646             <?php
    1647             if ( post_type_supports( $screen->post_type, 'author' ) && $bulk ) {
    1648                 echo $authors_dropdown;
    1649             }
    1650 
    1651             if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) :
    1652 
    1653                 if ( $post_type_object->hierarchical ) :
    1654                     ?>
    1655         <label>
    1656             <span class="title"><?php _e( 'Parent' ); ?></span>
    1657                     <?php
    1658                     $dropdown_args = array(
    1659                         'post_type'         => $post_type_object->name,
    1660                         'selected'          => $post->post_parent,
    1661                         'name'              => 'post_parent',
    1662                         'show_option_none'  => __( 'Main Page (no parent)' ),
    1663                         'option_none_value' => 0,
    1664                         'sort_column'       => 'menu_order, post_title',
    1665                     );
    1666 
    1667                     if ( $bulk ) {
    1668                         $dropdown_args['show_option_no_change'] = __( '&mdash; No Change &mdash;' );
    1669                     }
    1670 
    1671                     /**
    1672                      * Filters the arguments used to generate the Quick Edit page-parent drop-down.
    1673                      *
    1674                      * @since 2.7.0
    1675                      *
    1676                      * @see wp_dropdown_pages()
    1677                      *
    1678                      * @param array $dropdown_args An array of arguments.
    1679                      */
    1680                     $dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
    1681 
    1682                     wp_dropdown_pages( $dropdown_args );
    1683                     ?>
    1684         </label>
    1685 
    1686                     <?php
    1687                 endif; // hierarchical
    1688 
    1689                 if ( ! $bulk ) :
    1690                     ?>
    1691 
    1692             <label>
    1693                 <span class="title"><?php _e( 'Order' ); ?></span>
    1694                 <span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order; ?>" /></span>
    1695             </label>
    1696 
    1697                     <?php
    1698                 endif; // !$bulk
    1699         endif; // page-attributes
    1700             ?>
    1701 
    1702             <?php if ( 0 < count( get_page_templates( null, $screen->post_type ) ) ) : ?>
    1703         <label>
    1704             <span class="title"><?php _e( 'Template' ); ?></span>
    1705             <select name="page_template">
    1706                 <?php   if ( $bulk ) : ?>
    1707                 <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
    1708                 <?php   endif; // $bulk ?>
    1709                 <?php
    1710                 /** This filter is documented in wp-admin/includes/meta-boxes.php */
    1711                 $default_title = apply_filters( 'default_page_template_title', __( 'Default Template' ), 'quick-edit' );
    1712                 ?>
    1713                 <option value="default"><?php echo esc_html( $default_title ); ?></option>
    1714                 <?php page_template_dropdown( '', $screen->post_type ); ?>
    1715             </select>
    1716         </label>
    1717     <?php endif; ?>
    1718 
    1719             <?php if ( count( $flat_taxonomies ) && ! $bulk ) : ?>
    1720 
    1721                 <?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
    1722                     <?php
    1723                     if ( current_user_can( $taxonomy->cap->assign_terms ) ) :
    1724                         $taxonomy_name = esc_attr( $taxonomy->name );
    1725 
    1726                         ?>
    1727             <label class="inline-edit-tags">
    1728                 <span class="title"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
    1729                 <textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo $taxonomy_name; ?>]" class="tax_input_<?php echo $taxonomy_name; ?>"></textarea>
    1730             </label>
    1731                     <?php endif; ?>
    1732 
    1733     <?php endforeach; //$flat_taxonomies as $taxonomy ?>
    1734 
    1735     <?php endif; // count( $flat_taxonomies ) && !$bulk ?>
    1736 
    1737             <?php
    1738             if ( post_type_supports( $screen->post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) :
    1739                 if ( $bulk ) :
    1740                     ?>
    1741 
    1742             <div class="inline-edit-group wp-clearfix">
    1743                     <?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
    1744             <label class="alignleft">
    1745                 <span class="title"><?php _e( 'Comments' ); ?></span>
    1746                 <select name="comment_status">
    1747                     <option value=""><?php _e( '&mdash; No Change &mdash;' ); ?></option>
    1748                     <option value="open"><?php _e( 'Allow' ); ?></option>
    1749                     <option value="closed"><?php _e( 'Do not allow' ); ?></option>
    1750                 </select>
    1751             </label>
    1752         <?php endif; if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
    1753             <label class="alignright">
    1754                 <span class="title"><?php _e( 'Pings' ); ?></span>
    1755                 <select name="ping_status">
    1756                     <option value=""><?php _e( '&mdash; No Change &mdash;' ); ?></option>
    1757                     <option value="open"><?php _e( 'Allow' ); ?></option>
    1758                     <option value="closed"><?php _e( 'Do not allow' ); ?></option>
    1759                 </select>
    1760             </label>
    1761         <?php endif; ?>
    1762             </div>
    1763 
    1764             <?php else : // $bulk ?>
    1765 
    1766             <div class="inline-edit-group wp-clearfix">
    1767                 <?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
    1768                 <label class="alignleft">
    1769                     <input type="checkbox" name="comment_status" value="open" />
    1770                     <span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span>
    1771                 </label>
    1772             <?php endif; if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
    1773                 <label class="alignleft">
    1774                     <input type="checkbox" name="ping_status" value="open" />
    1775                     <span class="checkbox-title"><?php _e( 'Allow Pings' ); ?></span>
    1776                 </label>
    1777             <?php endif; ?>
    1778             </div>
    1779 
    1780                 <?php
    1781     endif; // $bulk
    1782     endif; // post_type_supports comments or pings
    1783             ?>
    1784 
    1785             <div class="inline-edit-group wp-clearfix">
    1786                 <label class="inline-edit-status alignleft">
    1787                     <span class="title"><?php _e( 'Status' ); ?></span>
    1788                     <select name="_status">
    1789             <?php if ( $bulk ) : ?>
    1790                         <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
    1791     <?php endif; // $bulk ?>
    1792                     <?php if ( $can_publish ) : // Contributors only get "Unpublished" and "Pending Review" ?>
    1793                         <option value="publish"><?php _e( 'Published' ); ?></option>
    1794                         <option value="future"><?php _e( 'Scheduled' ); ?></option>
    1795                         <?php if ( $bulk ) : ?>
    1796                         <option value="private"><?php _e( 'Private' ); ?></option>
    1797     <?php endif; // $bulk ?>
    1798                     <?php endif; ?>
    1799                         <option value="pending"><?php _e( 'Pending Review' ); ?></option>
    1800                         <option value="draft"><?php _e( 'Draft' ); ?></option>
    1801                     </select>
    1802                 </label>
    1803 
    1804             <?php if ( 'post' === $screen->post_type && $can_publish && current_user_can( $post_type_object->cap->edit_others_posts ) ) : ?>
    1805 
    1806                 <?php   if ( $bulk ) : ?>
    1807 
    1808                 <label class="alignright">
    1809                     <span class="title"><?php _e( 'Sticky' ); ?></span>
    1810                     <select name="sticky">
    1811                         <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
    1812                         <option value="sticky"><?php _e( 'Sticky' ); ?></option>
    1813                         <option value="unsticky"><?php _e( 'Not Sticky' ); ?></option>
    1814                     </select>
    1815                 </label>
    1816 
    1817     <?php   else : // $bulk ?>
    1818 
    1819                 <label class="alignleft">
    1820                     <input type="checkbox" name="sticky" value="sticky" />
    1821                     <span class="checkbox-title"><?php _e( 'Make this post sticky' ); ?></span>
    1822                 </label>
    1823 
    1824     <?php   endif; // $bulk ?>
    1825 
    1826     <?php endif; // 'post' && $can_publish && current_user_can( 'edit_others_cap' ) ?>
    1827 
    1828             </div>
    1829 
    1830             <?php
    1831 
    1832             if ( $bulk && current_theme_supports( 'post-formats' ) && post_type_supports( $screen->post_type, 'post-formats' ) ) {
    1833                 $post_formats = get_theme_support( 'post-formats' );
    1834 
    1835                 ?>
    1836         <label class="alignleft">
    1837         <span class="title"><?php _ex( 'Format', 'post format' ); ?></span>
    1838         <select name="post_format">
    1839             <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
    1840             <option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
    1841                 <?php
    1842                 if ( is_array( $post_formats[0] ) ) {
    1843                     foreach ( $post_formats[0] as $format ) {
    1844                         ?>
    1845                     <option value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
    1846                         <?php
    1847                     }
     1652                if ( post_type_supports( $screen->post_type, 'author' ) && $bulk ) {
     1653                    echo $authors_dropdown;
    18481654                }
    18491655                ?>
    1850         </select></label>
    1851                 <?php
    1852 
    1853             }
    1854 
    1855             ?>
    1856 
    1857         </div></fieldset>
     1656
     1657                <?php if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) : ?>
     1658
     1659                    <?php if ( $post_type_object->hierarchical ) : ?>
     1660
     1661                        <label>
     1662                            <span class="title"><?php _e( 'Parent' ); ?></span>
     1663                            <?php
     1664                            $dropdown_args = array(
     1665                                'post_type'         => $post_type_object->name,
     1666                                'selected'          => $post->post_parent,
     1667                                'name'              => 'post_parent',
     1668                                'show_option_none'  => __( 'Main Page (no parent)' ),
     1669                                'option_none_value' => 0,
     1670                                'sort_column'       => 'menu_order, post_title',
     1671                            );
     1672
     1673                            if ( $bulk ) {
     1674                                $dropdown_args['show_option_no_change'] = __( '&mdash; No Change &mdash;' );
     1675                            }
     1676
     1677                            /**
     1678                             * Filters the arguments used to generate the Quick Edit page-parent drop-down.
     1679                             *
     1680                             * @since 2.7.0
     1681                             *
     1682                             * @see wp_dropdown_pages()
     1683                             *
     1684                             * @param array $dropdown_args An array of arguments.
     1685                             */
     1686                            $dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
     1687
     1688                            wp_dropdown_pages( $dropdown_args );
     1689                            ?>
     1690                        </label>
     1691
     1692                    <?php endif; // hierarchical ?>
     1693
     1694                    <?php if ( ! $bulk ) : ?>
     1695
     1696                        <label>
     1697                            <span class="title"><?php _e( 'Order' ); ?></span>
     1698                            <span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order; ?>" /></span>
     1699                        </label>
     1700
     1701                    <?php endif; // ! $bulk ?>
     1702
     1703                <?php endif; // post_type_supports( ... 'page-attributes' ) ?>
     1704
     1705                <?php if ( 0 < count( get_page_templates( null, $screen->post_type ) ) ) : ?>
     1706
     1707                    <label>
     1708                        <span class="title"><?php _e( 'Template' ); ?></span>
     1709                        <select name="page_template">
     1710                            <?php if ( $bulk ) : ?>
     1711                            <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
     1712                            <?php endif; // $bulk ?>
     1713                            <?php
     1714                            /** This filter is documented in wp-admin/includes/meta-boxes.php */
     1715                            $default_title = apply_filters( 'default_page_template_title', __( 'Default Template' ), 'quick-edit' );
     1716                            ?>
     1717                            <option value="default"><?php echo esc_html( $default_title ); ?></option>
     1718                            <?php page_template_dropdown( '', $screen->post_type ); ?>
     1719                        </select>
     1720                    </label>
     1721
     1722                <?php endif; ?>
     1723
     1724                <?php if ( count( $flat_taxonomies ) && ! $bulk ) : ?>
     1725
     1726                    <?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
     1727
     1728                        <?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) : ?>
     1729                            <?php $taxonomy_name = esc_attr( $taxonomy->name ); ?>
     1730
     1731                            <label class="inline-edit-tags">
     1732                                <span class="title"><?php echo esc_html( $taxonomy->labels->name ); ?></span>
     1733                                <textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo $taxonomy_name; ?>]" class="tax_input_<?php echo $taxonomy_name; ?>"></textarea>
     1734                            </label>
     1735
     1736                        <?php endif; // current_user_can( 'assign_terms' ) ?>
     1737
     1738                    <?php endforeach; // $flat_taxonomies as $taxonomy ?>
     1739
     1740                <?php endif; // count( $flat_taxonomies ) && ! $bulk ?>
     1741
     1742                <?php if ( post_type_supports( $screen->post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
     1743
     1744                    <?php if ( $bulk ) : ?>
     1745
     1746                        <div class="inline-edit-group wp-clearfix">
     1747
     1748                        <?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
     1749
     1750                            <label class="alignleft">
     1751                                <span class="title"><?php _e( 'Comments' ); ?></span>
     1752                                <select name="comment_status">
     1753                                    <option value=""><?php _e( '&mdash; No Change &mdash;' ); ?></option>
     1754                                    <option value="open"><?php _e( 'Allow' ); ?></option>
     1755                                    <option value="closed"><?php _e( 'Do not allow' ); ?></option>
     1756                                </select>
     1757                            </label>
     1758
     1759                        <?php endif; ?>
     1760
     1761                        <?php if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
     1762
     1763                            <label class="alignright">
     1764                                <span class="title"><?php _e( 'Pings' ); ?></span>
     1765                                <select name="ping_status">
     1766                                    <option value=""><?php _e( '&mdash; No Change &mdash;' ); ?></option>
     1767                                    <option value="open"><?php _e( 'Allow' ); ?></option>
     1768                                    <option value="closed"><?php _e( 'Do not allow' ); ?></option>
     1769                                </select>
     1770                            </label>
     1771
     1772                        <?php endif; ?>
     1773
     1774                        </div>
     1775
     1776                    <?php else : // $bulk ?>
     1777
     1778                        <div class="inline-edit-group wp-clearfix">
     1779
     1780                        <?php if ( post_type_supports( $screen->post_type, 'comments' ) ) : ?>
     1781
     1782                            <label class="alignleft">
     1783                                <input type="checkbox" name="comment_status" value="open" />
     1784                                <span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span>
     1785                            </label>
     1786
     1787                        <?php endif; ?>
     1788
     1789                        <?php if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?>
     1790
     1791                            <label class="alignleft">
     1792                                <input type="checkbox" name="ping_status" value="open" />
     1793                                <span class="checkbox-title"><?php _e( 'Allow Pings' ); ?></span>
     1794                            </label>
     1795
     1796                        <?php endif; ?>
     1797
     1798                        </div>
     1799
     1800                    <?php endif; // $bulk ?>
     1801
     1802                <?php endif; // post_type_supports( ... comments or pings ) ?>
     1803
     1804                    <div class="inline-edit-group wp-clearfix">
     1805
     1806                        <label class="inline-edit-status alignleft">
     1807                            <span class="title"><?php _e( 'Status' ); ?></span>
     1808                            <select name="_status">
     1809                                <?php if ( $bulk ) : ?>
     1810                                    <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
     1811                                <?php endif; // $bulk ?>
     1812
     1813                                <?php if ( $can_publish ) : // Contributors only get "Unpublished" and "Pending Review". ?>
     1814                                    <option value="publish"><?php _e( 'Published' ); ?></option>
     1815                                    <option value="future"><?php _e( 'Scheduled' ); ?></option>
     1816                                    <?php if ( $bulk ) : ?>
     1817                                        <option value="private"><?php _e( 'Private' ); ?></option>
     1818                                    <?php endif; // $bulk ?>
     1819                                <?php endif; ?>
     1820
     1821                                <option value="pending"><?php _e( 'Pending Review' ); ?></option>
     1822                                <option value="draft"><?php _e( 'Draft' ); ?></option>
     1823                            </select>
     1824                        </label>
     1825
     1826                        <?php if ( 'post' === $screen->post_type && $can_publish && current_user_can( $post_type_object->cap->edit_others_posts ) ) : ?>
     1827
     1828                            <?php if ( $bulk ) : ?>
     1829
     1830                                <label class="alignright">
     1831                                    <span class="title"><?php _e( 'Sticky' ); ?></span>
     1832                                    <select name="sticky">
     1833                                        <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
     1834                                        <option value="sticky"><?php _e( 'Sticky' ); ?></option>
     1835                                        <option value="unsticky"><?php _e( 'Not Sticky' ); ?></option>
     1836                                    </select>
     1837                                </label>
     1838
     1839                            <?php else : // $bulk ?>
     1840
     1841                                <label class="alignleft">
     1842                                    <input type="checkbox" name="sticky" value="sticky" />
     1843                                    <span class="checkbox-title"><?php _e( 'Make this post sticky' ); ?></span>
     1844                                </label>
     1845
     1846                            <?php endif; // $bulk ?>
     1847
     1848                        <?php endif; // 'post' && $can_publish && current_user_can( 'edit_others_posts' ) ?>
     1849
     1850                    </div>
     1851
     1852                <?php if ( $bulk && current_theme_supports( 'post-formats' ) && post_type_supports( $screen->post_type, 'post-formats' ) ) : ?>
     1853                    <?php $post_formats = get_theme_support( 'post-formats' ); ?>
     1854
     1855                    <label class="alignleft">
     1856                        <span class="title"><?php _ex( 'Format', 'post format' ); ?></span>
     1857                        <select name="post_format">
     1858                            <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
     1859                            <option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
     1860                            <?php if ( is_array( $post_formats[0] ) ) : ?>
     1861                                <?php foreach ( $post_formats[0] as $format ) : ?>
     1862                                    <option value="<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
     1863                                <?php endforeach; ?>
     1864                            <?php endif; ?>
     1865                        </select>
     1866                    </label>
     1867
     1868                <?php endif; ?>
     1869
     1870                </div>
     1871            </fieldset>
    18581872
    18591873            <?php
     
    18911905            }
    18921906            ?>
    1893         <div class="submit inline-edit-save">
    1894             <button type="button" class="button cancel alignleft"><?php _e( 'Cancel' ); ?></button>
    1895             <?php
    1896             if ( ! $bulk ) {
    1897                 wp_nonce_field( 'inlineeditnonce', '_inline_edit', false );
    1898                 ?>
    1899                 <button type="button" class="button button-primary save alignright"><?php _e( 'Update' ); ?></button>
    1900                 <span class="spinner"></span>
    1901                 <?php
    1902             } else {
    1903                 submit_button( __( 'Update' ), 'primary alignright', 'bulk_edit', false );
    1904             }
    1905             ?>
    1906             <input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" />
    1907             <input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" />
    1908             <?php if ( ! $bulk && ! post_type_supports( $screen->post_type, 'author' ) ) { ?>
    1909                 <input type="hidden" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" />
    1910             <?php } ?>
    1911             <br class="clear" />
    1912             <div class="notice notice-error notice-alt inline hidden">
    1913                 <p class="error"></p>
     1907
     1908            <div class="submit inline-edit-save">
     1909                <button type="button" class="button cancel alignleft"><?php _e( 'Cancel' ); ?></button>
     1910
     1911                <?php if ( ! $bulk ) : ?>
     1912                    <?php wp_nonce_field( 'inlineeditnonce', '_inline_edit', false ); ?>
     1913                    <button type="button" class="button button-primary save alignright"><?php _e( 'Update' ); ?></button>
     1914                    <span class="spinner"></span>
     1915                <?php else : ?>
     1916                    <?php submit_button( __( 'Update' ), 'primary alignright', 'bulk_edit', false ); ?>
     1917                <?php endif; ?>
     1918
     1919                <input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" />
     1920                <input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" />
     1921                <?php if ( ! $bulk && ! post_type_supports( $screen->post_type, 'author' ) ) : ?>
     1922                    <input type="hidden" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" />
     1923                <?php endif; ?>
     1924                <br class="clear" />
     1925
     1926                <div class="notice notice-error notice-alt inline hidden">
     1927                    <p class="error"></p>
     1928                </div>
    19141929            </div>
    1915         </div>
    1916         </td></tr>
     1930
     1931            </td></tr>
     1932
    19171933            <?php
    19181934            $bulk++;
    1919         }
     1935        endwhile;
    19201936        ?>
    1921         </tbody></table></form>
     1937        </tbody></table>
     1938        </form>
    19221939        <?php
    19231940    }
Note: See TracChangeset for help on using the changeset viewer.