Plugin Directory

Changeset 1167136


Ignore:
Timestamp:
05/25/2015 02:06:00 PM (11 years ago)
Author:
primetimejas
Message:

custom jQuery UI CSS
bug fix

Location:
buddypress-profile-tabs/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • buddypress-profile-tabs/trunk/admin/class-bp-profile-tabs-admin.php

    r1105508 r1167136  
    6868
    6969        add_action( 'admin_init', array( $this, 'admin_register_bpt_script' ) );
    70         add_action( 'admin_head', array( $this, 'load_admin_scripts' ) );
     70        add_action( 'admin_print_styles', array( $this, 'load_admin_scripts' ) );
    7171
    7272    }
     
    194194    }
    195195    public function load_admin_scripts(){
    196         if ( $_GET['page'] === 'bp-profile-tabs' ) {
    197             wp_enqueue_style( $this->plugin_slug . '-jquery-ui-style' );
     196        if ( isset( $_GET['page'] ) && $_GET['page'] === 'bp-profile-tabs' ) {
     197            if ( isset( $_POST['bpt_custom'] ) ) {
     198                wp_deregister_style( $this->plugin_slug . '-jquery-ui-style' );
     199                wp_dequeue_style( $this->plugin_slug . '-jquery-ui-style' );
     200                //$bpt_options = get_option("bp_profile_tabs_option");
     201                $jquery_ui_css_url = $_POST['bpt_custom'];
     202                //wp_register_style( $this->plugin_slug . '-jquery-ui-style', $jquery_ui_css_url, array(), $this->version );
     203                //wp_enqueue_style( $this->plugin_slug . '-jquery-ui-style' );
     204                //echo $jquery_ui_css_url;
     205                wp_enqueue_style( $this->plugin_slug . '-jquery-ui-style', $jquery_ui_css_url, array(), $this->version );
     206            }
     207            else {
     208                wp_enqueue_style( $this->plugin_slug . '-jquery-ui-style' );
     209            }
    198210            wp_enqueue_script( $this->plugin_slug . '-script' );
    199211        }
     212
    200213    }
    201214    public function admin_register_bpt_script() {
     
    221234            $jquery_ui_css_url = $protocol . '://code.jquery.com/ui/'.$jquery_ui_version.'/themes/'.$bpt_theme.'/jquery-ui.css';
    222235        }
     236        if ( !empty( $bpt_options['bpt_custom'] ) ) {
     237            $jquery_ui_css_url = $bpt_options['bpt_custom'];
     238        }
    223239        wp_register_style( $this->plugin_slug . '-jquery-ui-style', $jquery_ui_css_url, array(), $this->version );
    224240    }
  • buddypress-profile-tabs/trunk/admin/views/admin.php

    r1105508 r1167136  
    6868                        ),
    6969                        'default' => 'google',
     70                    ),
     71                    array(
     72                        'name'    => __( 'Custom jQuery UI Theme', $this->plugin_slug ),
     73                        'desc'    => __( 'Enter a URL to a custom jQuery UI theme to replace the defaults above.', $this->plugin_slug ),
     74                        'id'      => $prefix . 'custom',
     75                        'type'    => 'text',
     76                        'default' => '',
    7077                    ),
    7178                ),
  • buddypress-profile-tabs/trunk/bp-profile-tabs.php

    r1122455 r1167136  
    1212 * Plugin URI:        http://ijas.me
    1313 * Description:       Makes the profile groups BuddyPress provides into tabs to better organize and consolidate the profile page.
    14  * Version:           1.5.7
     14 * Version:           1.5.8
    1515 * Author:            Jacob Schweitzer
    1616 * Author URI:        http://ijas.me
  • buddypress-profile-tabs/trunk/public/class-bp-profile-tabs.php

    r1122447 r1167136  
    357357            $jquery_ui_css_url = $protocol . '://code.jquery.com/ui/'.$jquery_ui_version.'/themes/'.$bpt_options["bpt_theme"].'/jquery-ui.css';
    358358        }
    359 
     359        if ( !empty( $bpt_options['bpt_custom'] ) ) {
     360            $jquery_ui_css_url = $bpt_options['bpt_custom'];
     361        }
    360362        wp_register_style( $this->plugin_slug . '-jquery-ui-style', $jquery_ui_css_url, array(), self::VERSION );
    361363    }
  • buddypress-profile-tabs/trunk/readme.txt

    r1122455 r1167136  
    55Requires at least: 3.4.2
    66Tested up to: 4.1.1
    7 Stable tag: 1.5.7
     7Stable tag: 1.5.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4141
    4242== Changelog ==
    43 = 1.5.7 =
    44 * Updated tab ids to match the group ids that are in the database.
     43
     44= 1.5.8 =
     45* Allow for custom jQuery UI theme
     46* Bug fix
    4547
    4648= 1.5.5 =
Note: See TracChangeset for help on using the changeset viewer.