public/wordpress/wp-content/plugins/wp-courseware/includes/functions/formatting.php
/**
 * Sanitize permalink values before insertion into DB.
 *
 * Cannot use wpcw_clean because it sometimes strips % chars and breaks the user's setting.
 *
 * @since 4.4.0
 *
 * @param string $value The permalink string.
 *
 * @return string The sanitized permalink string.
 */
Sanitize permalink values before insertion into DB.
Cannot use wpcw_clean because it sometimes strips % chars and breaks the user's setting.



@param string $value The permalink string.

@return string The sanitized permalink string.
Sanitize permalink values before insertion into DB . Cannot use wpcw_clean because it sometimes strips % chars and breaks the user ' s setting . @param string $value The permalink string . @return string The sanitized permalink string .
function wpcw_sanitize_permalink( $value ) {
	global $wpdb;
	$value = $wpdb->strip_invalid_text_for_column( $wpdb->options, 'option_value', $value );
	if ( is_wp_error( $value ) ) {
		$value = '';
	}
	$value = esc_url_raw( trim( $value ) );
	$value = str_replace( 'http://', '', $value );
	return untrailingslashit( $value );
}
function wpcw_sanitize_permalink ( $ value ) { global $ wpdb ; $ value = $ wpdb -> strip_invalid_text_for_column ( $ wpdb -> options , 'option_value' , $ value ) ; if ( is_wp_error ( $ value ) ) { $ value = '' ; } $ value = esc_url_raw ( trim ( $ value ) ) ; $ value = str_replace ( 'http://' , '' , $ value ) ; return untrailingslashit ( $ value ) ; }
Sanitize permalink values before insertion into DB.
Sanitize permalink values before insertion into DB .