Making WordPress.org

Changeset 1090


Ignore:
Timestamp:
01/06/2015 06:07:54 PM (10 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Remove more duplicative mentions of default values from parameter descriptions

Specifically:

  • "Default empty."
  • "Default empty string."
  • "default is empty string."
  • "Default empty array."
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php

    r1064 r1090  
    649649                        $params[ $arg['name'] ]['content'] = str_replace( "default is {$default}.", '', $params[ $arg['name'] ]['content'] );
    650650                        $params[ $arg['name'] ]['content'] = str_replace( "Default {$default}.", '', $params[ $arg['name'] ]['content'] );
     651
     652                        // When the default is '', docs sometimes say "Default empty." or similar.
     653                        if ( "''" == $arg['default'] ) {
     654                            $params[ $arg['name'] ]['content'] = str_replace( "Default empty.", '', $params[ $arg['name'] ]['content'] );
     655                            $params[ $arg['name'] ]['content'] = str_replace( "Default empty string.", '', $params[ $arg['name'] ]['content'] );
     656
     657                            // Only a few cases of this. Remove once core is fixed.
     658                            $params[ $arg['name'] ]['content'] = str_replace( "default is empty string.", '', $params[ $arg['name'] ]['content'] );
     659                        }
     660                        // When the default is array(), docs sometimes say "Default empty array." or similar.
     661                        elseif (  'array()' == $arg['default'] ) {
     662                            $params[ $arg['name'] ]['content'] = str_replace( "Default empty array.", '', $params[ $arg['name'] ]['content'] );
     663                            // Not as common.
     664                            $params[ $arg['name'] ]['content'] = str_replace( "Default empty.", '', $params[ $arg['name'] ]['content'] );
     665                        }
    651666                    }
    652667                }
Note: See TracChangeset for help on using the changeset viewer.