Skip to content

@billerickson /functions.php
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
<?php
/**
* Display Posts Shortcode - Offset Posts
* @author Bill Erickson
* @link http://wordpress.org/extend/plugins/display-posts-shortcode/
*
* @param array $args
* @param array $atts
* @return array $args
*/
function be_display_posts_shortcode_offset_posts( $args, $atts ) {
if( isset( $atts['offset'] ) ) {
$args['offset'] = (int) $atts['offset'];
}
return $args;
}
add_filter( 'display_posts_shortcode_args', 'be_display_posts_shortcode_offset_posts', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.