Ticket #4445: since-comments.patch
File since-comments.patch, 48.9 KB (added by , 12 years ago) |
---|
-
bp-activity/admin/js/admin.dev.js
# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /Applications/MAMP/htdocs/wp-content/plugins/buddypress-svn # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process.
3 3 /** 4 4 * Activity reply object for the activity index screen 5 5 * 6 * @since 1.66 * @since BuddyPress (1.6) 7 7 */ 8 8 var activityReply = { 9 9 10 10 /** 11 11 * Attach event handler functions to the relevant elements. 12 12 * 13 * @since 1.613 * @since BuddyPress (1.6) 14 14 */ 15 15 init : function() { 16 16 $(document).on( 'click', '.row-actions a.reply', activityReply.open ); … … 28 28 /** 29 29 * Reveals the entire row when "reply" is pressed. 30 30 * 31 * @since 1.631 * @since BuddyPress (1.6) 32 32 */ 33 33 open : function( e ) { 34 34 // Hide the container row, and move it to the new location … … 45 45 /** 46 46 * Hide and reset the entire row when "cancel", or escape, are pressed. 47 47 * 48 * @since 1.648 * @since BuddyPress (1.6) 49 49 */ 50 50 close : function( e ) { 51 51 // Hide the container row … … 65 65 /** 66 66 * Submits "form" via AJAX back to WordPress. 67 67 * 68 * @since 1.668 * @since BuddyPress (1.6) 69 69 */ 70 70 send : function( e ) { 71 71 // Hide any existing error message, and show the loading spinner … … 99 99 /** 100 100 * send() error message handler 101 101 * 102 * @since 1.6102 * @since BuddyPress (1.6) 103 103 */ 104 104 error : function( r ) { 105 105 var er = r.statusText; … … 117 117 /** 118 118 * send() success handler 119 119 * 120 * @since 1.6120 * @since BuddyPress (1.6) 121 121 */ 122 122 show : function ( xml ) { 123 123 var bg, id, response; -
bp-activity/bp-activity-actions.php
175 175 * @global object $bp BuddyPress global settings 176 176 * @param int $activity_id Activity id to be deleted. Defaults to 0. 177 177 * @return bool False on failure 178 * @since 1.6178 * @since BuddyPress (1.6) 179 179 */ 180 180 function bp_activity_action_spam_activity( $activity_id = 0 ) { 181 181 global $bp; … … 577 577 * Loads Akismet 578 578 * 579 579 * @global object $bp BuddyPress global settings 580 * @since 1.6580 * @since BuddyPress (1.6) 581 581 */ 582 582 function bp_activity_setup_akismet() { 583 583 global $bp; -
bp-activity/bp-activity-admin.php
6 6 * on which this implementation is heavily based. 7 7 * 8 8 * @package BuddyPress 9 * @since 1.69 * @since BuddyPress (1.6) 10 10 * @subpackage Activity 11 11 */ 12 12 … … 23 23 /** 24 24 * Registers the Activity component admin screen 25 25 * 26 * @since 1.626 * @since BuddyPress (1.6) 27 27 */ 28 28 function bp_activity_add_admin_menu() { 29 29 … … 42 42 * AJAX receiver for Activity replies via the admin screen. Adds a new activity 43 43 * comment, and returns HTML for a new table row. 44 44 * 45 * @since 1.645 * @since BuddyPress (1.6) 46 46 */ 47 47 function bp_activity_admin_reply() { 48 48 // Check nonce … … 116 116 * @param string $option Screen option name 117 117 * @param string $new_value Screen option form value 118 118 * @return string Option value. False to abandon update. 119 * @since 1.6119 * @since BuddyPress (1.6) 120 120 */ 121 121 function bp_activity_admin_screen_options( $value, $option, $new_value ) { 122 122 if ( 'toplevel_page_bp_activity_per_page' != $option && 'toplevel_page_bp_activity_network_per_page' != $option ) … … 135 135 * 136 136 * @param WP_Screen $screen Screen identifier 137 137 * @return array Hidden Meta Boxes 138 * @since 1.0138 * @since BuddyPress (1.0) 139 139 */ 140 140 function bp_activity_admin_edit_hidden_metaboxes( $hidden, $screen ) { 141 141 if ( empty( $screen->id ) || 'toplevel_page_bp-activity' != $screen->id && 'toplevel_page_bp-activity_network' != $screen->id ) … … 153 153 * 154 154 * @global object $bp BuddyPress global settings 155 155 * @global BP_Activity_List_Table $bp_activity_list_table Activity screen list table 156 * @since 1.6156 * @since BuddyPress (1.6) 157 157 */ 158 158 function bp_activity_admin_load() { 159 159 global $bp, $bp_activity_list_table; … … 503 503 /** 504 504 * Outputs the Activity component admin screens 505 505 * 506 * @since 1.6506 * @since BuddyPress (1.6) 507 507 */ 508 508 function bp_activity_admin() { 509 509 // Decide whether to load the index or edit screen … … 522 522 * Display the single activity edit screen 523 523 * 524 524 * @global int $screen_layout_columns Number of columns shown on this admin page 525 * @since 1.6525 * @since BuddyPress (1.6) 526 526 */ 527 527 function bp_activity_admin_edit() { 528 528 global $screen_layout_columns; … … 616 616 * Status metabox for the Activity admin edit screen 617 617 * 618 618 * @param object $item Activity item 619 * @since 1.6619 * @since BuddyPress (1.6) 620 620 */ 621 621 function bp_activity_admin_edit_metabox_status( $item ) { 622 622 ?> … … 671 671 * Primary link metabox for the Activity admin edit screen 672 672 * 673 673 * @param object $item Activity item 674 * @since 1.6674 * @since BuddyPress (1.6) 675 675 */ 676 676 function bp_activity_admin_edit_metabox_link( $item ) { 677 677 ?> … … 687 687 * User ID metabox for the Activity admin edit screen 688 688 * 689 689 * @param object $item Activity item 690 * @since 1.6690 * @since BuddyPress (1.6) 691 691 */ 692 692 function bp_activity_admin_edit_metabox_userid( $item ) { 693 693 ?> … … 703 703 * 704 704 * @global object $bp BuddyPress global settings 705 705 * @param object $item Activity item 706 * @since 1.6706 * @since BuddyPress (1.6) 707 707 */ 708 708 function bp_activity_admin_edit_metabox_type( $item ) { 709 709 global $bp; … … 739 739 * Primary item ID/Secondary item ID metabox for the Activity admin edit screen 740 740 * 741 741 * @param object $item Activity item 742 * @since 1.6742 * @since BuddyPress (1.6) 743 743 */ 744 744 function bp_activity_admin_edit_metabox_itemids( $item ) { 745 745 ?> … … 761 761 * 762 762 * @global BP_Activity_List_Table $bp_activity_list_table Activity screen list table 763 763 * @global string $plugin_page 764 * @since 1.6764 * @since BuddyPress (1.6) 765 765 */ 766 766 function bp_activity_admin_index() { 767 767 global $bp_activity_list_table, $plugin_page; … … 886 886 /** 887 887 * List table class for the Activity component admin page. 888 888 * 889 * @since 1.6889 * @since BuddyPress (1.6) 890 890 */ 891 891 class BP_Activity_List_Table extends WP_List_Table { 892 892 /** 893 893 * What type of view is being displayed? e.g. "All", "Pending", "Approved", "Spam"... 894 894 * 895 * @since 1.6895 * @since BuddyPress (1.6) 896 896 */ 897 897 public $view = 'all'; 898 898 899 899 /** 900 900 * How many activity items have been marked as spam. 901 901 * 902 * @since 1.6902 * @since BuddyPress (1.6) 903 903 */ 904 904 public $spam_count = 0; 905 905 906 906 /** 907 907 * Store activity-to-user-ID mappings for use in the In Response To column. 908 908 * 909 * @since 1.6909 * @since BuddyPress (1.6) 910 910 */ 911 911 protected $activity_user_id = array(); 912 912 913 913 /** 914 914 * Constructor 915 915 * 916 * @since 1.6916 * @since BuddyPress (1.6) 917 917 */ 918 918 public function __construct() { 919 919 … … 928 928 /** 929 929 * Handle filtering of data, sorting, pagination, and any other data-manipulation required prior to rendering. 930 930 * 931 * @since 1.6931 * @since BuddyPress (1.6) 932 932 */ 933 933 function prepare_items() { 934 934 $screen = get_current_screen(); … … 1030 1030 * Get an array of all the columns on the page 1031 1031 * 1032 1032 * @return array 1033 * @since 1.61033 * @since BuddyPress (1.6) 1034 1034 */ 1035 1035 function get_column_info() { 1036 1036 $this->_column_headers = array( … … 1045 1045 /** 1046 1046 * Displays a message on screen when no items are found (e.g. no search matches) 1047 1047 * 1048 * @since 1.61048 * @since BuddyPress (1.6) 1049 1049 */ 1050 1050 function no_items() { 1051 1051 _e( 'No activities found.', 'buddypress' ); … … 1054 1054 /** 1055 1055 * Outputs the Activity data table 1056 1056 * 1057 * @since 1.61057 * @since BuddyPress (1.6) 1058 1058 */ 1059 1059 function display() { 1060 1060 extract( $this->_args ); … … 1088 1088 * Generates content for a single row of the table 1089 1089 * 1090 1090 * @param object $item The current item 1091 * @since 1.61091 * @since BuddyPress (1.6) 1092 1092 */ 1093 1093 function single_row( $item ) { 1094 1094 static $row_class = ''; … … 1102 1102 /** 1103 1103 * Get the list of views available on this table (e.g. "all", "spam"). 1104 1104 * 1105 * @since 1.61105 * @since BuddyPress (1.6) 1106 1106 */ 1107 1107 function get_views() { 1108 1108 $redirect_to = remove_query_arg( array( 'activity_status', 'aid', 'deleted', 'error', 'spammed', 'unspammed', 'updated', ), $_SERVER['REQUEST_URI'] ); … … 1120 1120 * Get bulk actions 1121 1121 * 1122 1122 * @return array Key/value pairs for the bulk actions dropdown 1123 * @since 1.61123 * @since BuddyPress (1.6) 1124 1124 */ 1125 1125 function get_bulk_actions() { 1126 1126 $actions = array(); … … 1136 1136 * 1137 1137 * @see WP_List_Table::single_row_columns() 1138 1138 * @return array 1139 * @since 1.61139 * @since BuddyPress (1.6) 1140 1140 */ 1141 1141 function get_columns() { 1142 1142 return array( … … 1151 1151 * Get the column names for sortable columns 1152 1152 * 1153 1153 * @return array 1154 * @since 1.61154 * @since BuddyPress (1.6) 1155 1155 * @todo For this to work, BP_Activity_Activity::get() needs updating to supporting ordering by specific fields 1156 1156 */ 1157 1157 function get_sortable_columns() { … … 1167 1167 * 1168 1168 * @global object $bp BuddyPress global settings 1169 1169 * @param string $which 'top' or 'bottom' 1170 * @since 1.61170 * @since BuddyPress (1.6) 1171 1171 */ 1172 1172 function extra_tablenav( $which ) { 1173 1173 global $bp; … … 1216 1216 * 1217 1217 * @param array $item A singular item (one full row) 1218 1218 * @see WP_List_Table::single_row_columns() 1219 * @since 1.61219 * @since BuddyPress (1.6) 1220 1220 */ 1221 1221 function column_cb( $item ) { 1222 1222 printf( '<input type="checkbox" name="aid[]" value="%d" />', (int) $item['id'] ); … … 1227 1227 * 1228 1228 * @param array $item A singular item (one full row) 1229 1229 * @see WP_List_Table::single_row_columns() 1230 * @since 1.61230 * @since BuddyPress (1.6) 1231 1231 */ 1232 1232 function column_author( $item ) { 1233 1233 echo '<strong>' . get_avatar( $item['user_id'], '32' ) . ' ' . bp_core_get_userlink( $item['user_id'] ) . '</strong>'; … … 1240 1240 * 1241 1241 * @param array $item A singular item (one full row) 1242 1242 * @see WP_List_Table::single_row_columns() 1243 * @since 1.61243 * @since BuddyPress (1.6) 1244 1244 */ 1245 1245 function column_comment( $item ) { 1246 1246 // Determine what type of item (row) we're dealing with … … 1311 1311 * 1312 1312 * @param array $item A singular item (one full row) 1313 1313 * @see WP_List_Table::single_row_columns() 1314 * @since 1.61314 * @since BuddyPress (1.6) 1315 1315 */ 1316 1316 function column_response( $item ) { 1317 1317 // Is $item is a root activity? … … 1339 1339 * A wrapper function for the BP_Activity_List_Table to get the specified activity's user ID. 1340 1340 * 1341 1341 * @param int $activity_id Activity ID to retrieve User ID for 1342 * @since 1.61342 * @since BuddyPress (1.6) 1343 1343 */ 1344 1344 protected function get_activity_user_id( $activity_id ) { 1345 1345 // If there is an existing activity/user ID mapping, just return the user ID. … … 1373 1373 * 1374 1374 * @param array $tree Source array 1375 1375 * @return array Flattened array 1376 * @since 1.61376 * @since BuddyPress (1.6) 1377 1377 */ 1378 1378 public static function flatten_activity_array( $tree ){ 1379 1379 foreach ( (array) $tree as $node ) { -
bp-activity/bp-activity-akismet.php
3 3 * Akismet support for BuddyPress' Activity Stream 4 4 * 5 5 * @package BuddyPress 6 * @since 1.66 * @since BuddyPress (1.6) 7 7 * @subpackage Activity 8 8 */ 9 9 … … 16 16 * 17 17 * @access protected 18 18 * @var BP_Activity_Activity 19 * @since 1.619 * @since BuddyPress (1.6) 20 20 */ 21 21 protected $last_activity = null; 22 22 23 23 /** 24 24 * Constructor 25 25 * 26 * @since 1.626 * @since BuddyPress (1.6) 27 27 */ 28 28 public function __construct() { 29 29 $this->setup_actions(); … … 32 32 /** 33 33 * Hook Akismet into the activity stream 34 34 * 35 * @since 1.635 * @since BuddyPress (1.6) 36 36 */ 37 37 protected function setup_actions() { 38 38 // Add nonces to activity stream lists … … 67 67 * @param array $actions The hover links 68 68 * @param array $activity The activity for the current row being processed 69 69 * @return array The hover links 70 * @since 1.670 * @since BuddyPress (1.6) 71 71 */ 72 72 function comment_row_action( $actions, $activity ) { 73 73 $akismet_result = bp_activity_get_meta( $activity['id'], '_bp_akismet_result' ); … … 114 114 * This is used by Akismet to help detect spam activity. 115 115 * 116 116 * @see http://plugins.trac.wordpress.org/ticket/1232 117 * @since 1.6117 * @since BuddyPress (1.6) 118 118 */ 119 119 public function add_activity_stream_nonce() { 120 120 $form_id = '_bp_as_nonce'; … … 138 138 * @param int $user_id User ID 139 139 * @param int $activity_id Activity ID 140 140 * @see bp_dtheme_post_update() 141 * @since 1.6141 * @since BuddyPress (1.6) 142 142 */ 143 143 public function check_member_activity_update( $content, $user_id, $activity_id ) { 144 144 // By default, only handle activity updates and activity comments. … … 158 158 * 159 159 * This function is intended to be used inside the activity stream loop. 160 160 * 161 * @since 1.6161 * @since BuddyPress (1.6) 162 162 */ 163 163 public function add_activity_spam_button() { 164 164 if ( !bp_activity_user_can_mark_spam() ) … … 186 186 * 187 187 * This function is intended to be used inside the activity stream loop. 188 188 * 189 * @since 1.6189 * @since BuddyPress (1.6) 190 190 */ 191 191 public function add_activity_comment_spam_button() { 192 192 if ( !bp_activity_user_can_mark_spam() ) … … 214 214 * Get a list of filterable types of activity item that we want Akismet to automatically check for spam. 215 215 * 216 216 * @return array List of activity types 217 * @since 1.6217 * @since BuddyPress (1.6) 218 218 * @static 219 219 */ 220 220 public static function get_activity_types() { … … 226 226 * 227 227 * @param BP_Activity_Activity $activity 228 228 * @param string $source Either "by_a_person" (e.g. a person has manually marked the activity as spam) or "by_akismet" (automatically spammed). 229 * @since 1.6229 * @since BuddyPress (1.6) 230 230 */ 231 231 public function mark_as_spam( $activity, $source ) { 232 232 // Record this item so we can do some tidyup in BP_Akismet::check_member_activity_update() … … 240 240 * 241 241 * @param BP_Activity_Activity $activity 242 242 * @param string $source Either "by_a_person" (e.g. a person has manually marked the activity as ham) or "by_akismet" (automatically hammed). 243 * @since 1.6243 * @since BuddyPress (1.6) 244 244 */ 245 245 public function mark_as_ham( $activity, $source ) { 246 246 // If the activity was, originally, automatically marked as spam by Akismet, run the @mentions filter as it would have been skipped. … … 255 255 * 256 256 * @param BP_Activity_Activity $activity 257 257 * @see http://akismet.com/development/api/#comment-check 258 * @since 1.6258 * @since BuddyPress (1.6) 259 259 * @static 260 260 */ 261 261 public static function build_akismet_data_package( $activity ) { … … 294 294 * 295 295 * @param BP_Activity_Activity $activity The activity item to check 296 296 * @see http://akismet.com/development/api/ 297 * @since 1.6297 * @since BuddyPress (1.6) 298 298 * @todo Spam counter? 299 299 * @todo Auto-delete old spam? 300 300 */ … … 335 335 * Update activity meta after a manual spam change (user initiated) 336 336 * 337 337 * @param BP_Activity_Activity $activity The activity to check 338 * @since 1.6338 * @since BuddyPress (1.6) 339 339 */ 340 340 public function update_activity_spam_meta( $activity ) { 341 341 // By default, only handle activity updates and activity comments. … … 351 351 * Update activity meta after a manual ham change (user initiated) 352 352 * 353 353 * @param BP_Activity_Activity $activity The activity to check 354 * @since 1.6354 * @since BuddyPress (1.6) 355 355 */ 356 356 public function update_activity_ham_meta( $activity ) { 357 357 // By default, only handle activity updates and activity comments. … … 367 367 * Update activity meta after an automatic spam check (not user initiated) 368 368 * 369 369 * @param BP_Activity_Activity $activity The activity to check 370 * @since 1.6370 * @since BuddyPress (1.6) 371 371 */ 372 372 public function update_activity_akismet_meta( $activity ) { 373 373 // Check we're dealing with what was last updated by Akismet … … 408 408 * @param array $activity_data Packet of information to submit to Akismet 409 409 * @param string $check "check" or "submit" 410 410 * @param string $spam "spam" or "ham" 411 * @since 1.6411 * @since BuddyPress (1.6) 412 412 */ 413 413 public function send_akismet_request( $activity_data, $check = 'check', $spam = 'spam' ) { 414 414 global $akismet_api_host, $akismet_api_port; … … 480 480 * Filters user agent when sending to Akismet. 481 481 * 482 482 * @param string $user_agent 483 * @since 1.6483 * @since BuddyPress (1.6) 484 484 */ 485 485 public function buddypress_ua( $user_agent ) { 486 486 $user_agent = 'BuddyPress/' . bp_get_version() . ' | Akismet/'. constant( 'AKISMET_VERSION' ); … … 491 491 * Adds a "History" meta box to the activity edit screen. 492 492 * 493 493 * @param string $screen_action The type of screen that has been requested 494 * @since 1.6494 * @since BuddyPress (1.6) 495 495 */ 496 496 function add_history_metabox( $screen_action ) { 497 497 // Only proceed if we're on the edit screen … … 506 506 * History meta box for the Activity admin edit screen 507 507 * 508 508 * @param object $item Activity item 509 * @since 1.6509 * @since BuddyPress (1.6) 510 510 * @todo Update activity meta to allow >1 record with the same key (iterate through $history). 511 511 * @see http://buddypress.trac.wordpress.org/ticket/3907 512 512 */ … … 527 527 * @param int $activity_id Activity item ID 528 528 * @param string $message Human-readable description of what's changed 529 529 * @param string $event The type of check we were carrying out 530 * @since 1.6530 * @since BuddyPress (1.6) 531 531 */ 532 532 public function update_activity_history( $activity_id = 0, $message = '', $event = '' ) { 533 533 $event = array( … … 546 546 * 547 547 * @param int $activity_id Activity item ID 548 548 * @return array The activity item's Akismet history 549 * @since 1.6549 * @since BuddyPress (1.6) 550 550 */ 551 551 public function get_activity_history( $activity_id = 0 ) { 552 552 $history = bp_activity_get_meta( $activity_id, '_bp_akismet_history' ); … … 565 565 * 566 566 * @global object $bp BuddyPress global settings 567 567 * @global wpdb $wpdb WordPress database object 568 * @since 1.6568 * @since BuddyPress (1.6) 569 569 */ 570 570 function bp_activity_akismet_delete_old_metadata() { 571 571 global $bp, $wpdb; -
bp-activity/bp-activity-cache.php
3 3 /** 4 4 * Functions related to the BuddyPress Activity component and the WP Cache 5 5 * 6 * @since 1.66 * @since BuddyPress (1.6) 7 7 */ 8 8 9 9 // Exit if accessed directly -
bp-activity/bp-activity-classes.php
297 297 * @param string MySQL column sort; ASC or DESC. (Optional; default is DESC) 298 298 * @param bool $display_comments Retrieve an activity item's associated comments or not. (Optional; default is false) 299 299 * @return array 300 * @since 1.2300 * @since BuddyPress (1.2) 301 301 */ 302 302 function get_specific( $activity_ids, $max = false, $page = 1, $per_page = 25, $sort = 'DESC', $display_comments = false ) { 303 303 _deprecated_function( __FUNCTION__, '1.5', 'Use BP_Activity_Activity::get() with the "in" parameter instead.' ); … … 445 445 * @param array $activities 446 446 * @param bool $spam Optional; 'ham_only' (default), 'spam_only' or 'all'. 447 447 * @return array The updated activities with nested comments 448 * @since 1.2448 * @since BuddyPress (1.2) 449 449 */ 450 450 function append_comments( $activities, $spam = 'ham_only' ) { 451 451 global $wpdb; … … 476 476 * @param into $right Right-most node boundary 477 477 * @param bool $spam Optional; 'ham_only' (default), 'spam_only' or 'all'. 478 478 * @return array The updated activities with nested comments 479 * @since 1.2479 * @since BuddyPress (1.2) 480 480 */ 481 481 function get_activity_comments( $activity_id, $left, $right, $spam = 'ham_only' ) { 482 482 global $wpdb, $bp; -
bp-activity/bp-activity-functions.php
659 659 * @global object $wpdb 660 660 * @global object $bp BuddyPress global settings 661 661 * @param int $user_id 662 * @since 1.6662 * @since BuddyPress (1.6) 663 663 */ 664 664 function bp_activity_spam_all_user_data( $user_id = 0 ) { 665 665 global $bp, $wpdb; … … 710 710 * @global object $wpdb 711 711 * @global object $bp BuddyPress global settings 712 712 * @param int $user_id 713 * @since 1.6713 * @since BuddyPress (1.6) 714 714 */ 715 715 function bp_activity_ham_all_user_data( $user_id = 0 ) { 716 716 global $bp, $wpdb; … … 759 759 * Register the activity stream actions for updates 760 760 * 761 761 * @global object $bp BuddyPress global settings 762 * @since 1.6762 * @since BuddyPress (1.6) 763 763 */ 764 764 function bp_activity_register_activity_actions() { 765 765 global $bp; … … 1472 1472 * Convenience function to control whether the current user is allowed to mark activity items as spam 1473 1473 * 1474 1474 * @return bool True if user is allowed to mark activity items as spam 1475 * @since 1.61475 * @since BuddyPress (1.6) 1476 1476 * @static 1477 1477 */ 1478 1478 function bp_activity_user_can_mark_spam() { … … 1485 1485 * @global object $bp BuddyPress global settings 1486 1486 * @param BP_Activity_Activity $activity 1487 1487 * @param string $source Optional; default is "by_a_person" (e.g. a person has manually marked the activity as spam). 1488 * @since 1.61488 * @since BuddyPress (1.6) 1489 1489 */ 1490 1490 function bp_activity_mark_as_spam( &$activity, $source = 'by_a_person' ) { 1491 1491 global $bp; … … 1521 1521 * @global object $bp BuddyPress global settings 1522 1522 * @param BP_Activity_Activity $activity 1523 1523 * @param string $source Optional; default is "by_a_person" (e.g. a person has manually marked the activity as spam). 1524 * @since 1.61524 * @since BuddyPress (1.6) 1525 1525 */ 1526 1526 function bp_activity_mark_as_ham( &$activity, $source = 'by_a_person' ) { 1527 1527 global $bp; -
bp-activity/bp-activity-loader.php
323 323 /** 324 324 * Setup the actions 325 325 * 326 * @since 1.6326 * @since BuddyPress (1.6) 327 327 */ 328 328 function setup_actions() { 329 329 // Spam prevention -
bp-blogs/bp-blogs-filters.php
5 5 * 6 6 * @package BuddyPress 7 7 * @subpackage Blogs 8 * @since 1.68 * @since BuddyPress (1.6) 9 9 */ 10 10 11 11 /** 12 12 * Ensures that the 'Create a new site' link at wp-admin/my-sites.php points to the BP blog signup 13 13 * 14 * @since 1.614 * @since BuddyPress (1.6) 15 15 * @uses apply_filters() Filter bp_blogs_creation_location to alter the returned value 16 16 * 17 17 * @param string $url The original URL (points to wp-signup.php by default) -
bp-blogs/bp-blogs-functions.php
353 353 * Blogs component. This function bumps the priority of the core function, so that we can be sure 354 354 * that the Blogs component is loaded first. See http://buddypress.trac.wordpress.org/ticket/3916 355 355 * 356 * @since 1.6356 * @since BuddyPress (1.6) 357 357 */ 358 358 function bp_blogs_maybe_add_user_to_blog() { 359 359 if ( ! is_multisite() ) … … 440 440 * @param string $new_status New comment status. 441 441 * @param string $old_status Previous comment status. 442 442 * @param object $comment Comment data. 443 * @since 1.6443 * @since BuddyPress (1.6) 444 444 */ 445 445 function bp_blogs_transition_activity_status( $new_status, $old_status, $comment ) { 446 446 global $bp; -
bp-blogs/bp-blogs-template.php
511 511 /** 512 512 * Echo the value of bp_blogs_get_subdomain_base() 513 513 * 514 * @since 1.6514 * @since BuddyPress (1.6) 515 515 */ 516 516 function bp_blogs_subdomain_base() { 517 517 echo bp_blogs_get_subdomain_base(); … … 520 520 * Return the base URL to be displayed when a user chooses an address for a new blog, on 521 521 * a subdomain installation of WordPress MS 522 522 * 523 * @since 1.6523 * @since BuddyPress (1.6) 524 524 * @return str The base URL - eg, 'example.com' for site_url() example.com or www.example.com 525 525 */ 526 526 function bp_blogs_get_subdomain_base() { -
bp-core/admin/bp-core-functions.php
32 32 * @global array $_parent_pages 33 33 * @global array $_registered_pages 34 34 * @global array $submenu 35 * @since 1.635 * @since BuddyPress (1.6) 36 36 */ 37 37 function bp_core_admin_backpat_menu() { 38 38 global $_parent_pages, $_registered_pages, $submenu; … … 65 65 /** 66 66 * Tweak the Settings subnav menu to show only one BuddyPress menu item (Settings > BuddyPress). 67 67 * 68 * @since 1.668 * @since BuddyPress (1.6) 69 69 */ 70 70 function bp_core_modify_admin_menu() { 71 71 $page = bp_core_do_network_admin() ? 'settings.php' : 'options-general.php'; … … 85 85 * 86 86 * @global string $plugin_page 87 87 * @global array $submenu 88 * @since 1.688 * @since BuddyPress (1.6) 89 89 */ 90 90 function bp_core_modify_admin_menu_highlight() { 91 91 global $plugin_page, $submenu_file; … … 101 101 * will never appear. 102 102 * 103 103 * @see bp_core_admin_backpat_menu() 104 * @since 1.6104 * @since BuddyPress (1.6) 105 105 * @todo Add convenience links into the markup once new positions are finalised. 106 106 */ 107 107 function bp_core_admin_backpat_page() { -
bp-core/admin/bp-core-update.php
657 657 /** 658 658 * When upgrading to BP 1.6, prompt the admin to switch to WordPress' Toolbar. 659 659 * 660 * @since 1.6660 * @since BuddyPress (1.6) 661 661 */ 662 662 function step_admin_bar() { 663 663 ?> … … 943 943 * When upgrading to BP 1.6, the admin is prompted to switch to WordPress' Toolbar. 944 944 * If they choose not to, record that preference in the options table. 945 945 * 946 * @since 1.6946 * @since BuddyPress (1.6) 947 947 */ 948 948 function step_admin_bar_save() { 949 949 if ( isset( $_POST['submit'] ) ) { -
bp-core/bp-core-cache.php
60 60 /** 61 61 * Update the metadata cache for the specified objects. 62 62 * 63 * @since 1.663 * @since BuddyPress (1.6) 64 64 * @global $wpdb WordPress database object for queries. 65 65 * @param array $args See $defaults definition for more details 66 66 * @return mixed Metadata cache for the specified objects, or false on failure. -
bp-core/bp-core-catchuri.php
523 523 * general possible versions of the URL - eg, example.com/groups/mygroup/ instead of 524 524 * example.com/groups/mygroup/home/ 525 525 * 526 * @since 1.6526 * @since BuddyPress (1.6) 527 527 * @see BP_Members_Component::setup_globals() where $bp->canonical_stack['base_url'] and 528 528 * ['component'] may be set 529 529 * @see bp_core_new_nav_item() where $bp->canonical_stack['action'] may be set … … 576 576 /** 577 577 * Output rel=canonical header tag for BuddyPress content 578 578 * 579 * @since 1.6579 * @since BuddyPress (1.6) 580 580 */ 581 581 function bp_rel_canonical() { 582 582 $canonical_url = bp_get_canonical_url(); … … 702 702 * This function will be removed in a later version of BuddyPress. Plugins 703 703 * (and plugin authors!) should ignore it. 704 704 * 705 * @since 1.6.1705 * @since BuddyPress (1.6.1) 706 706 * 707 707 * @link http://buddypress.trac.wordpress.org/ticket/4329 708 708 * @link http://buddypress.trac.wordpress.org/ticket/4415 … … 722 722 * This function should be considered temporary, and may be removed without 723 723 * notice in future versions of BuddyPress. 724 724 * 725 * @since 1.6725 * @since BuddyPress (1.6) 726 726 */ 727 727 function _bp_maybe_remove_rel_canonical() { 728 728 if ( ! bp_is_blog_page() && ! is_404() ) { -
bp-core/bp-core-classes.php
873 873 * API to create BuddyPress buttons 874 874 * 875 875 * @package BuddyPress Core 876 * @since 1.2.6876 * @since BuddyPress (1.2.6) 877 877 */ 878 878 class BP_Button { 879 879 // Button properties -
bp-core/bp-core-cssjs.php
129 129 * 130 130 * Adds AJAX target URL so themes can access the WordPress AJAX functionality. 131 131 * 132 * @since 1.1132 * @since BuddyPress (1.1) 133 133 */ 134 134 function bp_core_add_ajax_url_js() { 135 135 ?> -
bp-core/bp-core-functions.php
254 254 * Get the current GMT time to save into the DB 255 255 * 256 256 * @package BuddyPress Core 257 * @since 1.2.6257 * @since BuddyPress (1.2.6) 258 258 */ 259 259 function bp_core_current_time( $gmt = true ) { 260 260 // Get current time in MYSQL format -
bp-core/bp-core-moderation.php
4 4 * 5 5 * @package BuddyPress 6 6 * @subpackage Core 7 * @since 1.67 * @since BuddyPress (1.6) 8 8 */ 9 9 10 10 // Exit if accessed directly … … 20 20 * 21 21 * @param int $user_id User id to check for flood 22 22 * @return bool True if there is no flooding, true if there is 23 * @since 1.623 * @since BuddyPress (1.6) 24 24 * @uses current_user_can() To check if the current user can throttle 25 25 * @uses bp_get_option() To get the throttle time 26 26 * @uses get_transient() To get the last posted transient of the ip … … 50 50 * @param string $title The title of the content 51 51 * @param string $content The content being posted 52 52 * @return bool True if test is passed, false if fail 53 * @since 1.653 * @since BuddyPress (1.6) 54 54 * @uses bp_current_author_ip() To get current user IP address 55 55 * @uses bp_current_author_ua() To get current user agent 56 56 * @uses bp_current_user_can() Allow super admins to bypass blacklist … … 159 159 * @uses bp_current_author_ip() To get current user IP address 160 160 * @uses bp_current_author_ua() To get current user agent 161 161 * @uses bp_current_user_can() Allow super admins to bypass blacklist 162 * @since 1.6162 * @since BuddyPress (1.6) 163 163 */ 164 164 function bp_core_check_for_blacklist( $user_id = 0, $title = '', $content = '' ) { 165 165 … … 241 241 * Get the current-user IP address 242 242 * 243 243 * @return string 244 * @since 1.6244 * @since BuddyPress (1.6) 245 245 */ 246 246 function bp_core_current_user_ip() { 247 247 $retval = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] ); … … 253 253 * Get the current-user user-agent 254 254 * 255 255 * @return string 256 * @since 1.6256 * @since BuddyPress (1.6) 257 257 */ 258 258 function bp_core_current_user_ua() { 259 259 -
bp-core/bp-core-template.php
161 161 /** 162 162 * Returns the name of the BP site. Used in RSS headers 163 163 * 164 * @since 1.6164 * @since BuddyPress (1.6) 165 165 */ 166 166 function bp_get_site_name() { 167 167 return apply_filters( 'bp_site_name', get_bloginfo( 'name', 'display' ) ); … … 247 247 * Generates the basic search form as used in BP-Default's header. 248 248 * 249 249 * @return string HTML <select> element 250 * @since 1.0250 * @since BuddyPress (1.0) 251 251 */ 252 252 function bp_search_form_type_select() { 253 253 -
bp-core/deprecated/1.5.php
43 43 * @package BuddyPress 44 44 * @param int $blog_id optional blog id to test (default current blog) 45 45 * @return bool True if not multisite or $blog_id is main site 46 * @since 1.2.646 * @since BuddyPress (1.2.6) 47 47 */ 48 48 function bp_core_is_main_site( $blog_id = '' ) { 49 49 _deprecated_function( __FUNCTION__, '1.5', 'is_main_site()' ); … … 73 73 * 74 74 * @deprecated 1.5 75 75 * @deprecated Use add_menu_page(). 76 * @since 1.176 * @since BuddyPress (1.1) 77 77 */ 78 78 function bp_core_add_admin_menu_page( $args = '' ) { 79 79 global $_registered_pages, $admin_page_hooks, $menu; … … 251 251 * 252 252 * @deprecated 1.5 253 253 * @deprecated Use wp_title() 254 * @since 1.0254 * @since BuddyPress (1.0) 255 255 */ 256 256 function bp_page_title() { 257 257 echo bp_get_page_title(); … … 262 262 * 263 263 * @deprecated 1.5 264 264 * @deprecated Use wp_title() 265 * @since 1.0265 * @since BuddyPress (1.0) 266 266 */ 267 267 function bp_get_page_title() { 268 268 _deprecated_function( __FUNCTION__, '1.5', 'wp_title()' ); … … 279 279 * 280 280 * @deprecated 1.5 281 281 * @deprecated Use wp_logout_url() 282 * @since 1.0282 * @since BuddyPress (1.0) 283 283 */ 284 284 function bp_log_out_link() { 285 285 _deprecated_function( __FUNCTION__, '1.5', 'wp_logout_url()' ); … … 440 440 * @param string $page_html A list of pages as a dropdown (select list) 441 441 * @return string 442 442 * @see wp_dropdown_pages() 443 * @since 1.2443 * @since BuddyPress (1.2) 444 444 */ 445 445 function bp_dtheme_wp_pages_filter( $page_html ) { 446 446 _deprecated_function( __FUNCTION__, '1.5', "No longer required." ); … … 458 458 * @param $string $oldvalue Previous value of get_option( 'page_on_front' ) 459 459 * @param $string $oldvalue New value of get_option( 'page_on_front' ) 460 460 * @return string 461 * @since 1.2461 * @since BuddyPress (1.2) 462 462 */ 463 463 function bp_dtheme_page_on_front_update( $oldvalue, $newvalue ) { 464 464 _deprecated_function( __FUNCTION__, '1.5', "No longer required." ); … … 478 478 * @deprecated No longer required. 479 479 * @param string $template Absolute path to the page template 480 480 * @return string 481 * @since 1.2481 * @since BuddyPress (1.2) 482 482 */ 483 483 function bp_dtheme_page_on_front_template( $template ) { 484 484 _deprecated_function( __FUNCTION__, '1.5', "No longer required." ); … … 493 493 * 494 494 * @deprecated 1.5 495 495 * @deprecated No longer required. 496 * @since 1.2496 * @since BuddyPress (1.2) 497 497 */ 498 498 function bp_dtheme_fix_get_posts_on_activity_front() { 499 499 _deprecated_function( __FUNCTION__, '1.5', "No longer required." ); … … 509 509 * @deprecated No longer required. 510 510 * @param array $posts Posts as retrieved by WP_Query 511 511 * @return array 512 * @since 1.2.5512 * @since BuddyPress (1.2.5) 513 513 */ 514 514 function bp_dtheme_fix_the_posts_on_activity_front( $posts ) { 515 515 _deprecated_function( __FUNCTION__, '1.5', "No longer required." ); … … 524 524 * 525 525 * @deprecated 1.5 526 526 * @deprecated Enqueue the comment-reply script in your theme's header.php. 527 * @since 1.2527 * @since BuddyPress (1.2) 528 528 */ 529 529 function bp_dtheme_add_blog_comments_js() { 530 530 _deprecated_function( __FUNCTION__, '1.5', "Enqueue the comment-reply script in your theme's header.php." ); -
bp-forums/bp-forums-functions.php
345 345 * Check to see whether a user has already left this particular reply on a given post. 346 346 * Prevents dupes. 347 347 * 348 * @since 1.6348 * @since BuddyPress (1.6) 349 349 * 350 350 * @param str $text The text of the comment 351 351 * @param int $topic_id The topic id -
bp-friends/bp-friends-functions.php
230 230 * Excludes friends that are already in the group, and banned friends if the 231 231 * user is not a group admin. 232 232 * 233 * @since 1.0233 * @since BuddyPress (1.0) 234 234 * @param int $user_id User ID whose friends to see can be invited 235 235 * @param int $group_id Group to check possible invitations against 236 236 * @return mixed False if no friends, array of users if friends -
bp-groups/bp-groups-classes.php
1097 1097 * @global wpdb $wpdb WordPress database object 1098 1098 * @param int $user_id 1099 1099 * @param int $group_id 1100 * @since 1.2.61100 * @since BuddyPress (1.2.6) 1101 1101 */ 1102 1102 function check_is_creator( $user_id, $group_id ) { 1103 1103 global $bp, $wpdb; … … 1216 1216 * @global object $bp BuddyPress global settings 1217 1217 * @global wpdb $wpdb WordPress database object 1218 1218 * @param int $user_id 1219 * @since 1.01219 * @since BuddyPress (1.0) 1220 1220 * @uses BP_Groups_Member 1221 1221 */ 1222 1222 function delete_all_for_user( $user_id ) { … … 1248 1248 * 1249 1249 * @package BuddyPress 1250 1250 * @subpackage Groups 1251 * @since 1.11251 * @since BuddyPress (1.1) 1252 1252 */ 1253 1253 class BP_Group_Extension { 1254 1254 var $name = false; -
bp-groups/bp-groups-forums.php
23 23 * @param string $group_name The group name 24 24 * @param string $group_description The group description 25 25 * 26 * @since 1.026 * @since BuddyPress (1.0) 27 27 */ 28 28 function groups_new_group_forum( $group_id = 0, $group_name = '', $group_desc = '' ) { 29 29 global $bp; … … 52 52 * 53 53 * @param int $group_id Group id, passed from groups_details_updated 54 54 * 55 * @since 1.155 * @since BuddyPress (1.1) 56 56 */ 57 57 function groups_update_group_forum( $group_id ) { 58 58 … … 89 89 * @param mixed $page The page number where the new forum post should reside. Defaults to boolean false. 90 90 * @return mixed The new forum post ID on success. Boolean false on failure. 91 91 * 92 * @since 1.092 * @since BuddyPress (1.0) 93 93 */ 94 94 function groups_new_group_forum_post( $post_text, $topic_id, $page = false ) { 95 95 if ( empty( $post_text ) ) … … 137 137 * @param int $forum_id The forum ID this forum topic resides in 138 138 * @return mixed The new topic object on success. Boolean false on failure. 139 139 * 140 * @since 1.0140 * @since BuddyPress (1.0) 141 141 */ 142 142 function groups_new_group_forum_topic( $topic_title, $topic_text, $topic_tags, $forum_id ) { 143 143 if ( empty( $topic_title ) || empty( $topic_text ) ) … … 183 183 * @param mixed $topic_tags A comma-delimited string of topic tags. Defaults to boolean false. 184 184 * @return mixed The topic object on success. Boolean false on failure. 185 185 * 186 * @since 1.1186 * @since BuddyPress (1.1) 187 187 */ 188 188 function groups_update_group_forum_topic( $topic_id, $topic_title, $topic_text, $topic_tags = false ) { 189 189 global $bp; … … 238 238 * @param mixed $page The page number where the new forum post should reside. Defaults to boolean false. 239 239 * @return mixed The forum post ID on success. Boolean false on failure. 240 240 * 241 * @since 1.1241 * @since BuddyPress (1.1) 242 242 */ 243 243 function groups_update_group_forum_post( $post_id, $post_text, $topic_id, $page = false ) { 244 244 global $bp; … … 302 302 * @param int $topic_id The id of the topic to be deleted 303 303 * @return bool True if the delete routine went through properly 304 304 * 305 * @since 1.1305 * @since BuddyPress (1.1) 306 306 */ 307 307 function groups_delete_group_forum_topic( $topic_id ) { 308 308 global $bp; … … 354 354 * function but is passed along to do_action() hooks. 355 355 * @return bool True on success. 356 356 * 357 * @since 1.1357 * @since BuddyPress (1.1) 358 358 */ 359 359 function groups_delete_group_forum_post( $post_id, $topic_id = false ) { 360 360 global $bp; … … 383 383 * Get a total count of all public topics of a given type, across groups/forums 384 384 * 385 385 * @package BuddyPress 386 * @since 1.5386 * @since BuddyPress (1.5) 387 387 * 388 388 * @param string $type Either 'newest', 'popular', 'unreplied', 'tags'. Defaults to 'newest'. 389 389 * @return int The topic count … … 396 396 * Get a total count of all topics of a given status, across groups/forums 397 397 * 398 398 * @package BuddyPress 399 * @since 1.5399 * @since BuddyPress (1.5) 400 400 * 401 401 * @param str $status 'public', 'private', 'hidden', 'all' Which group types to count 402 402 * @return int The topic count -
bp-groups/bp-groups-functions.php
195 195 * 196 196 * @global object $bp BuddyPress global settings 197 197 * @param int $group_id 198 * @since 1.0198 * @since BuddyPress (1.0) 199 199 */ 200 200 function groups_delete_group( $group_id ) { 201 201 global $bp; … … 265 265 /** 266 266 * Get a group ID by its slug 267 267 * 268 * @since 1.6268 * @since BuddyPress (1.6) 269 269 * 270 270 * @param string $group_slug The group's slug 271 271 * @return int The ID … … 501 501 * 502 502 * @param int $user_id 503 503 * @param int $group_id 504 * @since 1.2.6504 * @since BuddyPress (1.2.6) 505 505 * @uses BP_Groups_Member 506 506 */ 507 507 function groups_is_user_creator( $user_id, $group_id ) { -
bp-groups/bp-groups-template.php
1005 1005 * 1006 1006 * @deprecated 1.5 1007 1007 * @deprecated No longer used. 1008 * @since 1.01008 * @since BuddyPress (1.0) 1009 1009 * @todo Remove in 1.4 1010 1010 */ 1011 1011 function bp_group_admin_memberlist( $admin_list = false, $group = false ) { … … 1612 1612 * 1613 1613 * @global BP_Groups_Template $groups_template Groups template object 1614 1614 * @param object $group Group to get status message for. Optional; defaults to current group. 1615 * @since 1.01615 * @since BuddyPress (1.0) 1616 1616 */ 1617 1617 function bp_group_status_message( $group = null ) { 1618 1618 global $groups_template; … … 2194 2194 /** 2195 2195 * Echoes the current group creation step 2196 2196 * 2197 * @since 1.62197 * @since BuddyPress (1.6) 2198 2198 */ 2199 2199 function bp_groups_current_create_step() { 2200 2200 echo bp_get_groups_current_create_step(); … … 2202 2202 /** 2203 2203 * Returns the current group creation step. If none is found, returns an empty string 2204 2204 * 2205 * @since 1.62205 * @since BuddyPress (1.6) 2206 2206 * 2207 2207 * @uses apply_filters() Filter bp_get_groups_current_create_step to modify 2208 2208 * @return str $current_create_step … … 2360 2360 /** 2361 2361 * Echoes the current group admin tab slug 2362 2362 * 2363 * @since 1.62363 * @since BuddyPress (1.6) 2364 2364 */ 2365 2365 function bp_group_current_admin_tab() { 2366 2366 echo bp_get_group_current_admin_tab(); … … 2368 2368 /** 2369 2369 * Returns the current group admin tab slug 2370 2370 * 2371 * @since 1.62371 * @since BuddyPress (1.6) 2372 2372 * 2373 2373 * @uses apply_filters() Filter bp_get_current_group_admin_tab to modify return value 2374 2374 * @return str $tab The current tab's slug -
bp-members/bp-members-functions.php
849 849 * @param obj $user Either the WP_User object or the WP_Error object 850 850 * @return obj If the user is not a spammer, return the WP_User object. Otherwise a new WP_Error object. 851 851 * 852 * @since 1.1.2852 * @since BuddyPress (1.1.2) 853 853 */ 854 854 function bp_core_boot_spammer( $user ) { 855 855 // check to see if the $user has already failed logging in, if so return $user as-is … … 1282 1282 * @param obj $user Either the WP_User object or the WP_Error object 1283 1283 * @return obj If the user is not a spammer, return the WP_User object. Otherwise a new WP_Error object. 1284 1284 * 1285 * @since 1.2.21285 * @since BuddyPress (1.2.2) 1286 1286 */ 1287 1287 function bp_core_signup_disable_inactive( $user ) { 1288 1288 // check to see if the $user has already failed logging in, if so return $user as-is -
bp-messages/bp-messages-template.php
635 635 * Explicitly named function to avoid confusion with public messages. 636 636 * 637 637 * @uses bp_get_send_message_button() 638 * @since 1.2.6638 * @since BuddyPress (1.2.6) 639 639 */ 640 640 function bp_send_private_message_button() { 641 641 echo bp_get_send_message_button(); -
bp-themes/bp-default/_inc/ajax.php
9 9 * http://codex.wordpress.org/AJAX_in_Plugins. 10 10 * 11 11 * @package BuddyPress 12 * @since 1.212 * @since BuddyPress (1.2) 13 13 * @subpackage BP-Default 14 14 */ 15 15 -
bp-themes/bp-default/functions.php
24 24 * 25 25 * @package BuddyPress 26 26 * @subpackage BP-Default 27 * @since 1.227 * @since BuddyPress (1.2) 28 28 */ 29 29 30 30 // Exit if accessed directly … … 226 226 * 227 227 * Referenced via add_custom_image_header() in bp_dtheme_setup(). 228 228 * 229 * @since 1.2229 * @since BuddyPress (1.2) 230 230 */ 231 231 function bp_dtheme_admin_header_style() { 232 232 ?> … … 334 334 * Referenced via add_custom_image_header() in bp_dtheme_setup(). 335 335 * 336 336 * @global WP_Query $post The current WP_Query object for the current post or page 337 * @since 1.2337 * @since BuddyPress (1.2) 338 338 */ 339 339 function bp_dtheme_header_style() { 340 340 global $post; … … 453 453 * @param array $args Arguments from wp_list_comments() call 454 454 * @param int $depth Comment nesting level 455 455 * @see wp_list_comments() 456 * @since 1.2456 * @since BuddyPress (1.2) 457 457 */ 458 458 function bp_dtheme_blog_comments( $comment, $args, $depth ) { 459 459 $GLOBALS['comment'] = $comment; … … 520 520 * Return the ID of a page set as the home page. 521 521 * 522 522 * @return false|int ID of page set as the home page 523 * @since 1.2523 * @since BuddyPress (1.2) 524 524 */ 525 525 function bp_dtheme_page_on_front() { 526 526 if ( 'page' != get_option( 'show_on_front' ) ) … … 538 538 * @param BP_Activity_Activity $activity Activity object 539 539 * @package BuddyPress Theme 540 540 * @return string 541 * @since 1.2.6541 * @since BuddyPress (1.2.6) 542 542 */ 543 543 function bp_dtheme_activity_secondary_avatars( $action, $activity ) { 544 544 switch ( $activity->component ) { … … 562 562 /** 563 563 * Show a notice when the theme is activated - workaround by Ozh (http://old.nabble.com/Activation-hook-exist-for-themes--td25211004.html) 564 564 * 565 * @since 1.2565 * @since BuddyPress (1.2) 566 566 */ 567 567 function bp_dtheme_show_notice() { 568 568 global $pagenow; -
bp-xprofile/bp-xprofile-caps.php
4 4 * Roles and capabilities logic for the XProfile component 5 5 * 6 6 * @package BuddyPress 7 * @since 1.67 * @since BuddyPress (1.6) 8 8 */ 9 9 10 10 // Exit if accessed directly … … 13 13 /** 14 14 * Maps XProfile caps to built in WordPress caps 15 15 * 16 * @since 1.616 * @since BuddyPress (1.6) 17 17 * 18 18 * @param array $caps Capabilities for meta capability 19 19 * @param string $cap Capability name -
bp-xprofile/bp-xprofile-classes.php
287 287 /** 288 288 * Fetch the field visibility level for the fields returned by the query 289 289 * 290 * @since 1.6290 * @since BuddyPress (1.6) 291 291 * 292 292 * @param int $user_id The profile owner's user_id 293 293 * @param array $fields The database results returned by the get() query … … 323 323 /** 324 324 * Fetch the admin-set preferences for all fields 325 325 * 326 * @since 1.6326 * @since BuddyPress (1.6) 327 327 * 328 328 * @return array $default_visibility_levels An array, keyed by field_id, of default 329 329 * visibility level + allow_custom (whether the admin allows this field to be set by user) -
bp-xprofile/bp-xprofile-cssjs.php
29 29 /** 30 30 * Enqueue the jQuery libraries for handling drag/drop/sort 31 31 * 32 * @since BuddyPres (1.5)32 * @since BuddyPress (1.5) 33 33 */ 34 34 function xprofile_add_admin_js() { 35 35 if ( !empty( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) { -
bp-xprofile/bp-xprofile-functions.php
460 460 /** 461 461 * Syncs the standard built in WordPress profile data to XProfile. 462 462 * 463 * @since 1.2.4463 * @since BuddyPress (1.2.4) 464 464 * @package BuddyPress Core 465 465 */ 466 466 function xprofile_sync_bp_profile( &$errors, $update, &$user ) { … … 648 648 * profile viewer). Then, based on that relationship, we query for the set of fields that should 649 649 * be excluded from the profile loop. 650 650 * 651 * @since 1.6651 * @since BuddyPress (1.6) 652 652 * @see BP_XProfile_Group::get() 653 653 * @uses apply_filters() Filter bp_xprofile_get_hidden_fields_for_user to modify visibility levels, 654 654 * or if you have added your own custom levels … … 700 700 /** 701 701 * Fetch an array of the xprofile fields that a given user has marked with certain visibility levels 702 702 * 703 * @since 1.6703 * @since BuddyPress (1.6) 704 704 * @see bp_xprofile_get_hidden_fields_for_user() 705 705 * 706 706 * @param int $user_id The id of the profile owner -
bp-xprofile/bp-xprofile-loader.php
26 26 * The acceptable visibility levels for xprofile fields. 27 27 * 28 28 * @see bp_xprofile_get_visibility_levels() 29 * @since 1.629 * @since BuddyPress (1.6) 30 30 */ 31 31 var $visibility_levels = array(); 32 32 -
bp-xprofile/bp-xprofile-template.php
398 398 * 'radio', 'checkbox', and 'datebox'. 399 399 * 400 400 * @package BuddyPress Xprofile 401 * @since 1.1401 * @since BuddyPress (1.1) 402 402 * 403 403 * @uses bp_get_the_profile_field_options() 404 404 * … … 414 414 * 'radio', 'checkbox', and 'datebox'. 415 415 * 416 416 * @package BuddyPress Xprofile 417 * @since 1.1417 * @since BuddyPress (1.1) 418 418 * 419 419 * @uses BP_XProfile_Field::get_children() 420 420 * @uses BP_XProfile_ProfileData::get_value_byid()