Code Duplication    Length = 12-12 lines in 2 locations

modules/custom-post-types/portfolios.php 1 location

@@ 202-213 (lines=12) @@
199
	/**
200
	 * On theme switch, check if CPT item exists and disable if not
201
	 */
202
	function deactivation_post_type_support() {
203
		$portfolios = get_posts( array(
204
			'fields'           => 'ids',
205
			'posts_per_page'   => 1,
206
			'post_type'        => self::CUSTOM_POST_TYPE,
207
			'suppress_filters' => false
208
		) );
209
210
		if ( empty( $portfolios ) ) {
211
			update_option( self::OPTION_NAME, '0' );
212
		}
213
	}
214
215
	/**
216
	 * Register Post Type

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