@@ 176-185 (lines=10) @@ | ||
173 | /** |
|
174 | * Should this Custom Post Type be made available? |
|
175 | */ |
|
176 | function site_supports_custom_post_type() { |
|
177 | // If the current theme requests it. |
|
178 | if ( current_theme_supports( self::CUSTOM_POST_TYPE ) || get_option( self::OPTION_NAME, '0' ) ) { |
|
179 | return true; |
|
180 | } |
|
181 | ||
182 | // Otherwise, say no unless something wants to filter us to say yes. |
|
183 | /** This action is documented in modules/custom-post-types/nova.php */ |
|
184 | return (bool) apply_filters( 'jetpack_enable_cpt', false, self::CUSTOM_POST_TYPE ); |
|
185 | } |
|
186 | ||
187 | /** |
|
188 | * Add to REST API post type whitelist |
@@ 152-161 (lines=10) @@ | ||
149 | /** |
|
150 | * Should this Custom Post Type be made available? |
|
151 | */ |
|
152 | function site_supports_custom_post_type() { |
|
153 | // If the current theme requests it. |
|
154 | if ( current_theme_supports( self::CUSTOM_POST_TYPE ) || get_option( self::OPTION_NAME, '0' ) ) { |
|
155 | return true; |
|
156 | } |
|
157 | ||
158 | // Otherwise, say no unless something wants to filter us to say yes. |
|
159 | /** This action is documented in modules/custom-post-types/nova.php */ |
|
160 | return (bool) apply_filters( 'jetpack_enable_cpt', false, self::CUSTOM_POST_TYPE ); |
|
161 | } |
|
162 | ||
163 | /* |
|
164 | * Flush permalinks when CPT option is turned on/off |