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

@@ 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