Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/24/2011 06:11:28 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Tweak XProfile CSS and JS. See #3801.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-cssjs.php

    r5574 r5599  
    11<?php
     2
    23// Exit if accessed directly
    34if ( !defined( 'ABSPATH' ) ) exit;
    45
     6/**
     7 * Enqueue the CSS for XProfile admin styling
     8 *
     9 * @since BuddyPress (1.1)
     10 */
    511function xprofile_add_admin_css() {
    6         $version = '20111212';
     12        $version = '20111224';
     13
    714        if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {
    8                 if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )
     15                if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
    916                        wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . 'bp-xprofile/admin/css/admin.dev.css', array(), $version );
    10                 else
     17                } else {
    1118                        wp_enqueue_style( 'xprofile-admin-css', BP_PLUGIN_URL . 'bp-xprofile/admin/css/admin.css',     array(), $version );
     19                }
    1220        }
    1321}
    1422add_action( bp_core_admin_hook(), 'xprofile_add_admin_css' );
    1523
     24/**
     25 * Enqueue the jQuery libraries for handling drag/drop/sort
     26 *
     27 * @since BuddyPres (1.5)
     28 */
    1629function xprofile_add_admin_js() {
    1730        if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {
     
    2336                wp_enqueue_script( 'jquery-ui-sortable'  );
    2437
    25                 $version = '20111212';
    26                 if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )
     38                $version = '20111224';
     39
     40                if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
    2741                        wp_enqueue_script( 'xprofile-admin-js', BP_PLUGIN_URL . 'bp-xprofile/admin/js/admin.dev.js', array( 'jquery', 'jquery-ui-sortable' ), $version );
    28                 else
     42                } else {
    2943                        wp_enqueue_script( 'xprofile-admin-js', BP_PLUGIN_URL . 'bp-xprofile/admin/js/admin.js',     array( 'jquery', 'jquery-ui-sortable' ), $version );
     44                }
    3045        }
    3146}
    3247add_action( bp_core_admin_hook(), 'xprofile_add_admin_js', 1 );
     48
    3349?>
Note: See TracChangeset for help on using the changeset viewer.