public_html/wp-content/plugins/google-document-embedder/functions.php
/**
 * Sanitize dimensions (width, height)
 *
 * @since   2.5.0.1
 * @return  string Sanitized dimensions, or false if value is invalid
 * @note	Replaces old gde_sanitizeOpts function
 */
Sanitize dimensions (width, height)
@since   2.5.0.1
@return  string Sanitized dimensions, or false if value is invalid
@note        Replaces old gde_sanitizeOpts function
Sanitize dimensions ( width height ) @since 2 . 5 . 0 . 1 @return string Sanitized dimensions or false if value is invalid @note Replaces old gde_sanitizeOpts function
function gde_sanitize_dims( $dim ) {
	$dim = trim( str_replace( " ", "", $dim ) );
	if ( ! strstr( $dim, '%' ) ) {
		$type = "px";
		$dim = preg_replace( "/[^0-9]*/", '', $dim );
	} else {
		$type = "%";
		$dim = preg_replace( "/[^0-9]*/", '', $dim );
		if ( (int) $dim > 100 ) {
			$dim = "100";
		}
	}
	if ( $dim ) {
		return $dim.$type;
	} else {
		return false;
	}
}
function gde_sanitize_dims ( $ dim ) { $ dim = trim ( str_replace ( " " , " " , $ dim ) ) ; if ( ! strstr ( $ dim , '%' ) ) { $ type = " px " ; $ dim = preg_replace ( " /[^0-9]*/ " , '' , $ dim ) ; } else { $ type = " % " ; $ dim = preg_replace ( " /[^0-9]*/ " , '' , $ dim ) ; if ( ( int ) $ dim > 100 ) { $ dim = " 100 " ; } } if ( $ dim ) { return $ dim . $ type ; } else { return false ; } }
Sanitize dimensions (width, height)
 @since   2.5.0.1
 @return  string Sanitized dimensions, or false if value is invalid
 @note        Replaces old gde_sanitizeOpts function
Sanitize dimensions ( width height ) @since 2 . 5 . 0 . 1 @return string Sanitized dimensions or false if value is invalid @note Replaces old gde_sanitizeOpts function
// remove any spacing junk