modules/custom-post-types/portfolios.php 1 location
|
@@ 194-205 (lines=12) @@
|
191 |
|
/** |
192 |
|
* On theme switch, check if CPT item exists and disable if not |
193 |
|
*/ |
194 |
|
function deactivation_post_type_support() { |
195 |
|
$portfolios = get_posts( array( |
196 |
|
'fields' => 'ids', |
197 |
|
'posts_per_page' => 1, |
198 |
|
'post_type' => self::CUSTOM_POST_TYPE, |
199 |
|
'suppress_filters' => false |
200 |
|
) ); |
201 |
|
|
202 |
|
if ( empty( $portfolios ) ) { |
203 |
|
update_option( self::OPTION_NAME, '0' ); |
204 |
|
} |
205 |
|
} |
206 |
|
|
207 |
|
/** |
208 |
|
* Register Post Type |
modules/custom-post-types/testimonial.php 1 location
|
@@ 267-278 (lines=12) @@
|
264 |
|
/** |
265 |
|
* On theme switch, check if CPT item exists and disable if not |
266 |
|
*/ |
267 |
|
function deactivation_post_type_support() { |
268 |
|
$portfolios = get_posts( array( |
269 |
|
'fields' => 'ids', |
270 |
|
'posts_per_page' => 1, |
271 |
|
'post_type' => self::CUSTOM_POST_TYPE, |
272 |
|
'suppress_filters' => false |
273 |
|
) ); |
274 |
|
|
275 |
|
if ( empty( $portfolios ) ) { |
276 |
|
update_option( self::OPTION_NAME, '0' ); |
277 |
|
} |
278 |
|
} |
279 |
|
|
280 |
|
/** |
281 |
|
* Register Post Type |