Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/24/2012 06:10:17 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Switch to .min for compressed JS and CSS files.

  • This moves our "development" versions from .dev.js to .js (same for css).
  • The compressed version then moves from .js to .min.js (same for css).
  • By switching to the standard .min convention, it sets expectations for developers, and works nicely with existing tools such as ack.
  • Fixes #4455.
  • Props nacin.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-widgets.php

    r6262 r6264  
    2929
    3030        if ( is_active_widget( false, false, $this->id_base ) && !is_admin() && !is_network_admin() ) {
    31             if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
    32                 wp_enqueue_script( 'groups_widget_groups_list-js', BP_PLUGIN_URL . 'bp-groups/js/widget-groups.dev.js', array( 'jquery' ), bp_get_version() );
    33             } else {
    34                 wp_enqueue_script( 'groups_widget_groups_list-js', BP_PLUGIN_URL . 'bp-groups/js/widget-groups.js', array( 'jquery' ),     bp_get_version() );
    35             }
     31            $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     32            wp_enqueue_script( 'groups_widget_groups_list-js', BP_PLUGIN_URL . "bp-groups/js/widget-groups{$min}.js", array( 'jquery' ), bp_get_version() );
    3633        }
    3734    }
     
    4946
    5047        echo $before_widget;
    51        
     48
    5249        $title = $instance['link_title'] ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ) . '">' . $instance['title'] . '</a>' : $instance['title'];
    53        
     50
    5451        echo $before_title
    5552           . $title
     
    106103    function update( $new_instance, $old_instance ) {
    107104        $instance = $old_instance;
    108        
     105
    109106        $instance['title']         = strip_tags( $new_instance['title'] );
    110107        $instance['max_groups']    = strip_tags( $new_instance['max_groups'] );
     
    131128
    132129        <p><label for="bp-groups-widget-title"><?php _e('Title:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" style="width: 100%" /></label></p>
    133        
     130
    134131        <p><label for="<?php echo $this->get_field_name('link_title') ?>"><input type="checkbox" name="<?php echo $this->get_field_name('link_title') ?>" value="1" <?php checked( $link_title ) ?> /> <?php _e( 'Link widget title to Groups directory', 'buddypress' ) ?></label></p>
    135132
Note: See TracChangeset for help on using the changeset viewer.