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

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