Making WordPress.org

Ticket #546: meta-546.diff

File meta-546.diff, 1.5 KB (added by ryelle, 11 years ago)
  • plugins/wc-post-types/wc-post-types.php

     
    739739                        'show_avatars' => false,
    740740                        'avatar_size' => 100,
    741741                        'track' => 'all',
    742                         'speaker_link' => 'wporg', // anchor|wporg|none
     742                        'speaker_link' => 'wporg', // anchor|wporg|permalink|none
    743743                        'posts_per_page' => -1,
    744744                        'orderby' => 'date',
    745745                ), $attr );
     
    752752                // Clean up other attributes.
    753753                $attr['avatar_size'] = absint( $attr['avatar_size'] );
    754754
    755                 if ( ! in_array( $attr['speaker_link'], array( 'anchor', 'wporg', 'none' ) ) )
     755                if ( ! in_array( $attr['speaker_link'], array( 'anchor', 'wporg', 'permalink', 'none' ) ) )
    756756                        $attr['speaker_link'] = 'anchor';
    757757
    758758                $attr['orderby'] = ( in_array( $attr['orderby'], array( 'date', 'title', 'rand' ) ) ) ? $attr['orderby'] : 'date';
     
    837837                                                                $speaker_permalink = $this->get_speaker_anchor_permalink( $speaker->ID );
    838838                                                        elseif ( 'wporg' == $attr['speaker_link'] ) // profiles.wordpress.org/user
    839839                                                                $speaker_permalink = $this->get_speaker_wporg_permalink( $speaker->ID );
     840                                                        elseif ( 'permalink' == $attr['speaker_link'] ) // year.city.wordcamp.org/speakers/slug
     841                                                                $speaker_permalink = get_permalink( $speaker->ID );
    840842
    841843                                                        if ( ! empty( $speaker_permalink ) )
    842844                                                                $speaker_name = sprintf( '<a href="%s">%s</a>', esc_url( $speaker_permalink ), esc_html( $speaker_name ) );