Changeset 9086
- Timestamp:
- 10/18/2014 11:33:26 AM (10 years ago)
- Location:
- trunk/src/bp-activity
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-akismet.php
r7395 r9086 113 113 echo '<span class="akismet-status"><a href="' . esc_url( bp_get_admin_url( 'admin.php?page=bp-activity&action=edit&aid=' . $activity['id'] ) ) . '#bp_activity_history">' . htmlspecialchars( $desc ) . '</a></span>'; 114 114 115 /** 116 * Filters the list of actions for the current activity's row. 117 * 118 * @since BuddyPress (1.6.0) 119 * 120 * @param array $actions Array of available actions for the current activity item's row. 121 */ 115 122 return apply_filters( 'bp_akismet_comment_row_action', $actions ); 116 123 } … … 240 247 */ 241 248 public static function get_activity_types() { 249 250 /** 251 * Filters the list of activity types that Akismet should automatically check for spam. 252 * 253 * @since BuddyPress (1.6.0) 254 * 255 * @param array Array of default activity types for Akismet to check. 256 */ 242 257 return apply_filters( 'bp_akismet_get_activity_types', array( 'activity_comment', 'activity_update' ) ); 243 258 } … … 255 270 $this->last_activity = $activity; 256 271 272 /** 273 * Fires after marking an activity item has been marked as spam. 274 * 275 * @since BuddyPress (1.6.0) 276 * 277 * @param BP_Activity_Activity $activity Activity object being marked as spam. 278 * @param string $source Source of the whom marked as spam. Either "by_a_person" (e.g. a person has manually marked the activity as spam) or "by_akismet". 279 */ 257 280 do_action( 'bp_activity_akismet_mark_as_spam', $activity, $source ); 258 281 } … … 271 294 $activity->content = bp_activity_at_name_filter( $activity->content, $activity->id ); 272 295 296 /** 297 * Fires after marking an activity item has been marked as ham. 298 * 299 * @since BuddyPress (1.6.0) 300 * 301 * @param BP_Activity_Activity $activity Activity object being marked as ham. 302 * @param string $source Source of the whom marked as ham. Either "by_a_person" (e.g. a person has manually marked the activity as ham) or "by_akismet" (automatically hammed). 303 */ 273 304 do_action( 'bp_activity_akismet_mark_as_ham', $activity, $source ); 274 305 } … … 312 343 $activity_data['akismet_comment_nonce'] = wp_verify_nonce( $_POST["_bp_as_nonce_{$activity->secondary_item_id}"], "_bp_as_nonce_{$userdata->ID}_{$activity->secondary_item_id}" ) ? 'passed' : 'failed'; 313 344 345 /** 346 * Filters activity data before being sent to Akismet to inspect. 347 * 348 * @since BuddyPress (1.6.0) 349 * 350 * @param array $activity_data Array of activity data for Akismet to inspect. 351 * @param BP_Activity_Activity $activity Activity item data. 352 */ 314 353 return apply_filters( 'bp_akismet_build_akismet_data_package', $activity_data, $activity ); 315 354 } … … 348 387 // Spam 349 388 if ( 'true' == $activity_data['bp_as_result'] ) { 350 // Action for plugin authors 389 /** 390 * Fires after an activity item has been proven to be spam, but before officially being marked as spam. 391 * 392 * @since BuddyPress (1.6.0) 393 * 394 * @param BP_Activity_Activity $activity The activity item proven to be spam. 395 * @param array $activity_data Array of activity data for item including Akismet check results data. 396 */ 351 397 do_action_ref_array( 'bp_activity_akismet_spam_caught', array( &$activity, $activity_data ) ); 352 398 … … 615 661 global $bp, $wpdb; 616 662 663 /** 664 * Filters the threshold for how many days old Akismet metadata needs to be before being automatically deleted. 665 * 666 * @since BuddyPress (1.6.0) 667 * 668 * @param integer 15 How many days old metadata needs to be. 669 */ 617 670 $interval = apply_filters( 'bp_activity_akismet_delete_meta_interval', 15 ); 618 671 -
trunk/src/bp-activity/bp-activity-cssjs.php
r8958 r9086 42 42 } 43 43 44 // Print a list of the current user's friends to the page for quicker @mentions lookups. 44 /** 45 * Fires at the end of the Activity Mentions script. 46 * 47 * This is the hook where BP components can add their own prefetched results 48 * friends to the page for quicker @mentions lookups. 49 * 50 * @since BuddyPress (2.1.0) 51 */ 45 52 do_action( 'bp_activity_mentions_prime_results' ); 46 53 }
Note: See TracChangeset
for help on using the changeset viewer.