_WP_Editors::_parse_init

Advertisement

Private Access Private Access

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Syntax Syntax

_WP_Editors::_parse_init( array $init )

Parameters Parameters

$init

(Required)

Return Return

(string)

Source Source

File: wp-includes/class-wp-editor.php

			if ( is_bool( $value ) ) {
				$val      = $value ? 'true' : 'false';
				$options .= $key . ':' . $val . ',';
				continue;
			} elseif ( ! empty( $value ) && is_string( $value ) && (
				( '{' === $value[0] && '}' === $value[ strlen( $value ) - 1 ] ) ||
				( '[' === $value[0] && ']' === $value[ strlen( $value ) - 1 ] ) ||
				preg_match( '/^\(?function ?\(/', $value ) ) ) {

				$options .= $key . ':' . $value . ',';
				continue;
			}
			$options .= $key . ':"' . $value . '",';
		}

		return '{' . trim( $options, ' ,' ) . '}';
	}

	/**
	 * @since 3.3.0
	 *

Advertisement

Changelog Changelog

Changelog
Version Description
3.3.0 Introduced.

Advertisement

Leave a Reply