Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 176-185 (lines=10) @@
173
	/**
174
	 * Should this Custom Post Type be made available?
175
	 */
176
	function site_supports_custom_post_type() {
177
		// If the current theme requests it.
178
		if ( current_theme_supports( self::CUSTOM_POST_TYPE ) || get_option( self::OPTION_NAME, '0' ) ) {
179
			return true;
180
		}
181
182
		// Otherwise, say no unless something wants to filter us to say yes.
183
		/** This action is documented in modules/custom-post-types/nova.php */
184
		return (bool) apply_filters( 'jetpack_enable_cpt', false, self::CUSTOM_POST_TYPE );
185
	}
186
187
	/**
188
	 * Add to REST API post type whitelist

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

@@ 187-196 (lines=10) @@
184
	/**
185
	* Should this Custom Post Type be made available?
186
	*/
187
	function site_supports_custom_post_type() {
188
		// If the current theme requests it.
189
		if ( current_theme_supports( self::CUSTOM_POST_TYPE ) || get_option( self::OPTION_NAME, '0' ) ) {
190
			return true;
191
		}
192
193
		// Otherwise, say no unless something wants to filter us to say yes.
194
		/** This action is documented in modules/custom-post-types/nova.php */
195
		return (bool) apply_filters( 'jetpack_enable_cpt', false, self::CUSTOM_POST_TYPE );
196
	}
197
198
	/*
199
	 * Flush permalinks when CPT option is turned on/off