Making WordPress.org


Ignore:
Timestamp:
12/16/2013 07:33:33 PM (13 years ago)
Author:
iandunn
Message:

Post Types: Allow linking to individual speaker posts from the schedule shortcode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php

    r152 r154  
    345345                        'date' => null,
    346346                        'tracks' => 'all',
    347                         'speaker_link' => 'anchor', // anchor|wporg|none
     347                        'speaker_link' => 'anchor', // anchor|wporg|permalink|none
    348348                        'session_link' => 'permalink', // permalink|anchor|none
    349349                ), $attr );
    350350
    351                 if ( ! in_array( $attr['speaker_link'], array( 'anchor', 'wporg', 'none' ) ) )
     351                if ( ! in_array( $attr['speaker_link'], array( 'anchor', 'wporg', 'permalink', 'none' ) ) )
    352352                        $attr['speaker_link'] = 'anchor';
    353353
     
    537537                                        elseif ( 'wporg' == $attr['speaker_link'] ) // profiles.wordpress.org/user
    538538                                                $speaker_permalink = $this->get_speaker_wporg_permalink( $speaker->ID );
     539                                        elseif ( 'permalink' == $attr['speaker_link'] ) // year.city.wordcamp.org/speakers/slug
     540                                                $speaker_permalink = get_permalink( $speaker->ID );
    539541
    540542                                        if ( ! empty( $speaker_permalink ) )
     
    12091211                register_post_type( 'wcb_speaker', array(
    12101212                        'labels'            => $labels,
    1211                         'rewrite'           => array( 'slug' => 'speaker', 'with_front' => false ),
     1213                        'rewrite'           => array( 'slug' => 'speaker', 'with_front' => true ),
    12121214                        'supports'          => array( 'title', 'editor', 'revisions' ),
    12131215                        'menu_position'     => 20,
    1214                         'public'            => false,
     1216                        'public'            => true,
    12151217                        'show_ui'           => true,
    12161218                        'can_export'        => true,
Note: See TracChangeset for help on using the changeset viewer.