コード例 #1
0
ファイル: cptr.php プロジェクト: raheenbabul/flaming-lana
function ci_cptr_short($atts)
{
    if (isset($atts['echo'])) {
        $echo = $atts['echo'];
    } else {
        $echo = false;
    }
    $options = get_option(CI_CPTR_PLUGIN_OPTIONS);
    // $params will hold the default values ($options) overwritten by the values passed ($atts)
    $params = wp_parse_args($atts, $options);
    // Now check the whole thing against the defaults and remove undefined attributes.
    $p = shortcode_atts(array('limit' => CPTR_DEFAULT_LIMIT, 'excerpt' => CPTR_DEFAULT_EXCERPT, 'words' => CPTR_DEFAULT_EXCERPT_LENGTH, 'thumb' => CPTR_DEFAULT_THUMB, 'width' => CPTR_DEFAULT_THUMB_WIDTH, 'height' => CPTR_DEFAULT_THUMB_HEIGHT), $params);
    return cptr_show($echo, $p['limit'], $p['excerpt'], $p['words'], $p['thumb'], $p['width'], $p['height']);
}
コード例 #2
0
ファイル: cpr.php プロジェクト: raheenbabul/flaming-lana
function cpr_show($echo = true, $limit = CPR_DEFAULT_LIMIT, $excerpt = CPR_DEFAULT_EXCERPT, $words = CPR_DEFAULT_EXCERPT_LENGTH, $thumb = CPR_DEFAULT_THUMB, $width = CPR_DEFAULT_THUMB_WIDTH, $height = CPR_DEFAULT_THUMB_HEIGHT)
{
    _cptr_deprecated_function(__FUNCTION__, '2.2', 'cptr_show');
    return cptr_show($echo, $limit, $excerpt, $words, $thumb, $width, $height);
}