/** * Determine whether given Content Template name is already used as a post slug or post title. * * @param string $name CT name to check. * @param int $except_id CT id to exclude from checking. * @param array &$collision_data See WPV_Post_Object_Wrapper::is_name_used_base for details. * * @return bool True if name is already used, false otherwise. * * @since 1.9 */ public static function is_name_used( $name, $except_id = 0, &$collision_data = null ) { return WPV_Post_Object_Wrapper::is_name_used_base( $name, WPV_Content_Template_Embedded::POST_TYPE, $except_id, $collision_data ); }
/** * Determine whether given View name is already used as a post slug or post title. * * @param string $name View name to check. * * @param int $except_id The View ID to exclude from checking. * @param array &$collision_data (since 1.10) If there is a name collision, this will be set to an array: * - id: ID of the other post * - colliding_field: Where has the collision with $name happened: 'post_title', 'post_name' or 'both' * - post_title: Title of the other post * * @return bool True if name is already used, false otherwise. * * @since 1.9 */ public static function is_name_used( $name, $except_id = 0, &$collision_data = null ) { return WPV_Post_Object_Wrapper::is_name_used_base( $name, WPV_View_Base::POST_TYPE, $except_id, $collision_data ); }