WP_Scripts
class WP_Scripts
// Constructor: function Object() { [native code] } Core class used to register scripts.
Methods 26 methods
| Method / Return | Description |
|---|---|
| __construct() void | Constructor. |
| init() void | Initialize the class. |
| print_scripts() string[] | Prints scripts.
Parameters: $handles: mixed, $group: mixed |
| print_scripts_l10n() (bool | Prints extra scripts of a registered script.
Parameters: $handle: mixed, $display: mixed |
| print_extra_script() (bool | Prints extra scripts of a registered script.
Parameters: $handle: mixed, $display: mixed |
| are_all_dependents_in_footer() bool | Checks whether all dependents of a given handle are in the footer.
Parameters: $handle: mixed |
| do_item() bool | Processes a script dependency.
Parameters: $handle: mixed, $group: mixed |
| add_inline_script() bool | Adds extra code to a registered script.
Parameters: $handle: mixed, $data: mixed, $position: mixed |
| print_inline_script() (string | Prints inline scripts registered for a specific handle.
Parameters: $handle: mixed, $position: mixed, $display: mixed |
| get_inline_script_data() string | Gets data for inline scripts registered for a specific handle.
Parameters: $handle: mixed, $position: mixed |
| get_inline_script_tag() string | Gets tags for inline scripts registered for a specific handle.
Parameters: $handle: mixed, $position: mixed |
| localize() bool | Localizes a script, only if the script has already been added.
Parameters: $handle: mixed, $object_name: mixed, $l10n: mixed |
| set_group() bool | Sets handle group.
Parameters: $handle: mixed, $recursion: mixed, $group: mixed |
| set_translations() bool | Sets a translation textdomain.
Parameters: $handle: mixed, $domain: mixed, $path: mixed |
| print_translations() (string | Prints translations set for a specific handle.
Parameters: $handle: mixed, $display: mixed |
| all_deps() bool | Determines script dependencies.
Parameters: $handles: mixed, $recursion: mixed, $group: mixed |
| do_head_items() string[] | Processes items and dependencies for the head group. |
| do_footer_items() string[] | Processes items and dependencies for the footer group. |
| in_default_dir() bool | Whether a handle's source is in a default directory.
Parameters: $src: mixed |
| add_data() bool | This overrides the add_data method from WP_Dependencies, to support normalizing of $args.
Parameters: $handle: mixed, $key: mixed, $value: mixed |
| get_dependents() string[] | Gets all dependents of a script.
Parameters: $handle: mixed |
| is_delayed_strategy() bool | Checks if the strategy passed is a valid delayed (non-blocking) strategy.
Parameters: $strategy: mixed |
| get_eligible_loading_strategy() string | Gets the best eligible loading strategy for a script.
Parameters: $handle: mixed |
| filter_eligible_strategies() string[] | Filter the list of eligible loading strategies for a script.
Parameters: $handle: mixed, $eligible_strategies: mixed, $checked: mixed |
| has_inline_script() bool | Gets data for inline scripts registered for a specific handle.
Parameters: $handle: mixed, $position: mixed |
| reset() void | Resets class properties. |
Properties
| Property / Type | Description |
|---|---|
| $base_url mixed public | No description available. |
| $content_url mixed public | No description available. |
| $default_version mixed public | No description available. |
| $in_footer mixed public | No description available. |
| $concat mixed public | No description available. |
| $concat_version mixed public | No description available. |
| $do_concat mixed public | No description available. |
| $print_html mixed public | No description available. |
| $print_code mixed public | No description available. |
| $ext_handles mixed public | No description available. |
| $ext_version mixed public | No description available. |
| $default_dirs mixed public | No description available. |
| $dependents_map mixed public | No description available. |
| $delayed_strategies mixed public | No description available. |