Changeset 1680 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
- Timestamp:
- 06/19/2015 01:08:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
r1573 r1680 55 55 56 56 add_filter( 'dashboard_glance_items', array( $this, 'glance_items' ) ); 57 add_filter( 'option_default_comment_status', array( $this, 'default_comment_ping_status' ) ); 58 add_filter( 'option_default_ping_status', array( $this, 'default_comment_ping_status' ) ); 57 59 } 58 60 … … 1713 1715 'labels' => $labels, 1714 1716 'rewrite' => array( 'slug' => 'speaker', 'with_front' => true ), 1715 'supports' => array( 'title', 'editor', 'revisions' ),1717 'supports' => array( 'title', 'editor', 'revisions', 'comments' ), 1716 1718 'menu_position' => 20, 1717 1719 'public' => true, … … 2034 2036 return $items; 2035 2037 } 2038 2039 /** 2040 * Comments and pings on speakers closed by default. 2041 * 2042 * @param string $status Default comment status. 2043 * @return string Resulting status. 2044 */ 2045 public function default_comment_ping_status( $status ) { 2046 $screen = get_current_screen(); 2047 if ( ! empty( $screen->post_type ) && $screen->post_type == 'wcb_speaker' ) 2048 $status = 'closed'; 2049 2050 return $status; 2051 } 2036 2052 } 2037 2053
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)