Changeset 5623
- Timestamp:
- 01/07/2012 07:48:58 PM (13 years ago)
- Location:
- trunk/bp-activity
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/admin/css/admin.css
r5621 r5623 1 .akismet-status{float:right;}.akismet-status a{color:#AAA;font-style:italic;} #wp-bp-activities-wrap{padding:5px 0;}#bp-activities{height:120px;}#bp-replyhead{font-size:1em;line-height:1.4em;margin:0;}#bp-replysubmit{margin:0;padding:0 0 3px;text-align:center;}#bp-replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center;}#bp-replysubmit img.waiting{float:right;padding:4px 10px 0;vertical-align:top;}#bp-activities-form .column-response img{float:left;margin-right:10px;margin-top:1px;}.activity-errors{list-style-type:disc;margin-left:2em;}#bp_activity_action div.inside,#bp_activity_content div.inside{line-height:0;}#bp_activity_action h3,#bp_activity_content h3{cursor:auto;}#bp_activity_action td.mceIframeContainer,#bp_activity_content td.mceIframeContainer{background-color:white;}#post-body #bp-activities-action_resize,#post-body #bp-activities-content_resize{position:inherit;margin-top:-2px;}#bp_activity_link input{width:99%;}#bp-activities-primaryid{margin-bottom:1em;}1 .akismet-status{float:right;}.akismet-status a{color:#AAA;font-style:italic;}.akismet-history{margin:13px;}.akismet-history div{margin-bottom:13px;}.akismet-history span{color:#999;}#wp-bp-activities-wrap{padding:5px 0;}#bp-activities{height:120px;}#bp-replyhead{font-size:1em;line-height:1.4em;margin:0;}#bp-replysubmit{margin:0;padding:0 0 3px;text-align:center;}#bp-replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center;}#bp-replysubmit img.waiting{float:right;padding:4px 10px 0;vertical-align:top;}#bp-activities-form .column-response img{float:left;margin-right:10px;margin-top:1px;}.activity-errors{list-style-type:disc;margin-left:2em;}#bp_activity_action div.inside,#bp_activity_content div.inside{line-height:0;}#bp_activity_action h3,#bp_activity_content h3{cursor:auto;}#bp_activity_action td.mceIframeContainer,#bp_activity_content td.mceIframeContainer{background-color:white;}#post-body #bp-activities-action_resize,#post-body #bp-activities-content_resize{position:inherit;margin-top:-2px;}#bp_activity_link input{width:99%;}#bp-activities-primaryid{margin-bottom:1em;} -
trunk/bp-activity/admin/css/admin.dev.css
r5621 r5623 6 6 font-style: italic; 7 7 } 8 .akismet-history { 9 margin: 13px; 10 } 11 .akismet-history div { 12 margin-bottom: 13px; 13 } 14 .akismet-history span { 15 color: #999; 16 } 17 8 18 #wp-bp-activities-wrap { 9 19 padding: 5px 0; -
trunk/bp-activity/bp-activity-admin.php
r5576 r5623 1101 1101 */ 1102 1102 function get_views() { 1103 $redirect_to = remove_query_arg( array( 'activity_status', 'aid', 'deleted', ' spammed', 'unspammed', ), $_SERVER['REQUEST_URI'] );1103 $redirect_to = remove_query_arg( array( 'activity_status', 'aid', 'deleted', 'error', 'spammed', 'unspammed', 'updated', ), $_SERVER['REQUEST_URI'] ); 1104 1104 ?> 1105 1105 <ul class="subsubsub"> -
trunk/bp-activity/bp-activity-akismet.php
r5622 r5623 56 56 // Hook into the Activity wp-admin screen 57 57 add_action( 'bp_activity_admin_comment_row_actions', array( $this, 'comment_row_action' ), 10, 2 ); 58 add_action( 'bp_activity_admin_load', array( $this, 'add_history_metabox' ) ); 58 59 } 59 60 … … 97 98 $b[ $k ] = $item; 98 99 if ( $k == 'edit' ) 99 $b['history'] = '<a href="' . network_admin_url( 'admin.php?page=bp-activity&action=edit&aid=' . $activity['id'] ) . '# history"> '. __( 'History', 'buddypress' ) . '</a>';100 $b['history'] = '<a href="' . network_admin_url( 'admin.php?page=bp-activity&action=edit&aid=' . $activity['id'] ) . '#bp_activity_history"> '. __( 'History', 'buddypress' ) . '</a>'; 100 101 } 101 102 … … 104 105 105 106 if ( $desc ) 106 echo '<span class="akismet-status"><a href="' . network_admin_url( 'admin.php?page=bp-activity&action=edit&aid=' . $activity['id'] ) . '# history">' . htmlspecialchars( $desc ) . '</a></span>';107 echo '<span class="akismet-status"><a href="' . network_admin_url( 'admin.php?page=bp-activity&action=edit&aid=' . $activity['id'] ) . '#bp_activity_history">' . htmlspecialchars( $desc ) . '</a></span>'; 107 108 108 109 return apply_filters( 'bp_akismet_comment_row_action', $actions ); 109 110 } 110 111 111 112 112 /** … … 485 485 486 486 /** 487 * Adds a "History" meta box to the activity edit screen. 488 * 489 * @param string $screen_action The type of screen that has been requested 490 * @since 1.6 491 */ 492 function add_history_metabox( $screen_action ) { 493 // Only proceed if we're on the edit screen 494 if ( 'edit' != $screen_action ) 495 return; 496 497 // Display meta box with a low priority (low position on screen by default) 498 add_meta_box( 'bp_activity_history', __( 'Activity History', 'buddypress' ), array( $this, 'history_metabox' ), 'toplevel_page_bp-activity', 'advanced', 'low' ); 499 } 500 501 /** 502 * History meta box for the Activity admin edit screen 503 * 504 * @param object $item Activity item 505 * @since 1.6 506 * @todo Update activity meta to allow >1 record with the same key (iterate through $history). 507 * @see http://buddypress.trac.wordpress.org/ticket/3907 508 */ 509 function history_metabox( $item ) { 510 $history = BP_Akismet::get_activity_history( $item->id ); 511 512 if ( empty( $history ) ) 513 return; 514 515 echo '<div class="akismet-history"><div>'; 516 printf( '<span>%1$s</span> — %2$s', bp_core_time_since( $history[2] ), esc_html( $history[1] ) ); 517 echo '</div></div>'; 518 } 519 520 /** 487 521 * Update an activity item's Akismet history 488 522 *
Note: See TracChangeset
for help on using the changeset viewer.