Make WordPress Core


Ignore:
Timestamp:
01/12/2019 03:19:23 AM (5 years ago)
Author:
pento
Message:

Coding Standards: Extract extract() from the codebase.

Of the last four instances of extract() occurring, three of them are removed by this commit, and the fourth is appropriately documented.

See #45934.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/output.php

    r43571 r44569  
    3030
    3131    function _shortcode_paragraph( $atts, $content ) {
    32         extract(
    33             shortcode_atts(
    34                 array(
    35                     'class' => 'graf',
    36                 ),
    37                 $atts
    38             )
     32        $processed_atts = shortcode_atts(
     33            array(
     34                'class' => 'graf',
     35            ),
     36            $atts
    3937        );
    40         return "<p class='$class'>$content</p>\n";
     38
     39        return "<p class='{$processed_atts['class']}'>$content</p>\n";
    4140    }
    4241
Note: See TracChangeset for help on using the changeset viewer.