Skip to content

Instantly share code, notes, and snippets.

@reoring
Created September 27, 2012 05:42
Show Gist options
  • Save reoring/3792383 to your computer and use it in GitHub Desktop.
Save reoring/3792383 to your computer and use it in GitHub Desktop.
WordPressでTabbedWidgetが動作しないときの対処 ref: http://qiita.com/items/004501cc3cd0c245f3f3
function addHeader() {
wp_enqueue_script('jquery-ui-tabs', $this->plugin_path . 'js/jquery-ui-custom.min.js', array('jquery'), false, false);
wp_enqueue_script('jquery-ui-accordion', $this->plugin_path . 'js/jquery-ui-custom.min.js', array('jquery'), false, false);
wp_enqueue_script('jquery-ui-cookie', $this->plugin_path . 'js/jquery-cookie.min.js', array('jquery-ui-accordion'), false, false);
// Add default widgets styles
wp_enqueue_style('tabbed-widgets', $this->plugin_path . 'css/tabbed-widgets.css');
wp_enqueue_script('jquery-ui-accordion', $this->plugin_path . 'js/jquery-ui-custom.min.js', array('jquery'), false, true);
wp_enqueue_script('jquery-ui-cookie', $this->plugin_path . 'js/jquery-cookie.min.js', array('jquery-ui-accordion'), false, true);
// Add default widgets styles
wp_enqueue_style('tabbed-widgets', $this->plugin_path . 'css/tabbed-widgets.css');
if (get_current_theme() == 'Twenty Ten') {
wp_enqueue_style('tabbed-widgets-2010', $this->plugin_path . 'css/twenty-ten.css');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment