Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 147-156 (lines=10) @@
144
	/**
145
	* Should this Custom Post Type be made available?
146
	*/
147
	function site_supports_custom_post_type() {
148
		// If the current theme requests it.
149
		if ( current_theme_supports( self::CUSTOM_POST_TYPE ) || get_option( self::OPTION_NAME, '0' ) ) {
150
			return true;
151
		}
152
153
		// Otherwise, say no unless something wants to filter us to say yes.
154
		/** This action is documented in modules/custom-post-types/nova.php */
155
		return (bool) apply_filters( 'jetpack_enable_cpt', false, self::CUSTOM_POST_TYPE );
156
	}
157
158
	/*
159
	 * Flush permalinks when CPT option is turned on/off

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