示例#1
0
<?php

/*
 * Slideshow - A slideshow that integrates with the Placester Plugin
 */
PLS_Slideshow::init();
class PLS_Slideshow
{
    private static $default_img_url = '';
    public static $listings_to_delete = array();
    /*
     * Initializes the slideshow
     */
    public static function init()
    {
        // Set default image URL
        self::$default_img_url = PLS_IMG_URL . "/null/listing-1200x720.jpg";
        // For Wordpress 3.3.0
        if (!is_admin()) {
            add_action('init', array(__CLASS__, 'enqueue'));
        }
    }
    public static function enqueue()
    {
        $slideshow_support = get_theme_support('pls-slideshow');
        // Eventually, these will be set as args/from config...
        $slideshow_type = 'pls-slideshow-orbit';
        $slideshow_js_file = trailingslashit(PLS_EXT_URL) . 'slideshow/orbit/jquery.orbit.js';
        $slideshow_css_file = trailingslashit(PLS_EXT_URL) . 'slideshow/orbit/orbit.css';
        wp_register_script($slideshow_type, $slideshow_js_file, array('jquery'), NULL, false);
        wp_register_style($slideshow_type, $slideshow_css_file);