From 7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 7 Jan 2020 13:06:14 +0100 Subject: Added wordpress --- srcs/wordpress/wp-includes/class-wp-dependency.php | 137 +++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 srcs/wordpress/wp-includes/class-wp-dependency.php (limited to 'srcs/wordpress/wp-includes/class-wp-dependency.php') diff --git a/srcs/wordpress/wp-includes/class-wp-dependency.php b/srcs/wordpress/wp-includes/class-wp-dependency.php new file mode 100644 index 0000000..9648b2f --- /dev/null +++ b/srcs/wordpress/wp-includes/class-wp-dependency.php @@ -0,0 +1,137 @@ +handle, $this->src, $this->deps, $this->ver, $this->args ) = $args; + if ( ! is_array( $this->deps ) ) { + $this->deps = array(); + } + } + + /** + * Add handle data. + * + * @since 2.6.0 + * + * @param string $name The data key to add. + * @param mixed $data The data value to add. + * @return bool False if not scalar, true otherwise. + */ + public function add_data( $name, $data ) { + if ( ! is_scalar( $name ) ) { + return false; + } + $this->extra[ $name ] = $data; + return true; + } + + /** + * Sets the translation domain for this dependency. + * + * @since 5.0.0 + * + * @param string $domain The translation textdomain. + * @param string $path Optional. The full file path to the directory containing translation files. + * + * @return bool False if $domain is not a string, true otherwise. + */ + public function set_translations( $domain, $path = null ) { + if ( ! is_string( $domain ) ) { + return false; + } + $this->textdomain = $domain; + $this->translations_path = $path; + return true; + } +} -- cgit