Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/08/2009 05:25:01 PM (17 years ago)
Author:
apeatling
Message:

Re-factored a large amount of code. Moved all deprecated code into a deprecated folder which can be selectively unloaded. Removed all theme specific AJAX, CSS and JS from the plugins (and into the deprecated folder) in anticipation for the new theme setup coming in another big commit next week.

File:
1 edited

Legend:

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

    r1366 r1636  
    11<?php
    2 
    3 function xprofile_add_js() {
    4     if ( $_SERVER['SCRIPT_NAME'] == '/wp-signup.php' )
    5         wp_enqueue_script( 'jquery' );
    6 }
    7 add_action( 'wp', 'xprofile_add_js' );
    8 
    9 function xprofile_add_css() {
    10     if ( $_SERVER['SCRIPT_NAME'] == '/wp-signup.php' )
    11         wp_enqueue_style( 'bp-xprofile-signup', BP_PLUGIN_URL . '/bp-xprofile/css/signup.css' );   
    12    
    13     wp_print_styles();
    14 }
    15 add_action( 'wp_head', 'xprofile_add_css' );
    16 
    17 function xprofile_add_structure_css() {
    18     /* Enqueue the structure CSS file to give basic positional formatting for xprofile pages */
    19     wp_enqueue_style( 'bp-xprofile-structure', BP_PLUGIN_URL . '/bp-xprofile/css/structure.css' ); 
    20 }
    21 add_action( 'bp_styles', 'xprofile_add_structure_css' );
    222
    233function xprofile_add_admin_css() {
     
    3414add_action( 'admin_head', 'xprofile_add_admin_js' );
    3515
    36 function xprofile_add_cropper_js() {
    37     global $bp;
    38 
    39     if ( $_SERVER['SCRIPT_NAME'] == '/wp-activate.php' || $bp->current_component == BP_ACTIVATION_SLUG || $bp->current_action == 'change-avatar' ) {
    40         //wp_enqueue_script('jquery');
    41         //wp_enqueue_script('prototype');
    42         wp_enqueue_script('scriptaculous-root');
    43         wp_enqueue_script('cropper');
    44         add_action( 'wp_head', 'bp_core_add_cropper_js' );
    45     }
    46    
    47     if ( isset($_GET['page']) && $_GET['page'] == 'bp-xprofile.php' ) {
    48         add_action( 'admin_head', 'bp_core_add_cropper_js' );
    49     }
    50 }
    51 add_action( 'activate_header', 'xprofile_add_cropper_js' );
    52 add_action( 'template_redirect', 'xprofile_add_cropper_js', 1 );
    53 add_action( 'admin_menu', 'xprofile_add_cropper_js' );
    54 
    5516?>
Note: See TracChangeset for help on using the changeset viewer.