Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Awesome Helper Functions in WordPress Core

Display Helpers

checked( $var, $const = true, $echo = true );
selected( $var, $const = true, $echo = true );
disabled( $var, $const = true, $echo = true );
paginate_links( $args = '' );

Default aruments for paginate_links


$defaults = array(
    'base'          => '%_%',
    'format'        => '?page=%#%',
    'total'         => 1,
    'current'       => 0,
    'show_all'      => false,
    'prev_next'     => true,
    'prev_text'     => __('« Previous'),
    'next_text'     => __('Next »'),
    'end_size'      => 1,
    'mid_size'      => 2,
    'type'          => 'plain',
    'add_args'      => false,
    'add_fragment'  => ''
);

Data Helpers

__return_true();
__return_false();
__return_zero();
__return_null();
__return_empty_array();
wp_list_pluck( $list, $field );
wp_list_filter(
    $list,
    $args = array(),
    $operator = 'AND'
);
add_query_arg()

Arguments for add_query_arg (simplified)

remove_query_arg( $key, $query = false );
absint( $maybeint );
form_option( $option );

Action Helpers

media_sideload_image(
    $file,
    $post_id,
    $desc = null
);
get_temp_dir();
wp_remote_get( $url, $args = array() );
wp_remote_post( $url, $args = array() );
wp_die(
    $message = '',
    $title = '',
    $options = array()
);

Questions?