AssetsBundle
in package

Tags
since
1.0
todo

Make Flatpickr part of the other bundles.

Table of Contents

$scripts  : array<string|int, mixed>
$styles  : mixed
getAdminScripts()  : array<string|int, mixed>
getAdminStyles()  : array<string|int, mixed>
getPublicScripts()  : array<string|int, mixed>
getPublicStyles()  : array<string|int, mixed>
filterAssets()  : array<string|int, mixed>

Properties

$scripts

protected array<string|int, mixed> $scripts = array( // Use .min.js version of the file by default if there is a minified // version of the script; otherwise - use .js notation 'global' => array( // Handle => [$file, $dependencies = [], $version = '', $inFooter = true] 'flatpickr' => array('assets/js/flatpickr-4.6.3/dist/flatpickr.min.js', array(), \MotoPress\Appointment\FLATPICKR_VERSION), 'spectrum' => array('assets/js/spectrum-2.0.8/dist/spectrum.min.js', array('jquery'), \MotoPress\Appointment\SPECTRUM_VERSION), ), 'admin' => array('mpa-edit-post' => array('assets/js/edit-post.min.js', array('jquery', 'wp-i18n', 'wp-api-request', 'flatpickr', 'spectrum')), 'mpa-edit-category' => array('assets/js/edit-category.min.js', array('jquery', 'wp-media')), 'mpa-manage-posts' => array('assets/js/manage-posts.min.js', array('jquery')), 'mpa-settings-page' => array('assets/js/settings-page.min.js', array('jquery', 'wp-api-request')), 'mpa-gutenberg-blocks' => array('assets/js/gutenberg-blocks.min.js', array('wp-i18n', 'wp-editor', 'wp-element', 'wp-blocks', 'wp-components')), 'wpapi' => array('assets/js/wpapi/wpapi.min.js', array()), 'mpa-calendar-page' => array('assets/js/calendar-page.min.js', array('wp-i18n', 'wp-element', 'wp-html-entities', 'lodash', 'wpapi'))), 'public' => array('mpa-public' => array('assets/js/public.min.js', array('jquery', 'wp-i18n', 'wp-api-request', 'flatpickr')), 'mpa-elementor-widgets' => array('assets/js/elementor-widgets.min.js', array('jquery', 'wp-i18n', 'wp-api-request', 'flatpickr')), 'mpa-divi-modules' => array('assets/js/divi-modules.min.js', array('jquery', 'customize-preview'))), )
Tags
since
1.0
since
1.2

added "mpa-edit-category" script.

$styles

protected mixed $styles = array( // Use .min.css version of the file by default if there is a minified // version of the stylesheet; otherwise - use .css notation 'global' => array( // Handle => [$file, $dependencies = [], $version = '', $media = 'all'] 'flatpickr' => array('assets/js/flatpickr-4.6.3/dist/flatpickr.min.css', array(), \MotoPress\Appointment\FLATPICKR_VERSION), 'spectrum' => array('assets/js/spectrum-2.0.8/dist/spectrum.min.css', array(), \MotoPress\Appointment\SPECTRUM_VERSION), ), 'admin' => array('mpa-admin' => array('assets/css/admin.min.css'), 'mpa-edit-post' => array('assets/css/edit-post.min.css', array('flatpickr', 'spectrum')), 'mpa-edit-category' => array('assets/css/edit-category.min.css'), 'mpa-manage-posts' => array('assets/css/manage-posts.min.css'), 'mpa-settings-page' => array('assets/css/settings-page.min.css'), 'mpa-gutenberg-blocks' => array('assets/css/public.min.css'), 'mpa-calendar-page' => array('assets/css/calendar-page.min.css')), 'public' => array('mpa-public' => array('assets/css/public.min.css', array('flatpickr'))), )
Tags
since
1.0
since
1.2

added "mpa-edit-category" style.

since
1.2.1

added "mpa-admin" style.

Methods

getAdminScripts()

public getAdminScripts() : array<string|int, mixed>
Tags
since
1.0
Return values
array<string|int, mixed>

Array of [Handle => [$file, $dependencies = [], $version = '', $inFooter = true]].

getAdminStyles()

public getAdminStyles() : array<string|int, mixed>
Tags
since
1.0
Return values
array<string|int, mixed>

Array of [Handle => [$file, $dependencies = [], $version = '', $media = 'all']].

getPublicScripts()

public getPublicScripts() : array<string|int, mixed>
Tags
since
1.0
Return values
array<string|int, mixed>

Array of [Handle => [$file, $dependencies = [], $version = '', $inFooter = true]].

getPublicStyles()

public getPublicStyles() : array<string|int, mixed>
Tags
since
1.0
Return values
array<string|int, mixed>

Array of [Handle => [$file, $dependencies = [], $version = '', $media = 'all']].

filterAssets()

protected filterAssets(array<string|int, mixed> $assets) : array<string|int, mixed>
Parameters
$assets : array<string|int, mixed>
Tags
since
1.0
Return values
array<string|int, mixed>

Search results