\AdminPageFramework_HeadTag_PostType

Provides methods to enqueue or insert head tag elements into the head tag for the meta box class.

Summary

Methods
Properties
Constants
replyToAddStyle()
replyToAddScript()
enqueueStyles()
enqueueStyle()
enqueueScripts()
enqueueScript()
__construct()
No public properties found
No constants found
enqueueSRCByConditoin()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

replyToAddStyle()

replyToAddStyle()

replyToAddScript()

replyToAddScript()

enqueueStyles()

enqueueStyles( $arrSRCs,  $arrPostTypes,  $arrCustomArgs)

Enqueues styles by page slug and tab slug.

Parameters

$arrSRCs
$arrPostTypes
$arrCustomArgs

enqueueStyle()

enqueueStyle(string $strSRC, array $arrPostTypes, array $arrCustomArgs) : string

Enqueues a style by page slug and tab slug.

Custom Argument Array for the Fourth Parameter

  • strHandleID - ( optional, string ) The handle ID of the stylesheet.
  • arrDependencies - ( optional, array ) The dependency array. For more information, see codex.
  • strVersion - ( optional, string ) The stylesheet version number.
  • strMedia - ( optional, string ) the description of the field which is inserted into the after the input field tag.

Parameters

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.

Returns

string —

The script handle ID. If the passed url is not a valid url string, an empty string will be returned.

enqueueScripts()

enqueueScripts( $arrSRCs,  $arrPostTypes,  $arrCustomArgs)

Enqueues scripts by page slug and tab slug.

Parameters

$arrSRCs
$arrPostTypes
$arrCustomArgs

enqueueScript()

enqueueScript(string $strSRC, array $arrPostTypes, array $arrCustomArgs) : string

Enqueues a script by page slug and tab slug.

Custom Argument Array for the Fourth Parameter

  • strHandleID - ( optional, string ) The handle ID of the script.
  • arrDependencies - ( optional, array ) The dependency array. For more information, see codex.
  • strVersion - ( optional, string ) The stylesheet version number.
  • arrTranslation - ( optional, array ) The translation array. The handle ID will be used for the object name.
  • fInFooter - ( optional, boolean ) Whether to enqueue the script before < / head > or before < / body > Default: false.

Example

$this->enqueueScript( plugins_url( 'asset/js/test.js' , FILE ), // source url or path );

Parameters

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.

Returns

string —

The script handle ID. If the passed url is not a valid url string, an empty string will be returned.

__construct()

__construct( $oProps)

Parameters

$oProps

enqueueSRCByConditoin()

enqueueSRCByConditoin()