Closed nickburne closed 9 years ago
Should we have it exactly like Yoast SEO? but then our styles will conflict with jQuery UI css en-queued by WooCommerce, since right now I've made all to follow jQuery UI standard styles.
Well then why Yoast SEO tabs don't conflict with .... You might ask. To my surprise Yoast SEO doesn't use jQuery UI tabs built into wordpress but their custom jQuery stuff! This means they have different classes and remain unaffected by jQuery UI css styles. I don't believe in reinventing the wheel so I just used jQuery UI tabs by WordPress.
Do you have an example of WordPress core using the jQuery UI tabs?
Uhmmm... Lemme see.
No I don't but jQuery UI is built into wordpress core just use wp_enqueue_script('jquery-ui-tabs') and you are good to go. We can go for our own functionality if we want.
I always want to use wordpress core but then why does it conflict with WooCommerce?
Wocommerce does this includes/admin/class-wc-admin-assets.php
if ( in_array( $screen->id, wc_get_screen_ids() ) ) {
$jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
// Admin styles for WC pages only
wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION );
wp_enqueue_style( 'jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
wp_enqueue_style( 'wp-color-picker' );
}
wp_enqueue_style( 'jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
Adds jQuery UI styles!!!
Gotta go - we'll get into this tomorrow..
Now?
Okay... ...Tomorrow
Ok - closing this as the other ticket is open about tabs.
Would be great to have the same about of space above the tabs...