WordPress.org

Making WordPress.org


Ignore:
Timestamp:
04/30/2017 04:03:05 PM (5 years ago)
Author:
ocean90
Message:

Plugin Directory: Remove unused global import and use public instead of var for properties.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php

    r5338 r5445  
    2222
    2323    // Readme fields which get stored in plugin meta
    24     var $readme_fields = array(
     24    public $readme_fields = array(
    2525        'tested',
    2626        'requires',
     
    2929        'license_uri',
    3030        'upgrade_notice',
    31         'screenshots'
     31        'screenshots',
    3232    );
    3333
    3434    // Plugin headers that are stored in plugin meta
    35     var $plugin_headers = array(
     35    public $plugin_headers = array(
    3636        // Header    => meta_key
    3737        'Name'       => 'header_name',
     
    4040        'Author'     => 'header_author',
    4141        'AuthorURI'  => 'header_author_uri',
    42         'TextDomain' => 'header_textdomain'
     42        'TextDomain' => 'header_textdomain',
    4343    );
    4444
     
    5353     */
    5454    public function import_from_svn( $plugin_slug, $svn_changed_tags = array( 'trunk' ), $svn_revision_triggered = 0 ) {
    55         global $wpdb;
    56 
    5755        $plugin = Plugin_Directory::get_plugin_post( $plugin_slug );
    5856        if ( ! $plugin ) {
    59             throw new Exception( "Unknown Plugin" );
     57            throw new Exception( 'Unknown Plugin' );
    6058        }
    6159
     
    7371                $content .= "\n\n<!--section={$section}-->\n{$section_content}";
    7472            }
    75         } elseif ( !empty( $headers->Description ) ) {
     73        } elseif ( ! empty( $headers->Description ) ) {
    7674            $content = "<!--section=description-->\n{$headers->Description}";
    7775        }
Note: See TracChangeset for help on using the changeset viewer.