modules/custom-post-types/testimonial.php 1 location
|
@@ 271-282 (lines=12) @@
|
| 268 |
|
/** |
| 269 |
|
* On theme switch, check if CPT item exists and disable if not |
| 270 |
|
*/ |
| 271 |
|
function deactivation_post_type_support() { |
| 272 |
|
$portfolios = get_posts( array( |
| 273 |
|
'fields' => 'ids', |
| 274 |
|
'posts_per_page' => 1, |
| 275 |
|
'post_type' => self::CUSTOM_POST_TYPE, |
| 276 |
|
'suppress_filters' => false |
| 277 |
|
) ); |
| 278 |
|
|
| 279 |
|
if ( empty( $portfolios ) ) { |
| 280 |
|
update_option( self::OPTION_NAME, '0' ); |
| 281 |
|
} |
| 282 |
|
} |
| 283 |
|
|
| 284 |
|
/** |
| 285 |
|
* Register Post Type |
modules/custom-post-types/portfolios.php 1 location
|
@@ 242-253 (lines=12) @@
|
| 239 |
|
/** |
| 240 |
|
* On theme switch, check if CPT item exists and disable if not |
| 241 |
|
*/ |
| 242 |
|
function deactivation_post_type_support() { |
| 243 |
|
$portfolios = get_posts( array( |
| 244 |
|
'fields' => 'ids', |
| 245 |
|
'posts_per_page' => 1, |
| 246 |
|
'post_type' => self::CUSTOM_POST_TYPE, |
| 247 |
|
'suppress_filters' => false |
| 248 |
|
) ); |
| 249 |
|
|
| 250 |
|
if ( empty( $portfolios ) ) { |
| 251 |
|
update_option( self::OPTION_NAME, '0' ); |
| 252 |
|
} |
| 253 |
|
} |
| 254 |
|
|
| 255 |
|
/** |
| 256 |
|
* Register Post Type |