コード例 #1
0
ファイル: random-posts.php プロジェクト: emelleme/Drexel-Cab
    echo RandomPosts::execute($args);
}
function random_posts_mark_current()
{
    global $post, $random_posts_current_ID;
    $random_posts_current_ID = $post->ID;
}
/*

	'innards'
*/
if (!defined('DSEP')) {
    define('DSEP', DIRECTORY_SEPARATOR);
}
if (!defined('POST_PLUGIN_LIBRARY')) {
    RandomPosts::install_post_plugin_library();
}
$random_posts_current_ID = -1;
class RandomPosts
{
    function execute($args = '', $default_output_template = '<li>{link}</li>')
    {
        if (!RandomPosts::check_post_plugin_library(__('Post-Plugin Library missing'))) {
            return;
        }
        global $wpdb, $wp_version, $random_posts_current_ID;
        $start_time = ppl_microtime();
        // First we process any arguments to see if any defaults have been overridden
        $options = ppl_parse_args($args);
        // Next we retrieve the stored options and use them unless a value has been overridden via the arguments
        $options = ppl_set_options('random-posts', $options, $default_output_template);