Making WordPress.org


Ignore:
Timestamp:
04/16/2014 02:30:41 PM (12 years ago)
Author:
nacin
Message:

Credits: Add 'exclude' parameter to the wpcredits shortcode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/core/credits/shortcode.php

    r160 r543  
    2424                }
    2525        }
     26
     27        if ( isset( $attrs['exclude'] ) ) {
     28                $exclude = explode( ',', strtolower( $attrs['exclude'] ) );
     29                $props = array_diff_key( $props, array_flip( $exclude ) );
     30        }
     31
    2632        asort( $props, SORT_FLAG_CASE | SORT_STRING );
    2733        $output = array();
Note: See TracChangeset for help on using the changeset viewer.