From 31041a04f94c5ee26d4a11bf10738f0468576a6d Mon Sep 17 00:00:00 2001 From: Elliot Condon Date: Tue, 13 Dec 2016 09:26:14 +0100 Subject: [PATCH] 5.5.2 --- acf.php | 26 +- admin/admin.php | 123 +- admin/field-group.php | 60 +- admin/field-groups.php | 37 +- ...update-network.php => install-network.php} | 30 +- admin/install-updates.php | 553 ++ admin/install.php | 425 ++ admin/update.php | 372 - admin/updates/5.0.0.php | 325 - .../field-group-field-conditional-logic.php | 17 +- admin/views/field-group-field.php | 61 +- admin/views/field-group-fields.php | 27 +- admin/views/field-group-locations.php | 9 + admin/views/field-group-options.php | 13 +- ...update-network.php => install-network.php} | 6 +- .../{update-notice.php => install-notice.php} | 0 admin/views/{update.php => install.php} | 10 +- api/api-field-group.php | 8 +- api/api-field.php | 192 +- api/api-helpers.php | 462 +- api/api-template.php | 26 +- api/api-value.php | 30 + assets/css/acf-field-group.css | 19 +- assets/css/acf-global.css | 29 +- assets/css/acf-input.css | 165 +- .../inc/select2/{ => 3}/select2-spinner.gif | Bin assets/inc/select2/{ => 3}/select2.css | 0 assets/inc/select2/{ => 3}/select2.js | 0 assets/inc/select2/{ => 3}/select2.min.js | 0 assets/inc/select2/{ => 3}/select2.png | Bin assets/inc/select2/{ => 3}/select2x2.png | Bin assets/inc/select2/4/select2.css | 431 ++ assets/inc/select2/4/select2.full.js | 6114 +++++++++++++++++ assets/inc/select2/4/select2.full.min.js | 3 + assets/inc/select2/4/select2.js | 5403 +++++++++++++++ assets/inc/select2/4/select2.min.css | 1 + assets/inc/select2/4/select2.min.js | 2 + assets/js/acf-field-group.js | 880 +-- assets/js/acf-field-group.min.js | 2 +- assets/js/acf-input.js | 943 ++- assets/js/acf-input.min.js | 6 +- core/compatibility.php | 54 +- core/field.php | 287 +- core/location.php | 217 +- core/validation.php | 8 +- core/wpml.php | 53 +- fields/checkbox.php | 117 +- fields/date_picker.php | 80 +- fields/date_time_picker.php | 20 +- fields/file.php | 4 +- fields/google-map.php | 4 +- fields/image.php | 20 +- fields/message.php | 70 +- fields/oembed.php | 19 +- fields/output.php | 91 + fields/page_link.php | 24 +- fields/post_object.php | 16 +- fields/radio.php | 19 +- fields/relationship.php | 5 - fields/select.php | 90 +- fields/tab.php | 30 +- fields/taxonomy.php | 46 +- fields/true_false.php | 90 +- fields/user.php | 16 +- fields/wysiwyg.php | 131 +- forms/taxonomy.php | 46 +- forms/user.php | 15 +- lang/acf-ar.mo | Bin 52835 -> 52908 bytes lang/acf-ar.po | 34 +- lang/acf-bg_BG.mo | Bin 58737 -> 58838 bytes lang/acf-bg_BG.po | 30 +- lang/acf-cs_CZ.mo | Bin 9114 -> 9114 bytes lang/acf-cs_CZ.po | 22 +- lang/acf-de_CH.mo | Bin 50549 -> 50908 bytes lang/acf-de_CH.po | 381 +- lang/acf-de_DE.mo | Bin 51028 -> 52748 bytes lang/acf-de_DE.po | 1056 +-- lang/acf-de_DE_formal.mo | Bin 51231 -> 52964 bytes lang/acf-de_DE_formal.po | 1056 +-- lang/acf-es_ES.mo | Bin 45265 -> 45359 bytes lang/acf-es_ES.po | 32 +- lang/acf-fa_IR.mo | Bin 53002 -> 53041 bytes lang/acf-fa_IR.po | 40 +- lang/acf-fi.mo | Bin 49217 -> 49254 bytes lang/acf-fi.po | 34 +- lang/acf-fr_FR.mo | Bin 49409 -> 49429 bytes lang/acf-fr_FR.po | 35 +- lang/acf-he_IL.mo | Bin 41560 -> 41599 bytes lang/acf-he_IL.po | 24 +- lang/acf-hu_HU.mo | Bin 36978 -> 37026 bytes lang/acf-hu_HU.po | 26 +- lang/acf-id_ID.mo | Bin 42429 -> 42466 bytes lang/acf-id_ID.po | 28 +- lang/acf-it_IT.mo | Bin 49264 -> 50883 bytes lang/acf-it_IT.po | 1040 +-- lang/acf-ja.mo | Bin 45075 -> 45113 bytes lang/acf-ja.po | 26 +- lang/acf-nb_NO.mo | Bin 42803 -> 48618 bytes lang/acf-nb_NO.po | 1908 +++-- lang/acf-nl_NL.mo | Bin 46123 -> 46160 bytes lang/acf-nl_NL.po | 32 +- lang/acf-pl_PL.mo | Bin 49359 -> 49397 bytes lang/acf-pl_PL.po | 40 +- lang/acf-pt_BR.mo | Bin 49848 -> 49884 bytes lang/acf-pt_BR.po | 35 +- lang/acf-pt_PT.mo | Bin 50055 -> 51701 bytes lang/acf-pt_PT.po | 1254 ++-- lang/acf-ro_RO.mo | Bin 42214 -> 42249 bytes lang/acf-ro_RO.po | 26 +- lang/acf-ru_RU.mo | Bin 63335 -> 63379 bytes lang/acf-ru_RU.po | 42 +- lang/acf-sk_SK.mo | Bin 40621 -> 40655 bytes lang/acf-sk_SK.po | 26 +- lang/acf-sv_SE.mo | Bin 44600 -> 46052 bytes lang/acf-sv_SE.po | 5763 ++++++++-------- lang/acf-tr_TR.mo | Bin 35914 -> 35947 bytes lang/acf-tr_TR.po | 26 +- lang/acf-uk.mo | Bin 27878 -> 27943 bytes lang/acf-uk.po | 24 +- lang/acf-zh_CN.mo | Bin 11164 -> 11195 bytes lang/acf-zh_CN.po | 26 +- lang/acf.pot | 933 +-- pro/admin/options-page.php | 4 +- pro/api/api-pro.php | 9 +- pro/assets/css/acf-pro-input.css | 134 +- pro/assets/js/acf-pro-field-group.js | 481 +- pro/assets/js/acf-pro-field-group.min.js | 2 +- pro/assets/js/acf-pro-input.js | 214 +- pro/assets/js/acf-pro-input.min.js | 2 +- pro/fields/clone.php | 486 +- pro/fields/flexible-content.php | 213 +- pro/fields/gallery.php | 16 +- pro/fields/repeater.php | 167 +- readme.txt | 42 +- 134 files changed, 24314 insertions(+), 9837 deletions(-) rename admin/{update-network.php => install-network.php} (89%) create mode 100644 admin/install-updates.php create mode 100644 admin/install.php delete mode 100644 admin/update.php delete mode 100644 admin/updates/5.0.0.php rename admin/views/{update-network.php => install-network.php} (94%) rename admin/views/{update-notice.php => install-notice.php} (100%) rename admin/views/{update.php => install.php} (80%) rename assets/inc/select2/{ => 3}/select2-spinner.gif (100%) rename assets/inc/select2/{ => 3}/select2.css (100%) rename assets/inc/select2/{ => 3}/select2.js (100%) rename assets/inc/select2/{ => 3}/select2.min.js (100%) rename assets/inc/select2/{ => 3}/select2.png (100%) rename assets/inc/select2/{ => 3}/select2x2.png (100%) create mode 100644 assets/inc/select2/4/select2.css create mode 100644 assets/inc/select2/4/select2.full.js create mode 100644 assets/inc/select2/4/select2.full.min.js create mode 100644 assets/inc/select2/4/select2.js create mode 100644 assets/inc/select2/4/select2.min.css create mode 100644 assets/inc/select2/4/select2.min.js create mode 100644 fields/output.php diff --git a/acf.php b/acf.php index 9d2ed11..25ffdab 100644 --- a/acf.php +++ b/acf.php @@ -3,7 +3,7 @@ Plugin Name: Advanced Custom Fields PRO Plugin URI: https://www.advancedcustomfields.com/ Description: Customise WordPress with powerful, professional and intuitive fields -Version: 5.4.8 +Version: 5.5.2 Author: Elliot Condon Author URI: http://www.elliotcondon.com/ Copyright: Elliot Condon @@ -58,7 +58,7 @@ class acf { // basic 'name' => __('Advanced Custom Fields', 'acf'), - 'version' => '5.4.8', + 'version' => '5.5.2', // urls 'basename' => plugin_basename( __FILE__ ), @@ -83,7 +83,10 @@ class acf { 'google_api_key' => '', 'google_api_client' => '', 'enqueue_google_maps' => true, - 'enqueue_select2' => true, + 'enqueue_select2' => true, + 'enqueue_datepicker' => true, + 'enqueue_datetimepicker' => true, + 'select2_version' => 3 ); @@ -131,11 +134,17 @@ class acf { acf_include('admin/admin.php'); acf_include('admin/field-group.php'); acf_include('admin/field-groups.php'); - acf_include('admin/update.php'); - acf_include('admin/update-network.php'); + acf_include('admin/install.php'); acf_include('admin/settings-tools.php'); - //acf_include('admin/settings-addons.php'); acf_include('admin/settings-info.php'); + + + // network + if( is_network_admin() ) { + + acf_include('admin/install-network.php'); + + } } @@ -214,6 +223,7 @@ class acf { acf_include('fields/password.php'); acf_include('fields/wysiwyg.php'); acf_include('fields/oembed.php'); + //acf_include('fields/output.php'); acf_include('fields/image.php'); acf_include('fields/file.php'); acf_include('fields/select.php'); @@ -350,12 +360,12 @@ class acf { // acf-disabled register_post_status('acf-disabled', array( - 'label' => __( 'Disabled', 'acf' ), + 'label' => __( 'Inactive', 'acf' ), 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, - 'label_count' => _n_noop( 'Disabled (%s)', 'Disabled (%s)', 'acf' ), + 'label_count' => _n_noop( 'Inactive (%s)', 'Inactive (%s)', 'acf' ), )); } diff --git a/admin/admin.php b/admin/admin.php index 11c7e1f..b08039a 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -1,7 +1,15 @@ notices[] = array( + 'text' => $text, + 'class' => 'updated ' . $class, + 'wrap' => $wrap + ); + + } + + + /* + * get_notices + * + * This function will return an array of admin notices + * + * @type function + * @date 17/10/13 + * @since 5.0.0 + * + * @param n/a + * @return (array) + */ + + function get_notices() { + + // bail early if no notices + if( empty($this->notices) ) return false; + + + // return + return $this->notices; + + } + + /* * admin_menu * @@ -41,11 +101,7 @@ class acf_admin { function admin_menu() { // bail early if no show_admin - if( !acf_get_setting('show_admin') ) { - - return; - - } + if( !acf_get_setting('show_admin') ) return; // vars @@ -100,18 +156,15 @@ class acf_admin { function admin_notices() { // vars - $admin_notices = acf_get_admin_notices(); + $notices = $this->get_notices(); // bail early if no notices - if( empty($admin_notices) ) { - - return; - - } + if( !$notices ) return; - foreach( $admin_notices as $notice ) { + // loop + foreach( $notices as $notice ) { $open = ''; $close = ''; @@ -133,8 +186,50 @@ class acf_admin { } - // initialize -new acf_admin(); +acf()->admin = new acf_admin(); + +endif; // class_exists check + + +/* +* acf_add_admin_notice +* +* This function will add the notice data to a setting in the acf object for the admin_notices action to use +* +* @type function +* @date 17/10/13 +* @since 5.0.0 +* +* @param $text (string) +* @param $class (string) +* @return (int) message ID (array position) +*/ + +function acf_add_admin_notice( $text, $class = '', $wrap = 'p' ) { + + return acf()->admin->add_notice($text, $class, $wrap); + +} + + +/* +* acf_get_admin_notices +* +* This function will return an array containing any admin notices +* +* @type function +* @date 17/10/13 +* @since 5.0.0 +* +* @param n/a +* @return (array) +*/ + +function acf_get_admin_notices() { + + return acf()->admin->get_notices(); + +} ?> diff --git a/admin/field-group.php b/admin/field-group.php index b4368f8..7bfe15c 100644 --- a/admin/field-group.php +++ b/admin/field-group.php @@ -392,7 +392,7 @@ class acf_admin_field_group { // vars - $status = $field_group['active'] ? __("Active",'acf') : __("Disabled",'acf'); + $status = $field_group['active'] ? __("Active",'acf') : __("Inactive",'acf'); ?>