thirdparty/tinymce/tiny_mce_gzip.php
public static function renderTag($tagSettings, $return = false) {
		$settings = array_merge(self::$defaultSettings, $tagSettings);

		if (empty($settings["cache_dir"])) {
			$settings["cache_dir"] = dirname(__FILE__);
		}

		$scriptSrc = $settings["url"] . "?js=1";

		// Add plugins
		if (isset($settings["plugins"])) {
			$scriptSrc .= "&plugins=" . (is_array($settings["plugins"]) ? implode(',', $settings["plugins"]) : $settings["plugins"]);
		}

		// Add themes
		if (isset($settings["themes"])) {
			$scriptSrc .= "&themes=" . (is_array($settings["themes"]) ? implode(',', $settings["themes"]) : $settings["themes"]);
		}

		// Add languages
		if (isset($settings["languages"])) {
			$scriptSrc .= "&languages=" . (is_array($settings["languages"]) ? implode(',', $settings["languages"]) : $settings["languages"]);
		}

		// Add disk_cache
		if (isset($settings["disk_cache"])) {
			$scriptSrc .= "&diskcache=" . ($settings["disk_cache"] === true ? "true" : "false");
		}

		// Add any explicitly specified files if the default settings have been overriden by the tag ones
		/*
		 * Specifying tag files will override (rather than merge with) any site-specific ones set in the
		 * TinyMCE_Compressor object creation.  Note that since the parameter parser limits content to alphanumeric
		 * only base filenames can be specified.  The file extension is assumed to be ".js" and the directory is
		 * the TinyMCE root directory.  A typical use of this is to include a script which initiates the TinyMCE object.
		 */
		if (isset($tagSettings["files"])) {
			$scriptSrc .= "&files=" .(is_array($settings["files"]) ? implode(',', $settings["files"]) : $settings["files"]);
		}

		// Add src flag
		if (isset($settings["source"])) {
			$scriptSrc .= "&src=" . ($settings["source"] === true ? "true" : "false");
		}

		$scriptTag = '<script src="' . htmlspecialchars($scriptSrc) . '"></script>';

		if ($return) {
			return $scriptTag;
		} else {
			echo $scriptTag;
		}
	}
public static function renderTag($tagSettings, $return = false) {
		$settings = array_merge(self::$defaultSettings, $tagSettings);

		if (empty($settings["cache_dir"])) {
			$settings["cache_dir"] = dirname(__FILE__);
		}

		$scriptSrc = $settings["url"] . "?js=1";

		// Add plugins
		if (isset($settings["plugins"])) {
			$scriptSrc .= "&plugins=" . (is_array($settings["plugins"]) ? implode(',', $settings["plugins"]) : $settings["plugins"]);
		}

		// Add themes
		if (isset($settings["themes"])) {
			$scriptSrc .= "&themes=" . (is_array($settings["themes"]) ? implode(',', $settings["themes"]) : $settings["themes"]);
		}

		// Add languages
		if (isset($settings["languages"])) {
			$scriptSrc .= "&languages=" . (is_array($settings["languages"]) ? implode(',', $settings["languages"]) : $settings["languages"]);
		}

		// Add disk_cache
		if (isset($settings["disk_cache"])) {
			$scriptSrc .= "&diskcache=" . ($settings["disk_cache"] === true ? "true" : "false");
		}

		// Add any explicitly specified files if the default settings have been overriden by the tag ones
		/*
		 * Specifying tag files will override (rather than merge with) any site-specific ones set in the
		 * TinyMCE_Compressor object creation.  Note that since the parameter parser limits content to alphanumeric
		 * only base filenames can be specified.  The file extension is assumed to be ".js" and the directory is
		 * the TinyMCE root directory.  A typical use of this is to include a script which initiates the TinyMCE object.
		 */
		if (isset($tagSettings["files"])) {
			$scriptSrc .= "&files=" .(is_array($settings["files"]) ? implode(',', $settings["files"]) : $settings["files"]);
		}

		// Add src flag
		if (isset($settings["source"])) {
			$scriptSrc .= "&src=" . ($settings["source"] === true ? "true" : "false");
		}

		$scriptTag = '<script src="' . htmlspecialchars($scriptSrc) . '"></script>';

		if ($return) {
			return $scriptTag;
		} else {
			echo $scriptTag;
		}
	}
public static function renderTag ( $ tagSettings , $ return = false ) { $ settings = array_merge ( self :: $ defaultSettings , $ tagSettings ) ; if ( empty ( $ settings [ "cache_dir" ] ) ) { $ settings [ "cache_dir" ] = dirname ( __FILE__ ) ; } $ scriptSrc = $ settings [ "url" ] . "?js=1" ; // Add plugins if ( isset ( $ settings [ "plugins" ] ) ) { $ scriptSrc .= "&plugins=" . ( is_array ( $ settings [ "plugins" ] ) ? implode ( ',' , $ settings [ "plugins" ] ) : $ settings [ "plugins" ] ) ; } // Add themes if ( isset ( $ settings [ "themes" ] ) ) { $ scriptSrc .= "&themes=" . ( is_array ( $ settings [ "themes" ] ) ? implode ( ',' , $ settings [ "themes" ] ) : $ settings [ "themes" ] ) ; } // Add languages if ( isset ( $ settings [ "languages" ] ) ) { $ scriptSrc .= "&languages=" . ( is_array ( $ settings [ "languages" ] ) ? implode ( ',' , $ settings [ "languages" ] ) : $ settings [ "languages" ] ) ; } // Add disk_cache if ( isset ( $ settings [ "disk_cache" ] ) ) { $ scriptSrc .= "&diskcache=" . ( $ settings [ "disk_cache" ] === true ? "true" : "false" ) ; } // Add any explicitly specified files if the default settings have been overriden by the tag ones /*
		 * Specifying tag files will override (rather than merge with) any site-specific ones set in the
		 * TinyMCE_Compressor object creation.  Note that since the parameter parser limits content to alphanumeric
		 * only base filenames can be specified.  The file extension is assumed to be ".js" and the directory is
		 * the TinyMCE root directory.  A typical use of this is to include a script which initiates the TinyMCE object.
		 */ if ( isset ( $ tagSettings [ "files" ] ) ) { $ scriptSrc .= "&files=" . ( is_array ( $ settings [ "files" ] ) ? implode ( ',' , $ settings [ "files" ] ) : $ settings [ "files" ] ) ; } // Add src flag if ( isset ( $ settings [ "source" ] ) ) { $ scriptSrc .= "&src=" . ( $ settings [ "source" ] === true ? "true" : "false" ) ; } $ scriptTag = '<script src="' . htmlspecialchars ( $ scriptSrc ) . '"></script>' ; if ( $ return ) { return $ scriptTag ; } else { echo $ scriptTag ; } }
Renders a script tag that loads the TinyMCE script.

@param Array $settings Name/value array with settings for the script tag.
@param Bool  $return   The script tag is return instead of being output if true
@return String the tag is returned if $return is true
Renders a script tag that loads the TinyMCE script .