update tax widget to select tax, then term

js needs work
This commit is contained in:
Robin Cornett
2015-01-05 20:32:18 -05:00
parent 1b2c90c872
commit 37cbcc7210
3 changed files with 104 additions and 35 deletions
@@ -181,6 +181,7 @@ class Display_Featured_Image_Genesis {
$check = strpos( get_current_screen()->id, 'displayfeaturedimagegenesis' );
wp_register_script( 'displayfeaturedimage-upload', plugins_url( '/includes/js/settings-upload.js', dirname( __FILE__ ) ), array( 'jquery', 'media-upload', 'thickbox' ), $version );
wp_register_script( 'widget-selector', plugins_url( '/includes/js/widget-selector.js', dirname( __FILE__ ) ), array( 'jquery' ), $version );
if ( 'appearance_page_displayfeaturedimagegenesis' === get_current_screen()->id || ! empty( get_current_screen()->taxonomy ) ) {
@@ -192,6 +193,12 @@ class Display_Featured_Image_Genesis {
) );
}
$screen = get_current_screen()->id;
if ( $screen === 'widgets' || $screen === 'customize' ) {
wp_enqueue_script( 'widget-selector' );
wp_localize_script( 'widget-selector', 'ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
}
}
function register_widget() {