Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 246-257 (lines=12) @@
243
	/**
244
	 * On theme switch, check if CPT item exists and disable if not
245
	 */
246
	function deactivation_post_type_support() {
247
		$portfolios = get_posts( array(
248
			'fields'           => 'ids',
249
			'posts_per_page'   => 1,
250
			'post_type'        => self::CUSTOM_POST_TYPE,
251
			'suppress_filters' => false
252
		) );
253
254
		if ( empty( $portfolios ) ) {
255
			update_option( self::OPTION_NAME, '0' );
256
		}
257
	}
258
259
	/**
260
	 * Register Post Type