pootlepress / sfx-page-customizer

Page Customizer for Storefront
0 stars 0 forks source link

Attention to detail! #51

Closed nickburne closed 9 years ago

nickburne commented 9 years ago

Would be great to have the same about of space above the tabs... screenshot 2015-04-08 15 41 29

shramee commented 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.

shramee commented 9 years ago

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.

nickburne commented 9 years ago

Do you have an example of WordPress core using the jQuery UI tabs?

shramee commented 9 years ago

Uhmmm... Lemme see.

shramee commented 9 years ago

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.

nickburne commented 9 years ago

I always want to use wordpress core but then why does it conflict with WooCommerce?

shramee commented 9 years ago

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' );
        }
shramee commented 9 years ago
wp_enqueue_style( 'jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );

Adds jQuery UI styles!!!

nickburne commented 9 years ago

Gotta go - we'll get into this tomorrow..

shramee commented 9 years ago

Now?

shramee commented 9 years ago

Okay... ...Tomorrow

nickburne commented 9 years ago

Ok - closing this as the other ticket is open about tabs.