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/class-readme-parser.php

    r2992 r2994  
    11<?php
    22namespace WordPressdotorg\Plugin_Directory;
     3use Michelf\MarkdownExtra;
     4
    35/**
    46 * WordPress.org Plugin Readme Parser.
     
    9193        $line = $this->get_first_nonwhitespace( $contents );
    9294        do {
    93             $key = $value = null;
     95            $value = null;
    9496            if ( strpos( $line, ':' ) === false ) {
    9597                // Some plugins have line-breaks within the headers.
     
    258260        while ( ( $line = array_shift( $contents ) ) !== null ) {
    259261            $trimmed = trim( $line );
    260             if ( ! empty( $line ) ) {
     262            if ( ! empty( $trimmed ) ) {
    261263                break;
    262264            }
     
    343345
    344346    /**
    345      * Sanitize proided contributors to valid WordPress users
     347     * Sanitize provided contributors to valid WordPress users
    346348     *
    347349     * @param array $users Array of user_login's or user_nicename's.
     
    370372        }
    371373        if ( is_null( $markdown ) ) {
    372             $markdown = new \Michelf\MarkdownExtra();
     374            $markdown = new MarkdownExtra();
    373375        }
    374376
Note: See TracChangeset for help on using the changeset viewer.