예제 #1
0
 function add_admin_header_popover()
 {
     global $wp_version;
     wp_enqueue_script('popoveradminjs', popover_url('popoverincludes/js/popoveradmin.js'), array('jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable'), $this->build);
     if (version_compare(preg_replace('/-.*$/', '', $wp_version), "3.3", '<')) {
         wp_enqueue_style('popoveradmincss', popover_url('popoverincludes/css/popoveradmin.css'), array('widgets'), $this->build);
     } else {
         wp_enqueue_style('popoveradmincss', popover_url('popoverincludes/css/popoveradmin.css'), array(), $this->build);
     }
     $this->update_admin_header_popover();
 }
예제 #2
0
 function add_popover_files()
 {
     global $popoverajax;
     if (method_exists($popoverajax, 'selective_message_display')) {
         // Set up the rquest information from here - this is passed in using the standard JS interface so we need to fake it
         $_REQUEST['thereferrer'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
         $_REQUEST['thefrom'] = $this->myURL();
         $this->thepopover = $popoverajax->selective_message_display();
         if (isset($this->thepopover['name']) && $this->thepopover['name'] != 'nopopover') {
             wp_enqueue_script('jquery');
             wp_enqueue_script('popoverlegacyjs', popover_url('popoverincludes/js/popoverlegacy.js'), array('jquery'), $this->build);
             wp_localize_script('popoverlegacyjs', 'popover', array('divname' => $this->thepopover['name'], 'usejs' => $this->thepopover['usejs'], 'delay' => $this->thepopover['delay']));
             add_action('wp_head', array(&$this, 'output_header_content'));
             add_action('wp_footer', array(&$this, 'output_footer_content'));
         }
     }
 }
예제 #3
0
function P_style_urls($styles = array())
{
    $styles['Default'] = popover_url('popoverincludes/css/default');
    $styles['Default Fixed'] = popover_url('popoverincludes/css/fixed');
    $styles['Dark Background Fixed'] = popover_url('popoverincludes/css/fullbackground');
    return $styles;
}