
wpp_get_mostpopular Update
By:
casben79 on
Apr 3rd, 2012 | syntax:
PHP | size: 0.60 KB | hits: 42 | expires: Never
function wpp_get_mostpopular($args = NULL, $return = false) {
if ( is_null( $args ) ) {
echo do_shortcode('[wpp]');
} else {
if( is_array( $args ) ){
$atts = '';
foreach( $args as $key => $arg ){
$atts .= $key . '="' . $arg . '"';
}
} else {
$atts = trim( str_replace( "&", " ", $args ) );
}
$out = do_shortcode( '[wpp '.$atts.']' );
if( $return )
return $out;
echo $out;
}
}