Skip to content

Commit

Permalink
Merge pull request #190 from mediasanctuary/nov-upgrades
Browse files Browse the repository at this point in the history
November upgrades
  • Loading branch information
dphiffer authored Nov 20, 2024
2 parents 8fa8b4f + bcda3b0 commit 49e6f46
Show file tree
Hide file tree
Showing 2,103 changed files with 187,907 additions and 103,217 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/Jod'
- name: Install dependencies
run: |
cd wp-content/themes/mediasanctuary
npm install
- name: Build
run: |
cd wp-content/themes/mediasanctuary
npm run build
- name: Sync
env:
dest: "[email protected]:/home/members/nyma/sites/dev.mediasanctuary.org/web/wp-content/"
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v22
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is a WordPress site, the theme `mediasanctuary` and the plugins it depends

## Developer dependencies

* [node.js](https://nodejs.org/) v16
* [node.js](https://nodejs.org/) v22
* [Docker Desktop](https://www.docker.com/products/docker-desktop)

## How to run locally
Expand Down
91 changes: 87 additions & 4 deletions wp-content/plugins/advanced-custom-fields-pro/acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
* Plugin Name: Advanced Custom Fields PRO
* Plugin URI: https://www.advancedcustomfields.com
* Description: Customize WordPress with powerful, professional and intuitive fields.
* Version: 6.3.1
* Version: 6.3.11
* Author: WP Engine
* Author URI: https://wpengine.com/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=plugin_directory&utm_content=advanced_custom_fields
* Update URI: https://www.advancedcustomfields.com/pro
* Update URI: false
* Text Domain: acf
* Domain Path: /lang
* Requires PHP: 7.4
Expand All @@ -36,7 +36,7 @@ class ACF {
*
* @var string
*/
public $version = '6.3.1';
public $version = '6.3.11';

/**
* The plugin settings array.
Expand Down Expand Up @@ -130,6 +130,7 @@ public function initialize() {
'enable_shortcode' => true,
'enable_bidirection' => true,
'enable_block_bindings' => true,
'enable_meta_box_cb_edit' => true,
);

// Include utility functions.
Expand Down Expand Up @@ -227,6 +228,9 @@ public function initialize() {
// Include legacy.
acf_include( 'includes/legacy/legacy-locations.php' );

// Include updater.
acf_include( 'includes/Updater/Updater.php' );

// Include PRO.
acf_include( 'pro/acf-pro.php' );

Expand Down Expand Up @@ -391,12 +395,24 @@ public function init() {
*/
do_action( 'acf/include_taxonomies', ACF_MAJOR_VERSION );

// If we're on 6.5 or newer, load block bindings. This will move to an autoloader in 6.3.
// If we're on 6.5 or newer, load block bindings. This will move to an autoloader in 6.4.
if ( version_compare( get_bloginfo( 'version' ), '6.5-beta1', '>=' ) ) {
acf_include( 'includes/Blocks/Bindings.php' );
new ACF\Blocks\Bindings();
}

// If we're ACF free, register the updater.
if ( function_exists( 'acf_is_pro' ) && ! acf_is_pro() ) {
acf_register_plugin_update(
array(
'id' => 'acf',
'slug' => acf_get_setting( 'slug' ),
'basename' => acf_get_setting( 'basename' ),
'version' => acf_get_setting( 'version' ),
)
);
}

/**
* Fires after ACF is completely "initialized".
*
Expand Down Expand Up @@ -783,6 +799,73 @@ public function acf_plugin_activated() {
}
}

if ( ! class_exists( 'ACF_Updates' ) ) {
/**
* The main function responsible for returning the acf_updates singleton.
* Use this function like you would a global variable, except without needing to declare the global.
*
* Example: <?php $acf_updates = acf_updates(); ?>
*
* @since 5.5.12
*
* @return ACF\Updater The singleton instance of Updater.
*/
function acf_updates() {
global $acf_updates;
if ( ! isset( $acf_updates ) ) {
$acf_updates = new ACF\Updater();
}
return $acf_updates;
}

/**
* Alias of acf_updates()->add_plugin().
*
* @since 5.5.10
*
* @param array $plugin Plugin data array.
*/
function acf_register_plugin_update( $plugin ) {
acf_updates()->add_plugin( $plugin );
}

/**
* Register a dummy ACF_Updates class for back compat.
*/
class ACF_Updates {} //phpcs:ignore -- Back compat.
}

/**
* An ACF specific getter to replace `home_url` in our license checks to ensure we can avoid third party filters.
*
* @since 6.0.1
* @since 6.2.8 - Renamed to acf_pro_get_home_url to match pro exclusive function naming.
* @since 6.3.10 - Renamed to acf_get_home_url now updater logic applies to free.
*
* @return string $home_url The output from home_url, sans known third party filters which cause license activation issues.
*/
function acf_get_home_url() {
if ( acf_is_pro() ) {
// Disable WPML and TranslatePress's home url overrides for our license check.
add_filter( 'wpml_get_home_url', 'acf_pro_license_ml_intercept', 99, 2 );
add_filter( 'trp_home_url', 'acf_pro_license_ml_intercept', 99, 2 );

if ( acf_pro_is_legacy_multisite() && acf_is_multisite_sub_site() ) {
$home_url = get_home_url( get_main_site_id() );
} else {
$home_url = home_url();
}

// Re-enable WPML and TranslatePress's home url overrides.
remove_filter( 'wpml_get_home_url', 'acf_pro_license_ml_intercept', 99 );
remove_filter( 'trp_home_url', 'acf_pro_license_ml_intercept', 99 );
} else {
$home_url = home_url();
}

return $home_url;
}

/**
* The main function responsible for returning the one true acf Instance to functions everywhere.
* Use this function like you would a global variable, except without needing to declare the global.
Expand Down
Loading

0 comments on commit 49e6f46

Please sign in to comment.