Making WordPress.org

Changeset 8906


Ignore:
Timestamp:
06/03/2019 02:36:38 PM (4 years ago)
Author:
vedjain
Message:

WordCamp: Rename methods to reduce ambiguity.

The method published_speaker_post_updated and speaker_post_published_or_unpublished actually effects both speaker and organizer post types, instead of just speaker.

This patch renames them to remove speaker keyword to reduce confusion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-participation-notifier/wordcamp-participation-notifier.php

    r7684 r8906  
    4545
    4646        if ( 'publish' == $new_status && 'publish' == $old_status ) {
    47             $this->published_speaker_post_updated( $post );
     47            $this->published_post_updated( $post );
    4848        } elseif ( 'publish' == $new_status || 'publish' == $old_status ) {
    49             $this->speaker_post_published_or_unpublished( $new_status, $old_status, $post );
     49            $this->post_published_or_unpublished( $new_status, $old_status, $post );
    5050        }
    5151    }
     
    117117     * @param WP_Post $post
    118118     */
    119     protected function published_speaker_post_updated( $post ) {
     119    protected function published_post_updated( $post ) {
    120120        $previous_user_id = $this->get_saved_wporg_user_id( $post );
    121121        $new_user_id      = $this->get_new_wporg_user_id( $post );
     
    157157     * @param WP_Post $post
    158158     */
    159     protected function speaker_post_published_or_unpublished( $new_status, $old_status, $post ) {
     159    protected function post_published_or_unpublished( $new_status, $old_status, $post ) {
    160160        if ( 'publish' == $new_status ) {
    161161            $this->remote_post( self::PROFILES_HANDLER_URL, $this->get_post_activity_payload( $post ) );
Note: See TracChangeset for help on using the changeset viewer.