Code Duplication    Length = 10-10 lines in 2 locations

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

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

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

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