Changeset 1453136
- Timestamp:
- 07/12/2016 03:57:10 AM (10 years ago)
- Location:
- buddybar-widget/trunk
- Files:
-
- 6 added
- 1 deleted
- 6 edited
-
assets/css/widget.css (modified) (1 diff)
-
assets/css/widget.css.map (modified) (1 diff)
-
assets/css/widget.scss (modified) (1 diff)
-
buddybar-widget.php (modified) (5 diffs)
-
classes/class-buddybar-widget.php (modified) (3 diffs)
-
classes/class-public.php (added)
-
classes/class-widget.php (modified) (5 diffs)
-
classes/views/activity.php (added)
-
classes/views/friends.php (added)
-
classes/views/groups.php (added)
-
classes/views/messages.php (added)
-
classes/views/profile.php (added)
-
classes/views/widget.php (deleted)
Legend:
- Unmodified
- Added
- Removed
-
buddybar-widget/trunk/assets/css/widget.css
r1355246 r1453136 1 #bbw-avatar{float:left;margin-right: 0.5em;width:75px}#bbw-avatar img{height:75px;width:75px}.bbw-user-link{font-size:large;font-weight:bold;margin-bottom:0.5em}.bbw-module{display:inline-block;height:145px;list-style:none;margin-bottom:0.5em !important;vertical-align:top;width:50%}.bbw-module-title{font-size:medium;font-weight:bold}.bbw-module-link{margin:0;padding:0 1em 0 0 !important}#bbw-profile{height:85px;width:60%}1 #bbw-avatar{float:left;margin-right:.5em;width:75px}#bbw-avatar img{height:75px;width:75px}.bbw-user-link{font-size:large;font-weight:bold;margin-bottom:.5em}.bbw-module{display:inline-block;height:145px;list-style:none;margin-bottom:.5em !important;vertical-align:top;width:49%}.bbw-module-title{font-size:medium;font-weight:bold}.bbw-module-link{margin:0;padding:0 1em 0 0 !important}#bbw-profile{height:85px;width:60%} 2 2 3 3 /*# sourceMappingURL=widget.css.map */ -
buddybar-widget/trunk/assets/css/widget.css.map
r1355246 r1453136 1 {"version":3,"sources":["widget.scss"],"names":[],"mappings":"AAIA,YACC,WACA, mBACA,UAAc,CAEd,gBACC,YACA,UAAa,CAIf,eACC,gBACA,iBACA,mBAhBc,CAmBf,YACC,qBACA,aACA,gBACA,+BACA,mBACA,SAAc,CAGf,kBACC,iBACA,gBAAkB,CAGnB,iBACC,SACA,4BAA8B,CAG/B,aACC,YACA,SAAY,CAAA","file":"widget.css"}1 {"version":3,"sources":["widget.scss"],"names":[],"mappings":"AAIA,YACC,WACA,kBACA,UAAc,CAEd,gBACC,YACA,UAAa,CAIf,eACC,gBACA,iBACA,kBAhBc,CAmBf,YACC,qBACA,aACA,gBACA,8BACA,mBACA,SAAc,CAGf,kBACC,iBACA,gBAAkB,CAGnB,iBACC,SACA,4BAA8B,CAG/B,aACC,YACA,SAAY,CAAA","file":"widget.css"} -
buddybar-widget/trunk/assets/css/widget.scss
r1355246 r1453136 26 26 margin-bottom : $botmarg !important; 27 27 vertical-align : top; 28 width : 50%;28 width : 49%; 29 29 } 30 30 -
buddybar-widget/trunk/buddybar-widget.php
r1258609 r1453136 12 12 * Plugin URI: http://slushman.com/plugins/buddybar-widget 13 13 * Description: The BuddyBar Widget places all the links on BuddyPress’s BuddyBar in a sidebar widget. 14 * Version: 0. 2114 * Version: 0.3 15 15 * Author: Slushman 16 16 * Author URI: http://slushman.com … … 18 18 * License URI: http://www.gnu.org/licenses/gpl-0.2.txt 19 19 * Text Domain: buddybar-widget 20 * Domain Path: / languages20 * Domain Path: /assets/languages 21 21 */ 22 22 … … 28 28 /** 29 29 * The code that runs during plugin activation. 30 * This action is documented in includes/class-buddybar-widget-activator.php30 * This action is documented in classes/class-buddybar-widget-activator.php 31 31 */ 32 32 function activate_buddybar_widget() { 33 require_once plugin_dir_path( __FILE__ ) . ' includes/class-buddybar-widget-activator.php';33 require_once plugin_dir_path( __FILE__ ) . 'classes/class-activator.php'; 34 34 Buddybar_Widget_Activator::activate(); 35 35 } … … 37 37 /** 38 38 * The code that runs during plugin deactivation. 39 * This action is documented in includes/class-buddybar-widget-deactivator.php39 * This action is documented in classes/class-buddybar-widget-deactivator.php 40 40 */ 41 41 function deactivate_buddybar_widget() { 42 require_once plugin_dir_path( __FILE__ ) . ' includes/class-buddybar-widget-deactivator.php';42 require_once plugin_dir_path( __FILE__ ) . 'classes/class-deactivator.php'; 43 43 Buddybar_Widget_Deactivator::deactivate(); 44 44 } … … 51 51 * admin-specific hooks, and public-facing site hooks. 52 52 */ 53 require plugin_dir_path( __FILE__ ) . ' includes/class-buddybar-widget.php';53 require plugin_dir_path( __FILE__ ) . 'classes/class-buddybar-widget.php'; 54 54 55 55 /** -
buddybar-widget/trunk/classes/class-buddybar-widget.php
r1355246 r1453136 84 84 $this->set_locale(); 85 85 $this->define_widget_hooks(); 86 $this->define_public_hooks(); 86 87 87 88 } // __construct() … … 128 129 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'classes/class-widget.php'; 129 130 131 /** 132 * The class responsible for defining all actions that occur in the public-facing 133 * side of the site. 134 */ 135 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'classes/class-public.php'; 136 130 137 $this->loader = new Buddybar_Widget_Loader(); 131 138 $this->sanitizer = new BuddyBar_Widget_Sanitize(); … … 134 141 135 142 /** 143 * Register all of the hooks for public-facing functionality. 144 * 145 * @since 0.3 146 * @access private 147 */ 148 private function define_public_hooks() { 149 150 $plugin_public = new Buddybar_Widget_Public(); 151 152 $this->loader->action( 'buddybar-widget-component-menus', $plugin_public, 'add_component_menu_profile' ); 153 $this->loader->action( 'buddybar-widget-component-menus', $plugin_public, 'add_component_menu_activity' ); 154 $this->loader->action( 'buddybar-widget-component-menus', $plugin_public, 'add_component_menu_messages' ); 155 $this->loader->action( 'buddybar-widget-component-menus', $plugin_public, 'add_component_menu_friends' ); 156 $this->loader->action( 'buddybar-widget-component-menus', $plugin_public, 'add_component_menu_groups' ); 157 158 } // define_public_hooks() 159 160 /** 136 161 * Register all of the hooks shared between public-facing and admin functionality 137 162 * of the plugin. -
buddybar-widget/trunk/classes/class-widget.php
r1355267 r1453136 32 32 function __construct() { 33 33 34 $this->widget_name = 'buddybar_widget'; 35 34 $this->widget_name = 'buddybar_widget'; 36 35 $name = esc_html__( 'BuddyBar Widget', 'buddybar-widget' ); 37 36 $opts['classname'] = ''; … … 95 94 $widget_string = ''; 96 95 $widget_string .= $args['before_widget']; 96 97 /** 98 * buddybar_widget_title filter hook 99 */ 97 100 $filtered = apply_filters( 'buddybar_widget_title', $instance['title'] ); 98 101 $title = empty( $instance['title'] ) ? '' : $filtered; … … 106 109 ob_start(); 107 110 111 /** 112 * buddybar_widget_wrap_before action hook 113 */ 108 114 do_action( 'buddybar_widget_wrap_before' ); 109 115 110 116 if ( is_user_logged_in() ) { 111 117 112 include( plugin_dir_path( __FILE__ ) . 'views/widget.php' ); 118 /** 119 * buddybar-widget-component-menus action hook 120 * 121 * @hooked add_component_menu_profile 122 * @hooked add_component_menu_activity 123 * @hooked add_component_menu_messages 124 * @hooked add_component_menu_friends 125 * @hooked add_component_menu_groups 126 */ 127 do_action( 'buddybar-widget-component-menus' ); 113 128 114 129 } else { … … 118 133 } 119 134 135 /** 136 * buddybar_widget_wrap_after action hook 137 */ 120 138 do_action( 'buddybar_widget_wrap_after' ); 121 139 … … 161 179 } // update() 162 180 163 /**164 * Reorders the nav array165 *166 * @access public167 * @since 0.2168 *169 * @return array The reordered array170 */171 private function reorder_array( $array ) {172 173 $temp = array();174 $keys = array(175 array( 'activity', __( 'Activity', 'buddybar-widget' ) ),176 array( 'messages', __( 'Messages', 'buddybar-widget' ) ),177 array( 'friends', __( 'Friends', 'buddybar-widget' ) ),178 array( 'groups', __( 'Groups', 'buddybar-widget' ) )179 );180 181 foreach ( $keys as $key ) {182 183 if ( key_exists( $key[0], $array ) ) {184 185 $temp[$key[0]] = $array[$key[0]];186 $temp[$key[0]][0] = $key[1];187 188 }189 190 } // foreach191 192 return $temp;193 194 } // reorder_array()195 196 181 } // class
Note: See TracChangeset
for help on using the changeset viewer.