Ticket #546: meta-546.diff
File meta-546.diff, 1.5 KB (added by , 11 years ago) |
---|
-
plugins/wc-post-types/wc-post-types.php
739 739 'show_avatars' => false, 740 740 'avatar_size' => 100, 741 741 'track' => 'all', 742 'speaker_link' => 'wporg', // anchor|wporg| none742 'speaker_link' => 'wporg', // anchor|wporg|permalink|none 743 743 'posts_per_page' => -1, 744 744 'orderby' => 'date', 745 745 ), $attr ); … … 752 752 // Clean up other attributes. 753 753 $attr['avatar_size'] = absint( $attr['avatar_size'] ); 754 754 755 if ( ! in_array( $attr['speaker_link'], array( 'anchor', 'wporg', ' none' ) ) )755 if ( ! in_array( $attr['speaker_link'], array( 'anchor', 'wporg', 'permalink', 'none' ) ) ) 756 756 $attr['speaker_link'] = 'anchor'; 757 757 758 758 $attr['orderby'] = ( in_array( $attr['orderby'], array( 'date', 'title', 'rand' ) ) ) ? $attr['orderby'] : 'date'; … … 837 837 $speaker_permalink = $this->get_speaker_anchor_permalink( $speaker->ID ); 838 838 elseif ( 'wporg' == $attr['speaker_link'] ) // profiles.wordpress.org/user 839 839 $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 ); 840 842 841 843 if ( ! empty( $speaker_permalink ) ) 842 844 $speaker_name = sprintf( '<a href="%s">%s</a>', esc_url( $speaker_permalink ), esc_html( $speaker_name ) );