Changeset 707
- Timestamp:
- 06/17/2014 12:38:46 AM (10 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/email-post-changes.php
r705 r707 7 7 class WPorg_Handbook_Email_Post_Changes { 8 8 9 function init() {9 public static function init() { 10 10 add_action( 'widgets_init', array( __CLASS__, 'handbook_sidebar' ), 11 ); // After P2 11 11 add_filter( 'email_post_changes_emails', array( __CLASS__, 'email_post_changes_emails' ), 10, 3 ); … … 14 14 } 15 15 16 function handbook_sidebar() { 17 16 public static function handbook_sidebar() { 18 17 require_once dirname( __FILE__ ) . '/widgets.php'; 19 18 register_widget( 'WPorg_Handbook_Widget' ); 20 19 } 21 20 22 function option_email_post_changes( $values ) {21 public static function option_email_post_changes( $values ) { 23 22 $values['post_types'] = apply_filters( 'wporg_email_changes_for_post_types', $values['post_types'] ); 24 23 return $values; 25 24 } 26 25 27 function email_post_changes_emails( $emails, $post_before, $post_after ) {26 public static function email_post_changes_emails( $emails, $post_before, $post_after ) { 28 27 $post = get_post( $post_after ); 29 28 $users = get_post_meta( $post->ID, '_wporg_watchlist', true ); … … 38 37 } 39 38 40 function update_watchlist() {39 public static function update_watchlist() { 41 40 $post_id = absint( $_GET['post_id'] ); 42 41 if ( ! $post_id || ! $post = get_post( $post_id ) ) { -
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/table-of-contents.php
r706 r707 73 73 $items = $this->get_tags( $tag, $content ); 74 74 $first = true; 75 $matches = array(); 76 $replacements = array(); 75 77 76 foreach ( $items as $item) {78 foreach ( $items as $item ) { 77 79 $replacement = ''; 78 80 $matches[] = $item[0]; … … 89 91 } 90 92 91 $content = str_replace( $matches, $replacements, $content ); 93 if ( $replacements ) { 94 $content = str_replace( $matches, $replacements, $content ); 95 } 92 96 93 97 return $content; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/widgets.php
r706 r707 11 11 } 12 12 13 function widget( $args ) {13 function widget( $args, $instance ) { 14 14 if ( ! is_user_logged_in() ) 15 15 return;
Note: See TracChangeset
for help on using the changeset viewer.