PHP 7.4.33
Preview: compat.php Size: 864 B
/var/www/candid-stg.bitkit.dk/httpdocs/wp-content/plugins/wordpress-importer/compat.php
<?php
/**
 * Implementation for WordPress functions missing in older WordPress versions.
 *
 * @package WordPress
 * @subpackage Importer
 */

if ( ! function_exists( 'wp_slash_strings_only' ) ) {
	/**
	 * Adds slashes to only string values in an array of values.
	 *
	 * Compat for WordPress < 5.3.0.
	 *
	 * @since 0.7.0
	 *
	 * @param mixed $value Scalar or array of scalars.
	 * @return mixed Slashes $value
	 */
	function wp_slash_strings_only( $value ) {
		return map_deep( $value, 'addslashes_strings_only' );
	}
}

if ( ! function_exists( 'addslashes_strings_only' ) ) {
	/**
	 * Adds slashes only if the provided value is a string.
	 *
	 * Compat for WordPress < 5.3.0.
	 *
	 * @since 0.7.0
	 *
	 * @param mixed $value
	 * @return mixed
	 */
	function addslashes_strings_only( $value ) {
		return is_string( $value ) ? addslashes( $value ) : $value;
	}
}

Directory Contents

Dirs: 2 × Files: 5
Name Size Perms Modified Actions
parsers DIR
- drwxr-xr-x 2025-12-01 12:13:40
Edit Download
- drwxr-xr-x 2025-12-01 12:13:41
Edit Download
60.72 KB lrw-r--r-- 2025-12-01 12:13:40
Edit Download
864 B lrw-r--r-- 2025-12-01 12:13:40
Edit Download
642 B lrw-r--r-- 2025-12-01 12:13:40
Edit Download
6.96 KB lrw-r--r-- 2025-12-01 12:13:41
Edit Download
2.62 KB lrw-r--r-- 2025-12-01 12:13:41
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).