replyToAddStyle()
replyToAddStyle()
Provides methods to enqueue or insert head tag elements into the head tag for the meta box class.
enqueueStyle(string $strSRC, array $arrPostTypes, array $arrCustomArgs) : string
Enqueues a style by page slug and tab slug.
string | $strSRC | The URL of the stylesheet to enqueue, the absolute file path, or the relative path to the root directory of WordPress. Example: '/css/mystyle.css'. |
array | $arrPostTypes | (optional) The post type slugs that the stylesheet should be added to. If not set, it applies to all the pages of the post types. |
array | $arrCustomArgs | (optional) The argument array for more advanced parameters. |
The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
enqueueScript(string $strSRC, array $arrPostTypes, array $arrCustomArgs) : string
Enqueues a script by page slug and tab slug.
false
.$this->enqueueScript(
plugins_url( 'asset/js/test.js' , FILE ), // source url or path
);
string | $strSRC | The URL of the stylesheet to enqueue, the absolute file path, or relative path to the root directory of WordPress. Example: '/js/myscript.js'. |
array | $arrPostTypes | (optional) The post type slugs that the script should be added to. If not set, it applies to all the pages with the post type slugs. |
array | $arrCustomArgs | (optional) The argument array for more advanced parameters. |
The script handle ID. If the passed url is not a valid url string, an empty string will be returned.