9
9
* Plugin Name: Advanced Custom Fields
10
10
* Plugin URI: https://www.advancedcustomfields.com
11
11
* Description: Customize WordPress with powerful, professional and intuitive fields.
12
- * Version: 6.3.10
12
+ * Version: 6.3.11
13
13
* Author: WP Engine
14
14
* Author URI: https://wpengine.com/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=plugin_directory&utm_content=advanced_custom_fields
15
15
* Update URI: false
@@ -36,7 +36,7 @@ class ACF {
36
36
*
37
37
* @var string
38
38
*/
39
- public $ version = '6.3.10 ' ;
39
+ public $ version = '6.3.11 ' ;
40
40
41
41
/**
42
42
* The plugin settings array.
@@ -799,33 +799,40 @@ public function acf_plugin_activated() {
799
799
}
800
800
}
801
801
802
- /**
803
- * The main function responsible for returning the acf_updates singleton.
804
- * Use this function like you would a global variable, except without needing to declare the global.
805
- *
806
- * Example: <?php $acf_updates = acf_updates(); ?>
807
- *
808
- * @since 5.5.12
809
- *
810
- * @return ACF\Updater The singleton instance of Updater.
811
- */
812
- function acf_updates () {
813
- global $ acf_updates ;
814
- if ( ! isset ( $ acf_updates ) ) {
815
- $ acf_updates = new ACF \Updater ();
802
+ if ( ! class_exists ( 'ACF_Updates ' ) ) {
803
+ /**
804
+ * The main function responsible for returning the acf_updates singleton.
805
+ * Use this function like you would a global variable, except without needing to declare the global.
806
+ *
807
+ * Example: <?php $acf_updates = acf_updates(); ?>
808
+ *
809
+ * @since 5.5.12
810
+ *
811
+ * @return ACF\Updater The singleton instance of Updater.
812
+ */
813
+ function acf_updates () {
814
+ global $ acf_updates ;
815
+ if ( ! isset ( $ acf_updates ) ) {
816
+ $ acf_updates = new ACF \Updater ();
817
+ }
818
+ return $ acf_updates ;
816
819
}
817
- return $ acf_updates ;
818
- }
819
820
820
- /**
821
- * Alias of acf_updates()->add_plugin().
822
- *
823
- * @since 5.5.10
824
- *
825
- * @param array $plugin Plugin data array.
826
- */
827
- function acf_register_plugin_update ( $ plugin ) {
828
- acf_updates ()->add_plugin ( $ plugin );
821
+ /**
822
+ * Alias of acf_updates()->add_plugin().
823
+ *
824
+ * @since 5.5.10
825
+ *
826
+ * @param array $plugin Plugin data array.
827
+ */
828
+ function acf_register_plugin_update ( $ plugin ) {
829
+ acf_updates ()->add_plugin ( $ plugin );
830
+ }
831
+
832
+ /**
833
+ * Register a dummy ACF_Updates class for back compat.
834
+ */
835
+ class ACF_Updates {} //phpcs:ignore -- Back compat.
829
836
}
830
837
831
838
/**
@@ -838,24 +845,24 @@ function acf_register_plugin_update( $plugin ) {
838
845
* @return string $home_url The output from home_url, sans known third party filters which cause license activation issues.
839
846
*/
840
847
function acf_get_home_url () {
841
- // Disable WPML and TranslatePress's home url overrides for our license check.
842
- add_filter ( 'wpml_get_home_url ' , 'acf_pro_license_ml_intercept ' , 99 , 2 );
843
- add_filter ( 'trp_home_url ' , 'acf_pro_license_ml_intercept ' , 99 , 2 );
844
-
845
848
if ( acf_is_pro () ) {
849
+ // Disable WPML and TranslatePress's home url overrides for our license check.
850
+ add_filter ( 'wpml_get_home_url ' , 'acf_pro_license_ml_intercept ' , 99 , 2 );
851
+ add_filter ( 'trp_home_url ' , 'acf_pro_license_ml_intercept ' , 99 , 2 );
852
+
846
853
if ( acf_pro_is_legacy_multisite () && acf_is_multisite_sub_site () ) {
847
854
$ home_url = get_home_url ( get_main_site_id () );
848
855
} else {
849
856
$ home_url = home_url ();
850
857
}
858
+
859
+ // Re-enable WPML and TranslatePress's home url overrides.
860
+ remove_filter ( 'wpml_get_home_url ' , 'acf_pro_license_ml_intercept ' , 99 );
861
+ remove_filter ( 'trp_home_url ' , 'acf_pro_license_ml_intercept ' , 99 );
851
862
} else {
852
863
$ home_url = home_url ();
853
864
}
854
865
855
- // Re-enable WPML and TranslatePress's home url overrides.
856
- remove_filter ( 'wpml_get_home_url ' , 'acf_pro_license_ml_intercept ' , 99 );
857
- remove_filter ( 'trp_home_url ' , 'acf_pro_license_ml_intercept ' , 99 );
858
-
859
866
return $ home_url ;
860
867
}
861
868
0 commit comments