Advanced Custom Fields: Extended - Version 0.8.6.8

Version Description

  • Field: Flexible Content - Enhanced Code Base
  • Field: Flexible Content - Dynamic Render - Enhanced get_flexible() & the_flexible() functions logic
  • Field: Flexible Content - Dynamic Render - Enhanced Template, Style & Script files detection. Now detects paths from WP root directory, and from /wp-content/ directory
  • Field: Flexible Content - Dynamic Preview - Automatically include the layout {template}-preview.php file instead of template.php, if it is found within the same path
  • Field: Flexible Content - Dynamic Preview - Automatically enqueue the layout {style}-preview.css file in addition of style.css, if it is found within the same path
  • Field: Flexible Content - Dynamic Preview - Automatically enqueue the layout {script}-preview.js file instead of script.js, if it is found within the same path
  • Field: Flexible Content - Dynamic Preview - Fixed full path match for Layouts Templates files
  • Field: Flexible Content - Added filter('acfe/flexible/prepend/template/name=my_flexible', $path, $flexible, $layout) and its variations to alter the field's setting prepend (display only)
  • Field: Flexible Content - Added filter('acfe/flexible/prepend/style/name=my_flexible', $path, $flexible, $layout) and its variations to alter the field's setting prepend (display only)
  • Field: Flexible Content - Added filter('acfe/flexible/prepend/script/name=my_flexible', $path, $flexible, $layout) and its variations to alter the field's setting prepend (display only)
  • Field: Flexible Content - Deprecated acfe/flexible/layout/thumbnail/layout=my_layout hooks and its variations. Use acfe/flexible/thumbnail/layout=my_layout instead
  • Field: Flexible Content - Deprecated acfe/flexible/layout/render/template/layout=my_layout hooks and its variations. Use acfe/flexible/render/template/layout=my_layout instead
  • Field: Flexible Content - Deprecated acfe/flexible/layout/render/before_template/layout=my_layout hooks and its variations. Use acfe/flexible/render/before_template/layout=my_layout instead
  • Field: Flexible Content - Deprecated acfe/flexible/layout/render/after_template/layout=my_layout hooks and its variations. Use acfe/flexible/render/after_template/layout=my_layout instead
  • Field: Flexible Content - Deprecated acfe/flexible/layout/render/style/layout=my_layout hooks and its variations. Use acfe/flexible/render/style/layout=my_layout instead
  • Field: Flexible Content - Deprecated acfe/flexible/layout/render/script/layout=my_layout hooks and its variations. Use acfe/flexible/render/script/layout=my_layout instead
  • Field: Flexible Content - Deprecated acfe/flexible/layout/enqueue/layout=my_layout hooks and its variations. Use acfe/flexible/enqueue/layout=my_layout instead
  • Field: Flexible Content - Deprecated acfe/flexible/preview hooks and its variations
  • Module: Dynamic Block Types - The "Template Render" setting is now independant from the theme
  • Module: Dynamic Block Types - Added filter('acfe/block_type/prepend/template/name=my-block-type', $path, $name) and its variations to alter the field's setting prepend (display only)
  • Module: Dynamic Block Types - Added filter('acfe/block_type/prepend/style/name=my-block-type', $path, $name) and its variations to alter the field's setting prepend (display only)
  • Module: Dynamic Block Types - Added filter('acfe/block_type/prepend/script/name=my-block-type', $path, $name) and its variations to alter the field's setting prepend (display only)
  • Module: Post Type Archive Page - have_archive() now allows to pass the post type name. Usage example: while(have_archive('my-post-type')): the_archive()
  • Module: Multilang - Enhanced Options Pages Post ID detection
  • Module: Multilang - Added "Post Type List" & "Taxonomy List" Locations compatibility
  • Module: Multilang - Fixed the "Disable module" setting which wasn't working correctly
  • Module: Multilang - Fixed Polylang Ajax language detection
  • General: Enhanced acfe_update_setting(), acfe_get_setting() functions and filer('acfe/settings/{name}') hook
  • General: Removed ACFE_THEME_PATH & ACFE_THEME_URL constants
  • General: Added acfe/theme_path, acfe/theme_url & acfe/theme_folder settings
  • General: The default acfe/php_save, acfe/php_load & acfe/theme_folder settings are now generated based on the new acfe/theme_path & acfe/theme_url settings
  • General: The acfe/theme_folder setting is now used to preprend Flexible Content & Block Types render fields settings (Display only)
Download this release

Release Info

Developer hwk-fr
Plugin Icon 128x128 Advanced Custom Fields: Extended
Version 0.8.6.8
Comparing to
See all releases

Code changes from version 0.8.6.7 to 0.8.6.8

Files changed (3) hide show
  1. acf-extended.php +2 -2
  2. includes/core/helpers.php +39 -24
  3. readme.txt +6 -5
acf-extended.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Advanced Custom Fields: Extended
4
  * Description: Enhancement Suite which improves Advanced Custom Fields administration
5
- * Version: 0.8.6.7
6
  * Author: ACF Extended
7
  * Author URI: https://www.acf-extended.com
8
  * Text Domain: acfe
@@ -16,7 +16,7 @@ if(!class_exists('ACFE')):
16
  class ACFE{
17
 
18
  // Version
19
- var $version = '0.8.6.7';
20
 
21
  // Settings
22
  var $settings = array();
2
  /**
3
  * Plugin Name: Advanced Custom Fields: Extended
4
  * Description: Enhancement Suite which improves Advanced Custom Fields administration
5
+ * Version: 0.8.6.8
6
  * Author: ACF Extended
7
  * Author URI: https://www.acf-extended.com
8
  * Text Domain: acfe
16
  class ACFE{
17
 
18
  // Version
19
+ var $version = '0.8.6.8';
20
 
21
  // Settings
22
  var $settings = array();
includes/core/helpers.php CHANGED
@@ -573,37 +573,45 @@ function acfe_locate_file_url($filenames){
573
 
574
  }else{
575
 
576
- $filename = ltrim($filename, '/\\');
577
- $abspath = wp_normalize_path(untrailingslashit(ABSPATH));
578
 
579
  // Child Theme
580
- if(file_exists(STYLESHEETPATH . '/' . $filename)){
581
 
582
- $located = get_stylesheet_directory_uri() . '/' . $filename;
583
  break;
584
 
585
  }
586
 
587
  // Parent Theme
588
- elseif(file_exists(TEMPLATEPATH . '/' . $filename)){
589
 
590
- $located = get_template_directory_uri() . '/' . $filename;
591
  break;
592
 
593
  }
594
 
 
 
 
 
 
 
 
 
595
  // ABSPATH file path
596
- elseif(file_exists($abspath . '/' . $filename)){
597
 
598
- $located = acfe_get_abs_path_to_url($abspath . '/' . $filename);
599
  break;
600
 
601
  }
602
 
603
  // WP Content Dir
604
- elseif(file_exists(WP_CONTENT_DIR . '/' . $filename)){
605
 
606
- $located = WP_CONTENT_URL . '/' . $filename;
607
  break;
608
 
609
  }
@@ -629,37 +637,45 @@ function acfe_locate_file_path($filenames, $load = false, $require_once = true){
629
  if(!$filename)
630
  continue;
631
 
632
- $filename = ltrim($filename, '/\\');
633
  $abspath = untrailingslashit(ABSPATH);
634
 
635
  // Stylesheet file path
636
- if(file_exists(STYLESHEETPATH . '/' . $filename)){
637
 
638
- $located = STYLESHEETPATH . '/' . $filename;
639
  break;
640
 
641
  }
642
 
643
  // Template file path
644
- elseif(file_exists(TEMPLATEPATH . '/' . $filename)){
645
 
646
- $located = TEMPLATEPATH . '/' . $filename;
647
  break;
648
 
649
  }
650
 
 
 
 
 
 
 
 
 
651
  // ABSPATH file path
652
- elseif(file_exists($abspath . '/' . $filename)){
653
 
654
- $located = $abspath . '/' . $filename;
655
  break;
656
 
657
  }
658
 
659
  // WP Content Dir
660
- elseif(file_exists(WP_CONTENT_DIR . '/' . $filename)){
661
 
662
- $located = WP_CONTENT_DIR . '/' . $filename;
663
  break;
664
 
665
  }
@@ -681,11 +697,10 @@ function acfe_locate_file_path($filenames, $load = false, $require_once = true){
681
  */
682
  function acfe_get_abs_path_to_url($path = ''){
683
 
684
- $url = str_replace(
685
- wp_normalize_path(untrailingslashit(ABSPATH)),
686
- site_url(),
687
- wp_normalize_path($path)
688
- );
689
 
690
  return esc_url_raw($url);
691
 
573
 
574
  }else{
575
 
576
+ $_filename = ltrim($filename, '/\\');
577
+ $abspath = untrailingslashit(ABSPATH);
578
 
579
  // Child Theme
580
+ if(file_exists(STYLESHEETPATH . '/' . $_filename)){
581
 
582
+ $located = get_stylesheet_directory_uri() . '/' . $_filename;
583
  break;
584
 
585
  }
586
 
587
  // Parent Theme
588
+ elseif(file_exists(TEMPLATEPATH . '/' . $_filename)){
589
 
590
+ $located = get_template_directory_uri() . '/' . $_filename;
591
  break;
592
 
593
  }
594
 
595
+ // Direct file path
596
+ elseif(file_exists($filename)){
597
+
598
+ $located = acfe_get_abs_path_to_url($filename);
599
+ break;
600
+
601
+ }
602
+
603
  // ABSPATH file path
604
+ elseif(file_exists($abspath . '/' . $_filename)){
605
 
606
+ $located = acfe_get_abs_path_to_url($abspath . '/' . $_filename);
607
  break;
608
 
609
  }
610
 
611
  // WP Content Dir
612
+ elseif(file_exists(WP_CONTENT_DIR . '/' . $_filename)){
613
 
614
+ $located = WP_CONTENT_URL . '/' . $_filename;
615
  break;
616
 
617
  }
637
  if(!$filename)
638
  continue;
639
 
640
+ $_filename = ltrim($filename, '/\\');
641
  $abspath = untrailingslashit(ABSPATH);
642
 
643
  // Stylesheet file path
644
+ if(file_exists(STYLESHEETPATH . '/' . $_filename)){
645
 
646
+ $located = STYLESHEETPATH . '/' . $_filename;
647
  break;
648
 
649
  }
650
 
651
  // Template file path
652
+ elseif(file_exists(TEMPLATEPATH . '/' . $_filename)){
653
 
654
+ $located = TEMPLATEPATH . '/' . $_filename;
655
  break;
656
 
657
  }
658
 
659
+ // Direct file path
660
+ elseif(file_exists($filename)){
661
+
662
+ $located = $filename;
663
+ break;
664
+
665
+ }
666
+
667
  // ABSPATH file path
668
+ elseif(file_exists($abspath . '/' . $_filename)){
669
 
670
+ $located = $abspath . '/' . $_filename;
671
  break;
672
 
673
  }
674
 
675
  // WP Content Dir
676
+ elseif(file_exists(WP_CONTENT_DIR . '/' . $_filename)){
677
 
678
+ $located = WP_CONTENT_DIR . '/' . $_filename;
679
  break;
680
 
681
  }
697
  */
698
  function acfe_get_abs_path_to_url($path = ''){
699
 
700
+ $abspath = untrailingslashit(ABSPATH);
701
+
702
+ $url = str_replace($abspath, site_url(), $path);
703
+ $url = wp_normalize_path($url);
 
704
 
705
  return esc_url_raw($url);
706
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: acf, custom fields, meta, admin, fields, form, repeater, content
5
  Requires at least: 4.9
6
  Tested up to: 5.4
7
  Requires PHP: 5.6
8
- Stable tag: 0.8.6.7
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -866,13 +866,14 @@ function my_acfe_modules(){
866
 
867
  == Changelog ==
868
 
869
- = 0.8.6.7 =
870
  * Field: Flexible Content - Enhanced Code Base
871
  * Field: Flexible Content - Dynamic Render - Enhanced `get_flexible()` & `the_flexible()` functions logic
872
  * Field: Flexible Content - Dynamic Render - Enhanced Template, Style & Script files detection. Now detects paths from WP root directory, and from `/wp-content/` directory
873
  * Field: Flexible Content - Dynamic Preview - Automatically include the layout `{template}-preview.php` file instead of `template.php`, if it is found within the same path
874
  * Field: Flexible Content - Dynamic Preview - Automatically enqueue the layout `{style}-preview.css` file in addition of `style.css`, if it is found within the same path
875
  * Field: Flexible Content - Dynamic Preview - Automatically enqueue the layout `{script}-preview.js` file instead of `script.js`, if it is found within the same path
 
876
  * Field: Flexible Content - Added `filter('acfe/flexible/prepend/template/name=my_flexible', $path, $flexible, $layout)` and its variations to alter the field's setting prepend (display only)
877
  * Field: Flexible Content - Added `filter('acfe/flexible/prepend/style/name=my_flexible', $path, $flexible, $layout)` and its variations to alter the field's setting prepend (display only)
878
  * Field: Flexible Content - Added `filter('acfe/flexible/prepend/script/name=my_flexible', $path, $flexible, $layout)` and its variations to alter the field's setting prepend (display only)
@@ -885,9 +886,9 @@ function my_acfe_modules(){
885
  * Field: Flexible Content - Deprecated `acfe/flexible/layout/enqueue/layout=my_layout` hooks and its variations. Use `acfe/flexible/enqueue/layout=my_layout` instead
886
  * Field: Flexible Content - Deprecated `acfe/flexible/preview` hooks and its variations
887
  * Module: Dynamic Block Types - The "Template Render" setting is now independant from the theme
888
- * Module: Dynamic Block Types - Added `filter('acfe/block_type/prepend/template/name=my-block-type', $path, name)` and its variations to alter the field's setting prepend (display only)
889
- * Module: Dynamic Block Types - Added `filter('acfe/block_type/prepend/style/name=my-block-type', $path, name)` and its variations to alter the field's setting prepend (display only)
890
- * Module: Dynamic Block Types - Added `filter('acfe/block_type/prepend/script/name=my-block-type', $path, name)` and its variations to alter the field's setting prepend (display only)
891
  * Module: Post Type Archive Page - `have_archive()` now allows to pass the post type name. Usage example: `while(have_archive('my-post-type')): the_archive()`
892
  * Module: Multilang - Enhanced Options Pages Post ID detection
893
  * Module: Multilang - Added "Post Type List" & "Taxonomy List" Locations compatibility
5
  Requires at least: 4.9
6
  Tested up to: 5.4
7
  Requires PHP: 5.6
8
+ Stable tag: 0.8.6.8
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
866
 
867
  == Changelog ==
868
 
869
+ = 0.8.6.8 =
870
  * Field: Flexible Content - Enhanced Code Base
871
  * Field: Flexible Content - Dynamic Render - Enhanced `get_flexible()` & `the_flexible()` functions logic
872
  * Field: Flexible Content - Dynamic Render - Enhanced Template, Style & Script files detection. Now detects paths from WP root directory, and from `/wp-content/` directory
873
  * Field: Flexible Content - Dynamic Preview - Automatically include the layout `{template}-preview.php` file instead of `template.php`, if it is found within the same path
874
  * Field: Flexible Content - Dynamic Preview - Automatically enqueue the layout `{style}-preview.css` file in addition of `style.css`, if it is found within the same path
875
  * Field: Flexible Content - Dynamic Preview - Automatically enqueue the layout `{script}-preview.js` file instead of `script.js`, if it is found within the same path
876
+ * Field: Flexible Content - Dynamic Preview - Fixed full path match for Layouts Templates files
877
  * Field: Flexible Content - Added `filter('acfe/flexible/prepend/template/name=my_flexible', $path, $flexible, $layout)` and its variations to alter the field's setting prepend (display only)
878
  * Field: Flexible Content - Added `filter('acfe/flexible/prepend/style/name=my_flexible', $path, $flexible, $layout)` and its variations to alter the field's setting prepend (display only)
879
  * Field: Flexible Content - Added `filter('acfe/flexible/prepend/script/name=my_flexible', $path, $flexible, $layout)` and its variations to alter the field's setting prepend (display only)
886
  * Field: Flexible Content - Deprecated `acfe/flexible/layout/enqueue/layout=my_layout` hooks and its variations. Use `acfe/flexible/enqueue/layout=my_layout` instead
887
  * Field: Flexible Content - Deprecated `acfe/flexible/preview` hooks and its variations
888
  * Module: Dynamic Block Types - The "Template Render" setting is now independant from the theme
889
+ * Module: Dynamic Block Types - Added `filter('acfe/block_type/prepend/template/name=my-block-type', $path, $name)` and its variations to alter the field's setting prepend (display only)
890
+ * Module: Dynamic Block Types - Added `filter('acfe/block_type/prepend/style/name=my-block-type', $path, $name)` and its variations to alter the field's setting prepend (display only)
891
+ * Module: Dynamic Block Types - Added `filter('acfe/block_type/prepend/script/name=my-block-type', $path, $name)` and its variations to alter the field's setting prepend (display only)
892
  * Module: Post Type Archive Page - `have_archive()` now allows to pass the post type name. Usage example: `while(have_archive('my-post-type')): the_archive()`
893
  * Module: Multilang - Enhanced Options Pages Post ID detection
894
  * Module: Multilang - Added "Post Type List" & "Taxonomy List" Locations compatibility