modules/custom-post-types/portfolios.php 1 location
|
@@ 207-218 (lines=12) @@
|
| 204 |
|
/** |
| 205 |
|
* On theme switch, check if CPT item exists and disable if not |
| 206 |
|
*/ |
| 207 |
|
function deactivation_post_type_support() { |
| 208 |
|
$portfolios = get_posts( array( |
| 209 |
|
'fields' => 'ids', |
| 210 |
|
'posts_per_page' => 1, |
| 211 |
|
'post_type' => self::CUSTOM_POST_TYPE, |
| 212 |
|
'suppress_filters' => false |
| 213 |
|
) ); |
| 214 |
|
|
| 215 |
|
if ( empty( $portfolios ) ) { |
| 216 |
|
update_option( self::OPTION_NAME, '0' ); |
| 217 |
|
} |
| 218 |
|
} |
| 219 |
|
|
| 220 |
|
/** |
| 221 |
|
* Register Post Type |
modules/custom-post-types/testimonial.php 1 location
|
@@ 276-287 (lines=12) @@
|
| 273 |
|
/** |
| 274 |
|
* On theme switch, check if CPT item exists and disable if not |
| 275 |
|
*/ |
| 276 |
|
function deactivation_post_type_support() { |
| 277 |
|
$portfolios = get_posts( array( |
| 278 |
|
'fields' => 'ids', |
| 279 |
|
'posts_per_page' => 1, |
| 280 |
|
'post_type' => self::CUSTOM_POST_TYPE, |
| 281 |
|
'suppress_filters' => false |
| 282 |
|
) ); |
| 283 |
|
|
| 284 |
|
if ( empty( $portfolios ) ) { |
| 285 |
|
update_option( self::OPTION_NAME, '0' ); |
| 286 |
|
} |
| 287 |
|
} |
| 288 |
|
|
| 289 |
|
/** |
| 290 |
|
* Register Post Type |