From 892f4e0695613927994eb7df905c6fc5b24cb5a5 Mon Sep 17 00:00:00 2001 From: Andrei Glingeanu Date: Thu, 4 Oct 2018 19:08:41 +0300 Subject: [PATCH] feat($paths): introduce filters for manifest and available exts --- framework/core/class-fw-manifest.php | 2 +- .../extensions/manager/class--fw-extensions-manager.php | 2 +- framework/core/components/theme.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/core/class-fw-manifest.php b/framework/core/class-fw-manifest.php index 90e0a4e5..dbda8b25 100644 --- a/framework/core/class-fw-manifest.php +++ b/framework/core/class-fw-manifest.php @@ -569,4 +569,4 @@ public function get_required_extensions() { return $this->manifest['requirements']['extensions']; } -} \ No newline at end of file +} diff --git a/framework/core/components/extensions/manager/class--fw-extensions-manager.php b/framework/core/components/extensions/manager/class--fw-extensions-manager.php index bdcff705..94456b48 100644 --- a/framework/core/components/extensions/manager/class--fw-extensions-manager.php +++ b/framework/core/components/extensions/manager/class--fw-extensions-manager.php @@ -202,7 +202,7 @@ public function get_available_extensions() { $available = $available['extensions']; // Allow theme to register available extensions - $theme_available_ext_file = fw_fix_path( get_template_directory() ) . fw_get_framework_customizations_dir_rel_path( '/theme/available-extensions.php' ); + $theme_available_ext_file = fw_fix_path( get_template_directory() ) . apply_filters('fw_theme_available_extensions_file_path', fw_get_framework_customizations_dir_rel_path( '/theme/available-extensions.php' )); if ( file_exists( $theme_available_ext_file ) ) { diff --git a/framework/core/components/theme.php b/framework/core/components/theme.php index eb22e72b..25cfe0e6 100644 --- a/framework/core/components/theme.php +++ b/framework/core/components/theme.php @@ -15,7 +15,7 @@ final class _FW_Component_Theme { public function __construct() { $manifest = array(); - if ( ( $manifest_file = fw_get_template_customizations_directory( '/theme/manifest.php' ) ) && is_file( $manifest_file ) ) { + if ( ( $manifest_file = apply_filters('fw_framework_manifest_path', fw_get_template_customizations_directory( '/theme/manifest.php' )) ) && is_file( $manifest_file ) ) { @include $manifest_file; } @@ -228,7 +228,7 @@ public function _action_admin_notices() {

' . __( 'Activate Now | for FREE', 'fw' ) . - ' + '