Astra_Abilities_Init::register_abilities()
Register all Astra abilities.
Description
Return
(void)
Source
File: inc/abilities/class-astra-abilities-init.php
public function register_abilities() {
if ( $this->registered ) {
return;
}
if ( ! function_exists( 'wp_register_ability' ) ) {
return;
}
$abilities_dir = ASTRA_THEME_DIR . 'inc/abilities/';
$ability_files = array(
// Performance abilities.
'admin/settings/performance/class-astra-get-performance',
'admin/settings/performance/class-astra-update-performance',
'admin/settings/performance/class-astra-flush-local-fonts',
'admin/settings/performance/class-astra-get-load-google-fonts-locally',
'admin/settings/performance/class-astra-get-preload-local-fonts',
'admin/settings/performance/class-astra-update-load-google-fonts-locally',
'admin/settings/performance/class-astra-update-preload-local-fonts',
// Typography abilities.
'customizer/globals/typography/class-astra-get-body-font',
'customizer/globals/typography/class-astra-update-body-font',
'customizer/globals/typography/class-astra-get-headings-font',
'customizer/globals/typography/class-astra-update-headings-font',
'customizer/globals/typography/class-astra-list-font-families',
// Individual heading typography abilities (H1-H6) — registered via loop.
'customizer/globals/typography/class-astra-get-heading-font',
'customizer/globals/typography/class-astra-update-heading-font',
// Paragraph margin and underline links abilities.
'customizer/globals/typography/class-astra-get-paragraph-margin',
'customizer/globals/typography/class-astra-update-paragraph-margin',
'customizer/globals/typography/class-astra-get-underline-links-status',
'customizer/globals/typography/class-astra-toggle-underline-links',
// Colors abilities.
'customizer/globals/colors/class-astra-get-global-palette',
'customizer/globals/colors/class-astra-update-global-palette',
'customizer/globals/colors/class-astra-get-background-colors',
'customizer/globals/colors/class-astra-update-background-colors',
'customizer/globals/colors/class-astra-update-theme-colors',
// Container abilities.
'customizer/globals/container/class-astra-get-container-layout',
'customizer/globals/container/class-astra-update-container-layout',
'customizer/globals/container/class-astra-list-container-settings',
// Buttons abilities.
'customizer/globals/buttons/class-astra-get-global-buttons',
'customizer/globals/buttons/class-astra-update-global-buttons',
// Header Builder abilities.
'customizer/header/class-astra-get-header-builder',
'customizer/header/class-astra-get-header-builder-design',
'customizer/header/class-astra-update-header-builder',
'customizer/header/class-astra-update-header-builder-design',
'customizer/header/class-astra-migrate-header-components',
'customizer/header/builder/class-astra-list-header-builder-settings',
// Footer Builder abilities.
'customizer/footer/class-astra-get-footer-builder',
'customizer/footer/class-astra-get-footer-builder-design',
'customizer/footer/class-astra-update-footer-builder',
'customizer/footer/class-astra-update-footer-builder-design',
// Blogs / Post Types abilities.
'customizer/posttypes/blog/class-astra-get-blog-archive',
'customizer/posttypes/blog/class-astra-update-blog-archive',
'customizer/posttypes/blog/class-astra-get-single-post',
'customizer/posttypes/blog/class-astra-update-single-post',
'customizer/posttypes/blog/class-astra-get-single-page',
'customizer/posttypes/blog/class-astra-update-single-page',
// Site Identity abilities.
'customizer/siteidentity/class-astra-get-site-title-logo',
'customizer/siteidentity/class-astra-update-site-title-logo',
// Breadcrumb abilities.
'customizer/general/breadcrumb/class-astra-get-breadcrumb',
'customizer/general/breadcrumb/class-astra-update-breadcrumb',
// Post Meta abilities.
'admin/postmeta/class-astra-get-postmeta',
'admin/postmeta/class-astra-update-postmeta',
// Sidebar abilities.
'customizer/general/sidebar/class-astra-get-sidebar',
'customizer/general/sidebar/class-astra-get-sidebar-layout',
'customizer/general/sidebar/class-astra-get-sidebar-style',
'customizer/general/sidebar/class-astra-get-sidebar-width',
'customizer/general/sidebar/class-astra-get-sticky-sidebar',
'customizer/general/sidebar/class-astra-update-sidebar',
'customizer/general/sidebar/class-astra-update-sidebar-layout',
'customizer/general/sidebar/class-astra-update-sidebar-style',
'customizer/general/sidebar/class-astra-update-sidebar-width',
'customizer/general/sidebar/class-astra-update-sticky-sidebar',
);
foreach ( $ability_files as $file ) {
require_once $abilities_dir . $file . '.php';
}
$this->registered = true;
}
Expand full source code Collapse full source code View on Trac