Making WordPress.org


Ignore:
Timestamp:
04/21/2016 07:41:53 PM (9 years ago)
Author:
obenland
Message:

Plugin Directory: Housekeeping.

  • Updates and corrects doc blocks.
  • Simplifies overqualified class references.
  • Corrects function args and return types.
  • Adds missing labels to input elements.
  • Makes sure variables are set before using them.

See #1584.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-plugin-tags.php

    r2655 r2994  
    88 */
    99class Plugin_Tags {
    10 
    1110    /**
    1211     * Displays the Publish metabox for plugins.
    1312     * The HTML here matches what Core uses.
     13     *
     14     * @param \WP_Post $post
    1415     */
    15     static function display( $post, $box ) {
    16         $taxonomy = get_taxonomy( 'plugin_tag' );
     16    static function display( $post ) {
    1717        ?>
    1818        <div id="taxonomy-plugin_tag" class="categorydiv">
    1919            <div id="plugin_tag-all" class="tabs-panel">
    20                 <?php
    21                 echo "<input type='hidden' name='tax_input[plugin_tag][]' value='0' />"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.
    22                 ?>
     20                <?php // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks. ?>
     21                <input type='hidden' name='tax_input[plugin_tag][]' value='0' />
    2322                <ul id="plugin_tagchecklist" data-wp-lists="list:plugin_tag" class="categorychecklist form-no-clear">
    2423                    <?php wp_terms_checklist( $post->ID, array( 'taxonomy' => 'plugin_tag' ) ); ?>
Note: See TracChangeset for help on using the changeset viewer.