plugin updates
@@ -9,14 +9,14 @@
|
||||
* Plugin Name: Advanced Custom Fields PRO
|
||||
* Plugin URI: https://www.advancedcustomfields.com
|
||||
* Description: Customize WordPress with powerful, professional and intuitive fields.
|
||||
* Version: 6.2.10
|
||||
* Version: 6.3.1.2
|
||||
* 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
|
||||
* Text Domain: acf
|
||||
* Domain Path: /lang
|
||||
* Requires PHP: 7.0
|
||||
* Requires at least: 5.8
|
||||
* Requires PHP: 7.4
|
||||
* Requires at least: 6.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
@@ -36,7 +36,7 @@ if ( ! class_exists( 'ACF' ) ) {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $version = '6.2.10';
|
||||
public $version = '6.3.1.2';
|
||||
|
||||
/**
|
||||
* The plugin settings array.
|
||||
@@ -143,6 +143,7 @@ if ( ! class_exists( 'ACF' ) ) {
|
||||
// Include classes.
|
||||
acf_include( 'includes/class-acf-data.php' );
|
||||
acf_include( 'includes/class-acf-internal-post-type.php' );
|
||||
acf_include( 'includes/class-acf-site-health.php' );
|
||||
acf_include( 'includes/fields/class-acf-field.php' );
|
||||
acf_include( 'includes/locations/abstract-acf-legacy-location.php' );
|
||||
acf_include( 'includes/locations/abstract-acf-location.php' );
|
||||
@@ -164,6 +165,14 @@ if ( ! class_exists( 'ACF' ) ) {
|
||||
acf_include( 'includes/acf-input-functions.php' );
|
||||
acf_include( 'includes/acf-wp-functions.php' );
|
||||
|
||||
// Override the shortcode default value based on the version when installed.
|
||||
$first_activated_version = acf_get_version_when_first_activated();
|
||||
|
||||
// Only enable shortcode by default for versions prior to 6.3
|
||||
if ( $first_activated_version && version_compare( $first_activated_version, '6.3', '>=' ) ) {
|
||||
$this->settings['enable_shortcode'] = false;
|
||||
}
|
||||
|
||||
// Include core.
|
||||
acf_include( 'includes/fields.php' );
|
||||
acf_include( 'includes/locations.php' );
|
||||
@@ -305,6 +314,7 @@ if ( ! class_exists( 'ACF' ) ) {
|
||||
acf_include( 'includes/fields/class-acf-field-date_time_picker.php' );
|
||||
acf_include( 'includes/fields/class-acf-field-time_picker.php' );
|
||||
acf_include( 'includes/fields/class-acf-field-color_picker.php' );
|
||||
acf_include( 'includes/fields/class-acf-field-icon_picker.php' );
|
||||
acf_include( 'includes/fields/class-acf-field-message.php' );
|
||||
acf_include( 'includes/fields/class-acf-field-accordion.php' );
|
||||
acf_include( 'includes/fields/class-acf-field-tab.php' );
|
||||
@@ -762,8 +772,14 @@ if ( ! class_exists( 'ACF' ) ) {
|
||||
// If acf_version is set, this isn't the first activated version, so leave it unset so it's legacy.
|
||||
if ( null === get_option( 'acf_version', null ) ) {
|
||||
update_option( 'acf_first_activated_version', ACF_VERSION, true );
|
||||
|
||||
do_action( 'acf/first_activated' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( acf_is_pro() ) {
|
||||
do_action( 'acf/activated_pro' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,10 +89,16 @@
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
#acf-field-group-fields .li-field-type .field-type-label {
|
||||
display: flex;
|
||||
}
|
||||
#acf-field-group-fields .li-field-type .acf-pro-label-field-type {
|
||||
margin-left: 5px;
|
||||
display: inline;
|
||||
padding: 4px 8px;
|
||||
position: relative;
|
||||
top: -3px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
#acf-field-group-fields .li-field-type .acf-pro-label-field-type img {
|
||||
max-width: 34px;
|
||||
}
|
||||
#acf-field-group-fields .li-field-order {
|
||||
width: 64px;
|
||||
@@ -690,7 +696,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .p3 {
|
||||
font-size: 13.5px;
|
||||
}
|
||||
.acf-admin-page .p4, .acf-admin-page .acf-field-list .acf-sortable-handle, .acf-field-list .acf-admin-page .acf-sortable-handle, .acf-admin-page .post-type-acf-field-group .acf-field-object .handle li.li-field-label a.edit-field, .post-type-acf-field-group .acf-field-object .handle li.li-field-label .acf-admin-page a.edit-field, .acf-admin-page .post-type-acf-field-group .acf-field-object .handle li, .post-type-acf-field-group .acf-field-object .handle .acf-admin-page li, .acf-admin-page .post-type-acf-field-group .acf-thead li, .post-type-acf-field-group .acf-thead .acf-admin-page li, .acf-admin-page .acf-input .select2-container.-acf .select2-selection__rendered, .acf-admin-page .button, .acf-admin-page input[type=text],
|
||||
.acf-admin-page .p4, .acf-admin-page .acf-field-list .acf-sortable-handle, .acf-field-list .acf-admin-page .acf-sortable-handle, .acf-admin-page .post-type-acf-field-group .acf-field-object .handle li.li-field-label a.edit-field, .post-type-acf-field-group .acf-field-object .handle li.li-field-label .acf-admin-page a.edit-field, .acf-admin-page .post-type-acf-field-group .acf-field-object .handle li, .post-type-acf-field-group .acf-field-object .handle .acf-admin-page li, .acf-admin-page .post-type-acf-field-group .acf-thead li, .post-type-acf-field-group .acf-thead .acf-admin-page li, .acf-admin-page .acf-input .select2-container.-acf .select2-selection__rendered,
|
||||
.acf-admin-page .rule-groups .select2-container.-acf .select2-selection__rendered, .acf-admin-page .button, .acf-admin-page input[type=text],
|
||||
.acf-admin-page input[type=search],
|
||||
.acf-admin-page input[type=number],
|
||||
.acf-admin-page textarea,
|
||||
@@ -861,6 +868,7 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
border-color: #D0D5DD;
|
||||
box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.1);
|
||||
border-radius: 6px;
|
||||
/* stylelint-disable-next-line scss/at-extend-no-missing-placeholder */
|
||||
color: #344054;
|
||||
}
|
||||
.acf-admin-page input[type=text]:focus,
|
||||
@@ -1117,11 +1125,13 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .edit-field-group-header {
|
||||
display: block !important;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-container.-acf .select2-selection {
|
||||
.acf-admin-page .acf-input .select2-container.-acf .select2-selection,
|
||||
.acf-admin-page .rule-groups .select2-container.-acf .select2-selection {
|
||||
border: none;
|
||||
line-height: 1;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-container.-acf .select2-selection__rendered {
|
||||
.acf-admin-page .acf-input .select2-container.-acf .select2-selection__rendered,
|
||||
.acf-admin-page .rule-groups .select2-container.-acf .select2-selection__rendered {
|
||||
box-sizing: border-box;
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
@@ -1131,39 +1141,67 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
border-color: #D0D5DD;
|
||||
box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.1);
|
||||
border-radius: 6px;
|
||||
/* stylelint-disable-next-line scss/at-extend-no-missing-placeholder */
|
||||
color: #344054;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-container--focus {
|
||||
.acf-admin-page .acf-input .acf-conditional-select-name,
|
||||
.acf-admin-page .rule-groups .acf-conditional-select-name {
|
||||
min-width: 180px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.acf-admin-page .acf-input .acf-conditional-select-id,
|
||||
.acf-admin-page .rule-groups .acf-conditional-select-id {
|
||||
padding-right: 30px;
|
||||
}
|
||||
.acf-admin-page .acf-input .value .select2-container--focus,
|
||||
.acf-admin-page .rule-groups .value .select2-container--focus {
|
||||
height: 40px;
|
||||
}
|
||||
.acf-admin-page .acf-input .value .select2-container--open .select2-selection__rendered,
|
||||
.acf-admin-page .rule-groups .value .select2-container--open .select2-selection__rendered {
|
||||
border-color: #399CCB;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-container--focus,
|
||||
.acf-admin-page .rule-groups .select2-container--focus {
|
||||
outline: 3px solid #EBF5FA;
|
||||
border-color: #399CCB;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-container--focus .select2-selection__rendered {
|
||||
.acf-admin-page .acf-input .select2-container--focus .select2-selection__rendered,
|
||||
.acf-admin-page .rule-groups .select2-container--focus .select2-selection__rendered {
|
||||
border-color: #399CCB !important;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-container--focus.select2-container--below.select2-container--open .select2-selection__rendered {
|
||||
.acf-admin-page .acf-input .select2-container--focus.select2-container--below.select2-container--open .select2-selection__rendered,
|
||||
.acf-admin-page .rule-groups .select2-container--focus.select2-container--below.select2-container--open .select2-selection__rendered {
|
||||
border-bottom-right-radius: 0 !important;
|
||||
border-bottom-left-radius: 0 !important;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-container--focus.select2-container--above.select2-container--open .select2-selection__rendered {
|
||||
.acf-admin-page .acf-input .select2-container--focus.select2-container--above.select2-container--open .select2-selection__rendered,
|
||||
.acf-admin-page .rule-groups .select2-container--focus.select2-container--above.select2-container--open .select2-selection__rendered {
|
||||
border-top-right-radius: 0 !important;
|
||||
border-top-left-radius: 0 !important;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-container .select2-search--inline .select2-search__field {
|
||||
.acf-admin-page .acf-input .select2-container .select2-search--inline .select2-search__field,
|
||||
.acf-admin-page .rule-groups .select2-container .select2-search--inline .select2-search__field {
|
||||
margin: 0;
|
||||
padding-left: 6px;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-container .select2-search--inline .select2-search__field:focus {
|
||||
.acf-admin-page .acf-input .select2-container .select2-search--inline .select2-search__field:focus,
|
||||
.acf-admin-page .rule-groups .select2-container .select2-search--inline .select2-search__field:focus {
|
||||
outline: none;
|
||||
border: none;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
.acf-admin-page .acf-input .select2-container--default .select2-selection--multiple .select2-selection__rendered,
|
||||
.acf-admin-page .rule-groups .select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
padding-top: 0;
|
||||
padding-right: 6px;
|
||||
padding-bottom: 0;
|
||||
padding-left: 6px;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-selection__clear {
|
||||
.acf-admin-page .acf-input .select2-selection__clear,
|
||||
.acf-admin-page .rule-groups .select2-selection__clear {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-top: 12px;
|
||||
@@ -1173,7 +1211,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
overflow: hidden;
|
||||
color: #fff;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-selection__clear:before {
|
||||
.acf-admin-page .acf-input .select2-selection__clear:before,
|
||||
.acf-admin-page .rule-groups .select2-selection__clear:before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 16px;
|
||||
@@ -1192,7 +1231,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
mask-image: url("../../images/icons/icon-close.svg");
|
||||
background-color: #98A2B3;
|
||||
}
|
||||
.acf-admin-page .acf-input .select2-selection__clear:hover::before {
|
||||
.acf-admin-page .acf-input .select2-selection__clear:hover::before,
|
||||
.acf-admin-page .rule-groups .select2-selection__clear:hover::before {
|
||||
background-color: #0783BE;
|
||||
}
|
||||
.acf-admin-page .acf-label {
|
||||
@@ -1236,7 +1276,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .select2-container.-acf,
|
||||
.acf-admin-page .acf-field-delete-terms .select2-container.-acf,
|
||||
.acf-admin-page .acf-field-assign-terms .select2-container.-acf,
|
||||
.acf-admin-page .acf-field-meta-box .select2-container.-acf {
|
||||
.acf-admin-page .acf-field-meta-box .select2-container.-acf,
|
||||
.acf-admin-page .rule-groups .select2-container.-acf {
|
||||
min-height: 40px;
|
||||
}
|
||||
.acf-admin-page .acf-field-setting-type .select2-container--default .select2-selection--single .select2-selection__rendered,
|
||||
@@ -1249,7 +1290,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .select2-container--default .select2-selection--single .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-delete-terms .select2-container--default .select2-selection--single .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-assign-terms .select2-container--default .select2-selection--single .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--default .select2-selection--single .select2-selection__rendered,
|
||||
.acf-admin-page .rule-groups .select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
@@ -1270,7 +1312,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .select2-container--default .select2-selection--single .field-type-icon,
|
||||
.acf-admin-page .acf-field-delete-terms .select2-container--default .select2-selection--single .field-type-icon,
|
||||
.acf-admin-page .acf-field-assign-terms .select2-container--default .select2-selection--single .field-type-icon,
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--default .select2-selection--single .field-type-icon {
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--default .select2-selection--single .field-type-icon,
|
||||
.acf-admin-page .rule-groups .select2-container--default .select2-selection--single .field-type-icon {
|
||||
top: auto;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
@@ -1286,7 +1329,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .select2-container--default .select2-selection--single .field-type-icon:before,
|
||||
.acf-admin-page .acf-field-delete-terms .select2-container--default .select2-selection--single .field-type-icon:before,
|
||||
.acf-admin-page .acf-field-assign-terms .select2-container--default .select2-selection--single .field-type-icon:before,
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--default .select2-selection--single .field-type-icon:before {
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--default .select2-selection--single .field-type-icon:before,
|
||||
.acf-admin-page .rule-groups .select2-container--default .select2-selection--single .field-type-icon:before {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
}
|
||||
@@ -1300,7 +1344,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .select2-container--open .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-delete-terms .select2-container--open .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-assign-terms .select2-container--open .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--open .select2-selection__rendered {
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--open .select2-selection__rendered,
|
||||
.acf-admin-page .rule-groups .select2-container--open .select2-selection__rendered {
|
||||
border-color: #6BB5D8 !important;
|
||||
border-bottom-color: #D0D5DD !important;
|
||||
}
|
||||
@@ -1314,7 +1359,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .select2-container--open.select2-container--below .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-delete-terms .select2-container--open.select2-container--below .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-assign-terms .select2-container--open.select2-container--below .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--open.select2-container--below .select2-selection__rendered {
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--open.select2-container--below .select2-selection__rendered,
|
||||
.acf-admin-page .rule-groups .select2-container--open.select2-container--below .select2-selection__rendered {
|
||||
border-bottom-right-radius: 0 !important;
|
||||
border-bottom-left-radius: 0 !important;
|
||||
}
|
||||
@@ -1328,7 +1374,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .select2-container--open.select2-container--above .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-delete-terms .select2-container--open.select2-container--above .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-assign-terms .select2-container--open.select2-container--above .select2-selection__rendered,
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--open.select2-container--above .select2-selection__rendered {
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--open.select2-container--above .select2-selection__rendered,
|
||||
.acf-admin-page .rule-groups .select2-container--open.select2-container--above .select2-selection__rendered {
|
||||
border-top-right-radius: 0 !important;
|
||||
border-top-left-radius: 0 !important;
|
||||
border-bottom-color: #6BB5D8 !important;
|
||||
@@ -1344,10 +1391,11 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .acf-selection.has-icon,
|
||||
.acf-admin-page .acf-field-delete-terms .acf-selection.has-icon,
|
||||
.acf-admin-page .acf-field-assign-terms .acf-selection.has-icon,
|
||||
.acf-admin-page .acf-field-meta-box .acf-selection.has-icon {
|
||||
.acf-admin-page .acf-field-meta-box .acf-selection.has-icon,
|
||||
.acf-admin-page .rule-groups .acf-selection.has-icon {
|
||||
margin-left: 6px;
|
||||
}
|
||||
.rtl.acf-admin-page .acf-field-setting-type .acf-selection.has-icon, .acf-admin-page .acf-field-permalink-rewrite .acf-selection.has-icon, .acf-admin-page .acf-field-query-var .acf-selection.has-icon, .acf-admin-page .acf-field-capability .acf-selection.has-icon, .acf-admin-page .acf-field-parent-slug .acf-selection.has-icon, .acf-admin-page .acf-field-data-storage .acf-selection.has-icon, .acf-admin-page .acf-field-manage-terms .acf-selection.has-icon, .acf-admin-page .acf-field-edit-terms .acf-selection.has-icon, .acf-admin-page .acf-field-delete-terms .acf-selection.has-icon, .acf-admin-page .acf-field-assign-terms .acf-selection.has-icon, .acf-admin-page .acf-field-meta-box .acf-selection.has-icon {
|
||||
.rtl.acf-admin-page .acf-field-setting-type .acf-selection.has-icon, .acf-admin-page .acf-field-permalink-rewrite .acf-selection.has-icon, .acf-admin-page .acf-field-query-var .acf-selection.has-icon, .acf-admin-page .acf-field-capability .acf-selection.has-icon, .acf-admin-page .acf-field-parent-slug .acf-selection.has-icon, .acf-admin-page .acf-field-data-storage .acf-selection.has-icon, .acf-admin-page .acf-field-manage-terms .acf-selection.has-icon, .acf-admin-page .acf-field-edit-terms .acf-selection.has-icon, .acf-admin-page .acf-field-delete-terms .acf-selection.has-icon, .acf-admin-page .acf-field-assign-terms .acf-selection.has-icon, .acf-admin-page .acf-field-meta-box .acf-selection.has-icon, .acf-admin-page .rule-groups .acf-selection.has-icon {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
@@ -1361,7 +1409,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .select2-selection__arrow,
|
||||
.acf-admin-page .acf-field-delete-terms .select2-selection__arrow,
|
||||
.acf-admin-page .acf-field-assign-terms .select2-selection__arrow,
|
||||
.acf-admin-page .acf-field-meta-box .select2-selection__arrow {
|
||||
.acf-admin-page .acf-field-meta-box .select2-selection__arrow,
|
||||
.acf-admin-page .rule-groups .select2-selection__arrow {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
top: calc(50% - 10px);
|
||||
@@ -1378,7 +1427,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .select2-selection__arrow:after,
|
||||
.acf-admin-page .acf-field-delete-terms .select2-selection__arrow:after,
|
||||
.acf-admin-page .acf-field-assign-terms .select2-selection__arrow:after,
|
||||
.acf-admin-page .acf-field-meta-box .select2-selection__arrow:after {
|
||||
.acf-admin-page .acf-field-meta-box .select2-selection__arrow:after,
|
||||
.acf-admin-page .rule-groups .select2-selection__arrow:after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
@@ -1412,7 +1462,8 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .select2-selection__arrow b[role=presentation],
|
||||
.acf-admin-page .acf-field-delete-terms .select2-selection__arrow b[role=presentation],
|
||||
.acf-admin-page .acf-field-assign-terms .select2-selection__arrow b[role=presentation],
|
||||
.acf-admin-page .acf-field-meta-box .select2-selection__arrow b[role=presentation] {
|
||||
.acf-admin-page .acf-field-meta-box .select2-selection__arrow b[role=presentation],
|
||||
.acf-admin-page .rule-groups .select2-selection__arrow b[role=presentation] {
|
||||
display: none;
|
||||
}
|
||||
.acf-admin-page .acf-field-setting-type .select2-container--open .select2-selection__arrow:after,
|
||||
@@ -1425,10 +1476,22 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.acf-admin-page .acf-field-edit-terms .select2-container--open .select2-selection__arrow:after,
|
||||
.acf-admin-page .acf-field-delete-terms .select2-container--open .select2-selection__arrow:after,
|
||||
.acf-admin-page .acf-field-assign-terms .select2-container--open .select2-selection__arrow:after,
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--open .select2-selection__arrow:after {
|
||||
.acf-admin-page .acf-field-meta-box .select2-container--open .select2-selection__arrow:after,
|
||||
.acf-admin-page .rule-groups .select2-container--open .select2-selection__arrow:after {
|
||||
-webkit-mask-image: url("../../images/icons/icon-chevron-up.svg");
|
||||
mask-image: url("../../images/icons/icon-chevron-up.svg");
|
||||
}
|
||||
.acf-admin-page .acf-term-search-term-name {
|
||||
background-color: #F9FAFB;
|
||||
border-top: 1px solid #EAECF0;
|
||||
border-bottom: 1px solid #EAECF0;
|
||||
color: #98A2B3;
|
||||
padding: 5px 5px 5px 10px;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
display: block;
|
||||
font-weight: 300;
|
||||
}
|
||||
.acf-admin-page .field-type-select-results {
|
||||
position: relative;
|
||||
top: 4px;
|
||||
@@ -2375,6 +2438,29 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
}
|
||||
}
|
||||
|
||||
.acf-taxonomy-select-id,
|
||||
.acf-relationship-select-id,
|
||||
.acf-post_object-select-id,
|
||||
.acf-page_link-select-id {
|
||||
color: #98A2B3;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.acf-taxonomy-select-sub-item {
|
||||
max-width: 180px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.acf-taxonomy-select-name {
|
||||
max-width: 180px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
*
|
||||
* Prefix & append styling
|
||||
@@ -2969,7 +3055,6 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.post-type-acf-field-group .acf-field-setting-fc_layout {
|
||||
overflow: hidden;
|
||||
width: calc(100% - 144px);
|
||||
margin-right: 72px;
|
||||
margin-left: 72px;
|
||||
@@ -3019,7 +3104,7 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
align-items: center;
|
||||
justify-content: left;
|
||||
background-color: #F9FAFB;
|
||||
border-radius: 8px 8px 0px 0px;
|
||||
border-radius: 8px;
|
||||
min-height: 64px;
|
||||
margin-bottom: 0px;
|
||||
padding-right: 24px;
|
||||
@@ -3110,6 +3195,9 @@ html[dir=rtl] .acf-field-object.open > .handle {
|
||||
.post-type-acf-field-group .acf-field-settings-fc_head .acf-fl-actions li:last-of-type {
|
||||
margin-right: 0;
|
||||
}
|
||||
.post-type-acf-field-group .acf-field-settings-fc_head.open {
|
||||
border-radius: 8px 8px 0px 0px;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
*
|
||||
|
||||
@@ -1153,7 +1153,10 @@ html[dir=rtl] .acf-button-group label:last-child {
|
||||
*
|
||||
*-----------------------------------------------------------------------------*/
|
||||
.acf-switch {
|
||||
display: inline-block;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
@@ -1184,6 +1187,10 @@ html[dir=rtl] .acf-button-group label:last-child {
|
||||
.acf-switch .acf-switch-on {
|
||||
color: #fff;
|
||||
text-shadow: #007cba 0 1px 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.acf-switch .acf-switch-off {
|
||||
overflow: hidden;
|
||||
}
|
||||
.acf-switch .acf-switch-slider {
|
||||
position: absolute;
|
||||
@@ -2437,8 +2444,8 @@ tr.acf-accordion + tr.acf-accordion {
|
||||
.block-editor .edit-post-sidebar .acf-fields > .acf-field {
|
||||
border-width: 0;
|
||||
border-color: #e2e4e7;
|
||||
margin: 16px;
|
||||
padding: 0;
|
||||
margin: 0px;
|
||||
padding: 10px 16px;
|
||||
width: auto !important;
|
||||
min-height: 0 !important;
|
||||
float: none !important;
|
||||
@@ -2471,6 +2478,27 @@ tr.acf-accordion + tr.acf-accordion {
|
||||
.block-editor .edit-post-sidebar .acf-fields > .acf-field.acf-accordion .acf-accordion-content > .acf-fields {
|
||||
border-top-width: 0;
|
||||
}
|
||||
.block-editor .edit-post-sidebar .block-editor-block-inspector .acf-fields > .acf-notice {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 25px;
|
||||
padding: 10px;
|
||||
margin: 0;
|
||||
}
|
||||
.block-editor .edit-post-sidebar .block-editor-block-inspector .acf-fields > .acf-notice p:last-of-type {
|
||||
margin: 0;
|
||||
}
|
||||
.block-editor .edit-post-sidebar .block-editor-block-inspector .acf-fields > .acf-notice > .acf-notice-dismiss {
|
||||
position: relative;
|
||||
top: unset;
|
||||
right: unset;
|
||||
}
|
||||
.block-editor .edit-post-sidebar .block-editor-block-inspector .acf-fields .acf-field .acf-notice {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.block-editor .edit-post-sidebar .block-editor-block-inspector .acf-fields .acf-error {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
*
|
||||
|
||||
@@ -697,6 +697,10 @@ html[dir=rtl] .acf-gallery .acf-gallery-side-data th.label {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.block-editor .acf-field.acf-error {
|
||||
background-color: rgba(255, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.acf-block-component .acf-block-fields {
|
||||
background: #fff;
|
||||
text-align: left;
|
||||
@@ -722,40 +726,149 @@ html[dir=rtl] .acf-block-component .acf-block-fields {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.acf-block-body .acf-block-fields {
|
||||
.acf-block-body .acf-block-fields:has(> .acf-error-message),
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-block-fields:has(> .acf-error-message) {
|
||||
border: none !important;
|
||||
}
|
||||
.acf-block-body .acf-error-message,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-error-message {
|
||||
margin-top: 0;
|
||||
border: none;
|
||||
}
|
||||
.acf-block-body .acf-error-message .acf-notice-dismiss,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-error-message .acf-notice-dismiss {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
outline: unset;
|
||||
}
|
||||
.acf-block-body .acf-error-message .acf-icon.-cancel::before,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-error-message .acf-icon.-cancel::before {
|
||||
margin: 0 !important;
|
||||
}
|
||||
.acf-block-body.acf-block-has-validation-error,
|
||||
.acf-block-fields:has(> .acf-error-message).acf-block-has-validation-error {
|
||||
border: 2px solid #d94f4f;
|
||||
}
|
||||
.acf-block-body .acf-error .acf-input .acf-notice,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-error .acf-input .acf-notice {
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
padding-left: 0;
|
||||
}
|
||||
.acf-block-body .acf-error .acf-input .acf-notice p,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-error .acf-input .acf-notice p {
|
||||
margin: 0.5em 0 !important;
|
||||
}
|
||||
.acf-block-body .acf-error .acf-input .acf-notice::before,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-error .acf-input .acf-notice::before {
|
||||
content: "";
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
font-size: 20px;
|
||||
background-image: url(../../../images/icons/icon-info-red.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 69%;
|
||||
height: 26px !important;
|
||||
width: 26px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.acf-block-body .acf-error .acf-label label,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-error .acf-label label {
|
||||
color: #d94f4f;
|
||||
}
|
||||
.acf-block-body .acf-error .acf-input input,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-error .acf-input input {
|
||||
border-color: #d94f4f;
|
||||
}
|
||||
.acf-block-body.acf-block-has-validation-error::before,
|
||||
.acf-block-fields:has(> .acf-error-message).acf-block-has-validation-error::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
left: -32px;
|
||||
font-size: 20px;
|
||||
background-color: #d94f4f;
|
||||
background-image: url(../../../images/icons/icon-info-white.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position-x: center;
|
||||
background-position-y: 52%;
|
||||
background-size: 55%;
|
||||
height: 40px;
|
||||
width: 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.acf-block-body .acf-block-validation-error,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-block-validation-error {
|
||||
color: #d94f4f;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.acf-block-body .acf-block-fields,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-block-fields {
|
||||
border: #adb2ad solid 1px;
|
||||
}
|
||||
.acf-block-body .acf-block-fields .acf-tab-wrap .acf-tab-group {
|
||||
.acf-block-body .acf-block-fields .acf-tab-wrap .acf-tab-group,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-block-fields .acf-tab-wrap .acf-tab-group {
|
||||
margin-left: 0;
|
||||
padding: 16px 20px 0;
|
||||
}
|
||||
.acf-block-body .acf-fields > .acf-field {
|
||||
.acf-block-body .acf-fields > .acf-field,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-fields > .acf-field {
|
||||
padding: 16px 20px;
|
||||
}
|
||||
.acf-block-body .acf-fields > .acf-field.acf-accordion {
|
||||
.acf-block-body .acf-fields > .acf-field.acf-accordion,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-fields > .acf-field.acf-accordion {
|
||||
border-color: #adb2ad;
|
||||
}
|
||||
.acf-block-body .acf-fields > .acf-field.acf-accordion .acf-accordion-title {
|
||||
.acf-block-body .acf-fields > .acf-field.acf-accordion .acf-accordion-title,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-fields > .acf-field.acf-accordion .acf-accordion-title {
|
||||
padding: 16px 20px;
|
||||
}
|
||||
.acf-block-body .acf-button, .acf-block-body .acf-link a.button, .acf-block-body .acf-add-checkbox {
|
||||
.acf-block-body .acf-button,
|
||||
.acf-block-body .acf-link a.button,
|
||||
.acf-block-body .acf-add-checkbox,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-button,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-link a.button,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-add-checkbox {
|
||||
color: #2271b1 !important;
|
||||
border-color: #2271b1 !important;
|
||||
background: #f6f7f7 !important;
|
||||
vertical-align: top;
|
||||
}
|
||||
.acf-block-body .acf-button.button-primary:hover, .acf-block-body .acf-link a.button.button-primary:hover, .acf-block-body .acf-add-checkbox.button-primary:hover {
|
||||
.acf-block-body .acf-button.button-primary:hover,
|
||||
.acf-block-body .acf-link a.button.button-primary:hover,
|
||||
.acf-block-body .acf-add-checkbox.button-primary:hover,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-button.button-primary:hover,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-link a.button.button-primary:hover,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-add-checkbox.button-primary:hover {
|
||||
color: white !important;
|
||||
background: #2271b1 !important;
|
||||
}
|
||||
.acf-block-body .acf-button:focus, .acf-block-body .acf-link a.button:focus, .acf-block-body .acf-add-checkbox:focus {
|
||||
.acf-block-body .acf-button:focus,
|
||||
.acf-block-body .acf-link a.button:focus,
|
||||
.acf-block-body .acf-add-checkbox:focus,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-button:focus,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-link a.button:focus,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-add-checkbox:focus {
|
||||
outline: none !important;
|
||||
background: #f6f7f7 !important;
|
||||
}
|
||||
.acf-block-body .acf-button:hover, .acf-block-body .acf-link a.button:hover, .acf-block-body .acf-add-checkbox:hover {
|
||||
.acf-block-body .acf-button:hover,
|
||||
.acf-block-body .acf-link a.button:hover,
|
||||
.acf-block-body .acf-add-checkbox:hover,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-button:hover,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-link a.button:hover,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-add-checkbox:hover {
|
||||
color: #0a4b78 !important;
|
||||
}
|
||||
.acf-block-body .acf-block-preview {
|
||||
.acf-block-body .acf-block-preview,
|
||||
.acf-block-fields:has(> .acf-error-message) .acf-block-preview {
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,24 +3,9 @@ var __webpack_exports__ = {};
|
||||
/*!*********************************************************************************!*\
|
||||
!*** ./src/advanced-custom-fields-pro/assets/src/js/acf-escaped-html-notice.js ***!
|
||||
\*********************************************************************************/
|
||||
(function ($, undefined) {
|
||||
/* global, acf_escaped_html_notice */
|
||||
(function ($) {
|
||||
const $notice = $('.acf-escaped-html-notice');
|
||||
$notice.on('click', '.notice-dismiss', function (e) {
|
||||
const $target = $(e.target).closest('.acf-escaped-html-notice');
|
||||
let to_dismiss = 'escaped_html';
|
||||
if ($target.hasClass('acf-will-escape')) {
|
||||
to_dismiss = 'to_be_escaped';
|
||||
}
|
||||
$.ajax({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
'action': 'acf/dismiss_escaped_html_notice',
|
||||
'nonce': acf_escaped_html_notice.nonce,
|
||||
'notice': to_dismiss
|
||||
},
|
||||
type: 'post'
|
||||
});
|
||||
});
|
||||
$notice.on('click', '.acf-show-more-details', function (e) {
|
||||
e.preventDefault();
|
||||
const $link = $(e.target);
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"acf-escaped-html-notice.js","mappings":";;;;;AAAA,CAAE,UAAWA,CAAC,EAAEC,SAAS,EAAG;EAE3B,MAAMC,OAAO,GAAGF,CAAC,CAAE,0BAA2B,CAAC;EAE/CE,OAAO,CAACC,EAAE,CAAE,OAAO,EAAE,iBAAiB,EAAE,UAAUC,CAAC,EAAG;IACrD,MAAMC,OAAO,GAAGL,CAAC,CAAEI,CAAC,CAACE,MAAO,CAAC,CAACC,OAAO,CAAE,0BAA2B,CAAC;IAEnE,IAAIC,UAAU,GAAG,cAAc;IAC/B,IAAKH,OAAO,CAACI,QAAQ,CAAE,iBAAkB,CAAC,EAAG;MAC5CD,UAAU,GAAG,eAAe;IAC7B;IAEAR,CAAC,CAACU,IAAI,CAAE;MACPC,GAAG,EAAEC,OAAO;MACZC,IAAI,EAAE;QACL,QAAQ,EAAE,iCAAiC;QAC3C,OAAO,EAAEC,uBAAuB,CAACC,KAAK;QACtC,QAAQ,EAAEP;MACX,CAAC;MACDQ,IAAI,EAAE;IACP,CAAE,CAAC;EACJ,CAAE,CAAC;EAEHd,OAAO,CAACC,EAAE,CAAE,OAAO,EAAE,wBAAwB,EAAE,UAAUC,CAAC,EAAG;IAC5DA,CAAC,CAACa,cAAc,CAAC,CAAC;IAElB,MAAMC,KAAK,GAAGlB,CAAC,CAAEI,CAAC,CAACE,MAAO,CAAC;IAC3B,MAAMa,QAAQ,GAAGD,KAAK,CAACX,OAAO,CAAE,0BAA2B,CAAC,CAACa,IAAI,CAAE,oBAAqB,CAAC;IAEzF,IAAKD,QAAQ,CAACE,EAAE,CAAE,SAAU,CAAC,EAAG;MAC/BF,QAAQ,CAACG,SAAS,CAAE,GAAI,CAAC;MACzBJ,KAAK,CAACK,IAAI,CAAET,uBAAuB,CAACU,YAAa,CAAC;IACnD,CAAC,MAAM;MACNL,QAAQ,CAACM,OAAO,CAAE,GAAI,CAAC;MACvBP,KAAK,CAACK,IAAI,CAAET,uBAAuB,CAACY,YAAa,CAAC;IACnD;EACD,CAAE,CAAC;AAEJ,CAAC,EAAIC,MAAO,CAAC,C","sources":["webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/acf-escaped-html-notice.js"],"sourcesContent":["( function ( $, undefined ) {\n\n\tconst $notice = $( '.acf-escaped-html-notice' );\n\n\t$notice.on( 'click', '.notice-dismiss', function( e ) {\n\t\tconst $target = $( e.target ).closest( '.acf-escaped-html-notice' );\n\n\t\tlet to_dismiss = 'escaped_html';\n\t\tif ( $target.hasClass( 'acf-will-escape' ) ) {\n\t\t\tto_dismiss = 'to_be_escaped';\n\t\t}\n\n\t\t$.ajax( {\n\t\t\turl: ajaxurl,\n\t\t\tdata: {\n\t\t\t\t'action': 'acf/dismiss_escaped_html_notice',\n\t\t\t\t'nonce': acf_escaped_html_notice.nonce,\n\t\t\t\t'notice': to_dismiss,\n\t\t\t},\n\t\t\ttype: 'post'\n\t\t} );\n\t} );\n\n\t$notice.on( 'click', '.acf-show-more-details', function( e ) {\n\t\te.preventDefault();\n\n\t\tconst $link = $( e.target );\n\t\tconst $details = $link.closest( '.acf-escaped-html-notice' ).find( '.acf-error-details' );\n\n\t\tif ( $details.is( ':hidden' ) ) {\n\t\t\t$details.slideDown( 100 );\n\t\t\t$link.text( acf_escaped_html_notice.hide_details );\n\t\t} else {\n\t\t\t$details.slideUp( 100 );\n\t\t\t$link.text( acf_escaped_html_notice.show_details );\n\t\t}\n\t} );\n\n} )( jQuery );\n"],"names":["$","undefined","$notice","on","e","$target","target","closest","to_dismiss","hasClass","ajax","url","ajaxurl","data","acf_escaped_html_notice","nonce","type","preventDefault","$link","$details","find","is","slideDown","text","hide_details","slideUp","show_details","jQuery"],"sourceRoot":""}
|
||||
{"version":3,"file":"acf-escaped-html-notice.js","mappings":";;;;;AAAA;AACA,CAAE,UAAWA,CAAC,EAAG;EAChB,MAAMC,OAAO,GAAGD,CAAC,CAAE,0BAA2B,CAAC;EAE/CC,OAAO,CAACC,EAAE,CAAE,OAAO,EAAE,wBAAwB,EAAE,UAAWC,CAAC,EAAG;IAC7DA,CAAC,CAACC,cAAc,CAAC,CAAC;IAElB,MAAMC,KAAK,GAAGL,CAAC,CAAEG,CAAC,CAACG,MAAO,CAAC;IAC3B,MAAMC,QAAQ,GAAGF,KAAK,CACpBG,OAAO,CAAE,0BAA2B,CAAC,CACrCC,IAAI,CAAE,oBAAqB,CAAC;IAE9B,IAAKF,QAAQ,CAACG,EAAE,CAAE,SAAU,CAAC,EAAG;MAC/BH,QAAQ,CAACI,SAAS,CAAE,GAAI,CAAC;MACzBN,KAAK,CAACO,IAAI,CAAEC,uBAAuB,CAACC,YAAa,CAAC;IACnD,CAAC,MAAM;MACNP,QAAQ,CAACQ,OAAO,CAAE,GAAI,CAAC;MACvBV,KAAK,CAACO,IAAI,CAAEC,uBAAuB,CAACG,YAAa,CAAC;IACnD;EACD,CAAE,CAAC;AACJ,CAAC,EAAIC,MAAO,CAAC,C","sources":["webpack://advanced-custom-fields-pro/./src/advanced-custom-fields-pro/assets/src/js/acf-escaped-html-notice.js"],"sourcesContent":["/* global, acf_escaped_html_notice */\n( function ( $ ) {\n\tconst $notice = $( '.acf-escaped-html-notice' );\n\n\t$notice.on( 'click', '.acf-show-more-details', function ( e ) {\n\t\te.preventDefault();\n\n\t\tconst $link = $( e.target );\n\t\tconst $details = $link\n\t\t\t.closest( '.acf-escaped-html-notice' )\n\t\t\t.find( '.acf-error-details' );\n\n\t\tif ( $details.is( ':hidden' ) ) {\n\t\t\t$details.slideDown( 100 );\n\t\t\t$link.text( acf_escaped_html_notice.hide_details );\n\t\t} else {\n\t\t\t$details.slideUp( 100 );\n\t\t\t$link.text( acf_escaped_html_notice.show_details );\n\t\t}\n\t} );\n} )( jQuery );\n"],"names":["$","$notice","on","e","preventDefault","$link","target","$details","closest","find","is","slideDown","text","acf_escaped_html_notice","hide_details","slideUp","show_details","jQuery"],"sourceRoot":""}
|
||||
@@ -1 +1 @@
|
||||
!function(e,t){const c=e(".acf-escaped-html-notice");c.on("click",".notice-dismiss",(function(t){let c="escaped_html";e(t.target).closest(".acf-escaped-html-notice").hasClass("acf-will-escape")&&(c="to_be_escaped"),e.ajax({url:ajaxurl,data:{action:"acf/dismiss_escaped_html_notice",nonce:acf_escaped_html_notice.nonce,notice:c},type:"post"})})),c.on("click",".acf-show-more-details",(function(t){t.preventDefault();const c=e(t.target),a=c.closest(".acf-escaped-html-notice").find(".acf-error-details");a.is(":hidden")?(a.slideDown(100),c.text(acf_escaped_html_notice.hide_details)):(a.slideUp(100),c.text(acf_escaped_html_notice.show_details))}))}(jQuery);
|
||||
(()=>{var e;(e=jQuery)(".acf-escaped-html-notice").on("click",".acf-show-more-details",(function(t){t.preventDefault();const c=e(t.target),a=c.closest(".acf-escaped-html-notice").find(".acf-error-details");a.is(":hidden")?(a.slideDown(100),c.text(acf_escaped_html_notice.hide_details)):(a.slideUp(100),c.text(acf_escaped_html_notice.show_details))}))})();
|
||||
@@ -104,7 +104,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
||||
const iconName = fieldType.name.replaceAll('_', '-');
|
||||
return `
|
||||
<a href="#" class="acf-field-type" data-field-type="${fieldType.name}">
|
||||
${fieldType.pro && !acf.get('is_pro') ? '<span class="field-type-requires-pro"><i class="acf-icon acf-icon-lock"></i>PRO</span>' : fieldType.pro ? '<span class="field-type-requires-pro">PRO</span>' : ''}
|
||||
${fieldType.pro && !acf.get('is_pro') ? '<span class="field-type-requires-pro not-pro"></span>' : fieldType.pro ? '<span class="field-type-requires-pro"></span>' : ''}
|
||||
<i class="field-type-icon field-type-icon-${iconName}"></i>
|
||||
<span class="field-type-label">${fieldType.label}</span>
|
||||
</a>
|
||||
@@ -566,6 +566,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
||||
$tabLabel: function () {
|
||||
return this.fieldObject.$el.find('.conditional-logic-badge');
|
||||
},
|
||||
$conditionalValueSelect: function () {
|
||||
return this.$('.condition-rule-value');
|
||||
},
|
||||
open: function () {
|
||||
var $div = this.$control();
|
||||
$div.show();
|
||||
@@ -705,51 +708,57 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
||||
if (!this.ruleData('field') || !this.ruleData('operator')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// vars
|
||||
var $select = this.$input('value');
|
||||
var $td = this.$td('value');
|
||||
var val = $select.val();
|
||||
var currentVal = $select.val();
|
||||
var savedValue = this.$rule[0].getAttribute('data-value');
|
||||
|
||||
// get selected field
|
||||
var $field = acf.findFieldObject(this.ruleData('field'));
|
||||
var field = acf.getFieldObject($field);
|
||||
|
||||
// get selected field conditions
|
||||
var conditionTypes = acf.getConditionTypes({
|
||||
fieldType: field.getType(),
|
||||
operator: this.ruleData('operator')
|
||||
});
|
||||
|
||||
// html
|
||||
var conditionType = conditionTypes[0].prototype;
|
||||
var choices = conditionType.choices(field);
|
||||
|
||||
// create html: array
|
||||
if (choices instanceof Array) {
|
||||
var $newSelect = $('<select></select>');
|
||||
let $newSelect;
|
||||
if (choices instanceof jQuery && !!choices.data('acfSelect2Props')) {
|
||||
$newSelect = $select.clone();
|
||||
// If converting from a disabled input, we need to convert it to an active select.
|
||||
if ($newSelect.is('input')) {
|
||||
var classes = $select.attr('class');
|
||||
const $rebuiltSelect = $('<select></select>').addClass(classes).val(savedValue);
|
||||
$newSelect = $rebuiltSelect;
|
||||
}
|
||||
acf.addAction('acf_conditional_value_rendered', function () {
|
||||
acf.newSelect2($newSelect, choices.data('acfSelect2Props'));
|
||||
});
|
||||
} else if (choices instanceof Array) {
|
||||
this.$conditionalValueSelect().removeClass('select2-hidden-accessible');
|
||||
$newSelect = $('<select></select>');
|
||||
acf.renderSelect($newSelect, choices);
|
||||
|
||||
// create html: string (<input />)
|
||||
} else {
|
||||
var $newSelect = $(choices);
|
||||
this.$conditionalValueSelect().removeClass('select2-hidden-accessible');
|
||||
$newSelect = $(choices);
|
||||
}
|
||||
|
||||
// append
|
||||
$select.detach();
|
||||
$td.html($newSelect);
|
||||
|
||||
// copy attrs
|
||||
// timeout needed to avoid browser bug where "disabled" attribute is not applied
|
||||
setTimeout(function () {
|
||||
['class', 'name', 'id'].map(function (attr) {
|
||||
$newSelect.attr(attr, $select.attr(attr));
|
||||
});
|
||||
$select.val(savedValue);
|
||||
acf.doAction('acf_conditional_value_rendered');
|
||||
}, 0);
|
||||
|
||||
// select existing value (if not a disabled input)
|
||||
if (!$newSelect.prop('disabled')) {
|
||||
acf.val($newSelect, val, true);
|
||||
acf.val($newSelect, currentVal, true);
|
||||
}
|
||||
|
||||
// set
|
||||
@@ -774,6 +783,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
||||
// remove all tr's except the first one
|
||||
$group2.find('tr').not(':first').remove();
|
||||
|
||||
// Find the remaining tr and render
|
||||
var $tr = $group2.find('tr');
|
||||
this.renderRule($tr);
|
||||
|
||||
// save field
|
||||
this.fieldObject.save();
|
||||
},
|
||||
@@ -1236,7 +1249,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
||||
if ($(e.target).hasClass('acf-input-wrap')) {
|
||||
copyValue = $(e.target).find('input').first().val();
|
||||
} else {
|
||||
copyValue = $(e.target).text();
|
||||
copyValue = $(e.target).text().trim();
|
||||
}
|
||||
navigator.clipboard.writeText(copyValue).then(() => {
|
||||
$(e.target).closest('.copyable').addClass('copied');
|
||||
@@ -2762,6 +2775,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
||||
var _field$data;
|
||||
if ((field === null || field === void 0 || (_field$data = field.data) === null || _field$data === void 0 ? void 0 : _field$data.call(field, 'key')) !== 'bidirectional_target') return args;
|
||||
args.dropdownCssClass = 'field-type-select-results';
|
||||
|
||||
// Check for a full modern version of select2 like the one provided by ACF.
|
||||
try {
|
||||
$.fn.select2.amd.require('select2/compat/dropdownCss');
|
||||
} catch (err) {
|
||||
console.warn('ACF was not able to load the full version of select2 due to a conflicting version provided by another plugin or theme taking precedence. Skipping styling of bidirectional settings.');
|
||||
delete args.dropdownCssClass;
|
||||
}
|
||||
args.templateResult = function (selection) {
|
||||
if ('undefined' !== typeof selection.element) {
|
||||
return selection;
|
||||
|
||||
@@ -1238,6 +1238,7 @@
|
||||
timeout: 0,
|
||||
dismiss: true,
|
||||
target: false,
|
||||
location: 'before',
|
||||
close: function () {}
|
||||
},
|
||||
events: {
|
||||
@@ -1289,8 +1290,13 @@
|
||||
},
|
||||
show: function () {
|
||||
var $target = this.get('target');
|
||||
var location = this.get('location');
|
||||
if ($target) {
|
||||
$target.prepend(this.$el);
|
||||
if (location === 'after') {
|
||||
$target.append(this.$el);
|
||||
} else {
|
||||
$target.prepend(this.$el);
|
||||
}
|
||||
}
|
||||
},
|
||||
hide: function () {
|
||||
@@ -3323,7 +3329,6 @@
|
||||
|
||||
// filter for 3rd party customization
|
||||
data = acf.applyFilters('prepare_for_ajax', data);
|
||||
|
||||
// return
|
||||
return data;
|
||||
};
|
||||
@@ -3869,7 +3874,6 @@
|
||||
itemsHtml += '<option value="' + acf.escAttr(id) + '"' + (item.disabled ? ' disabled="disabled"' : '') + '>' + acf.strEscape(text) + '</option>';
|
||||
}
|
||||
});
|
||||
|
||||
// return
|
||||
return itemsHtml;
|
||||
};
|
||||
@@ -4349,6 +4353,15 @@
|
||||
acf.doAction('refresh');
|
||||
}, 0);
|
||||
|
||||
/**
|
||||
* Log something to console if we're in debug mode.
|
||||
*
|
||||
* @since 6.3
|
||||
*/
|
||||
acf.debug = function () {
|
||||
if (acf.get('debug')) console.log.apply(null, arguments);
|
||||
};
|
||||
|
||||
// Set up actions from events
|
||||
$(document).ready(function () {
|
||||
acf.doAction('ready');
|
||||
|
||||
@@ -40,7 +40,7 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
Component
|
||||
} = React;
|
||||
const {
|
||||
withSelect
|
||||
useSelect
|
||||
} = wp.data;
|
||||
const {
|
||||
createHigherOrderComponent
|
||||
@@ -61,6 +61,15 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
*/
|
||||
const blockTypes = {};
|
||||
|
||||
/**
|
||||
* Data storage for Block Instances and their DynamicHTML components.
|
||||
* This is temporarily stored on the ACF object, but this will be replaced in ACF 6.4.
|
||||
* Developers should not rely on reading or using any aspect of acf.blockInstances.
|
||||
*
|
||||
* @since 6.3
|
||||
*/
|
||||
acf.blockInstances = {};
|
||||
|
||||
/**
|
||||
* Returns a block type for the given name.
|
||||
*
|
||||
@@ -88,6 +97,19 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
return blockType.acf_block_version || 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a block's validate property. Default true.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param string name The block name
|
||||
* @return boolean
|
||||
*/
|
||||
function blockSupportsValidation(name) {
|
||||
const blockType = getBlockType(name);
|
||||
return blockType.validate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if a block (identified by client ID) is nested in a query loop block.
|
||||
*
|
||||
@@ -229,7 +251,7 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
// Remove all empty attribute defaults from PHP values to allow serialisation.
|
||||
// https://github.com/WordPress/gutenberg/issues/7342
|
||||
for (const key in blockType.attributes) {
|
||||
if (blockType.attributes[key].default.length === 0) {
|
||||
if ('default' in blockType.attributes[key] && blockType.attributes[key].default.length === 0) {
|
||||
delete blockType.attributes[key].default;
|
||||
}
|
||||
}
|
||||
@@ -264,7 +286,16 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
}
|
||||
|
||||
// Set edit and save functions.
|
||||
blockType.edit = props => (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(ThisBlockEdit, _objectSpread({}, props));
|
||||
blockType.edit = props => {
|
||||
// Ensure we remove our save lock if a block is removed.
|
||||
wp.element.useEffect(() => {
|
||||
return () => {
|
||||
if (!wp.data.dispatch('core/editor')) return;
|
||||
wp.data.dispatch('core/editor').unlockPostSaving('acf/block/' + props.clientId);
|
||||
};
|
||||
}, []);
|
||||
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(ThisBlockEdit, _objectSpread({}, props));
|
||||
};
|
||||
blockType.save = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(ThisBlockSave, null);
|
||||
|
||||
// Add to storage.
|
||||
@@ -810,48 +841,62 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
/**
|
||||
* The BlockBody functional component.
|
||||
*
|
||||
* @date 19/2/19
|
||||
* @since 5.7.12
|
||||
*/
|
||||
function _BlockBody(props) {
|
||||
function BlockBody(props) {
|
||||
const {
|
||||
attributes,
|
||||
isSelected,
|
||||
name
|
||||
name,
|
||||
clientId
|
||||
} = props;
|
||||
const {
|
||||
mode
|
||||
} = attributes;
|
||||
const index = useSelect(select => {
|
||||
const rootClientId = select('core/block-editor').getBlockRootClientId(clientId);
|
||||
return select('core/block-editor').getBlockIndex(clientId, rootClientId);
|
||||
});
|
||||
let showForm = true;
|
||||
let additionalClasses = 'acf-block-component acf-block-body';
|
||||
if (mode === 'auto' && !isSelected || mode === 'preview') {
|
||||
additionalClasses += ' acf-block-preview';
|
||||
showForm = false;
|
||||
}
|
||||
|
||||
// Setup block cache if required, and update mode.
|
||||
if (!(clientId in acf.blockInstances)) {
|
||||
acf.blockInstances[clientId] = {
|
||||
validation_errors: false,
|
||||
mode: mode
|
||||
};
|
||||
}
|
||||
acf.blockInstances[clientId].mode = mode;
|
||||
if (!isSelected) {
|
||||
if (blockSupportsValidation(name) && acf.blockInstances[clientId].validation_errors) {
|
||||
additionalClasses += ' acf-block-has-validation-error';
|
||||
}
|
||||
acf.blockInstances[clientId].has_been_deselected = true;
|
||||
}
|
||||
if (getBlockVersion(name) > 1) {
|
||||
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", _objectSpread({}, useBlockProps({
|
||||
className: additionalClasses
|
||||
})), showForm ? (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, _objectSpread({}, props)) : (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockPreview, _objectSpread({}, props)));
|
||||
})), showForm ? (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, _objectSpread(_objectSpread({}, props), {}, {
|
||||
index: index
|
||||
})) : (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockPreview, _objectSpread(_objectSpread({}, props), {}, {
|
||||
index: index
|
||||
})));
|
||||
} else {
|
||||
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", _objectSpread({}, useBlockProps()), (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
|
||||
className: "acf-block-component acf-block-body"
|
||||
}, showForm ? (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, _objectSpread({}, props)) : (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockPreview, _objectSpread({}, props))));
|
||||
}, showForm ? (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, _objectSpread(_objectSpread({}, props), {}, {
|
||||
index: index
|
||||
})) : (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockPreview, _objectSpread(_objectSpread({}, props), {}, {
|
||||
index: index
|
||||
}))));
|
||||
}
|
||||
}
|
||||
|
||||
// Append blockIndex to component props.
|
||||
const BlockBody = withSelect((select, ownProps) => {
|
||||
const {
|
||||
clientId
|
||||
} = ownProps;
|
||||
// Use optional rootClientId to allow discoverability of child blocks.
|
||||
const rootClientId = select('core/block-editor').getBlockRootClientId(clientId);
|
||||
const index = select('core/block-editor').getBlockIndex(clientId, rootClientId);
|
||||
return {
|
||||
index
|
||||
};
|
||||
})(_BlockBody);
|
||||
|
||||
/**
|
||||
* A react component to append HTMl.
|
||||
*
|
||||
@@ -900,9 +945,6 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
}
|
||||
}
|
||||
|
||||
// Data storage for DynamicHTML components.
|
||||
const store = {};
|
||||
|
||||
/**
|
||||
* DynamicHTML Class.
|
||||
*
|
||||
@@ -926,42 +968,72 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
this.el = false;
|
||||
this.subscribed = true;
|
||||
this.renderMethod = 'jQuery';
|
||||
this.passedValidation = false;
|
||||
this.setup(props);
|
||||
|
||||
// Load state.
|
||||
this.loadState();
|
||||
}
|
||||
setup(props) {
|
||||
// Do nothing.
|
||||
const constructor = this.constructor.name;
|
||||
const clientId = props.clientId;
|
||||
if (!(clientId in acf.blockInstances)) {
|
||||
acf.blockInstances[clientId] = {
|
||||
validation_errors: false,
|
||||
mode: props.mode
|
||||
};
|
||||
}
|
||||
if (!(constructor in acf.blockInstances[clientId])) {
|
||||
acf.blockInstances[clientId][constructor] = {};
|
||||
}
|
||||
}
|
||||
fetch() {
|
||||
// Do nothing.
|
||||
}
|
||||
maybePreload(blockId, clientId, form) {
|
||||
if (this.state.html === undefined && !isBlockInQueryLoop(this.props.clientId)) {
|
||||
acf.debug('Preload check', blockId, clientId, form);
|
||||
if (!isBlockInQueryLoop(this.props.clientId)) {
|
||||
const preloadedBlocks = acf.get('preloadedBlocks');
|
||||
const modeText = form ? 'form' : 'preview';
|
||||
if (preloadedBlocks && preloadedBlocks[blockId]) {
|
||||
// Ensure we only preload the correct block state (form or preview).
|
||||
if (form && !preloadedBlocks[blockId].form || !form && preloadedBlocks[blockId].form) return false;
|
||||
if (form && !preloadedBlocks[blockId].form || !form && preloadedBlocks[blockId].form) {
|
||||
acf.debug('Preload failed: state not preloaded.');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set HTML to the preloaded version.
|
||||
return preloadedBlocks[blockId].html.replaceAll(blockId, clientId);
|
||||
preloadedBlocks[blockId].html = preloadedBlocks[blockId].html.replaceAll(blockId, clientId);
|
||||
|
||||
// Replace blockId in errors.
|
||||
if (preloadedBlocks[blockId].validation && preloadedBlocks[blockId].validation.errors) {
|
||||
preloadedBlocks[blockId].validation.errors = preloadedBlocks[blockId].validation.errors.map(error => {
|
||||
error.input = error.input.replaceAll(blockId, clientId);
|
||||
return error;
|
||||
});
|
||||
}
|
||||
|
||||
// Return preloaded object.
|
||||
acf.debug('Preload successful', preloadedBlocks[blockId]);
|
||||
return preloadedBlocks[blockId];
|
||||
}
|
||||
}
|
||||
acf.debug('Preload failed: not preloaded.');
|
||||
return false;
|
||||
}
|
||||
loadState() {
|
||||
this.state = store[this.id] || {};
|
||||
const client = acf.blockInstances[this.props.clientId] || {};
|
||||
this.state = client[this.constructor.name] || {};
|
||||
}
|
||||
setState(state) {
|
||||
store[this.id] = _objectSpread(_objectSpread({}, this.state), state);
|
||||
acf.blockInstances[this.props.clientId][this.constructor.name] = _objectSpread(_objectSpread({}, this.state), state);
|
||||
|
||||
// Update component state if subscribed.
|
||||
// - Allows AJAX callback to update store without modifying state of an unmounted component.
|
||||
if (this.subscribed) {
|
||||
super.setState(state);
|
||||
}
|
||||
acf.debug('SetState', Object.assign({}, this), this.props.clientId, this.constructor.name, Object.assign({}, acf.blockInstances[this.props.clientId][this.constructor.name]));
|
||||
}
|
||||
setHtml(html) {
|
||||
html = html ? html.trim() : '';
|
||||
@@ -1051,6 +1123,13 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
}
|
||||
}
|
||||
|
||||
// Lock block if required.
|
||||
if (this.getValidationErrors() && this.isNotNewlyAdded()) {
|
||||
this.lockBlockForSaving();
|
||||
} else {
|
||||
this.unlockBlockForSaving();
|
||||
}
|
||||
|
||||
// Call context specific method.
|
||||
switch (context) {
|
||||
case 'append':
|
||||
@@ -1061,6 +1140,9 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
break;
|
||||
}
|
||||
}
|
||||
validate() {
|
||||
// Do nothing.
|
||||
}
|
||||
componentDidMount() {
|
||||
// Fetch on first load.
|
||||
if (this.state.html === undefined) {
|
||||
@@ -1102,6 +1184,65 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
acf.doAction('remount', this.state.$el);
|
||||
});
|
||||
}
|
||||
isNotNewlyAdded() {
|
||||
return acf.blockInstances[this.props.clientId].has_been_deselected || false;
|
||||
}
|
||||
hasShownValidation() {
|
||||
return acf.blockInstances[this.props.clientId].shown_validation || false;
|
||||
}
|
||||
setShownValidation() {
|
||||
acf.blockInstances[this.props.clientId].shown_validation = true;
|
||||
}
|
||||
setValidationErrors(errors) {
|
||||
acf.blockInstances[this.props.clientId].validation_errors = errors;
|
||||
}
|
||||
getValidationErrors() {
|
||||
return acf.blockInstances[this.props.clientId].validation_errors;
|
||||
}
|
||||
getMode() {
|
||||
return acf.blockInstances[this.props.clientId].mode;
|
||||
}
|
||||
lockBlockForSaving() {
|
||||
if (!wp.data.dispatch('core/editor')) return;
|
||||
wp.data.dispatch('core/editor').lockPostSaving('acf/block/' + this.props.clientId);
|
||||
}
|
||||
unlockBlockForSaving() {
|
||||
if (!wp.data.dispatch('core/editor')) return;
|
||||
wp.data.dispatch('core/editor').unlockPostSaving('acf/block/' + this.props.clientId);
|
||||
}
|
||||
displayValidation($formEl) {
|
||||
if (!blockSupportsValidation(this.props.name)) {
|
||||
acf.debug('Block does not support validation');
|
||||
return;
|
||||
}
|
||||
if (!$formEl || $formEl.hasClass('acf-empty-block-fields')) {
|
||||
acf.debug('There is no edit form available to validate.');
|
||||
return;
|
||||
}
|
||||
const errors = this.getValidationErrors();
|
||||
acf.debug('Starting handle validation', Object.assign({}, this), Object.assign({}, $formEl), errors);
|
||||
this.setShownValidation();
|
||||
let validator = acf.getBlockFormValidator($formEl);
|
||||
validator.clearErrors();
|
||||
acf.doAction('blocks/validation/pre_apply', errors);
|
||||
if (errors) {
|
||||
validator.addErrors(errors);
|
||||
validator.showErrors('after');
|
||||
this.lockBlockForSaving();
|
||||
} else {
|
||||
// remove previous error message
|
||||
if (validator.has('notice')) {
|
||||
validator.get('notice').update({
|
||||
type: 'success',
|
||||
text: acf.__('Validation successful'),
|
||||
timeout: 1000
|
||||
});
|
||||
validator.set('notice', null);
|
||||
}
|
||||
this.unlockBlockForSaving();
|
||||
}
|
||||
acf.doAction('blocks/validation/post_apply', errors);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1116,46 +1257,93 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
* @return void
|
||||
*/
|
||||
class BlockForm extends DynamicHTML {
|
||||
setup({
|
||||
clientId
|
||||
}) {
|
||||
this.id = `BlockForm-${clientId}`;
|
||||
setup(props) {
|
||||
this.id = `BlockForm-${props.clientId}`;
|
||||
super.setup(props);
|
||||
}
|
||||
fetch() {
|
||||
fetch(validate_only = false, data = false) {
|
||||
// Extract props.
|
||||
const {
|
||||
attributes,
|
||||
context,
|
||||
clientId
|
||||
clientId,
|
||||
name
|
||||
} = this.props;
|
||||
let {
|
||||
attributes
|
||||
} = this.props;
|
||||
let query = {
|
||||
form: true
|
||||
};
|
||||
if (validate_only) {
|
||||
query = {
|
||||
validate: true
|
||||
};
|
||||
attributes.data = data;
|
||||
}
|
||||
const hash = createBlockAttributesHash(attributes, context);
|
||||
acf.debug('BlockForm fetch', attributes, query);
|
||||
|
||||
// Try preloaded data first.
|
||||
const preloaded = this.maybePreload(hash, clientId, true);
|
||||
if (preloaded) {
|
||||
this.setHtml(preloaded);
|
||||
this.setHtml(acf.applyFilters('blocks/form/render', preloaded.html, true));
|
||||
if (preloaded.validation) this.setValidationErrors(preloaded.validation.errors);
|
||||
return;
|
||||
}
|
||||
if (!blockSupportsValidation(name)) {
|
||||
query.validate = false;
|
||||
}
|
||||
|
||||
// Request AJAX and update HTML on complete.
|
||||
fetchBlock({
|
||||
attributes,
|
||||
context,
|
||||
clientId,
|
||||
query: {
|
||||
form: true
|
||||
}
|
||||
query
|
||||
}).done(({
|
||||
data
|
||||
}) => {
|
||||
this.setHtml(data.form.replaceAll(data.clientId, clientId));
|
||||
acf.debug('fetch block form promise');
|
||||
if (data.form) {
|
||||
this.setHtml(acf.applyFilters('blocks/form/render', data.form.replaceAll(data.clientId, clientId), false));
|
||||
}
|
||||
if (data.validation) this.setValidationErrors(data.validation.errors);
|
||||
if (this.isNotNewlyAdded()) {
|
||||
acf.debug("Block has already shown it's invalid. The form needs to show validation errors");
|
||||
this.validate();
|
||||
}
|
||||
});
|
||||
}
|
||||
validate(loadState = true) {
|
||||
if (loadState) {
|
||||
this.loadState();
|
||||
}
|
||||
acf.debug('BlockForm calling validate with state', Object.assign({}, this));
|
||||
super.displayValidation(this.state.$el);
|
||||
}
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
if (blockSupportsValidation(this.props.name) && this.state.$el && this.isNotNewlyAdded() && !this.hasShownValidation()) {
|
||||
this.validate(false); // Shouldn't update state in shouldComponentUpdate.
|
||||
}
|
||||
return super.shouldComponentUpdate(nextProps, nextState);
|
||||
}
|
||||
componentWillUnmount() {
|
||||
super.componentWillUnmount();
|
||||
|
||||
//TODO: either delete this, or clear validations here (if that's a sensible idea)
|
||||
|
||||
acf.debug('BlockForm Component did unmount');
|
||||
}
|
||||
componentDidRemount() {
|
||||
super.componentDidRemount();
|
||||
acf.debug('BlockForm component did remount');
|
||||
const {
|
||||
$el
|
||||
} = this.state;
|
||||
if (blockSupportsValidation(this.props.name) && this.isNotNewlyAdded()) {
|
||||
acf.debug("Block has already shown it's invalid. The form needs to show validation errors");
|
||||
this.validate();
|
||||
}
|
||||
|
||||
// Make sure our on append events are registered.
|
||||
if ($el.data('acf-events-added') !== true) {
|
||||
@@ -1164,21 +1352,23 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
}
|
||||
componentDidAppend() {
|
||||
super.componentDidAppend();
|
||||
acf.debug('BlockForm component did append');
|
||||
|
||||
// Extract props.
|
||||
const {
|
||||
attributes,
|
||||
setAttributes,
|
||||
clientId
|
||||
clientId,
|
||||
name
|
||||
} = this.props;
|
||||
const props = this.props;
|
||||
const thisBlockForm = this;
|
||||
const {
|
||||
$el
|
||||
} = this.state;
|
||||
|
||||
// Callback for updating block data.
|
||||
// Callback for updating block data and validation status if we're in an edit only mode.
|
||||
function serializeData(silent = false) {
|
||||
const data = acf.serialize($el, `acf-${clientId}`);
|
||||
const data = acf.serialize($el, `acf-block_${clientId}`);
|
||||
if (silent) {
|
||||
attributes.data = data;
|
||||
} else {
|
||||
@@ -1186,6 +1376,10 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
data
|
||||
});
|
||||
}
|
||||
if (blockSupportsValidation(name) && !silent && thisBlockForm.getMode() !== 'preview') {
|
||||
acf.debug('No block preview currently available. Need to trigger a validation only fetch.');
|
||||
thisBlockForm.fetch(true, data);
|
||||
}
|
||||
}
|
||||
|
||||
// Add events.
|
||||
@@ -1218,17 +1412,15 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
* @return void
|
||||
*/
|
||||
class BlockPreview extends DynamicHTML {
|
||||
setup({
|
||||
clientId,
|
||||
name
|
||||
}) {
|
||||
const blockType = getBlockType(name);
|
||||
setup(props) {
|
||||
const blockType = getBlockType(props.name);
|
||||
const contextPostId = acf.isget(this.props, 'context', 'postId');
|
||||
this.id = `BlockPreview-${clientId}`;
|
||||
this.id = `BlockPreview-${props.clientId}`;
|
||||
super.setup(props);
|
||||
|
||||
// Apply the contextPostId to the ID if set to stop query loop ID duplication.
|
||||
if (contextPostId) {
|
||||
this.id = `BlockPreview-${clientId}-${contextPostId}`;
|
||||
this.id = `BlockPreview-${props.clientId}-${contextPostId}`;
|
||||
}
|
||||
if (blockType.supports.jsx) {
|
||||
this.renderMethod = 'jsx';
|
||||
@@ -1256,20 +1448,25 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
let preloaded = this.maybePreload(hash, clientId, false);
|
||||
if (preloaded) {
|
||||
if (getBlockVersion(name) == 1) {
|
||||
preloaded = '<div class="acf-block-preview">' + preloaded + '</div>';
|
||||
preloaded.html = '<div class="acf-block-preview">' + preloaded.html + '</div>';
|
||||
}
|
||||
this.setHtml(preloaded);
|
||||
this.setHtml(acf.applyFilters('blocks/preview/render', preloaded.html, true));
|
||||
if (preloaded.validation) this.setValidationErrors(preloaded.validation.errors);
|
||||
return;
|
||||
}
|
||||
let query = {
|
||||
preview: true
|
||||
};
|
||||
if (!blockSupportsValidation(name)) {
|
||||
query.validate = false;
|
||||
}
|
||||
|
||||
// Request AJAX and update HTML on complete.
|
||||
fetchBlock({
|
||||
attributes,
|
||||
context,
|
||||
clientId,
|
||||
query: {
|
||||
preview: true
|
||||
},
|
||||
query,
|
||||
delay
|
||||
}).done(({
|
||||
data
|
||||
@@ -1278,9 +1475,24 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
if (getBlockVersion(name) == 1) {
|
||||
replaceHtml = '<div class="acf-block-preview">' + replaceHtml + '</div>';
|
||||
}
|
||||
this.setHtml(replaceHtml);
|
||||
acf.debug('fetch block render promise');
|
||||
this.setHtml(acf.applyFilters('blocks/preview/render', replaceHtml, false));
|
||||
if (data.validation) {
|
||||
this.setValidationErrors(data.validation.errors);
|
||||
}
|
||||
if (this.isNotNewlyAdded()) {
|
||||
this.validate();
|
||||
}
|
||||
});
|
||||
}
|
||||
validate() {
|
||||
// Check we've got a block form for this instance.
|
||||
const client = acf.blockInstances[this.props.clientId] || {};
|
||||
const blockFormState = client.BlockForm || false;
|
||||
if (blockFormState) {
|
||||
super.displayValidation(blockFormState.$el);
|
||||
}
|
||||
}
|
||||
componentDidAppend() {
|
||||
super.componentDidAppend();
|
||||
this.renderBlockPreviewEvent();
|
||||
@@ -1300,6 +1512,7 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
if (nextAttributes.anchor !== thisAttributes.anchor) {
|
||||
delay = 300;
|
||||
}
|
||||
acf.debug('Triggering fetch from block preview shouldComponentUpdate');
|
||||
this.fetch({
|
||||
attributes: nextAttributes,
|
||||
context: nextProps.context,
|
||||
@@ -1337,9 +1550,11 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
}
|
||||
componentDidRemount() {
|
||||
super.componentDidRemount();
|
||||
acf.debug('Checking if fetch is required in BlockPreview componentDidRemount', Object.assign({}, this.state.prevAttributes), Object.assign({}, this.props.attributes), Object.assign({}, this.state.prevContext), Object.assign({}, this.props.context));
|
||||
|
||||
// Update preview if data has changed since last render (changing from "edit" to "preview").
|
||||
if (!compareObjects(this.state.prevAttributes, this.props.attributes) || !compareObjects(this.state.prevContext, this.props.context)) {
|
||||
acf.debug('Triggering block preview fetch from componentDidRemount');
|
||||
this.fetch();
|
||||
}
|
||||
|
||||
@@ -1586,11 +1801,23 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
|
||||
* @return string
|
||||
*/
|
||||
function createBlockAttributesHash(attributes, context) {
|
||||
attributes['_acf_context'] = context;
|
||||
return md5(JSON.stringify(Object.keys(attributes).sort().reduce((acc, currValue) => {
|
||||
acc[currValue] = attributes[currValue];
|
||||
attributes['_acf_context'] = sortObjectByKey(context);
|
||||
return md5(JSON.stringify(sortObjectByKey(attributes)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Key sort an object
|
||||
*
|
||||
* @since 6.3.1
|
||||
*
|
||||
* @param object toSort The object to be sorted
|
||||
* @return object
|
||||
*/
|
||||
function sortObjectByKey(toSort) {
|
||||
return Object.keys(toSort).sort().reduce((acc, currValue) => {
|
||||
acc[currValue] = toSort[currValue];
|
||||
return acc;
|
||||
}, {})));
|
||||
}, {});
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
@@ -2293,7 +2520,7 @@ if (
|
||||
) {
|
||||
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
||||
}
|
||||
var ReactVersion = '18.2.0';
|
||||
var ReactVersion = '18.3.1';
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
@@ -4969,6 +5196,7 @@ exports.PureComponent = PureComponent;
|
||||
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
||||
exports.Suspense = REACT_SUSPENSE_TYPE;
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
|
||||
exports.act = act;
|
||||
exports.cloneElement = cloneElement$1;
|
||||
exports.createContext = createContext;
|
||||
exports.createElement = createElement$1;
|
||||
|
||||
@@ -204,6 +204,7 @@
|
||||
initialize: function () {
|
||||
// add sortable
|
||||
var $tbody = this.$el.parent();
|
||||
$tbody.css('position', 'relative');
|
||||
if (!$tbody.hasClass('ui-sortable')) {
|
||||
$tbody.sortable({
|
||||
items: '> .acf-field-setting-fc_layout',
|
||||
@@ -254,6 +255,7 @@
|
||||
return $settings.hasClass('open');
|
||||
},
|
||||
open: function (element, isAddingLayout) {
|
||||
const $header = element ? element.children('.acf-field-settings-fc_head') : this.$el.children('.acf-field-settings-fc_head');
|
||||
const $settings = element ? element.children('.acf-field-layout-settings') : this.$el.children('.acf-field-layout-settings');
|
||||
const toggle = element ? element.find('.toggle-indicator').first() : this.$el.find('.toggle-indicator').first();
|
||||
|
||||
@@ -275,8 +277,10 @@
|
||||
toggle.removeClass('closed');
|
||||
}
|
||||
$settings.addClass('open');
|
||||
$header.addClass('open');
|
||||
},
|
||||
close: function () {
|
||||
const $header = this.$el.children('.acf-field-settings-fc_head');
|
||||
const $settings = this.$el.children('.acf-field-layout-settings');
|
||||
const toggle = this.$el.find('.toggle-indicator').first();
|
||||
|
||||
@@ -284,6 +288,7 @@
|
||||
$settings.slideUp();
|
||||
$settings.removeClass('open');
|
||||
toggle.removeClass('open');
|
||||
$header.removeClass('open');
|
||||
if (!toggle.hasClass('closed')) {
|
||||
toggle.addClass('closed');
|
||||
}
|
||||
@@ -304,7 +309,7 @@
|
||||
}
|
||||
},
|
||||
onChangeName: function (e, $el) {
|
||||
const sanitizedName = acf.strSanitize($el.val());
|
||||
const sanitizedName = acf.strSanitize($el.val(), false);
|
||||
$el.val(sanitizedName);
|
||||
this.set('layoutName', sanitizedName);
|
||||
this.$el.attr('data-layout-name', sanitizedName);
|
||||
|
||||
|
Before Width: | Height: | Size: 3.4 KiB |
@@ -1,7 +1,15 @@
|
||||
<svg width="55" height="24" viewBox="0 0 55 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M43.9986 23.8816H38.0521V0.0253448H53.9034V5.58064H43.9986V9.83762H53.334V15.2547H43.9986V23.8825V23.8816Z" fill="white"/>
|
||||
<path opacity="0.05" d="M36.4832 13.8697H42.3772C41.5051 19.9417 36.3849 23.9574 30.1814 23.9574C23.3882 23.9574 17.8572 18.8809 17.8572 12.0448C17.843 10.4551 18.1521 8.879 18.7658 7.41239C19.3795 5.94579 20.2849 4.61924 21.4271 3.51334C23.7714 1.24304 26.9182 -0.00834104 30.1814 0.0320335C36.3275 0.0320335 41.5908 4.07879 42.3392 10.0536H36.4511C34.6807 3.2856 23.649 3.94741 23.649 12.0448C23.649 20.1432 34.8189 20.7398 36.4832 13.8716V13.8697Z" fill="white"/>
|
||||
<path d="M35.2772 13.8697C34.266 17.2858 30.667 19.317 27.1244 18.4664C23.5798 17.6128 21.3588 14.187 22.0946 10.7047C22.8294 7.22146 26.2572 4.92655 29.8582 5.50758C31.3334 5.70738 32.6937 6.41247 33.7074 7.50273C34.408 8.22394 34.9337 9.0963 35.2442 10.0526H40.96C40.2116 4.06425 34.9337 0.0320875 28.8022 0.0320875C25.5386 -0.00942939 22.391 1.24129 20.0459 3.51144C18.903 4.61761 17.997 5.94473 17.3831 7.41208C16.7693 8.87942 16.4603 10.4563 16.4751 12.0468C16.4751 18.8829 21.9739 23.9574 28.8042 23.9574C35.0028 23.9574 40.1084 19.9418 40.996 13.8697H35.2763H35.2772Z" fill="white"/>
|
||||
<path opacity="0.05" d="M17.5146 20.4109H9.2391L7.88629 23.8776H1.55337L11.245 0H15.4689L25.5459 23.8854H18.8597L17.5127 20.4109H17.5146ZM11.5914 14.5004L11.3841 15.0396H15.4017L15.2625 14.6347L13.3919 9.51446L11.5914 14.5004Z" fill="white"/>
|
||||
<path d="M15.9476 20.4109H7.68573L6.33389 23.8776H0L9.69257 0H13.9165L23.9935 23.8854H17.3102L15.9476 20.4109ZM10.0381 14.5004L9.83174 15.0396H13.8493L13.7092 14.6347L11.8396 9.51446L10.039 14.5004H10.0381Z" fill="white"/>
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.9 1.10017L1.1 8.90139C0.39375 9.60775 0 10.5579 0 11.5518V38.1247C0 39.1624 0.8375 40 1.875 40H38.125C39.1625 40 40 39.1624 40 38.1247V1.87529C40 0.837631 39.1625 0 38.125 0H11.5562C10.5625 0 9.60625 0.393812 8.90625 1.10017H8.9Z" fill="url(#paint0_radial_117_9708)"/>
|
||||
<path d="M9.10713 1.60017H9.11468L9.2614 1.45212C9.86638 0.84164 10.6943 0.5 11.5562 0.5H38.125C38.8863 0.5 39.5 1.1137 39.5 1.87529V38.1247C39.5 38.8863 38.8863 39.5 38.125 39.5H1.875C1.11372 39.5 0.5 38.8863 0.5 38.1247V11.5518C0.5 10.6909 0.840778 9.86781 1.45358 9.25492L9.10713 1.60017Z" stroke="white" stroke-opacity="0.25"/>
|
||||
<path d="M28.3014 26.3536H25.4056V14.7H33.1249V17.4137H28.3014V19.4932H32.8476V22.1394H28.3014V26.3541V26.3536Z" fill="white"/>
|
||||
<path opacity="0.05" d="M24.6417 21.4627H27.512C27.0873 24.4289 24.5938 26.3905 21.5728 26.3905C18.2646 26.3905 15.5712 23.9107 15.5712 20.5713C15.5642 19.7947 15.7148 19.0248 16.0136 18.3084C16.3125 17.5919 16.7534 16.9439 17.3096 16.4037C18.4513 15.2947 19.9837 14.6834 21.5728 14.7031C24.5659 14.7031 27.129 16.6799 27.4935 19.5986H24.6261C23.7639 16.2925 18.3917 16.6157 18.3917 20.5713C18.3917 24.5273 23.8312 24.8187 24.6417 21.4637V21.4627Z" fill="#002447"/>
|
||||
<path d="M24.0543 21.4627C23.5619 23.1315 21.8092 24.1237 20.084 23.7082C18.3579 23.2912 17.2763 21.6177 17.6346 19.9167C17.9925 18.2151 19.6617 17.094 21.4154 17.3779C22.1338 17.4755 22.7962 17.8199 23.2899 18.3525C23.631 18.7048 23.8871 19.1309 24.0382 19.5981H26.8218C26.4573 16.6728 23.887 14.7031 20.9011 14.7031C19.3118 14.6828 17.779 15.2938 16.637 16.4028C16.0804 16.9431 15.6392 17.5914 15.3402 18.3082C15.0413 19.025 14.8908 19.7953 14.898 20.5723C14.898 23.9117 17.5759 26.3905 20.9021 26.3905C23.9207 26.3905 26.4071 24.4289 26.8393 21.4627H24.0539H24.0543Z" fill="white"/>
|
||||
<path opacity="0.05" d="M15.4044 24.6581H11.3744L10.7156 26.3516H7.63153L12.3512 14.6875H14.4081L19.3155 26.3554H16.0594L15.4034 24.6581H15.4044ZM12.5199 21.7709L12.4189 22.0343H14.3754L14.3077 21.8365L13.3967 19.3353L12.5199 21.7709Z" fill="#002447"/>
|
||||
<path d="M14.6412 24.6581H10.6178L9.9595 26.3516H6.875L11.5951 14.6875H13.6521L18.5594 26.3554H15.3048L14.6412 24.6581ZM11.7634 21.7709L11.6629 22.0343H13.6194L13.5511 21.8365L12.6407 19.3353L11.7638 21.7709H11.7634Z" fill="white"/>
|
||||
<defs>
|
||||
<radialGradient id="paint0_radial_117_9708" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="rotate(45) scale(56.5685)">
|
||||
<stop stop-color="#0ECAD4"/>
|
||||
<stop offset="1" stop-color="#006BD6"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,27 @@
|
||||
<svg width="41" height="40" viewBox="0 0 41 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_120_9753)">
|
||||
<path d="M7.54459 0.932623L0.932477 7.54576C0.333784 8.14455 0 8.95 0 9.79254V32.3186C0 33.1982 0.709954 33.9083 1.58945 33.9083H32.3188C33.1983 33.9083 33.9083 33.1982 33.9083 32.3186V1.5897C33.9083 0.710065 33.1983 0 32.3188 0H9.79631C8.9539 0 8.14328 0.333837 7.54988 0.932623H7.54459Z" fill="url(#paint0_radial_120_9753)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.54988 0.932623C8.14328 0.333837 8.9539 0 9.79631 0H32.3188C33.1983 0 33.9083 0.710065 33.9083 1.5897V32.3186C33.9083 33.1982 33.1983 33.9083 32.3188 33.9083H1.58945C0.709954 33.9083 0 33.1982 0 32.3186V9.79254C0 8.95 0.333784 8.14455 0.932477 7.54576L7.54459 0.932623H7.54988ZM7.95885 1.93262L1.63964 8.25282C1.22784 8.66468 1 9.21605 1 9.79254V32.3186C1 32.646 1.26239 32.9083 1.58945 32.9083H32.3188C32.6459 32.9083 32.9083 32.646 32.9083 32.3186V1.5897C32.9083 1.2622 32.6459 1 32.3188 1H9.79631C9.21748 1 8.66355 1.22949 8.26018 1.63652L7.96675 1.93262H7.95885Z" fill="white" fill-opacity="0.25"/>
|
||||
<path d="M23.9913 22.3401H21.5365V12.4612H28.0802V14.7616H23.9913V16.5245H27.8452V18.7677H23.9913V22.3405V22.3401Z" fill="white"/>
|
||||
<path opacity="0.05" d="M20.8889 18.1942H23.3221C22.9621 20.7086 20.8484 22.3715 18.2874 22.3715C15.4831 22.3715 13.1998 20.2693 13.1998 17.4385C13.1939 16.7802 13.3215 16.1276 13.5749 15.5202C13.8282 14.9129 14.202 14.3636 14.6735 13.9056C15.6413 12.9655 16.9403 12.4473 18.2874 12.464C20.8247 12.464 22.9975 14.1398 23.3064 16.6139H20.8757C20.1449 13.8113 15.5907 14.0854 15.5907 17.4385C15.5907 20.7921 20.2019 21.0391 20.8889 18.195V18.1942Z" fill="#002447"/>
|
||||
<path d="M20.3911 18.1942C19.9736 19.6088 18.4879 20.4499 17.0254 20.0977C15.5621 19.7442 14.6453 18.3256 14.949 16.8836C15.2524 15.4412 16.6674 14.4908 18.154 14.7314C18.763 14.8142 19.3245 15.1062 19.743 15.5576C20.0322 15.8563 20.2492 16.2175 20.3774 16.6136H22.737C22.4281 14.1338 20.2492 12.464 17.7181 12.464C16.3708 12.4468 15.0714 12.9648 14.1033 13.9048C13.6315 14.3629 13.2575 14.9125 13.004 15.5201C12.7506 16.1277 12.6231 16.7807 12.6292 17.4393C12.6292 20.2702 14.8992 22.3715 17.7189 22.3715C20.2778 22.3715 22.3855 20.7087 22.7519 18.1942H20.3907H20.3911Z" fill="white"/>
|
||||
<path opacity="0.05" d="M13.0584 20.9029H9.64211L9.08365 22.3384H6.4693L10.4702 12.4507H12.2139L16.3738 22.3417H13.6137L13.0576 20.9029H13.0584ZM10.6132 18.4553L10.5276 18.6786H12.1861L12.1287 18.5109L11.3565 16.3906L10.6132 18.4553Z" fill="#002447"/>
|
||||
<path d="M12.4115 20.9029H9.00082L8.44275 22.3384H5.828L9.82928 12.4507H11.573L15.733 22.3417H12.974L12.4115 20.9029ZM9.97191 18.4553L9.88673 18.6786H11.5453L11.4874 18.5109L10.7156 16.3906L9.97231 18.4553H9.97191Z" fill="white"/>
|
||||
<rect x="18" y="26" width="22.29" height="13.1994" rx="6.59972" fill="url(#paint1_radial_120_9753)"/>
|
||||
<rect x="18.5" y="26.5" width="21.29" height="12.1994" rx="6.09972" stroke="white" stroke-opacity="0.4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M33.1989 35.2127C32.7879 35.2127 32.4199 35.1185 32.0948 34.9299C31.7698 34.7414 31.5129 34.47 31.3242 34.1157C31.1376 33.7615 31.0442 33.3357 31.0442 32.8385C31.0442 32.3392 31.1376 31.9124 31.3242 31.5581C31.5129 31.2018 31.7698 30.9293 32.0948 30.7408C32.4199 30.5523 32.7879 30.458 33.1989 30.458C33.6078 30.458 33.9737 30.5523 34.2967 30.7408C34.6217 30.9293 34.8775 31.2018 35.0642 31.5581C35.2529 31.9124 35.3473 32.3392 35.3473 32.8385C35.3473 33.3357 35.2529 33.7625 35.0642 34.1188C34.8775 34.4731 34.6217 34.7445 34.2967 34.9331C33.9737 35.1195 33.6078 35.2127 33.1989 35.2127ZM33.1989 34.47C33.4526 34.47 33.677 34.4079 33.872 34.2836C34.0692 34.1572 34.2233 33.9728 34.3344 33.7304C34.4456 33.4859 34.5011 33.1886 34.5011 32.8385C34.5011 32.4842 34.4456 32.1859 34.3344 31.9435C34.2233 31.699 34.0692 31.5146 33.872 31.3903C33.677 31.2639 33.4526 31.2007 33.1989 31.2007C32.9431 31.2007 32.7166 31.2639 32.5195 31.3903C32.3224 31.5167 32.1672 31.7021 32.0539 31.9466C31.9428 32.189 31.8872 32.4863 31.8872 32.8385C31.8872 33.1886 31.9428 33.4849 32.0539 33.7273C32.1672 33.9697 32.3224 34.1541 32.5195 34.2804C32.7166 34.4068 32.9431 34.47 33.1989 34.47ZM27.3415 35.1506C27.2035 35.1506 27.0915 35.0387 27.0915 34.9006V30.7702C27.0915 30.6321 27.2035 30.5202 27.3415 30.5202H28.8436C29.2022 30.5202 29.5041 30.5823 29.7495 30.7066C29.9948 30.8309 30.1804 31.005 30.3062 31.2287C30.4321 31.4504 30.495 31.7083 30.495 32.0025C30.495 32.2967 30.431 32.5526 30.3031 32.7701C30.1773 32.9876 29.9906 33.1555 29.7432 33.2736C29.7138 33.2876 29.6837 33.3007 29.6527 33.3131L30.463 34.7797C30.5551 34.9463 30.4346 35.1506 30.2442 35.1506H29.8763C29.7846 35.1506 29.7002 35.1004 29.6565 35.0197L28.8061 33.4507H27.9314V34.9006C27.9314 35.0387 27.8195 35.1506 27.6814 35.1506H27.3415ZM28.7209 32.7639H27.9314V31.4663C27.9314 31.3282 28.0433 31.2163 28.1814 31.2163H28.7146C28.9285 31.2163 29.1026 31.2474 29.2368 31.3095C29.3731 31.3717 29.4737 31.4618 29.5387 31.5799C29.6037 31.6959 29.6362 31.8368 29.6362 32.0025C29.6362 32.1641 29.6037 32.3019 29.5387 32.4158C29.4737 32.5298 29.3741 32.6168 29.2399 32.6769C29.1057 32.7349 28.9327 32.7639 28.7209 32.7639ZM23.0153 34.9006C23.0153 35.0387 23.1272 35.1506 23.2653 35.1506H23.6051C23.7432 35.1506 23.8551 35.0387 23.8551 34.9006V33.5843H24.7547C25.1154 33.5843 25.4195 33.518 25.6669 33.3854C25.9144 33.2528 26.101 33.0716 26.2268 32.8416C26.3547 32.6116 26.4187 32.3485 26.4187 32.0522C26.4187 31.758 26.3558 31.496 26.23 31.266C26.1041 31.034 25.9185 30.8516 25.6732 30.719C25.4279 30.5865 25.1259 30.5202 24.7673 30.5202H23.2653C23.1272 30.5202 23.0153 30.6321 23.0153 30.7702V34.9006ZM23.8551 32.9006H24.6446C24.8564 32.9006 25.0294 32.8644 25.1636 32.7919C25.2999 32.7194 25.3995 32.6189 25.4625 32.4904C25.5275 32.362 25.56 32.2159 25.56 32.0522C25.56 31.8886 25.5275 31.7435 25.4625 31.6172C25.3995 31.4908 25.2999 31.3924 25.1636 31.3219C25.0273 31.2515 24.8522 31.2163 24.6383 31.2163H24.1051C23.967 31.2163 23.8551 31.3282 23.8551 31.4663V32.9006Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<radialGradient id="paint0_radial_120_9753" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="rotate(45) scale(47.9535)">
|
||||
<stop stop-color="#0ECAD4"/>
|
||||
<stop offset="1" stop-color="#006BD6"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="paint1_radial_120_9753" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(40.3484 39.1008) rotate(-149.621) scale(25.9053 22.7152)">
|
||||
<stop stop-color="#0ECAD4"/>
|
||||
<stop offset="1" stop-color="#7A45E5"/>
|
||||
</radialGradient>
|
||||
<clipPath id="clip0_120_9753">
|
||||
<rect width="40.2902" height="39.1996" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.5 KiB |
@@ -0,0 +1,11 @@
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 5C10 3.89543 10.8954 3 12 3C13.1046 3 14 3.89543 14 5C14 6.10457 13.1046 7 12 7C10.8954 7 10 6.10457 10 5Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 19C10 17.8954 10.8954 17 12 17C13.1046 17 14 17.8954 14 19C14 20.1046 13.1046 21 12 21C10.8954 21 10 20.1046 10 19Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 5C17 3.89543 17.8954 3 19 3C20.1046 3 21 3.89543 21 5C21 6.10457 20.1046 7 19 7C17.8954 7 17 6.10457 17 5Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 12C17 10.8954 17.8954 10 19 10C20.1046 10 21 10.8954 21 12C21 13.1046 20.1046 14 19 14C17.8954 14 17 13.1046 17 12Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 19C17 17.8954 17.8954 17 19 17C20.1046 17 21 17.8954 21 19C21 20.1046 20.1046 21 19 21C17.8954 21 17 20.1046 17 19Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 5C3 3.89543 3.89543 3 5 3C6.10457 3 7 3.89543 7 5C7 6.10457 6.10457 7 5 7C3.89543 7 3 6.10457 3 5Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 12C3 10.8954 3.89543 10 5 10C6.10457 10 7 10.8954 7 12C7 13.1046 6.10457 14 5 14C3.89543 14 3 13.1046 3 12Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 19C3 17.8954 3.89543 17 5 17C6.10457 17 7 17.8954 7 19C7 20.1046 6.10457 21 5 21C3.89543 21 3 20.1046 3 19Z" fill="black"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1,5 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.16671 8.83337V3.83337H8.83337V8.83337H7.16671Z" fill="white"/>
|
||||
<path d="M7.16671 10.5V12.1667H8.83337V10.5H7.16671Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.2917 8.00004C15.2917 12.0271 12.0271 15.2917 8.00004 15.2917C3.97296 15.2917 0.708374 12.0271 0.708374 8.00004C0.708374 3.97296 3.97296 0.708374 8.00004 0.708374C12.0271 0.708374 15.2917 3.97296 15.2917 8.00004ZM8.00004 14.0417C11.3368 14.0417 14.0417 11.3368 14.0417 8.00004C14.0417 4.66332 11.3368 1.95837 8.00004 1.95837C4.66332 1.95837 1.95837 4.66332 1.95837 8.00004C1.95837 11.3368 4.66332 14.0417 8.00004 14.0417Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 736 B |
@@ -0,0 +1,11 @@
|
||||
<svg width="55" height="24" viewBox="0 0 55 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="55" height="23.6867" rx="11.8434" fill="url(#paint0_radial_117_9719)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.6667 9.33333C10.6667 7.49238 12.1591 6 14 6C15.8409 6 17.3333 7.49238 17.3333 9.33333V10.528C17.4903 10.5624 17.641 10.6125 17.7866 10.6867C18.2048 10.8997 18.5447 11.2397 18.7578 11.6578C18.8952 11.9274 18.9499 12.2145 18.9754 12.5268C19 12.8274 19 13.1965 19 13.6437V13.9118C19 14.359 19 14.7281 18.9754 15.0288C18.9499 15.3411 18.8952 15.6281 18.7578 15.8978C18.5447 16.3159 18.2048 16.6558 17.7866 16.8689C17.517 17.0063 17.23 17.061 16.9177 17.0866C16.617 17.1111 16.2479 17.1111 15.8007 17.1111H12.1993C11.7521 17.1111 11.383 17.1111 11.0823 17.0866C10.77 17.061 10.483 17.0063 10.2134 16.8689C9.79522 16.6558 9.45526 16.3159 9.24221 15.8978C9.10482 15.6281 9.05007 15.3411 9.02455 15.0288C8.99999 14.7281 8.99999 14.359 9 13.9118V13.6437C8.99999 13.1965 8.99999 12.8274 9.02455 12.5268C9.05007 12.2145 9.10482 11.9274 9.24221 11.6578C9.45526 11.2397 9.79522 10.8997 10.2134 10.6867C10.359 10.6125 10.5097 10.5624 10.6667 10.528V9.33333ZM11.7778 10.4453C11.9098 10.4444 12.0502 10.4444 12.1993 10.4444H15.8007C15.9498 10.4444 16.0902 10.4444 16.2222 10.4453V9.33333C16.2222 8.10603 15.2273 7.11111 14 7.11111C12.7727 7.11111 11.7778 8.10603 11.7778 9.33333V10.4453ZM11.1728 11.5764C10.9292 11.5963 10.8047 11.6324 10.7178 11.6767C10.5087 11.7832 10.3387 11.9532 10.2322 12.1622C10.1879 12.2491 10.1519 12.3737 10.132 12.6172C10.1115 12.8673 10.1111 13.1908 10.1111 13.6667V13.8889C10.1111 14.3648 10.1115 14.6883 10.132 14.9383C10.1519 15.1819 10.1879 15.3064 10.2322 15.3933C10.3387 15.6024 10.5087 15.7724 10.7178 15.8789C10.8047 15.9232 10.9292 15.9592 11.1728 15.9791C11.4228 15.9996 11.7463 16 12.2222 16H15.7778C16.2537 16 16.5772 15.9996 16.8272 15.9791C17.0708 15.9592 17.1953 15.9232 17.2822 15.8789C17.4913 15.7724 17.6613 15.6024 17.7678 15.3933C17.8121 15.3064 17.8481 15.1819 17.868 14.9383C17.8885 14.6883 17.8889 14.3648 17.8889 13.8889V13.6667C17.8889 13.1908 17.8885 12.8673 17.868 12.6172C17.8481 12.3737 17.8121 12.2491 17.7678 12.1622C17.6613 11.9532 17.4913 11.7832 17.2822 11.6767C17.1953 11.6324 17.0708 11.5963 16.8272 11.5764C16.5772 11.556 16.2537 11.5556 15.7778 11.5556H12.2222C11.7463 11.5556 11.4228 11.556 11.1728 11.5764Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M42.2748 15.8218C41.5372 15.8218 40.8768 15.6526 40.2935 15.3143C39.7103 14.976 39.2493 14.489 38.9106 13.8532C38.5757 13.2174 38.4082 12.4534 38.4082 11.5611C38.4082 10.6651 38.5757 9.89925 38.9106 9.26349C39.2493 8.62402 39.7103 8.13512 40.2935 7.7968C40.8768 7.45847 41.5372 7.28931 42.2748 7.28931C43.0086 7.28931 43.6653 7.45847 44.2448 7.7968C44.8281 8.13512 45.2872 8.62402 45.6221 9.26349C45.9608 9.89925 46.1301 10.6651 46.1301 11.5611C46.1301 12.4534 45.9608 13.2193 45.6221 13.8588C45.2872 14.4945 44.8281 14.9816 44.2448 15.3199C43.6653 15.6545 43.0086 15.8218 42.2748 15.8218ZM42.2748 14.489C42.7302 14.489 43.1328 14.3774 43.4828 14.1543C43.8365 13.9276 44.1131 13.5967 44.3125 13.1617C44.512 12.723 44.6117 12.1895 44.6117 11.5611C44.6117 10.9254 44.512 10.39 44.3125 9.95502C44.1131 9.51631 43.8365 9.18542 43.4828 8.96235C43.1328 8.73556 42.7302 8.62216 42.2748 8.62216C41.8157 8.62216 41.4093 8.73556 41.0556 8.96235C40.7018 9.18914 40.4234 9.52189 40.2202 9.96059C40.0207 10.3956 39.921 10.9291 39.921 11.5611C39.921 12.1895 40.0207 12.7211 40.2202 13.1561C40.4234 13.5911 40.7018 13.922 41.0556 14.1488C41.4093 14.3756 41.8157 14.489 42.2748 14.489ZM31.565 15.7103C31.4269 15.7103 31.315 15.5983 31.315 15.4603V7.65083C31.315 7.51276 31.4269 7.40083 31.565 7.40083H34.4591C35.1026 7.40083 35.6445 7.51237 36.0847 7.73544C36.525 7.95851 36.8581 8.27082 37.0838 8.67234C37.3096 9.07016 37.4225 9.53303 37.4225 10.061C37.4225 10.5889 37.3078 11.0481 37.0782 11.4384C36.8524 11.8288 36.5175 12.13 36.0735 12.3419C36.0208 12.367 35.9667 12.3907 35.9111 12.4128L37.5281 15.3394C37.6201 15.506 37.4996 15.7103 37.3092 15.7103H36.1941C36.1024 15.7103 36.018 15.66 35.9743 15.5794L34.3918 12.6598H32.8221V15.4603C32.8221 15.5983 32.7102 15.7103 32.5721 15.7103H31.565ZM34.2389 11.4273H32.8221V8.90004C32.8221 8.76197 32.9341 8.65004 33.0721 8.65004H34.2276C34.6115 8.65004 34.9238 8.70581 35.1647 8.81734C35.4093 8.92888 35.5899 9.0906 35.7065 9.30252C35.8232 9.51072 35.8815 9.76354 35.8815 10.061C35.8815 10.351 35.8232 10.5982 35.7065 10.8027C35.5899 11.0072 35.4111 11.1633 35.1703 11.2711C34.9295 11.3752 34.619 11.4273 34.2389 11.4273ZM24 15.4603C24 15.5983 24.1119 15.7103 24.25 15.7103H25.2571C25.3952 15.7103 25.5071 15.5983 25.5071 15.4603V12.8996H27.1215C27.7688 12.8996 28.3144 12.7806 28.7585 12.5426C29.2025 12.3047 29.5374 11.9794 29.7632 11.5667C29.9928 11.154 30.1075 10.6819 30.1075 10.1502C30.1075 9.62226 29.9946 9.15195 29.7689 8.73927C29.5431 8.32287 29.21 7.99569 28.7697 7.75775C28.3295 7.51981 27.7876 7.40083 27.1441 7.40083H24.25C24.1119 7.40083 24 7.51276 24 7.65083V15.4603ZM25.5071 11.6727H26.9239C27.304 11.6727 27.6145 11.6076 27.8553 11.4775C28.0999 11.3474 28.2787 11.167 28.3916 10.9365C28.5082 10.706 28.5665 10.4439 28.5665 10.1502C28.5665 9.85649 28.5082 9.59623 28.3916 9.36944C28.2787 9.14265 28.0999 8.96606 27.8553 8.83965C27.6107 8.71324 27.2965 8.65004 26.9127 8.65004H25.7571C25.6191 8.65004 25.5071 8.76197 25.5071 8.90004V11.6727Z" fill="white"/>
|
||||
<defs>
|
||||
<radialGradient id="paint0_radial_117_9719" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(55.1441 23.5097) rotate(-156.91) scale(59.9465 43.4653)">
|
||||
<stop stop-color="#0ECAD4"/>
|
||||
<stop offset="1" stop-color="#7A45E5"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.6 KiB |
@@ -0,0 +1,10 @@
|
||||
<svg width="40" height="24" viewBox="0 0 40 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="40" height="23.6867" rx="11.8434" fill="url(#paint0_radial_109_8486)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M27.2748 16.5325C26.5372 16.5325 25.8768 16.3633 25.2935 16.025C24.7103 15.6867 24.2493 15.1996 23.9106 14.5639C23.5757 13.9281 23.4082 13.1641 23.4082 12.2718C23.4082 11.3758 23.5757 10.6099 23.9106 9.97419C24.2493 9.33471 24.7103 8.84581 25.2935 8.50749C25.8768 8.16916 26.5372 8 27.2748 8C28.0086 8 28.6653 8.16916 29.2448 8.50749C29.8281 8.84581 30.2872 9.33471 30.6221 9.97419C30.9608 10.6099 31.1301 11.3758 31.1301 12.2718C31.1301 13.1641 30.9608 13.93 30.6221 14.5695C30.2872 15.2052 29.8281 15.6923 29.2448 16.0306C28.6653 16.3652 28.0086 16.5325 27.2748 16.5325ZM27.2748 15.1996C27.7302 15.1996 28.1328 15.0881 28.4828 14.865C28.8365 14.6383 29.1131 14.3074 29.3125 13.8724C29.512 13.4337 29.6117 12.9001 29.6117 12.2718C29.6117 11.6361 29.512 11.1007 29.3125 10.6657C29.1131 10.227 28.8365 9.89611 28.4828 9.67304C28.1328 9.44625 27.7302 9.33286 27.2748 9.33286C26.8157 9.33286 26.4093 9.44625 26.0556 9.67304C25.7018 9.89983 25.4234 10.2326 25.2202 10.6713C25.0207 11.1063 24.921 11.6398 24.921 12.2718C24.921 12.9001 25.0207 13.4318 25.2202 13.8668C25.4234 14.3018 25.7018 14.6327 26.0556 14.8595C26.4093 15.0863 26.8157 15.1996 27.2748 15.1996ZM16.565 16.421C16.4269 16.421 16.315 16.309 16.315 16.171V8.36153C16.315 8.22346 16.4269 8.11153 16.565 8.11153H19.4591C20.1026 8.11153 20.6445 8.22306 21.0847 8.44614C21.525 8.66921 21.8581 8.98151 22.0838 9.38304C22.3096 9.78085 22.4225 10.2437 22.4225 10.7717C22.4225 11.2996 22.3078 11.7588 22.0782 12.1491C21.8524 12.5395 21.5175 12.8407 21.0735 13.0526C21.0208 13.0777 20.9667 13.1014 20.9111 13.1235L22.5281 16.0501C22.6201 16.2167 22.4996 16.421 22.3092 16.421H21.1941C21.1024 16.421 21.018 16.3707 20.9743 16.2901L19.3918 13.3705H17.8221V16.171C17.8221 16.309 17.7102 16.421 17.5721 16.421H16.565ZM19.2389 12.138H17.8221V9.61073C17.8221 9.47266 17.9341 9.36073 18.0721 9.36073H19.2276C19.6115 9.36073 19.9238 9.4165 20.1647 9.52803C20.4093 9.63957 20.5899 9.8013 20.7065 10.0132C20.8232 10.2214 20.8815 10.4742 20.8815 10.7717C20.8815 11.0617 20.8232 11.3089 20.7065 11.5134C20.5899 11.7179 20.4111 11.874 20.1703 11.9818C19.9295 12.0859 19.619 12.138 19.2389 12.138ZM9 16.171C9 16.309 9.11193 16.421 9.25 16.421H10.2571C10.3952 16.421 10.5071 16.309 10.5071 16.171V13.6103H12.1215C12.7688 13.6103 13.3144 13.4913 13.7585 13.2533C14.2025 13.0154 14.5374 12.6901 14.7632 12.2774C14.9928 11.8647 15.1075 11.3925 15.1075 10.8609C15.1075 10.333 14.9946 9.86264 14.7689 9.44996C14.5431 9.03356 14.21 8.70639 13.7697 8.46844C13.3295 8.2305 12.7876 8.11153 12.1441 8.11153H9.25C9.11193 8.11153 9 8.22346 9 8.36153V16.171ZM10.5071 12.3834H11.9239C12.304 12.3834 12.6145 12.3183 12.8553 12.1882C13.0999 12.058 13.2787 11.8777 13.3916 11.6472C13.5082 11.4167 13.5665 11.1546 13.5665 10.8609C13.5665 10.5672 13.5082 10.3069 13.3916 10.0801C13.2787 9.85335 13.0999 9.67675 12.8553 9.55034C12.6107 9.42393 12.2965 9.36073 11.9127 9.36073H10.7571C10.6191 9.36073 10.5071 9.47266 10.5071 9.61073V12.3834Z" fill="white"/>
|
||||
<defs>
|
||||
<radialGradient id="paint0_radial_109_8486" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(40.1048 23.5097) rotate(-149.621) scale(46.4877 40.763)">
|
||||
<stop stop-color="#0ECAD4"/>
|
||||
<stop offset="1" stop-color="#7A45E5"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
@@ -1,14 +1,22 @@
|
||||
<svg width="104" height="20" viewBox="0 0 104 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.923096 1.52942L2.45251 0H7.35447V6.43138H0.923096V1.52942ZM7.70741 0H14.1388V4.90196L12.5702 6.43138H9.23682L7.70741 4.90196V0ZM16.0211 6.78432L14.4917 8.31373V11.6863L16.0211 13.2157H20.9231V6.78432H16.0211ZM7.70741 20H14.1388V15.098L12.5702 13.5686H9.23682L7.70741 15.098V20ZM20.9231 20V15.098L19.3937 13.5686H14.4917V20H20.9231ZM14.4917 0V4.90196L16.0211 6.43138H20.9231V0H14.4917ZM10.0211 10C10.0211 10.4706 10.4133 10.902 10.9231 10.902C11.4329 10.902 11.8251 10.5098 11.8251 10C11.8251 9.52941 11.4329 9.09804 10.9231 9.09804C10.4525 9.09804 10.0211 9.4902 10.0211 10ZM7.35447 6.78432H0.923096V13.2157H5.78584L7.35447 11.6863V6.78432ZM5.78584 13.5686L7.35447 15.098V18.4706L5.78584 20H0.923096V13.5686H5.78584Z" fill="#0ECAD4"/>
|
||||
<path d="M80.4769 3.11705C80.3614 3.11705 80.2844 3.04002 80.2844 2.92447V2.11567C80.2844 2.00012 80.3614 1.9231 80.4769 1.9231H80.9389C81.0544 1.9231 81.1314 2.00012 81.1314 2.11567V2.92447C81.1314 3.04002 81.0544 3.11705 80.9389 3.11705H80.4769Z" fill="#002838"/>
|
||||
<path d="M80.6309 15.4031C80.5154 15.4031 80.4384 15.3261 80.4384 15.2106V6.23672C80.4384 6.12117 80.5154 6.04414 80.6309 6.04414H80.8234C80.9389 6.04414 81.0159 6.12117 81.0159 6.23672V15.2106C81.0159 15.3261 80.9389 15.4031 80.8234 15.4031H80.6309Z" fill="#002838"/>
|
||||
<path d="M33.8928 15.5957C33.7773 15.5957 33.7388 15.5572 33.7003 15.4417L32.1218 9.85707H32.0833L30.5049 15.4417C30.4664 15.5572 30.4279 15.5957 30.3124 15.5957H28.4644C28.3489 15.5957 28.3104 15.5572 28.2719 15.4417L25.5385 5.73603C25.5385 5.659 25.5385 5.58197 25.654 5.58197H28.0794C28.1949 5.58197 28.2719 5.659 28.2719 5.73603L29.5809 11.5517H29.6194L31.1593 5.73603C31.1978 5.62049 31.2363 5.58197 31.3518 5.58197H32.8533C32.9688 5.58197 33.0073 5.62049 33.0458 5.73603L34.6628 11.5517H34.7013L35.9333 5.73603C35.9333 5.659 36.0103 5.58197 36.1258 5.58197H38.5512C38.6282 5.58197 38.6667 5.659 38.6667 5.73603L35.9718 15.4417C35.9333 15.5572 35.8948 15.5957 35.7793 15.5957H33.8928Z" fill="#002838"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.5917 15.5957C40.5147 15.5957 40.4377 15.5187 40.4377 15.4417V5.73603C40.4377 5.659 40.5147 5.58197 40.5917 5.58197H44.5956C47.0211 5.58197 48.2915 6.96849 48.2915 8.89421C48.2915 10.8199 47.0211 12.245 44.5956 12.245H43.1326C43.0556 12.245 43.0556 12.2835 43.0556 12.322V15.4031C43.0556 15.4802 42.9786 15.5572 42.9016 15.5572H40.5917V15.5957ZM45.7121 8.93273C45.7121 8.23947 45.2501 7.81581 44.4416 7.81581H43.1326C43.0556 7.81581 43.0556 7.85432 43.0556 7.89283V10.0111C43.0556 10.0882 43.0941 10.0882 43.1326 10.0882H44.4416C45.2501 10.0882 45.7121 9.62598 45.7121 8.93273Z" fill="#002838"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M51.4485 10.6659C51.4485 11.9754 51.5255 12.6301 51.718 13.1693C52.257 14.7869 53.4119 15.5957 55.1444 15.5957C56.6074 15.5957 57.7238 14.941 58.3783 14.0166C58.4553 13.9396 58.4553 13.8241 58.3398 13.747L58.2243 13.6315C58.1473 13.5545 58.0318 13.5545 57.9549 13.67C57.3774 14.4403 56.4149 15.018 55.1059 15.018C53.7199 15.018 52.6804 14.4018 52.2184 12.9767C52.0645 12.4761 51.9875 11.8983 51.9875 10.8584C51.9875 10.7814 52.026 10.7044 52.103 10.7044H58.3783C58.5323 10.7044 58.6093 10.6274 58.6093 10.5118C58.6093 9.31787 58.5323 8.70164 58.3398 8.16244C57.8394 6.58335 56.6459 5.77454 55.0289 5.77454C53.4504 5.77454 52.2185 6.58335 51.718 8.16244C51.564 8.70164 51.4485 9.3949 51.4485 10.6659ZM58.0703 10.0496C58.0703 10.1267 58.0318 10.1652 57.9549 10.1652H52.18C52.103 10.1652 52.0645 10.1267 52.0645 10.0496C52.0645 9.35638 52.1415 8.8557 52.2955 8.39353C52.7189 7.00701 53.7199 6.35225 55.0674 6.35225C56.4149 6.35225 57.4159 7.04552 57.8393 8.39353C57.9933 8.8557 58.0703 9.3949 58.0703 10.0496Z" fill="#002838"/>
|
||||
<path d="M67.5412 15.4031C67.4257 15.4031 67.3487 15.3261 67.3487 15.2106V9.58748C67.3487 7.35364 66.4247 6.39077 64.6152 6.39077C63.0368 6.39077 61.7278 7.46918 61.7278 9.31787V15.2491C61.7278 15.3646 61.6508 15.4417 61.5353 15.4417H61.3428C61.2273 15.4417 61.1503 15.3646 61.1503 15.2491V6.27523C61.1503 6.15969 61.2273 6.08266 61.3428 6.08266H61.5353C61.6508 6.08266 61.7278 6.15969 61.7278 6.27523V7.58472H61.7663C62.2283 6.50632 63.3062 5.85157 64.6537 5.85157C66.7712 5.85157 67.9647 7.04552 67.9647 9.47193V15.2491C67.9647 15.3646 67.8877 15.4417 67.7722 15.4417H67.5412V15.4031Z" fill="#002838"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M70.8136 17.56C70.6981 17.5985 70.6981 17.714 70.7751 17.8296C71.2371 18.5613 72.3536 19.1776 73.7011 19.2161C75.857 19.2161 77.243 18.0606 77.243 15.4802V6.27523C77.243 6.15969 77.166 6.08266 77.0505 6.08266H76.858C76.7425 6.08266 76.6655 6.15969 76.6655 6.27523V7.62324H76.627C76.165 6.58335 75.3565 5.85157 73.7011 5.85157C72.1226 5.85157 71.0446 6.69888 70.5826 8.0854C70.3901 8.74015 70.2746 9.58748 70.2746 10.7429C70.2746 11.8983 70.3516 12.7457 70.5826 13.4004C71.0446 14.7869 72.1226 15.6342 73.7011 15.6342C75.3565 15.6342 76.165 14.9025 76.627 13.8626H76.6655V15.4417C76.6655 17.7525 75.5105 18.6384 73.7396 18.6384C72.5846 18.6384 71.7761 18.2147 71.2371 17.5214C71.1601 17.4059 71.0831 17.3674 70.9676 17.4444L70.8136 17.56ZM76.6655 10.7044C76.6655 11.8983 76.5885 12.5916 76.396 13.1693C75.9725 14.5558 74.933 15.0565 73.778 14.9795C72.5076 14.9795 71.6221 14.3633 71.1986 13.1308C71.0061 12.5531 70.8906 11.7443 70.8906 10.6659C70.8906 9.58747 71.0061 8.77867 71.1986 8.20095C71.5836 6.96849 72.5076 6.35225 73.778 6.35225C74.933 6.35225 75.934 6.85295 76.396 8.23947C76.5885 8.81719 76.6655 9.54896 76.6655 10.7044Z" fill="#002838"/>
|
||||
<path d="M90.4097 15.2106C90.4097 15.3261 90.4867 15.4031 90.6022 15.4031V15.4417H90.8332C90.9487 15.4417 91.0257 15.3646 91.0257 15.2491V9.47193C91.0257 7.04552 89.8323 5.85157 87.7148 5.85157C86.3673 5.85157 85.2893 6.50632 84.8273 7.58472H84.7888V6.27523C84.7888 6.15969 84.7118 6.08266 84.5963 6.08266H84.4039C84.2884 6.08266 84.2114 6.15969 84.2114 6.27523V15.2491C84.2114 15.3646 84.2884 15.4417 84.4039 15.4417H84.5963C84.7118 15.4417 84.7888 15.3646 84.7888 15.2491V9.31787C84.7888 7.46918 86.0978 6.39077 87.6763 6.39077C89.4858 6.39077 90.4097 7.35364 90.4097 9.58748V15.2106Z" fill="#002838"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M93.6437 13.1693C93.4512 12.6301 93.3742 11.9754 93.3742 10.6659C93.3742 9.3949 93.4897 8.70164 93.6437 8.16244C94.1442 6.58335 95.3761 5.77454 96.9546 5.77454C98.5716 5.77454 99.7651 6.58335 100.266 8.16244C100.458 8.70164 100.535 9.31787 100.535 10.5118C100.535 10.6274 100.458 10.7044 100.304 10.7044H94.0672C93.9902 10.7044 93.9517 10.7814 93.9517 10.8584C93.9517 11.8983 94.0287 12.4761 94.1827 12.9767C94.6447 14.4018 95.6841 15.018 97.0701 15.018C98.3791 15.018 99.3416 14.4403 99.9191 13.67C99.9961 13.5545 100.112 13.5545 100.189 13.6315L100.304 13.747C100.42 13.8241 100.42 13.9396 100.343 14.0166C99.6881 14.941 98.5716 15.5957 97.1086 15.5957C95.3376 15.5957 94.1442 14.7869 93.6437 13.1693ZM99.8421 10.1652C99.9191 10.1652 99.9576 10.1267 99.9576 10.0496C99.9576 9.3949 99.8806 8.8557 99.7266 8.39353C99.3031 7.04552 98.3021 6.35225 96.9546 6.35225C95.6071 6.35225 94.6062 7.00701 94.1827 8.39353C94.0287 8.8557 93.9517 9.35638 93.9517 10.0496C93.9517 10.1267 93.9902 10.1652 94.0672 10.1652H99.8421Z" fill="#002838"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M102.422 7.5462C102.422 7.58472 102.422 7.58472 102.46 7.58472H102.537C102.537 7.58472 102.576 7.58472 102.576 7.5462V7.08404H102.845L103.115 7.58472C103.134 7.58472 103.143 7.59435 103.153 7.60398C103.163 7.61361 103.172 7.62324 103.192 7.62324H103.307C103.346 7.62324 103.384 7.58472 103.346 7.5462L103.076 7.04552C103.269 7.00701 103.346 6.85295 103.346 6.69889C103.346 6.46781 103.191 6.31375 102.922 6.31375H102.46C102.441 6.31375 102.431 6.31375 102.426 6.31856C102.422 6.32337 102.422 6.333 102.422 6.35225V7.5462ZM102.922 6.50632C103.076 6.50632 103.153 6.58335 103.153 6.69889C103.153 6.81444 103.076 6.89147 102.922 6.89147H102.614V6.50632H102.922Z" fill="#002838"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M102.845 5.81305C102.191 5.81305 101.69 6.31374 101.69 6.96849C101.69 7.62323 102.191 8.12392 102.845 8.12392C103.499 8.12392 104 7.62323 104 6.96849C104 6.31374 103.499 5.81305 102.845 5.81305ZM102.845 6.00563C103.384 6.00563 103.807 6.39077 103.807 6.96849C103.807 7.50769 103.384 7.93135 102.845 7.93135C102.306 7.93135 101.883 7.5462 101.883 6.96849C101.883 6.42929 102.268 6.00563 102.845 6.00563Z" fill="#002838"/>
|
||||
<svg width="1064" height="208" viewBox="0 0 1064 208" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1058.44 56.71L1054.62 65.8L1050.83 56.71H1048.14V69.17H1050.35V60.78L1054.04 69.17H1055.25L1058.9 60.81V69.17H1061.16V56.71H1058.44Z" fill="#002447"/>
|
||||
<path d="M1036.16 58.66H1039.93V69.17H1042.18V58.66H1045.95V56.71H1036.16V58.66Z" fill="#002447"/>
|
||||
<path d="M387.93 56.01H364.88C364.41 56.01 364 56.33 363.9 56.79C362.34 64.07 350.48 119.72 349.82 124.39C349.77 124.74 349.55 124.74 349.5 124.39C348.76 119.72 335.93 63.99 334.27 56.77C334.17 56.32 333.76 56 333.3 56H311.79C311.32 56 310.92 56.31 310.82 56.77C309.15 63.98 296.28 119.72 295.56 124.39C295.49 124.82 295.24 124.82 295.17 124.39C294.49 119.72 282.67 64.08 281.12 56.79C281.02 56.33 280.62 56 280.14 56H257.09C256.43 56 255.95 56.62 256.12 57.26L281.19 151.13C281.31 151.57 281.7 151.87 282.16 151.87H306.4C306.86 151.87 307.26 151.56 307.37 151.11C308.89 144.7 319.55 99.78 321.96 89.27C322.08 88.75 322.81 88.75 322.93 89.27C325.37 99.77 336.16 144.71 337.69 151.11C337.8 151.56 338.2 151.87 338.66 151.87H362.84C363.29 151.87 363.69 151.57 363.81 151.13L388.88 57.26C389.05 56.63 388.57 56 387.91 56L387.93 56.01Z" fill="#002447"/>
|
||||
<path d="M462.52 60.19C457.29 57.4 451.07 56.01 443.86 56.01H406.59C406.04 56.01 405.59 56.46 405.59 57.01V150.88C405.59 151.43 406.04 151.88 406.59 151.88H427.3C427.85 151.88 428.3 151.43 428.3 150.88V121.96H443.21C450.54 121.96 456.87 120.59 462.19 117.84C467.51 115.1 471.61 111.28 474.48 106.39C477.35 101.5 478.79 95.75 478.79 89.15C478.79 82.55 477.38 76.82 474.57 71.84C471.76 66.86 467.74 62.98 462.51 60.19H462.52ZM455.41 96.93C454.21 99.16 452.41 100.9 450 102.14C447.6 103.38 444.62 104.01 441.06 104.01H428.31V74.41H441C444.56 74.41 447.55 75.01 449.97 76.21C452.39 77.41 454.2 79.12 455.41 81.33C456.61 83.54 457.21 86.15 457.21 89.15C457.21 92.15 456.61 94.71 455.41 96.94V96.93Z" fill="#002447"/>
|
||||
<path d="M583.93 67.87C580.2 64.11 576 61.31 571.33 59.47C566.66 57.63 561.8 56.71 556.75 56.71C548.73 56.71 541.69 58.77 535.63 62.89C529.56 67.01 524.84 72.66 521.47 79.85C518.09 87.04 516.41 95.28 516.41 104.55C516.41 113.82 518.13 122.04 521.56 129.17C524.99 136.31 529.85 141.89 536.14 145.93C542.43 149.96 549.88 151.98 558.5 151.98C564.7 151.98 570.19 150.98 574.97 148.97C579.75 146.97 583.71 144.32 586.87 141.02C589.75 138.01 591.91 134.78 593.35 131.32C593.57 130.78 593.27 130.17 592.72 129.99L583.98 127.21C583.49 127.06 582.98 127.3 582.77 127.76C581.68 130.14 580.14 132.35 578.14 134.39C575.92 136.67 573.17 138.5 569.91 139.87C566.64 141.24 562.87 141.93 558.59 141.93C552.28 141.93 546.8 140.44 542.16 137.44C537.52 134.45 533.94 130.25 531.41 124.84C529.05 119.79 527.81 113.95 527.65 107.34H594.97C595.52 107.34 595.97 106.89 595.97 106.34V102.48C595.97 94.69 594.9 87.91 592.76 82.14C590.62 76.38 587.68 71.61 583.95 67.85L583.93 67.87ZM531.28 83.55C533.72 78.5 537.13 74.44 541.49 71.36C545.85 68.29 550.95 66.75 556.77 66.75C562.59 66.75 567.67 68.26 571.84 71.28C576.01 74.3 579.22 78.42 581.47 83.63C583.3 87.87 584.38 92.57 584.72 97.71H527.69C527.98 92.62 529.17 87.9 531.28 83.55Z" fill="#002447"/>
|
||||
<path d="M672.03 60.62C667.34 58.01 661.86 56.71 655.6 56.71C648.63 56.71 642.44 58.49 637.03 62.06C632.71 64.91 629.32 69.2 626.84 74.89L626.78 58.94C626.78 58.39 626.33 57.94 625.78 57.94H616.99C616.44 57.94 615.99 58.39 615.99 58.94V149C615.99 149.55 616.44 150 616.99 150H626.19C626.74 150 627.19 149.55 627.19 149V92.61C627.19 87.34 628.3 82.77 630.52 78.9C632.74 75.03 635.78 72.07 639.62 70.01C643.46 67.95 647.8 66.92 652.63 66.92C659.71 66.92 665.36 69.1 669.59 73.47C673.82 77.83 675.93 83.78 675.93 91.3V149.01C675.93 149.56 676.38 150.01 676.93 150.01H686.05C686.6 150.01 687.05 149.56 687.05 149.01V90.48C687.05 83.18 685.72 77.03 683.06 72.03C680.4 67.04 676.72 63.23 672.03 60.63V60.62Z" fill="#002447"/>
|
||||
<path d="M783.6 57.94H774.73C774.18 57.94 773.73 58.39 773.73 58.94V75.64H772.58C771.37 72.84 769.63 69.97 767.35 67.04C765.07 64.1 762.07 61.65 758.33 59.67C754.6 57.69 749.93 56.71 744.33 56.71C736.81 56.71 730.19 58.69 724.48 62.64C718.77 66.59 714.32 72.1 711.14 79.15C707.96 86.2 706.36 94.43 706.36 103.81C706.36 113.19 707.98 121.27 711.22 128.02C714.46 134.77 718.92 139.96 724.6 143.58C730.28 147.2 736.77 149.01 744.07 149.01C749.56 149.01 754.17 148.12 757.9 146.33C761.63 144.55 764.67 142.27 767 139.5C769.33 136.73 771.1 133.91 772.31 131.06H773.38V151.73C773.38 160.18 770.91 166.43 765.97 170.46C761.03 174.5 754.5 176.51 746.37 176.51C741.26 176.51 736.95 175.81 733.44 174.41C729.93 173.01 727.06 171.2 724.83 168.98C722.88 167.03 721.28 165.03 720.03 162.97C719.74 162.5 719.13 162.34 718.66 162.62L711.11 167.2C710.66 167.48 710.49 168.06 710.74 168.53C712.51 171.81 714.89 174.74 717.88 177.33C721.12 180.13 725.11 182.34 729.86 183.96C734.61 185.58 740.11 186.39 746.37 186.39C753.73 186.39 760.29 185.17 766.05 182.73C771.81 180.29 776.34 176.54 779.64 171.49C782.93 166.44 784.58 160.02 784.58 152.22V58.94C784.58 58.39 784.13 57.94 783.58 57.94H783.6ZM770.28 122.54C768.08 127.84 764.91 131.9 760.77 134.73C756.62 137.56 751.62 138.97 745.74 138.97C739.86 138.97 734.68 137.48 730.51 134.48C726.34 131.49 723.15 127.33 720.96 122.01C718.76 116.69 717.67 110.54 717.67 103.56C717.67 96.58 718.75 90.5 720.92 84.95C723.09 79.41 726.26 75 730.43 71.73C734.6 68.46 739.71 66.83 745.75 66.83C751.79 66.83 756.78 68.41 760.9 71.56C765.02 74.72 768.16 79.05 770.33 84.57C772.5 90.09 773.58 96.41 773.58 103.55C773.58 110.69 772.48 117.23 770.29 122.53L770.28 122.54Z" fill="#002447"/>
|
||||
<path d="M823.62 57.94H814.42C813.868 57.94 813.42 58.3877 813.42 58.94V149C813.42 149.552 813.868 150 814.42 150H823.62C824.172 150 824.62 149.552 824.62 149V58.94C824.62 58.3877 824.172 57.94 823.62 57.94Z" fill="#002447"/>
|
||||
<path d="M819.02 44.89C822.516 44.89 825.35 42.0559 825.35 38.56C825.35 35.064 822.516 32.23 819.02 32.23C815.524 32.23 812.69 35.064 812.69 38.56C812.69 42.0559 815.524 44.89 819.02 44.89Z" fill="#002447"/>
|
||||
<path d="M910.3 60.62C905.61 58.01 900.13 56.71 893.87 56.71C886.9 56.71 880.71 58.49 875.3 62.06C870.98 64.91 867.59 69.2 865.11 74.89L865.05 58.94C865.05 58.39 864.6 57.94 864.05 57.94H855.26C854.71 57.94 854.26 58.39 854.26 58.94V149C854.26 149.55 854.71 150 855.26 150H864.46C865.01 150 865.46 149.55 865.46 149V92.61C865.46 87.34 866.57 82.77 868.79 78.9C871.01 75.03 874.05 72.07 877.89 70.01C881.73 67.95 886.07 66.92 890.9 66.92C897.98 66.92 903.63 69.1 907.86 73.47C912.09 77.83 914.2 83.78 914.2 91.3V149.01C914.2 149.56 914.65 150.01 915.2 150.01H924.32C924.87 150.01 925.32 149.56 925.32 149.01V90.48C925.32 83.18 923.99 77.03 921.33 72.03C918.67 67.04 914.99 63.23 910.3 60.63V60.62Z" fill="#002447"/>
|
||||
<path d="M1012.78 67.87C1009.05 64.11 1004.85 61.31 1000.18 59.47C995.51 57.63 990.65 56.71 985.6 56.71C977.58 56.71 970.54 58.77 964.48 62.89C958.41 67.01 953.69 72.66 950.32 79.85C946.94 87.04 945.26 95.28 945.26 104.55C945.26 113.82 946.98 122.04 950.41 129.17C953.84 136.31 958.7 141.89 964.99 145.93C971.28 149.96 978.73 151.98 987.35 151.98C993.55 151.98 999.04 150.98 1003.82 148.97C1008.6 146.97 1012.56 144.32 1015.72 141.02C1018.6 138.01 1020.76 134.78 1022.2 131.32C1022.42 130.78 1022.12 130.17 1021.57 129.99L1012.83 127.21C1012.34 127.06 1011.83 127.3 1011.62 127.76C1010.53 130.14 1008.99 132.35 1006.99 134.39C1004.77 136.67 1002.02 138.5 998.76 139.87C995.49 141.24 991.72 141.93 987.44 141.93C981.13 141.93 975.65 140.44 971.01 137.44C966.37 134.45 962.79 130.25 960.26 124.84C957.9 119.79 956.66 113.95 956.5 107.34H1023.82C1024.37 107.34 1024.82 106.89 1024.82 106.34V102.48C1024.82 94.69 1023.75 87.91 1021.61 82.14C1019.47 76.38 1016.53 71.61 1012.8 67.85L1012.78 67.87ZM960.12 83.55C962.56 78.5 965.97 74.44 970.33 71.36C974.69 68.29 979.79 66.75 985.61 66.75C991.43 66.75 996.51 68.26 1000.68 71.28C1004.85 74.3 1008.06 78.42 1010.31 83.63C1012.14 87.87 1013.22 92.57 1013.56 97.71H956.53C956.82 92.62 958.01 87.9 960.12 83.55Z" fill="#002447"/>
|
||||
<path d="M133 208C134.66 208 136 206.66 136 205V162.49C136 160.9 135.37 159.37 134.24 158.25L121.75 145.76C120.62 144.63 119.1 144 117.51 144H90.48C88.89 144 87.36 144.63 86.24 145.76L73.75 158.25C72.62 159.38 71.99 160.9 71.99 162.49V205C71.99 206.66 73.33 208 74.99 208H133Z" fill="#0ECAD4"/>
|
||||
<path d="M158.24 73.76L145.75 86.25C144.62 87.38 143.99 88.9 143.99 90.49V117.52C143.99 119.11 144.62 120.64 145.75 121.76L158.24 134.25C159.37 135.38 160.89 136.01 162.48 136.01H204.99C206.65 136.01 207.99 134.67 207.99 133.01V75.01C207.99 73.35 206.65 72.01 204.99 72.01H162.48C160.89 72.01 159.36 72.64 158.24 73.77V73.76Z" fill="#0ECAD4"/>
|
||||
<path d="M75 0C73.34 0 72 1.34 72 3V45.51C72 47.1 72.63 48.63 73.76 49.75L86.25 62.24C87.38 63.37 88.9 64 90.49 64H117.52C119.11 64 120.64 63.37 121.76 62.24L134.25 49.75C135.38 48.62 136.01 47.1 136.01 45.51V3C136.01 1.34 134.67 0 133.01 0H75Z" fill="#0ECAD4"/>
|
||||
<path d="M205 144H162.49C160.9 144 159.37 144.63 158.25 145.76L145.76 158.25C144.63 159.38 144 160.9 144 162.49V205C144 206.66 145.34 208 147 208H205C206.66 208 208 206.66 208 205V147C208 145.34 206.66 144 205 144Z" fill="#0ECAD4"/>
|
||||
<path d="M61 0H18.49C16.89 0 15.37 0.63 14.24 1.76L1.76 14.24C0.63 15.37 0 16.89 0 18.49V61C0 62.66 1.34 64 3 64H45.51C47.1 64 48.63 63.37 49.75 62.24L62.24 49.75C63.37 48.62 64 47.1 64 45.51V3C64 1.34 62.66 0 61 0Z" fill="#0ECAD4"/>
|
||||
<path d="M144 3V45.51C144 47.1 144.63 48.63 145.76 49.75L158.25 62.24C159.38 63.37 160.9 64 162.49 64H205C206.66 64 208 62.66 208 61V3C208 1.34 206.66 0 205 0H147C145.34 0 144 1.34 144 3Z" fill="#0ECAD4"/>
|
||||
<path d="M104 120C95.16 120 88 112.84 88 104C88 95.16 95.17 88 104 88C112.83 88 120 95.16 120 104C120 112.84 112.83 120 104 120Z" fill="#0ECAD4"/>
|
||||
<path d="M0 147V205C0 206.66 1.34 208 3 208H61C62.66 208 64 206.66 64 205V162.49C64 160.9 63.37 159.37 62.24 158.25L49.75 145.76C48.62 144.63 47.1 144 45.51 144H3C1.34 144 0 145.34 0 147Z" fill="#0ECAD4"/>
|
||||
<path d="M62.24 86.24L49.75 73.75C48.62 72.62 47.1 71.99 45.51 71.99H3C1.34 72 0 73.34 0 75V133C0 134.66 1.34 136 3 136H46.2C47.79 136 49.32 135.37 50.44 134.24L62.24 122.45C63.37 121.32 64 119.8 64 118.21V90.49C64 88.9 63.37 87.37 62.24 86.25V86.24Z" fill="#0ECAD4"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 10 KiB |
@@ -1,14 +1,22 @@
|
||||
<svg width="104" height="20" viewBox="0 0 104 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.923096 1.52942L2.45251 0H7.35447V6.43138H0.923096V1.52942ZM7.70741 0H14.1388V4.90196L12.5702 6.43138H9.23682L7.70741 4.90196V0ZM16.0211 6.78432L14.4917 8.31373V11.6863L16.0211 13.2157H20.9231V6.78432H16.0211ZM7.70741 20H14.1388V15.098L12.5702 13.5686H9.23682L7.70741 15.098V20ZM20.9231 20V15.098L19.3937 13.5686H14.4917V20H20.9231ZM14.4917 0V4.90196L16.0211 6.43138H20.9231V0H14.4917ZM10.0211 10C10.0211 10.4706 10.4133 10.902 10.9231 10.902C11.4329 10.902 11.8251 10.5098 11.8251 10C11.8251 9.52941 11.4329 9.09804 10.9231 9.09804C10.4525 9.09804 10.0211 9.4902 10.0211 10ZM7.35447 6.78432H0.923096V13.2157H5.78584L7.35447 11.6863V6.78432ZM5.78584 13.5686L7.35447 15.098V18.4706L5.78584 20H0.923096V13.5686H5.78584Z" fill="#0ECAD4"/>
|
||||
<path d="M80.4769 3.11705C80.3614 3.11705 80.2844 3.04002 80.2844 2.92447V2.11567C80.2844 2.00012 80.3614 1.9231 80.4769 1.9231H80.9389C81.0544 1.9231 81.1314 2.00012 81.1314 2.11567V2.92447C81.1314 3.04002 81.0544 3.11705 80.9389 3.11705H80.4769Z" fill="white"/>
|
||||
<path d="M80.6309 15.4031C80.5154 15.4031 80.4384 15.3261 80.4384 15.2106V6.23672C80.4384 6.12117 80.5154 6.04414 80.6309 6.04414H80.8234C80.9389 6.04414 81.0159 6.12117 81.0159 6.23672V15.2106C81.0159 15.3261 80.9389 15.4031 80.8234 15.4031H80.6309Z" fill="white"/>
|
||||
<path d="M33.8928 15.5957C33.7773 15.5957 33.7388 15.5572 33.7003 15.4417L32.1218 9.85707H32.0833L30.5049 15.4417C30.4664 15.5572 30.4279 15.5957 30.3124 15.5957H28.4644C28.3489 15.5957 28.3104 15.5572 28.2719 15.4417L25.5385 5.73603C25.5385 5.659 25.5385 5.58197 25.654 5.58197H28.0794C28.1949 5.58197 28.2719 5.659 28.2719 5.73603L29.5809 11.5517H29.6194L31.1593 5.73603C31.1978 5.62049 31.2363 5.58197 31.3518 5.58197H32.8533C32.9688 5.58197 33.0073 5.62049 33.0458 5.73603L34.6628 11.5517H34.7013L35.9333 5.73603C35.9333 5.659 36.0103 5.58197 36.1258 5.58197H38.5512C38.6282 5.58197 38.6667 5.659 38.6667 5.73603L35.9718 15.4417C35.9333 15.5572 35.8948 15.5957 35.7793 15.5957H33.8928Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.5917 15.5957C40.5147 15.5957 40.4377 15.5187 40.4377 15.4417V5.73603C40.4377 5.659 40.5147 5.58197 40.5917 5.58197H44.5956C47.0211 5.58197 48.2915 6.96849 48.2915 8.89421C48.2915 10.8199 47.0211 12.245 44.5956 12.245H43.1326C43.0556 12.245 43.0556 12.2835 43.0556 12.322V15.4031C43.0556 15.4802 42.9786 15.5572 42.9016 15.5572H40.5917V15.5957ZM45.7121 8.93273C45.7121 8.23947 45.2501 7.81581 44.4416 7.81581H43.1326C43.0556 7.81581 43.0556 7.85432 43.0556 7.89283V10.0111C43.0556 10.0882 43.0941 10.0882 43.1326 10.0882H44.4416C45.2501 10.0882 45.7121 9.62598 45.7121 8.93273Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M51.4485 10.6659C51.4485 11.9754 51.5255 12.6301 51.718 13.1693C52.257 14.7869 53.4119 15.5957 55.1444 15.5957C56.6074 15.5957 57.7238 14.941 58.3783 14.0166C58.4553 13.9396 58.4553 13.8241 58.3398 13.747L58.2243 13.6315C58.1473 13.5545 58.0318 13.5545 57.9549 13.67C57.3774 14.4403 56.4149 15.018 55.1059 15.018C53.7199 15.018 52.6804 14.4018 52.2184 12.9767C52.0645 12.4761 51.9875 11.8983 51.9875 10.8584C51.9875 10.7814 52.026 10.7044 52.103 10.7044H58.3783C58.5323 10.7044 58.6093 10.6274 58.6093 10.5118C58.6093 9.31787 58.5323 8.70164 58.3398 8.16244C57.8394 6.58335 56.6459 5.77454 55.0289 5.77454C53.4504 5.77454 52.2185 6.58335 51.718 8.16244C51.564 8.70164 51.4485 9.3949 51.4485 10.6659ZM58.0703 10.0496C58.0703 10.1267 58.0318 10.1652 57.9549 10.1652H52.18C52.103 10.1652 52.0645 10.1267 52.0645 10.0496C52.0645 9.35638 52.1415 8.8557 52.2955 8.39353C52.7189 7.00701 53.7199 6.35225 55.0674 6.35225C56.4149 6.35225 57.4159 7.04552 57.8393 8.39353C57.9933 8.8557 58.0703 9.3949 58.0703 10.0496Z" fill="white"/>
|
||||
<path d="M67.5412 15.4031C67.4257 15.4031 67.3487 15.3261 67.3487 15.2106V9.58748C67.3487 7.35364 66.4247 6.39077 64.6152 6.39077C63.0368 6.39077 61.7278 7.46918 61.7278 9.31787V15.2491C61.7278 15.3646 61.6508 15.4417 61.5353 15.4417H61.3428C61.2273 15.4417 61.1503 15.3646 61.1503 15.2491V6.27523C61.1503 6.15969 61.2273 6.08266 61.3428 6.08266H61.5353C61.6508 6.08266 61.7278 6.15969 61.7278 6.27523V7.58472H61.7663C62.2283 6.50632 63.3062 5.85157 64.6537 5.85157C66.7712 5.85157 67.9647 7.04552 67.9647 9.47193V15.2491C67.9647 15.3646 67.8877 15.4417 67.7722 15.4417H67.5412V15.4031Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M70.8136 17.56C70.6981 17.5985 70.6981 17.714 70.7751 17.8296C71.2371 18.5613 72.3536 19.1776 73.7011 19.2161C75.857 19.2161 77.243 18.0606 77.243 15.4802V6.27523C77.243 6.15969 77.166 6.08266 77.0505 6.08266H76.858C76.7425 6.08266 76.6655 6.15969 76.6655 6.27523V7.62324H76.627C76.165 6.58335 75.3565 5.85157 73.7011 5.85157C72.1226 5.85157 71.0446 6.69888 70.5826 8.0854C70.3901 8.74015 70.2746 9.58748 70.2746 10.7429C70.2746 11.8983 70.3516 12.7457 70.5826 13.4004C71.0446 14.7869 72.1226 15.6342 73.7011 15.6342C75.3565 15.6342 76.165 14.9025 76.627 13.8626H76.6655V15.4417C76.6655 17.7525 75.5105 18.6384 73.7396 18.6384C72.5846 18.6384 71.7761 18.2147 71.2371 17.5214C71.1601 17.4059 71.0831 17.3674 70.9676 17.4444L70.8136 17.56ZM76.6655 10.7044C76.6655 11.8983 76.5885 12.5916 76.396 13.1693C75.9725 14.5558 74.933 15.0565 73.778 14.9795C72.5076 14.9795 71.6221 14.3633 71.1986 13.1308C71.0061 12.5531 70.8906 11.7443 70.8906 10.6659C70.8906 9.58747 71.0061 8.77867 71.1986 8.20095C71.5836 6.96849 72.5076 6.35225 73.778 6.35225C74.933 6.35225 75.934 6.85295 76.396 8.23947C76.5885 8.81719 76.6655 9.54896 76.6655 10.7044Z" fill="white"/>
|
||||
<path d="M90.4097 15.2106C90.4097 15.3261 90.4867 15.4031 90.6022 15.4031V15.4417H90.8332C90.9487 15.4417 91.0257 15.3646 91.0257 15.2491V9.47193C91.0257 7.04552 89.8323 5.85157 87.7148 5.85157C86.3673 5.85157 85.2893 6.50632 84.8273 7.58472H84.7888V6.27523C84.7888 6.15969 84.7118 6.08266 84.5963 6.08266H84.4039C84.2884 6.08266 84.2114 6.15969 84.2114 6.27523V15.2491C84.2114 15.3646 84.2884 15.4417 84.4039 15.4417H84.5963C84.7118 15.4417 84.7888 15.3646 84.7888 15.2491V9.31787C84.7888 7.46918 86.0978 6.39077 87.6763 6.39077C89.4858 6.39077 90.4097 7.35364 90.4097 9.58748V15.2106Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M93.6437 13.1693C93.4512 12.6301 93.3742 11.9754 93.3742 10.6659C93.3742 9.3949 93.4897 8.70164 93.6437 8.16244C94.1442 6.58335 95.3761 5.77454 96.9546 5.77454C98.5716 5.77454 99.7651 6.58335 100.266 8.16244C100.458 8.70164 100.535 9.31787 100.535 10.5118C100.535 10.6274 100.458 10.7044 100.304 10.7044H94.0672C93.9902 10.7044 93.9517 10.7814 93.9517 10.8584C93.9517 11.8983 94.0287 12.4761 94.1827 12.9767C94.6447 14.4018 95.6841 15.018 97.0701 15.018C98.3791 15.018 99.3416 14.4403 99.9191 13.67C99.9961 13.5545 100.112 13.5545 100.189 13.6315L100.304 13.747C100.42 13.8241 100.42 13.9396 100.343 14.0166C99.6881 14.941 98.5716 15.5957 97.1086 15.5957C95.3376 15.5957 94.1442 14.7869 93.6437 13.1693ZM99.8421 10.1652C99.9191 10.1652 99.9576 10.1267 99.9576 10.0496C99.9576 9.3949 99.8806 8.8557 99.7266 8.39353C99.3031 7.04552 98.3021 6.35225 96.9546 6.35225C95.6071 6.35225 94.6062 7.00701 94.1827 8.39353C94.0287 8.8557 93.9517 9.35638 93.9517 10.0496C93.9517 10.1267 93.9902 10.1652 94.0672 10.1652H99.8421Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M102.422 7.5462C102.422 7.58472 102.422 7.58472 102.46 7.58472H102.537C102.537 7.58472 102.576 7.58472 102.576 7.5462V7.08404H102.845L103.115 7.58472C103.134 7.58472 103.143 7.59435 103.153 7.60398C103.163 7.61361 103.172 7.62324 103.192 7.62324H103.307C103.346 7.62324 103.384 7.58472 103.346 7.5462L103.076 7.04552C103.269 7.00701 103.346 6.85295 103.346 6.69889C103.346 6.46781 103.191 6.31375 102.922 6.31375H102.46C102.441 6.31375 102.431 6.31375 102.426 6.31856C102.422 6.32337 102.422 6.333 102.422 6.35225V7.5462ZM102.922 6.50632C103.076 6.50632 103.153 6.58335 103.153 6.69889C103.153 6.81444 103.076 6.89147 102.922 6.89147H102.614V6.50632H102.922Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M102.845 5.81305C102.191 5.81305 101.69 6.31374 101.69 6.96849C101.69 7.62323 102.191 8.12392 102.845 8.12392C103.499 8.12392 104 7.62323 104 6.96849C104 6.31374 103.499 5.81305 102.845 5.81305ZM102.845 6.00563C103.384 6.00563 103.807 6.39077 103.807 6.96849C103.807 7.50769 103.384 7.93135 102.845 7.93135C102.306 7.93135 101.883 7.5462 101.883 6.96849C101.883 6.42929 102.268 6.00563 102.845 6.00563Z" fill="white"/>
|
||||
<svg width="1064" height="208" viewBox="0 0 1064 208" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1058.44 56.71L1054.62 65.8L1050.83 56.71H1048.14V69.17H1050.35V60.78L1054.04 69.17H1055.25L1058.9 60.81V69.17H1061.16V56.71H1058.44Z" fill="white"/>
|
||||
<path d="M1036.16 58.66H1039.93V69.17H1042.18V58.66H1045.95V56.71H1036.16V58.66Z" fill="white"/>
|
||||
<path d="M387.93 56.01H364.88C364.41 56.01 364 56.33 363.9 56.79C362.34 64.07 350.48 119.72 349.82 124.39C349.77 124.74 349.55 124.74 349.5 124.39C348.76 119.72 335.93 63.99 334.27 56.77C334.17 56.32 333.76 56 333.3 56H311.79C311.32 56 310.92 56.31 310.82 56.77C309.15 63.98 296.28 119.72 295.56 124.39C295.49 124.82 295.24 124.82 295.17 124.39C294.49 119.72 282.67 64.08 281.12 56.79C281.02 56.33 280.62 56 280.14 56H257.09C256.43 56 255.95 56.62 256.12 57.26L281.19 151.13C281.31 151.57 281.7 151.87 282.16 151.87H306.4C306.86 151.87 307.26 151.56 307.37 151.11C308.89 144.7 319.55 99.78 321.96 89.27C322.08 88.75 322.81 88.75 322.93 89.27C325.37 99.77 336.16 144.71 337.69 151.11C337.8 151.56 338.2 151.87 338.66 151.87H362.84C363.29 151.87 363.69 151.57 363.81 151.13L388.88 57.26C389.05 56.63 388.57 56 387.91 56L387.93 56.01Z" fill="white"/>
|
||||
<path d="M462.52 60.19C457.29 57.4 451.07 56.01 443.86 56.01H406.59C406.04 56.01 405.59 56.46 405.59 57.01V150.88C405.59 151.43 406.04 151.88 406.59 151.88H427.3C427.85 151.88 428.3 151.43 428.3 150.88V121.96H443.21C450.54 121.96 456.87 120.59 462.19 117.84C467.51 115.1 471.61 111.28 474.48 106.39C477.35 101.5 478.79 95.75 478.79 89.15C478.79 82.55 477.38 76.82 474.57 71.84C471.76 66.86 467.74 62.98 462.51 60.19H462.52ZM455.41 96.93C454.21 99.16 452.41 100.9 450 102.14C447.6 103.38 444.62 104.01 441.06 104.01H428.31V74.41H441C444.56 74.41 447.55 75.01 449.97 76.21C452.39 77.41 454.2 79.12 455.41 81.33C456.61 83.54 457.21 86.15 457.21 89.15C457.21 92.15 456.61 94.71 455.41 96.94V96.93Z" fill="white"/>
|
||||
<path d="M583.93 67.87C580.2 64.11 576 61.31 571.33 59.47C566.66 57.63 561.8 56.71 556.75 56.71C548.73 56.71 541.69 58.77 535.63 62.89C529.56 67.01 524.84 72.66 521.47 79.85C518.09 87.04 516.41 95.28 516.41 104.55C516.41 113.82 518.13 122.04 521.56 129.17C524.99 136.31 529.85 141.89 536.14 145.93C542.43 149.96 549.88 151.98 558.5 151.98C564.7 151.98 570.19 150.98 574.97 148.97C579.75 146.97 583.71 144.32 586.87 141.02C589.75 138.01 591.91 134.78 593.35 131.32C593.57 130.78 593.27 130.17 592.72 129.99L583.98 127.21C583.49 127.06 582.98 127.3 582.77 127.76C581.68 130.14 580.14 132.35 578.14 134.39C575.92 136.67 573.17 138.5 569.91 139.87C566.64 141.24 562.87 141.93 558.59 141.93C552.28 141.93 546.8 140.44 542.16 137.44C537.52 134.45 533.94 130.25 531.41 124.84C529.05 119.79 527.81 113.95 527.65 107.34H594.97C595.52 107.34 595.97 106.89 595.97 106.34V102.48C595.97 94.69 594.9 87.91 592.76 82.14C590.62 76.38 587.68 71.61 583.95 67.85L583.93 67.87ZM531.28 83.55C533.72 78.5 537.13 74.44 541.49 71.36C545.85 68.29 550.95 66.75 556.77 66.75C562.59 66.75 567.67 68.26 571.84 71.28C576.01 74.3 579.22 78.42 581.47 83.63C583.3 87.87 584.38 92.57 584.72 97.71H527.69C527.98 92.62 529.17 87.9 531.28 83.55Z" fill="white"/>
|
||||
<path d="M672.03 60.62C667.34 58.01 661.86 56.71 655.6 56.71C648.63 56.71 642.44 58.49 637.03 62.06C632.71 64.91 629.32 69.2 626.84 74.89L626.78 58.94C626.78 58.39 626.33 57.94 625.78 57.94H616.99C616.44 57.94 615.99 58.39 615.99 58.94V149C615.99 149.55 616.44 150 616.99 150H626.19C626.74 150 627.19 149.55 627.19 149V92.61C627.19 87.34 628.3 82.77 630.52 78.9C632.74 75.03 635.78 72.07 639.62 70.01C643.46 67.95 647.8 66.92 652.63 66.92C659.71 66.92 665.36 69.1 669.59 73.47C673.82 77.83 675.93 83.78 675.93 91.3V149.01C675.93 149.56 676.38 150.01 676.93 150.01H686.05C686.6 150.01 687.05 149.56 687.05 149.01V90.48C687.05 83.18 685.72 77.03 683.06 72.03C680.4 67.04 676.72 63.23 672.03 60.63V60.62Z" fill="white"/>
|
||||
<path d="M783.6 57.94H774.73C774.18 57.94 773.73 58.39 773.73 58.94V75.64H772.58C771.37 72.84 769.63 69.97 767.35 67.04C765.07 64.1 762.07 61.65 758.33 59.67C754.6 57.69 749.93 56.71 744.33 56.71C736.81 56.71 730.19 58.69 724.48 62.64C718.77 66.59 714.32 72.1 711.14 79.15C707.96 86.2 706.36 94.43 706.36 103.81C706.36 113.19 707.98 121.27 711.22 128.02C714.46 134.77 718.92 139.96 724.6 143.58C730.28 147.2 736.77 149.01 744.07 149.01C749.56 149.01 754.17 148.12 757.9 146.33C761.63 144.55 764.67 142.27 767 139.5C769.33 136.73 771.1 133.91 772.31 131.06H773.38V151.73C773.38 160.18 770.91 166.43 765.97 170.46C761.03 174.5 754.5 176.51 746.37 176.51C741.26 176.51 736.95 175.81 733.44 174.41C729.93 173.01 727.06 171.2 724.83 168.98C722.88 167.03 721.28 165.03 720.03 162.97C719.74 162.5 719.13 162.34 718.66 162.62L711.11 167.2C710.66 167.48 710.49 168.06 710.74 168.53C712.51 171.81 714.89 174.74 717.88 177.33C721.12 180.13 725.11 182.34 729.86 183.96C734.61 185.58 740.11 186.39 746.37 186.39C753.73 186.39 760.29 185.17 766.05 182.73C771.81 180.29 776.34 176.54 779.64 171.49C782.93 166.44 784.58 160.02 784.58 152.22V58.94C784.58 58.39 784.13 57.94 783.58 57.94H783.6ZM770.28 122.54C768.08 127.84 764.91 131.9 760.77 134.73C756.62 137.56 751.62 138.97 745.74 138.97C739.86 138.97 734.68 137.48 730.51 134.48C726.34 131.49 723.15 127.33 720.96 122.01C718.76 116.69 717.67 110.54 717.67 103.56C717.67 96.58 718.75 90.5 720.92 84.95C723.09 79.41 726.26 75 730.43 71.73C734.6 68.46 739.71 66.83 745.75 66.83C751.79 66.83 756.78 68.41 760.9 71.56C765.02 74.72 768.16 79.05 770.33 84.57C772.5 90.09 773.58 96.41 773.58 103.55C773.58 110.69 772.48 117.23 770.29 122.53L770.28 122.54Z" fill="white"/>
|
||||
<path d="M823.62 57.94H814.42C813.868 57.94 813.42 58.3877 813.42 58.94V149C813.42 149.552 813.868 150 814.42 150H823.62C824.173 150 824.62 149.552 824.62 149V58.94C824.62 58.3877 824.173 57.94 823.62 57.94Z" fill="white"/>
|
||||
<path d="M819.02 44.89C822.516 44.89 825.35 42.0559 825.35 38.56C825.35 35.064 822.516 32.23 819.02 32.23C815.524 32.23 812.69 35.064 812.69 38.56C812.69 42.0559 815.524 44.89 819.02 44.89Z" fill="white"/>
|
||||
<path d="M910.3 60.62C905.61 58.01 900.13 56.71 893.87 56.71C886.9 56.71 880.71 58.49 875.3 62.06C870.98 64.91 867.59 69.2 865.11 74.89L865.05 58.94C865.05 58.39 864.6 57.94 864.05 57.94H855.26C854.71 57.94 854.26 58.39 854.26 58.94V149C854.26 149.55 854.71 150 855.26 150H864.46C865.01 150 865.46 149.55 865.46 149V92.61C865.46 87.34 866.57 82.77 868.79 78.9C871.01 75.03 874.05 72.07 877.89 70.01C881.73 67.95 886.07 66.92 890.9 66.92C897.98 66.92 903.63 69.1 907.86 73.47C912.09 77.83 914.2 83.78 914.2 91.3V149.01C914.2 149.56 914.65 150.01 915.2 150.01H924.32C924.87 150.01 925.32 149.56 925.32 149.01V90.48C925.32 83.18 923.99 77.03 921.33 72.03C918.67 67.04 914.99 63.23 910.3 60.63V60.62Z" fill="white"/>
|
||||
<path d="M1012.78 67.87C1009.05 64.11 1004.85 61.31 1000.18 59.47C995.51 57.63 990.65 56.71 985.6 56.71C977.58 56.71 970.54 58.77 964.48 62.89C958.41 67.01 953.69 72.66 950.32 79.85C946.94 87.04 945.26 95.28 945.26 104.55C945.26 113.82 946.98 122.04 950.41 129.17C953.84 136.31 958.7 141.89 964.99 145.93C971.28 149.96 978.73 151.98 987.35 151.98C993.55 151.98 999.04 150.98 1003.82 148.97C1008.6 146.97 1012.56 144.32 1015.72 141.02C1018.6 138.01 1020.76 134.78 1022.2 131.32C1022.42 130.78 1022.12 130.17 1021.57 129.99L1012.83 127.21C1012.34 127.06 1011.83 127.3 1011.62 127.76C1010.53 130.14 1008.99 132.35 1006.99 134.39C1004.77 136.67 1002.02 138.5 998.76 139.87C995.49 141.24 991.72 141.93 987.44 141.93C981.13 141.93 975.65 140.44 971.01 137.44C966.37 134.45 962.79 130.25 960.26 124.84C957.9 119.79 956.66 113.95 956.5 107.34H1023.82C1024.37 107.34 1024.82 106.89 1024.82 106.34V102.48C1024.82 94.69 1023.75 87.91 1021.61 82.14C1019.47 76.38 1016.53 71.61 1012.8 67.85L1012.78 67.87ZM960.12 83.55C962.56 78.5 965.97 74.44 970.33 71.36C974.69 68.29 979.79 66.75 985.61 66.75C991.43 66.75 996.51 68.26 1000.68 71.28C1004.85 74.3 1008.06 78.42 1010.31 83.63C1012.14 87.87 1013.22 92.57 1013.56 97.71H956.53C956.82 92.62 958.01 87.9 960.12 83.55Z" fill="white"/>
|
||||
<path d="M133 208C134.66 208 136 206.66 136 205V162.49C136 160.9 135.37 159.37 134.24 158.25L121.75 145.76C120.62 144.63 119.1 144 117.51 144H90.48C88.89 144 87.36 144.63 86.24 145.76L73.75 158.25C72.62 159.38 71.99 160.9 71.99 162.49V205C71.99 206.66 73.33 208 74.99 208H133Z" fill="#0ECAD4"/>
|
||||
<path d="M158.24 73.76L145.75 86.25C144.62 87.38 143.99 88.9 143.99 90.49V117.52C143.99 119.11 144.62 120.64 145.75 121.76L158.24 134.25C159.37 135.38 160.89 136.01 162.48 136.01H204.99C206.65 136.01 207.99 134.67 207.99 133.01V75.01C207.99 73.35 206.65 72.01 204.99 72.01H162.48C160.89 72.01 159.36 72.64 158.24 73.77V73.76Z" fill="#0ECAD4"/>
|
||||
<path d="M75 0C73.34 0 72 1.34 72 3V45.51C72 47.1 72.63 48.63 73.76 49.75L86.25 62.24C87.38 63.37 88.9 64 90.49 64H117.52C119.11 64 120.64 63.37 121.76 62.24L134.25 49.75C135.38 48.62 136.01 47.1 136.01 45.51V3C136.01 1.34 134.67 0 133.01 0H75Z" fill="#0ECAD4"/>
|
||||
<path d="M205 144H162.49C160.9 144 159.37 144.63 158.25 145.76L145.76 158.25C144.63 159.38 144 160.9 144 162.49V205C144 206.66 145.34 208 147 208H205C206.66 208 208 206.66 208 205V147C208 145.34 206.66 144 205 144Z" fill="#0ECAD4"/>
|
||||
<path d="M61 0H18.49C16.89 0 15.37 0.63 14.24 1.76L1.76 14.24C0.63 15.37 0 16.89 0 18.49V61C0 62.66 1.34 64 3 64H45.51C47.1 64 48.63 63.37 49.75 62.24L62.24 49.75C63.37 48.62 64 47.1 64 45.51V3C64 1.34 62.66 0 61 0Z" fill="#0ECAD4"/>
|
||||
<path d="M144 3V45.51C144 47.1 144.63 48.63 145.76 49.75L158.25 62.24C159.38 63.37 160.9 64 162.49 64H205C206.66 64 208 62.66 208 61V3C208 1.34 206.66 0 205 0H147C145.34 0 144 1.34 144 3Z" fill="#0ECAD4"/>
|
||||
<path d="M104 120C95.16 120 88 112.84 88 104C88 95.16 95.17 88 104 88C112.83 88 120 95.16 120 104C120 112.84 112.83 120 104 120Z" fill="#0ECAD4"/>
|
||||
<path d="M0 147V205C0 206.66 1.34 208 3 208H61C62.66 208 64 206.66 64 205V162.49C64 160.9 63.37 159.37 62.24 158.25L49.75 145.76C48.62 144.63 47.1 144 45.51 144H3C1.34 144 0 145.34 0 147Z" fill="#0ECAD4"/>
|
||||
<path d="M62.24 86.24L49.75 73.75C48.62 72.62 47.1 71.99 45.51 71.99H3C1.34 72 0 73.34 0 75V133C0 134.66 1.34 136 3 136H46.2C47.79 136 49.32 135.37 50.44 134.24L62.24 122.45C63.37 121.32 64 119.8 64 118.21V90.49C64 88.9 63.37 87.37 62.24 86.25V86.24Z" fill="#0ECAD4"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 9.9 KiB |
@@ -667,3 +667,45 @@ function acf_maybe_unserialize( $data ) {
|
||||
function acf_is_pro() {
|
||||
return defined( 'ACF_PRO' ) && ACF_PRO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if ACF is a beta-like release.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @return boolean True if the current install version contains a dash, indicating a alpha, beta or RC release.
|
||||
*/
|
||||
function acf_is_beta() {
|
||||
return defined( 'ACF_VERSION' ) && strpos( ACF_VERSION, '-' ) !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version of ACF when it was first activated.
|
||||
* However, if ACF was first activated prior to the introduction of the acf_first_activated_version option,
|
||||
* this function returns false (boolean) to indicate that the version could not be determined.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @return string|boolean The (string) version of ACF when it was first activated, or false (boolean) if the version could not be determined.
|
||||
*/
|
||||
function acf_get_version_when_first_activated() {
|
||||
// Check if ACF is network-activated on a multisite.
|
||||
if ( is_multisite() ) {
|
||||
$acf_dir_and_filename = basename( ACF_PATH ) . '/acf.php';
|
||||
$plugins = get_site_option( 'active_sitewide_plugins' );
|
||||
|
||||
if ( isset( $plugins[ $acf_dir_and_filename ] ) ) {
|
||||
$main_site_id = get_main_site_id();
|
||||
|
||||
if ( empty( $main_site_id ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ACF is network activated, so get the version from main site's options.
|
||||
return get_blog_option( $main_site_id, 'acf_first_activated_version', false );
|
||||
}
|
||||
}
|
||||
|
||||
// Check if ACF is activated on this single site.
|
||||
return get_option( 'acf_first_activated_version', false );
|
||||
}
|
||||
|
||||
@@ -453,6 +453,8 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
|
||||
$duplicate_action_url = wp_nonce_url( admin_url( 'post-new.php?post_type=acf-post-type&use_post_type=' . $post->ID ), 'acfduplicate-' . $post->ID );
|
||||
} elseif ( 'acf-taxonomy' === $this->post_type ) {
|
||||
$duplicate_action_url = wp_nonce_url( admin_url( 'post-new.php?post_type=acf-taxonomy&use_taxonomy=' . $post->ID ), 'acfduplicate-' . $post->ID );
|
||||
} elseif ( 'acf-ui-options-page' === $this->post_type ) {
|
||||
$duplicate_action_url = wp_nonce_url( admin_url( 'post-new.php?post_type=acf-ui-options-page&use_options_page=' . $post->ID ), 'acfduplicate-' . $post->ID );
|
||||
}
|
||||
|
||||
$actions['acfduplicate'] = '<a href="' . esc_url( $duplicate_action_url ) . '" aria-label="' . esc_attr__( 'Duplicate this item', 'acf' ) . '">' . __( 'Duplicate', 'acf' ) . '</a>';
|
||||
|
||||
@@ -28,7 +28,6 @@ if ( ! class_exists( 'acf_admin_tools' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function __construct() {
|
||||
|
||||
// actions
|
||||
@@ -46,7 +45,6 @@ if ( ! class_exists( 'acf_admin_tools' ) ) :
|
||||
* @param string $class
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function register_tool( $class ) {
|
||||
|
||||
$instance = new $class();
|
||||
@@ -65,7 +63,6 @@ if ( ! class_exists( 'acf_admin_tools' ) ) :
|
||||
* @param string $name
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function get_tool( $name ) {
|
||||
|
||||
return isset( $this->tools[ $name ] ) ? $this->tools[ $name ] : null;
|
||||
@@ -83,7 +80,6 @@ if ( ! class_exists( 'acf_admin_tools' ) ) :
|
||||
* @param n/a
|
||||
* @return array
|
||||
*/
|
||||
|
||||
function get_tools() {
|
||||
|
||||
return $this->tools;
|
||||
@@ -100,7 +96,6 @@ if ( ! class_exists( 'acf_admin_tools' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function admin_menu() {
|
||||
|
||||
// bail early if no show_admin
|
||||
@@ -127,7 +122,6 @@ if ( ! class_exists( 'acf_admin_tools' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function load() {
|
||||
|
||||
add_action( 'admin_body_class', array( $this, 'admin_body_class' ) );
|
||||
@@ -169,7 +163,6 @@ if ( ! class_exists( 'acf_admin_tools' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function include_tools() {
|
||||
|
||||
// include
|
||||
@@ -193,7 +186,6 @@ if ( ! class_exists( 'acf_admin_tools' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function check_submit() {
|
||||
|
||||
// loop
|
||||
@@ -221,7 +213,6 @@ if ( ! class_exists( 'acf_admin_tools' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function html() {
|
||||
|
||||
// vars
|
||||
|
||||
@@ -19,7 +19,8 @@ if ( ! class_exists( 'ACF_Admin' ) ) :
|
||||
add_action( 'admin_body_class', array( $this, 'admin_body_class' ) );
|
||||
add_action( 'current_screen', array( $this, 'current_screen' ) );
|
||||
add_action( 'admin_notices', array( $this, 'maybe_show_escaped_html_notice' ) );
|
||||
add_action( 'wp_ajax_acf/dismiss_escaped_html_notice', array( $this, 'dismiss_escaped_html_notice' ) );
|
||||
add_action( 'admin_init', array( $this, 'dismiss_escaped_html_notice' ) );
|
||||
add_action( 'admin_init', array( $this, 'clear_escaped_html_log' ) );
|
||||
add_filter( 'parent_file', array( $this, 'ensure_menu_selection' ) );
|
||||
add_filter( 'submenu_file', array( $this, 'ensure_submenu_selection' ) );
|
||||
}
|
||||
@@ -58,7 +59,6 @@ if ( ! class_exists( 'ACF_Admin' ) ) :
|
||||
'acf-escaped-html-notice',
|
||||
'acf_escaped_html_notice',
|
||||
array(
|
||||
'nonce' => wp_create_nonce( 'acf/dismiss_escaped_html_notice' ),
|
||||
'show_details' => __( 'Show details', 'acf' ),
|
||||
'hide_details' => __( 'Hide details', 'acf' ),
|
||||
)
|
||||
@@ -220,6 +220,10 @@ if ( ! class_exists( 'ACF_Admin' ) ) :
|
||||
return;
|
||||
}
|
||||
|
||||
if ( get_option( 'acf_escaped_html_notice_dismissed' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$escaped = _acf_get_escaped_html_log();
|
||||
|
||||
// Notice for when HTML has already been escaped.
|
||||
@@ -229,18 +233,55 @@ if ( ! class_exists( 'ACF_Admin' ) ) :
|
||||
}
|
||||
|
||||
/**
|
||||
* Dismisses the escaped unsafe HTML notice by clearing the stored log.
|
||||
* Dismisses the escaped unsafe HTML notice.
|
||||
*
|
||||
* @since 6.2.5
|
||||
*/
|
||||
public function dismiss_escaped_html_notice() {
|
||||
if ( empty( $_GET['acf-dismiss-esc-html-notice'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$nonce = sanitize_text_field( wp_unslash( $_GET['acf-dismiss-esc-html-notice'] ) );
|
||||
|
||||
if (
|
||||
! check_admin_referer( 'acf/dismiss_escaped_html_notice', 'nonce' ) ||
|
||||
! current_user_can( acf_get_setting( 'capability' ) ) ) {
|
||||
! wp_verify_nonce( $nonce, 'acf/dismiss_escaped_html_notice' ) ||
|
||||
! current_user_can( acf_get_setting( 'capability' ) )
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
update_option( 'acf_escaped_html_notice_dismissed', true );
|
||||
|
||||
_acf_delete_escaped_html_log();
|
||||
|
||||
wp_safe_redirect( remove_query_arg( 'acf-dismiss-esc-html-notice' ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the escaped unsafe HTML log.
|
||||
*
|
||||
* @since 6.2.5
|
||||
*/
|
||||
public function clear_escaped_html_log() {
|
||||
if ( empty( $_GET['acf-clear-esc-html-log'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$nonce = sanitize_text_field( wp_unslash( $_GET['acf-clear-esc-html-log'] ) );
|
||||
|
||||
if (
|
||||
! wp_verify_nonce( $nonce, 'acf/clear_escaped_html_log' ) ||
|
||||
! current_user_can( acf_get_setting( 'capability' ) )
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
_acf_delete_escaped_html_log();
|
||||
|
||||
wp_safe_redirect( remove_query_arg( 'acf-clear-esc-html-log' ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -111,6 +111,36 @@ if ( ! class_exists( 'acf_admin_field_group' ) ) :
|
||||
'Value is less than' => esc_html__( 'Value is less than', 'acf' ),
|
||||
'Selection is greater than' => esc_html__( 'Selection is greater than', 'acf' ),
|
||||
'Selection is less than' => esc_html__( 'Selection is less than', 'acf' ),
|
||||
'Relationship is equal to' => esc_html__( 'Relationship is equal to', 'acf' ),
|
||||
'Relationship is not equal to' => esc_html__( 'Relationship is not equal to', 'acf' ),
|
||||
'Relationships contain' => esc_html__( 'Relationships contain', 'acf' ),
|
||||
'Relationships do not contain' => esc_html__( 'Relationships do not contain', 'acf' ),
|
||||
'Post is equal to' => esc_html__( 'Post is equal to', 'acf' ),
|
||||
'Post is not equal to' => esc_html__( 'Post is not equal to', 'acf' ),
|
||||
'Posts contain' => esc_html__( 'Posts contain', 'acf' ),
|
||||
'Posts do not contain' => esc_html__( 'Posts do not contain', 'acf' ),
|
||||
'Has any post selected' => esc_html__( 'Has any post selected', 'acf' ),
|
||||
'Has no post selected' => esc_html__( 'Has no post selected', 'acf' ),
|
||||
'Has any relationship selected' => esc_html__( 'Has any relationship selected', 'acf' ),
|
||||
'Has no relationship selected' => esc_html__( 'Has no relationship selected', 'acf' ),
|
||||
'Page is equal to' => esc_html__( 'Page is equal to', 'acf' ),
|
||||
'Page is not equal to' => esc_html__( 'Page is not equal to', 'acf' ),
|
||||
'Pages contain' => esc_html__( 'Pages contain', 'acf' ),
|
||||
'Pages do not contain' => esc_html__( 'Pages do not contain', 'acf' ),
|
||||
'Has any page selected' => esc_html__( 'Has any page selected', 'acf' ),
|
||||
'Has no page selected' => esc_html__( 'Has no page selected', 'acf' ),
|
||||
'User is equal to' => esc_html__( 'User is equal to', 'acf' ),
|
||||
'User is not equal to' => esc_html__( 'User is not equal to', 'acf' ),
|
||||
'Users contain' => esc_html__( 'Users contain', 'acf' ),
|
||||
'Users do not contain' => esc_html__( 'Users do not contain', 'acf' ),
|
||||
'Has any user selected' => esc_html__( 'Has any user selected', 'acf' ),
|
||||
'Has no user selected' => esc_html__( 'Has no user selected', 'acf' ),
|
||||
'Term is equal to' => esc_html__( 'Term is equal to', 'acf' ),
|
||||
'Term is not equal to' => esc_html__( 'Term is not equal to', 'acf' ),
|
||||
'Terms contain' => esc_html__( 'Terms contain', 'acf' ),
|
||||
'Terms do not contain' => esc_html__( 'Terms do not contain', 'acf' ),
|
||||
'Has any term selected' => esc_html__( 'Has any term selected', 'acf' ),
|
||||
'Has no term selected' => esc_html__( 'Has no term selected', 'acf' ),
|
||||
|
||||
// Custom Select2 templates.
|
||||
'Type to search...' => esc_html__( 'Type to search...', 'acf' ),
|
||||
@@ -479,12 +509,14 @@ if ( ! class_exists( 'acf_admin_field_group' ) ) :
|
||||
}
|
||||
|
||||
/**
|
||||
* Move field AJAX function
|
||||
* Moves fields between field groups via AJAX.
|
||||
*
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function ajax_move_field() {
|
||||
// disable filters to ensure ACF loads raw data from DB.
|
||||
// Disable filters to ensure ACF loads raw data from DB.
|
||||
acf_disable_filters();
|
||||
|
||||
// phpcs:disable WordPress.Security.NonceVerification.Missing
|
||||
@@ -499,34 +531,35 @@ if ( ! class_exists( 'acf_admin_field_group' ) ) :
|
||||
);
|
||||
// phpcs:enable WordPress.Security.NonceVerification.Missing
|
||||
|
||||
// verify nonce.
|
||||
// Verify nonce.
|
||||
if ( ! wp_verify_nonce( $args['nonce'], 'acf_nonce' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// verify user capability.
|
||||
// Verify user capability.
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// confirm?
|
||||
// Move the field if the user has confirmed.
|
||||
if ( $args['field_id'] && $args['field_group_id'] ) {
|
||||
$field = acf_get_field( $args['field_id'] );
|
||||
$old_field_group = acf_get_field_group( $args['post_id'] );
|
||||
$new_field_group = acf_get_field_group( $args['field_group_id'] );
|
||||
|
||||
// vars.
|
||||
$field = acf_get_field( $args['field_id'] );
|
||||
$field_group = acf_get_field_group( $args['field_group_id'] );
|
||||
|
||||
// update parent.
|
||||
$field['parent'] = $field_group['ID'];
|
||||
|
||||
// remove conditional logic.
|
||||
// Update the field parent and remove conditional logic.
|
||||
$field['parent'] = $new_field_group['ID'];
|
||||
$field['conditional_logic'] = 0;
|
||||
|
||||
// update field.
|
||||
// Update the field in the database.
|
||||
acf_update_field( $field );
|
||||
|
||||
// Fire `acf/update_field_group` action hook so JSON can sync if necessary.
|
||||
do_action( 'acf/update_field_group', $old_field_group );
|
||||
do_action( 'acf/update_field_group', $new_field_group );
|
||||
|
||||
// Output HTML.
|
||||
$link = '<a href="' . admin_url( 'post.php?post=' . $field_group['ID'] . '&action=edit' ) . '" target="_blank">' . esc_html( $field_group['title'] ) . '</a>';
|
||||
$link = '<a href="' . admin_url( 'post.php?post=' . $new_field_group['ID'] . '&action=edit' ) . '" target="_blank">' . esc_html( $new_field_group['title'] ) . '</a>';
|
||||
|
||||
echo '' .
|
||||
'<p><strong>' . esc_html__( 'Move Complete.', 'acf' ) . '</strong></p>' .
|
||||
@@ -540,22 +573,18 @@ if ( ! class_exists( 'acf_admin_field_group' ) ) :
|
||||
die();
|
||||
}
|
||||
|
||||
// get all field groups.
|
||||
// Get all field groups.
|
||||
$field_groups = acf_get_field_groups();
|
||||
$choices = array();
|
||||
|
||||
// check.
|
||||
if ( ! empty( $field_groups ) ) {
|
||||
|
||||
// loop.
|
||||
foreach ( $field_groups as $field_group ) {
|
||||
|
||||
// bail early if no ID.
|
||||
// Bail early if no ID.
|
||||
if ( ! $field_group['ID'] ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// bail early if is current.
|
||||
// Bail early if is current.
|
||||
if ( $field_group['ID'] == $args['post_id'] ) {
|
||||
continue;
|
||||
}
|
||||
@@ -564,7 +593,7 @@ if ( ! class_exists( 'acf_admin_field_group' ) ) :
|
||||
}
|
||||
}
|
||||
|
||||
// render options.
|
||||
// Render options.
|
||||
$field = acf_get_valid_field(
|
||||
array(
|
||||
'type' => 'select',
|
||||
@@ -575,14 +604,9 @@ if ( ! class_exists( 'acf_admin_field_group' ) ) :
|
||||
);
|
||||
|
||||
echo '<p>' . esc_html__( 'Please select the destination for this field', 'acf' ) . '</p>';
|
||||
|
||||
echo '<form id="acf-move-field-form">';
|
||||
|
||||
// render.
|
||||
acf_render_field_wrap( $field );
|
||||
|
||||
echo '<button type="submit" class="acf-btn">' . esc_html__( 'Move Field', 'acf' ) . '</button>';
|
||||
|
||||
echo '</form>';
|
||||
|
||||
die();
|
||||
|
||||
@@ -121,7 +121,7 @@ if ( ! class_exists( 'ACF_Admin_Field_Groups' ) ) :
|
||||
|
||||
// Description.
|
||||
case 'acf-description':
|
||||
if ( is_string( $post['description'] ) && ! empty( $post['description'] ) ) {
|
||||
if ( ( is_string( $post['description'] ) || is_numeric( $post['description'] ) ) && ! empty( $post['description'] ) ) {
|
||||
echo '<span class="acf-description">' . acf_esc_html( $post['description'] ) . '</span>';
|
||||
} else {
|
||||
echo '<span class="acf-emdash" aria-hidden="true">—</span>';
|
||||
|
||||
@@ -140,7 +140,7 @@ if ( ! class_exists( 'ACF_Admin_Post_Types' ) ) :
|
||||
|
||||
// Description.
|
||||
case 'acf-description':
|
||||
if ( is_string( $post['description'] ) && ! empty( $post['description'] ) ) {
|
||||
if ( ( is_string( $post['description'] ) || is_numeric( $post['description'] ) ) && ! empty( $post['description'] ) ) {
|
||||
echo '<span class="acf-description">' . acf_esc_html( $post['description'] ) . '</span>';
|
||||
} else {
|
||||
echo '<span class="acf-emdash" aria-hidden="true">—</span>';
|
||||
|
||||
@@ -139,7 +139,7 @@ if ( ! class_exists( 'ACF_Admin_Taxonomies' ) ) :
|
||||
|
||||
// Description.
|
||||
case 'acf-description':
|
||||
if ( is_string( $post['description'] ) && ! empty( $post['description'] ) ) {
|
||||
if ( ( is_string( $post['description'] ) || is_numeric( $post['description'] ) ) && ! empty( $post['description'] ) ) {
|
||||
echo '<span class="acf-description">' . acf_esc_html( $post['description'] ) . '</span>';
|
||||
} else {
|
||||
echo '<span class="acf-emdash" aria-hidden="true">—</span>';
|
||||
|
||||
@@ -19,7 +19,6 @@ if ( ! class_exists( 'ACF_Admin_Tool_Import' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -40,7 +39,6 @@ if ( ! class_exists( 'ACF_Admin_Tool_Import' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function html() {
|
||||
|
||||
?>
|
||||
|
||||
@@ -36,7 +36,6 @@ if ( ! class_exists( 'ACF_Admin_Tool' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function get_name() {
|
||||
return $this->name;
|
||||
}
|
||||
@@ -53,7 +52,6 @@ if ( ! class_exists( 'ACF_Admin_Tool' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function get_title() {
|
||||
return $this->title;
|
||||
}
|
||||
@@ -70,7 +68,6 @@ if ( ! class_exists( 'ACF_Admin_Tool' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function get_url() {
|
||||
return acf_get_admin_tool_url( $this->name );
|
||||
}
|
||||
@@ -87,7 +84,6 @@ if ( ! class_exists( 'ACF_Admin_Tool' ) ) :
|
||||
* @param n/a
|
||||
* @return boolean
|
||||
*/
|
||||
|
||||
function is_active() {
|
||||
return acf_maybe_get_GET( 'tool' ) === $this->name;
|
||||
}
|
||||
@@ -103,7 +99,6 @@ if ( ! class_exists( 'ACF_Admin_Tool' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function __construct() {
|
||||
|
||||
// initialize
|
||||
@@ -122,7 +117,6 @@ if ( ! class_exists( 'ACF_Admin_Tool' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
/* do nothing */
|
||||
@@ -141,7 +135,6 @@ if ( ! class_exists( 'ACF_Admin_Tool' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function load() {
|
||||
|
||||
/* do nothing */
|
||||
@@ -159,7 +152,6 @@ if ( ! class_exists( 'ACF_Admin_Tool' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function html() {
|
||||
}
|
||||
|
||||
@@ -175,7 +167,6 @@ if ( ! class_exists( 'ACF_Admin_Tool' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function submit() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,8 +139,19 @@ if ( empty( $field['conditional_logic'] ) ) {
|
||||
</td>
|
||||
<td class="value">
|
||||
<?php
|
||||
$conditional_field = get_field_object( $rule['field'] );
|
||||
|
||||
/**
|
||||
* Filters the choices available for a conditional logic rule.
|
||||
*
|
||||
* @since 6.3.0
|
||||
*
|
||||
* @param array $choices The available choices.
|
||||
* @param array $conditional_field The field object for the conditional field.
|
||||
* @param mixed $value The value of the rule.
|
||||
*/
|
||||
$choices = apply_filters( 'acf/conditional_logic/choices', array( $rule['value'] => $rule['value'] ), $conditional_field, $rule['value'] );
|
||||
|
||||
// create field
|
||||
acf_render_field(
|
||||
array(
|
||||
'type' => 'select',
|
||||
@@ -149,12 +160,9 @@ if ( empty( $field['conditional_logic'] ) ) {
|
||||
'class' => 'condition-rule-value',
|
||||
'disabled' => $disabled,
|
||||
'value' => $rule['value'],
|
||||
'choices' => array(
|
||||
$rule['value'] => $rule['value'],
|
||||
),
|
||||
'choices' => $choices,
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td class="add">
|
||||
|
||||
@@ -34,7 +34,7 @@ if ( acf_is_pro() && acf_get_field_type_prop( $field['type'], 'pro' ) ) {
|
||||
}
|
||||
|
||||
if ( acf_is_pro() && acf_get_field_type_prop( $field['type'], 'pro' ) && ! acf_pro_is_license_active() ) {
|
||||
$field_type_label .= '<span class="acf-pro-label acf-pro-label-field-type">PRO</span>';
|
||||
$field_type_label .= '<span class="acf-pro-label-field-type"><img src="' . esc_url( acf_get_url( 'assets/images/pro-chip.svg' ) ) . '" alt="' . esc_attr__( 'ACF PRO Logo', 'acf' ) . '"></span>';
|
||||
|
||||
if ( ! acf_pro_is_license_expired() ) {
|
||||
$inactive_field_class = ' acf-js-tooltip';
|
||||
@@ -217,7 +217,7 @@ if ( isset( $field['conditional_logic'] ) && is_array( $field['conditional_logic
|
||||
$field,
|
||||
array(
|
||||
'label' => __( 'Instructions', 'acf' ),
|
||||
'instructions' => __( 'Instructions for authors. Shown when submitting data', 'acf' ),
|
||||
'instructions' => __( 'Instructions for content editors. Shown when submitting data.', 'acf' ),
|
||||
'type' => 'textarea',
|
||||
'name' => 'instructions',
|
||||
'rows' => 5,
|
||||
|
||||
@@ -22,9 +22,9 @@ if ( acf_is_pro() ) {
|
||||
?>
|
||||
<div id="tmpl-acf-field-group-pro-features">
|
||||
<div class="acf-field-group-pro-features-wrapper">
|
||||
<h1 class="acf-field-group-pro-features-title-sm"><?php echo esc_html( $acf_field_group_pro_features_title ); ?> <div class="acf-pro-label">PRO</div></h1>
|
||||
<h1 class="acf-field-group-pro-features-title-sm"><?php echo esc_html( $acf_field_group_pro_features_title ); ?> <div class="acf-pro-label"><img src="<?php echo esc_url( acf_get_url( 'assets/images/pro-chip.svg' ) ); ?>" alt="<?php esc_attr_e( 'ACF PRO logo', 'acf' ); ?>"></div></h1>
|
||||
<div class="acf-field-group-pro-features-content">
|
||||
<h1 class="acf-field-group-pro-features-title"><?php echo esc_html( $acf_field_group_pro_features_title ); ?> <div class="acf-pro-label">PRO</div></h1>
|
||||
<h1 class="acf-field-group-pro-features-title"><?php echo esc_html( $acf_field_group_pro_features_title ); ?> <div class="acf-pro-label"><img src="<?php echo esc_url( acf_get_url( 'assets/images/pro-chip.svg' ) ); ?>" alt="<?php esc_attr_e( 'ACF PRO logo', 'acf' ); ?>"></div></h1>
|
||||
<p class="acf-field-group-pro-features-desc"><?php esc_html_e( 'Speed up your workflow and develop better websites with features like ACF Blocks and Options Pages, and sophisticated field types like Repeater, Flexible Content, Clone, and Gallery.', 'acf' ); ?></p>
|
||||
<div class="acf-field-group-pro-features-actions">
|
||||
<a target="<?php echo esc_attr( $acf_learn_more_target ); ?>" href="<?php echo $acf_learn_more_link; ?>" class="acf-btn acf-btn-muted acf-pro-features-learn-more"><?php //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped on generation. ?>
|
||||
|
||||
@@ -747,15 +747,6 @@ foreach ( acf_get_combined_post_type_settings_tabs() as $tab_key => $tab_label )
|
||||
)
|
||||
);
|
||||
|
||||
$acf_dashicon_class_name = __( 'Dashicon class name', 'acf' );
|
||||
$acf_dashicon_link = '<a href="https://developer.wordpress.org/resource/dashicons/" target="_blank">' . $acf_dashicon_class_name . '</a>';
|
||||
|
||||
$acf_menu_icon_instructions = sprintf(
|
||||
/* translators: %s = "dashicon class name", link to the WordPress dashicon documentation. */
|
||||
__( 'The icon used for the post type menu item in the admin dashboard. Can be a URL or %s to use for the icon.', 'acf' ),
|
||||
$acf_dashicon_link
|
||||
);
|
||||
|
||||
acf_render_field_wrap(
|
||||
array(
|
||||
'type' => 'text',
|
||||
@@ -795,20 +786,52 @@ foreach ( acf_get_combined_post_type_settings_tabs() as $tab_key => $tab_label )
|
||||
'field'
|
||||
);
|
||||
|
||||
// Set the default value for the icon field.
|
||||
$acf_default_icon_value = array(
|
||||
'type' => 'dashicons',
|
||||
'value' => 'dashicons-admin-post',
|
||||
);
|
||||
|
||||
if ( empty( $acf_post_type['menu_icon'] ) ) {
|
||||
$acf_post_type['menu_icon'] = $acf_default_icon_value;
|
||||
}
|
||||
|
||||
// Backwards compatibility for before the icon picker was introduced.
|
||||
if ( is_string( $acf_post_type['menu_icon'] ) ) {
|
||||
// If the old value was a string that starts with dashicons-, assume it's a dashicon.
|
||||
if ( false !== strpos( $acf_post_type['menu_icon'], 'dashicons-' ) ) {
|
||||
$acf_post_type['menu_icon'] = array(
|
||||
'type' => 'dashicons',
|
||||
'value' => $acf_post_type['menu_icon'],
|
||||
);
|
||||
} else {
|
||||
$acf_post_type['menu_icon'] = array(
|
||||
'type' => 'url',
|
||||
'value' => $acf_post_type['menu_icon'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
acf_render_field_wrap(
|
||||
array(
|
||||
'type' => 'text',
|
||||
'name' => 'menu_icon',
|
||||
'key' => 'menu_icon',
|
||||
'prefix' => 'acf_post_type',
|
||||
'value' => $acf_post_type['menu_icon'],
|
||||
'label' => __( 'Menu Icon', 'acf' ),
|
||||
'placeholder' => 'dashicons-admin-post',
|
||||
'instructions' => $acf_menu_icon_instructions,
|
||||
'conditions' => array(
|
||||
'field' => 'show_in_menu',
|
||||
'operator' => '==',
|
||||
'value' => 1,
|
||||
'type' => 'icon_picker',
|
||||
'name' => 'menu_icon',
|
||||
'key' => 'menu_icon',
|
||||
'prefix' => 'acf_post_type',
|
||||
'value' => $acf_post_type['menu_icon'],
|
||||
'label' => __( 'Menu Icon', 'acf' ),
|
||||
'placeholder' => 'dashicons-admin-post',
|
||||
'conditions' => array(
|
||||
array(
|
||||
'field' => 'show_in_menu',
|
||||
'operator' => '==',
|
||||
'value' => '1',
|
||||
),
|
||||
array(
|
||||
'field' => 'admin_menu_parent',
|
||||
'operator' => '==',
|
||||
'value' => '',
|
||||
),
|
||||
),
|
||||
),
|
||||
'div',
|
||||
|
||||
@@ -2,44 +2,67 @@
|
||||
|
||||
$acf_plugin_name = acf_is_pro() ? 'ACF PRO' : 'ACF';
|
||||
$acf_plugin_name = '<strong>' . $acf_plugin_name . ' —</strong>';
|
||||
$acf_learn_how_to_fix = '<a href="' . acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/escaping-the-field/', 'docs', '6-2-5-security-changes' ) . '" target="_blank">' . __( 'Learn how to fix this', 'acf' ) . '</a>';
|
||||
$acf_learn_how_to_fix = '<a href="' . acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/escaping-the-field/', 'docs', '6-2-5-security-changes' ) . '" target="_blank">' . __( 'Learn more', 'acf' ) . '</a>';
|
||||
$acf_class = 'notice-error';
|
||||
$acf_user_can_acf = false;
|
||||
|
||||
if ( current_user_can( acf_get_setting( 'capability' ) ) ) {
|
||||
$acf_user_can_acf = true;
|
||||
$acf_show_details = ' <a class="acf-show-more-details" href="#">' . __( 'Show details', 'acf' ) . '</a>';
|
||||
$acf_class .= ' is-dismissible';
|
||||
$acf_dismiss_url = add_query_arg( array( 'acf-dismiss-esc-html-notice' => wp_create_nonce( 'acf/dismiss_escaped_html_notice' ) ) );
|
||||
|
||||
// "Show/Hide Details" is a button for accessibility purposes, because it isn't a link. But since the design shows a link, we need to make it look like a link.
|
||||
$acf_style_button_as_link = trim(
|
||||
'display: inline;
|
||||
padding: 0;
|
||||
background: none;
|
||||
border: none;
|
||||
color: #0073aa;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;'
|
||||
);
|
||||
|
||||
$acf_show_details = '<button style="' . esc_attr( $acf_style_button_as_link ) . '" class="acf-show-more-details">' . __( 'Show details', 'acf' ) . '</button>';
|
||||
$acf_show_details .= ' | <a class="acf-dismiss-permanently-button" href="' . esc_url( $acf_dismiss_url ) . '">' . __( 'Dismiss permanently', 'acf' ) . '</a>';
|
||||
} else {
|
||||
$acf_show_details = __( 'Please contact your site administrator or developer for more details.', 'acf' );
|
||||
}
|
||||
|
||||
$acf_error_msg = sprintf(
|
||||
/* translators: %1$s - name of the ACF plugin. %2$s - Link to documentation. %3$s - Link to show more details about the error */
|
||||
__( '%1$s ACF now automatically escapes unsafe HTML when rendered by <code>the_field</code> or the ACF shortcode. We\'ve detected the output of some of your fields has been modified by this change, but this may not be a breaking change. %2$s. %3$s.', 'acf' ),
|
||||
__( '%1$s ACF now automatically escapes unsafe HTML when rendered by <code>the_field</code> or the ACF shortcode. We\'ve detected the output of some of your fields has been modified by this change, but this may not be a breaking change. %2$s.', 'acf' ),
|
||||
$acf_plugin_name,
|
||||
$acf_learn_how_to_fix,
|
||||
$acf_show_details
|
||||
$acf_learn_how_to_fix
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
<div class="acf-admin-notice notice acf-escaped-html-notice <?php echo esc_attr( $acf_class ); ?>">
|
||||
<p><?php echo acf_esc_html( $acf_error_msg ); ?></p>
|
||||
<p style="margin-bottom: 0.5em; padding-bottom: 2px;"><?php echo acf_esc_html( $acf_error_msg ); ?></p>
|
||||
<p style="margin: 0.5em 0; padding: 2px;"><?php echo acf_esc_html( $acf_show_details ); ?></p>
|
||||
<?php if ( $acf_user_can_acf && ! empty( $acf_escaped ) ) : ?>
|
||||
<ul class="acf-error-details" style="display: none; list-style: disc; margin-left: 14px;">
|
||||
<?php
|
||||
foreach ( $acf_escaped as $acf_field_key => $acf_data ) {
|
||||
$acf_error = sprintf(
|
||||
/* translators: %1$s - The selector used %2$s The field name 3%$s The parent function name */
|
||||
__( '%1$s (%2$s) - rendered via %3$s', 'acf' ),
|
||||
$acf_data['selector'],
|
||||
$acf_data['field'],
|
||||
$acf_data['function']
|
||||
);
|
||||
<div class="acf-error-details" style="display: none; list-style: disc; margin-left: 14px;">
|
||||
<ul class="acf-error-details" style="display: none; list-style: disc; margin-left: 14px;">
|
||||
<?php
|
||||
foreach ( $acf_escaped as $acf_field_key => $acf_data ) {
|
||||
$acf_error = sprintf(
|
||||
/* translators: %1$s - The selector used %2$s The field name 3%$s The parent function name */
|
||||
__( '%1$s (%2$s) - rendered via %3$s', 'acf' ),
|
||||
$acf_data['selector'],
|
||||
$acf_data['field'],
|
||||
$acf_data['function']
|
||||
);
|
||||
|
||||
echo '<li>' . esc_html( $acf_error ) . '</li>';
|
||||
}
|
||||
echo '<li>' . esc_html( $acf_error ) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<p style="margin: 0.5em 0; padding: 2px;">
|
||||
<?php
|
||||
$acf_clear_logs_url = add_query_arg( array( 'acf-clear-esc-html-log' => wp_create_nonce( 'acf/clear_escaped_html_log' ) ) );
|
||||
// translators: %s - The clear log button opening HTML tag. %s - The closing HTML tag.
|
||||
echo acf_esc_html( '<i>' . sprintf( __( 'This data is logged as we detect values that have been changed during output. %1$sClear log and dismiss%2$s after escaping the values in your code. The notice will reappear if we detect changed values again.', 'acf' ), '<a class="acf-clear-log-button" href="' . esc_url( $acf_clear_logs_url ) . '">', '</a>' ) . '</i>' );
|
||||
?>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -40,15 +40,18 @@ if ( 'acf-field-group' === $acf_post_type ) {
|
||||
if ( empty( $acf_title ) && $acf_prefilled_title ) {
|
||||
$acf_title = $acf_prefilled_title;
|
||||
}
|
||||
} elseif ( in_array( $acf_post_type, array( 'acf-post-type', 'acf-taxonomy' ) ) ) {
|
||||
$acf_duplicate_post_type = acf_get_post_type_from_request_args( 'acfduplicate' );
|
||||
$acf_duplicate_taxonomy = acf_get_taxonomy_from_request_args( 'acfduplicate' );
|
||||
$acf_duplicated_from_label = '';
|
||||
} elseif ( in_array( $acf_post_type, array( 'acf-post-type', 'acf-taxonomy', 'acf-ui-options-page' ), true ) ) {
|
||||
$acf_duplicate_post_type = acf_get_post_type_from_request_args( 'acfduplicate' );
|
||||
$acf_duplicate_taxonomy = acf_get_taxonomy_from_request_args( 'acfduplicate' );
|
||||
$acf_duplicate_ui_options_page = acf_get_ui_options_page_from_request_args( 'acfduplicate' );
|
||||
$acf_duplicated_from_label = '';
|
||||
|
||||
if ( $acf_duplicate_post_type && ! empty( $acf_duplicate_post_type['labels']['singular_name'] ) ) {
|
||||
$acf_duplicated_from_label = $acf_duplicate_post_type['labels']['singular_name'];
|
||||
} elseif ( $acf_duplicate_taxonomy && ! empty( $acf_duplicate_taxonomy['labels']['singular_name'] ) ) {
|
||||
$acf_duplicated_from_label = $acf_duplicate_taxonomy['labels']['singular_name'];
|
||||
} elseif ( $acf_duplicate_ui_options_page && ! empty( $acf_duplicate_ui_options_page['page_title'] ) ) {
|
||||
$acf_duplicated_from_label = $acf_duplicate_ui_options_page['page_title'];
|
||||
}
|
||||
|
||||
if ( ! empty( $acf_duplicated_from_label ) ) {
|
||||
|
||||
@@ -24,7 +24,7 @@ if ( $page_title ) {
|
||||
echo esc_html( $page_title );
|
||||
?>
|
||||
<?php if ( $acf_is_options_page_preview ) { ?>
|
||||
<div class="acf-pro-label">PRO</div>
|
||||
<div class="acf-pro-label"><img src="<?php echo esc_url( acf_get_url( 'assets/images/pro-chip.svg' ) ); ?>" alt="<?php esc_attr_e( 'ACF PRO logo', 'acf' ); ?>"></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -172,12 +172,15 @@ function acf_print_menu_section( $menu_items, $section = '' ) {
|
||||
<div class="acf-admin-toolbar">
|
||||
<div class="acf-admin-toolbar-inner">
|
||||
<div class="acf-nav-wrap">
|
||||
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=acf-field-group' ) ); ?>" class="acf-logo">
|
||||
<img src="<?php echo esc_url( acf_get_url( 'assets/images/acf-logo.svg' ) ); ?>" alt="<?php esc_attr_e( 'Advanced Custom Fields logo', 'acf' ); ?>">
|
||||
<?php if ( acf_is_pro() && acf_pro_is_license_active() ) { ?>
|
||||
<div class="acf-pro-label">PRO</div>
|
||||
<?php } ?>
|
||||
</a>
|
||||
<?php if ( acf_is_pro() && acf_pro_is_license_active() ) { ?>
|
||||
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=acf-field-group' ) ); ?>" class="acf-logo pro">
|
||||
<img src="<?php echo esc_url( acf_get_url( 'assets/images/acf-pro-logo.svg' ) ); ?>" alt="<?php esc_attr_e( 'Advanced Custom Fields logo', 'acf' ); ?>">
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo esc_url( admin_url( 'edit.php?post_type=acf-field-group' ) ); ?>" class="acf-logo">
|
||||
<img src="<?php echo esc_url( acf_get_url( 'assets/images/acf-logo.svg' ) ); ?>" alt="<?php esc_attr_e( 'Advanced Custom Fields logo', 'acf' ); ?>">
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
<h2><?php echo esc_html( acf_get_setting( 'name' ) ); ?></h2>
|
||||
<?php acf_print_menu_section( $core_tabs, 'core' ); ?>
|
||||
|
||||
@@ -22,7 +22,7 @@ if ( ! acf_get_setting( 'pro' ) ) {
|
||||
<div id="acf-upgrade-notice" class="notice">
|
||||
<div class="notice-container">
|
||||
<div class="col-content">
|
||||
<img src="<?php echo esc_url( acf_get_url( 'assets/images/acf-logo.png' ) ); ?>" />
|
||||
<img src="<?php echo esc_url( acf_get_url( 'assets/images/acf-logo.svg' ) ); ?>" />
|
||||
<h2><?php esc_html_e( 'Database Upgrade Required', 'acf' ); ?></h2>
|
||||
<?php // translators: %1 plugin name, %2 version number ?>
|
||||
<p><?php echo acf_esc_html( sprintf( __( 'Thank you for updating to %1$s v%2$s!', 'acf' ), acf_get_setting( 'name' ), acf_get_setting( 'version' ) ) ); ?><br />
|
||||
|
||||
@@ -141,13 +141,14 @@ if ( ! class_exists( 'ACF_Ajax_Query_Users' ) ) :
|
||||
// Determine if more results exist.
|
||||
// As this query does not return grouped results, the calculation can be exact (">").
|
||||
$this->more = ( $total_users > count( $users ) + $args['offset'] );
|
||||
|
||||
// Otherwise, group results via role.
|
||||
} else {
|
||||
|
||||
// Unset args that will interfer with query results.
|
||||
unset( $args['role__in'], $args['role__not_in'] );
|
||||
|
||||
$args['search'] = $this->search ? $this->search : '';
|
||||
|
||||
// Loop over each role.
|
||||
foreach ( $roles as $role => $role_label ) {
|
||||
|
||||
|
||||
@@ -93,6 +93,12 @@ if ( ! class_exists( 'ACF_Ajax_Query' ) ) :
|
||||
$this->search = sanitize_text_field( $request['search'] );
|
||||
$this->is_search = true;
|
||||
}
|
||||
|
||||
if ( isset( $request['s'] ) && acf_not_empty( $request['s'] ) ) {
|
||||
$this->search = sanitize_text_field( $request['s'] );
|
||||
$this->is_search = true;
|
||||
}
|
||||
|
||||
if ( isset( $request['post_id'] ) ) {
|
||||
$this->post_id = $request['post_id'];
|
||||
}
|
||||
@@ -115,18 +121,19 @@ if ( ! class_exists( 'ACF_Ajax_Query' ) ) :
|
||||
if ( isset( $request['query'] ) ) {
|
||||
return (array) $request['query'];
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* get_items
|
||||
* get_results
|
||||
*
|
||||
* Returns an array of results for the given args.
|
||||
*
|
||||
* @date 31/7/18
|
||||
* @since 5.7.2
|
||||
*
|
||||
* @param array args The query args.
|
||||
* @param array $args The query args.
|
||||
* @return array
|
||||
*/
|
||||
function get_results( $args ) {
|
||||
@@ -134,7 +141,7 @@ if ( ! class_exists( 'ACF_Ajax_Query' ) ) :
|
||||
}
|
||||
|
||||
/**
|
||||
* get_item
|
||||
* get_result
|
||||
*
|
||||
* Returns a single result for the given item object.
|
||||
*
|
||||
|
||||
@@ -1153,7 +1153,7 @@ function acf_get_posts( $args = array() ) {
|
||||
$args['post_status'] = acf_get_post_stati();
|
||||
}
|
||||
|
||||
// Check if specifc post ID's have been provided.
|
||||
// Check if specific post IDs have been provided.
|
||||
if ( $args['post__in'] ) {
|
||||
|
||||
// Clean value into an array of IDs.
|
||||
|
||||
@@ -142,6 +142,11 @@ function _acf_log_escaped_html( $function, $selector, $field, $post_id ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the notice has been dismissed, don't log further errors.
|
||||
if ( get_option( 'acf_escaped_html_notice_dismissed' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the field isn't set, we've output a non-ACF field, so don't log anything.
|
||||
if ( ! is_array( $field ) ) {
|
||||
return;
|
||||
@@ -191,7 +196,7 @@ function _acf_get_escaped_html_log() {
|
||||
* @return boolean True on success, or false on failure.
|
||||
*/
|
||||
function _acf_update_escaped_html_log( $escaped = array() ) {
|
||||
return update_option( 'acf_escaped_html_log', (array) $escaped, true );
|
||||
return update_option( 'acf_escaped_html_log', (array) $escaped, false );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -112,7 +112,7 @@ if ( ! class_exists( 'ACF_Assets' ) ) :
|
||||
|
||||
// Register scripts.
|
||||
wp_register_script( 'acf', acf_get_url( 'assets/build/js/acf' . $suffix . '.js' ), array( 'jquery' ), $version );
|
||||
wp_register_script( 'acf-input', acf_get_url( 'assets/build/js/acf-input' . $suffix . '.js' ), array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-resizable', 'acf' ), $version );
|
||||
wp_register_script( 'acf-input', acf_get_url( 'assets/build/js/acf-input' . $suffix . '.js' ), array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-resizable', 'acf', 'wp-a11y' ), $version );
|
||||
wp_register_script( 'acf-field-group', acf_get_url( 'assets/build/js/acf-field-group' . $suffix . '.js' ), array( 'acf-input' ), $version );
|
||||
wp_register_script( 'acf-internal-post-type', acf_get_url( 'assets/build/js/acf-internal-post-type' . $suffix . '.js' ), array( 'acf-input' ), $version );
|
||||
wp_register_script( 'acf-escaped-html-notice', acf_get_url( 'assets/build/js/acf-escaped-html-notice' . $suffix . '.js' ), array( 'jquery' ), $version, true );
|
||||
@@ -369,6 +369,9 @@ if ( ! class_exists( 'ACF_Assets' ) ) :
|
||||
'1 field requires attention' => __( '1 field requires attention', 'acf' ),
|
||||
'%d fields require attention' => __( '%d fields require attention', 'acf' ),
|
||||
|
||||
// Block Validation
|
||||
'An ACF Block on this page requires attention before you can save.' => __( 'An ACF Block on this page requires attention before you can save.', 'acf' ),
|
||||
|
||||
// Other
|
||||
'Edit field group' => __( 'Edit field group', 'acf' ),
|
||||
)
|
||||
@@ -472,6 +475,7 @@ if ( ! class_exists( 'ACF_Assets' ) ) :
|
||||
'validation' => acf_get_form_data( 'validation' ),
|
||||
'editor' => acf_is_block_editor() ? 'block' : 'classic',
|
||||
'is_pro' => acf_is_pro(),
|
||||
'debug' => acf_is_beta() || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG,
|
||||
);
|
||||
|
||||
acf_localize_data( $data_to_localize );
|
||||
|
||||
@@ -0,0 +1,714 @@
|
||||
<?php
|
||||
/**
|
||||
* Adds helpful debugging information to a new "Advanced Custom Fields"
|
||||
* panel in the WordPress Site Health screen.
|
||||
*
|
||||
* @package ACF
|
||||
*/
|
||||
|
||||
// Exit if accessed directly.
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! class_exists( 'ACF_Site_Health' ) ) {
|
||||
|
||||
/**
|
||||
* The ACF Site Health class responsible for populating ACF debug information in WordPress Site Health.
|
||||
*/
|
||||
class ACF_Site_Health {
|
||||
/**
|
||||
* The option name used to store site health data.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public string $option_name = 'acf_site_health';
|
||||
|
||||
/**
|
||||
* Constructs the ACF_Site_Health class.
|
||||
*
|
||||
* @since 6.3
|
||||
*/
|
||||
public function __construct() {
|
||||
add_action( 'debug_information', array( $this, 'render_tab_content' ) );
|
||||
add_action( 'acf_update_site_health_data', array( $this, 'update_site_health_data' ) );
|
||||
|
||||
if ( ! wp_next_scheduled( 'acf_update_site_health_data' ) ) {
|
||||
wp_schedule_event( time(), 'weekly', 'acf_update_site_health_data' );
|
||||
}
|
||||
|
||||
// ACF events.
|
||||
add_action( 'acf/first_activated', array( $this, 'add_activation_event' ) );
|
||||
add_action( 'acf/activated_pro', array( $this, 'add_activation_event' ) );
|
||||
add_filter( 'acf/pre_update_field_group', array( $this, 'pre_update_acf_internal_cpt' ) );
|
||||
add_filter( 'acf/pre_update_post_type', array( $this, 'pre_update_acf_internal_cpt' ) );
|
||||
add_filter( 'acf/pre_update_taxonomy', array( $this, 'pre_update_acf_internal_cpt' ) );
|
||||
add_filter( 'acf/pre_update_ui_options_page', array( $this, 'pre_update_acf_internal_cpt' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the stored site health information.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_site_health(): array {
|
||||
$site_health = get_option( $this->option_name, '' );
|
||||
|
||||
if ( is_string( $site_health ) ) {
|
||||
$site_health = json_decode( $site_health, true );
|
||||
}
|
||||
|
||||
return is_array( $site_health ) ? $site_health : array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the site health information.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param array $data An array of site health information to update.
|
||||
* @return boolean
|
||||
*/
|
||||
public function update_site_health( array $data = array() ): bool {
|
||||
return update_option( $this->option_name, wp_json_encode( $data ), false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores debug data in the ACF site health option.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param array $data Data to update with (optional).
|
||||
* @return boolean
|
||||
*/
|
||||
public function update_site_health_data( array $data = array() ): bool {
|
||||
if ( wp_doing_cron() ) {
|
||||
// Bootstrap wp-admin, as WP_Cron doesn't do this for us.
|
||||
require_once trailingslashit( ABSPATH ) . 'wp-admin/includes/admin.php';
|
||||
}
|
||||
|
||||
$site_health = $this->get_site_health();
|
||||
$values = ! empty( $data ) ? $data : $this->get_site_health_values();
|
||||
$updated = array();
|
||||
|
||||
if ( ! empty( $values ) ) {
|
||||
foreach ( $values as $key => $value ) {
|
||||
$updated[ $key ] = $value['debug'] ?? $value['value'];
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $site_health as $key => $value ) {
|
||||
if ( 'event_' === substr( $key, 0, 6 ) ) {
|
||||
$updated[ $key ] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$updated['last_updated'] = time();
|
||||
|
||||
return $this->update_site_health( $updated );
|
||||
}
|
||||
|
||||
/**
|
||||
* Pushes an event to the ACF site health option.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param string $event_name The name of the event to push.
|
||||
* @return boolean
|
||||
*/
|
||||
public function add_site_health_event( string $event_name = '' ): bool {
|
||||
$site_health = $this->get_site_health();
|
||||
|
||||
// Allow using action/filter hooks to set events.
|
||||
if ( empty( $event_name ) ) {
|
||||
$current_filter = current_filter();
|
||||
|
||||
if ( strpos( $current_filter, 'acf/' ) !== false ) {
|
||||
$event_name = str_replace( 'acf/', '', $current_filter );
|
||||
}
|
||||
}
|
||||
|
||||
// Bail if this event was already stored.
|
||||
if ( empty( $event_name ) || ! empty( $site_health[ 'event_' . $event_name ] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$time = time();
|
||||
|
||||
$site_health[ 'event_' . $event_name ] = $time;
|
||||
$site_health['last_updated'] = $time;
|
||||
|
||||
return $this->update_site_health( $site_health );
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs activation events for free/pro.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function add_activation_event() {
|
||||
$event_name = 'first_activated';
|
||||
|
||||
if ( acf_is_pro() ) {
|
||||
$event_name = 'first_activated_pro';
|
||||
|
||||
if ( 'acf/first_activated' !== current_filter() ) {
|
||||
$site_health = $this->get_site_health();
|
||||
|
||||
/**
|
||||
* We already have an event for when pro was first activated,
|
||||
* so we don't need to log an additional event here.
|
||||
*/
|
||||
if ( ! empty( $site_health[ 'event_' . $event_name ] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$event_name = 'activated_pro';
|
||||
}
|
||||
}
|
||||
|
||||
return $this->add_site_health_event( $event_name );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds events when ACF internal post types are created.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param array $post The post about to be updated.
|
||||
* @return array
|
||||
*/
|
||||
public function pre_update_acf_internal_cpt( array $post = array() ): array {
|
||||
if ( empty( $post['key'] ) ) {
|
||||
return $post;
|
||||
}
|
||||
|
||||
$post_type = acf_determine_internal_post_type( $post['key'] );
|
||||
|
||||
if ( $post_type ) {
|
||||
$posts = acf_get_internal_post_type_posts( $post_type );
|
||||
|
||||
if ( empty( $posts ) ) {
|
||||
$post_type = str_replace(
|
||||
array(
|
||||
'acf-',
|
||||
'-',
|
||||
),
|
||||
array(
|
||||
'',
|
||||
'_',
|
||||
),
|
||||
$post_type
|
||||
);
|
||||
$this->add_site_health_event( 'first_created_' . $post_type );
|
||||
}
|
||||
}
|
||||
|
||||
return $post;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the ACF section to the "Info" tab of the WordPress Site Health screen.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param array $debug_info The current debug info for site health.
|
||||
* @return array The debug info appended with the ACF section.
|
||||
*/
|
||||
public function render_tab_content( array $debug_info ): array {
|
||||
$data = $this->get_site_health_values();
|
||||
|
||||
$this->update_site_health_data( $data );
|
||||
|
||||
// Unset values we don't want to display yet.
|
||||
$fields_to_unset = array(
|
||||
'wp_version',
|
||||
'mysql_version',
|
||||
'is_multisite',
|
||||
'active_theme',
|
||||
'parent_theme',
|
||||
'active_plugins',
|
||||
'number_of_fields_by_type',
|
||||
'number_of_third_party_fields_by_type',
|
||||
);
|
||||
|
||||
foreach ( $fields_to_unset as $field ) {
|
||||
if ( isset( $data[ $field ] ) ) {
|
||||
unset( $data[ $field ] );
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $data as $key => $value ) {
|
||||
if ( 'event_' === substr( $key, 0, 6 ) ) {
|
||||
unset( $data[ $key ] );
|
||||
}
|
||||
}
|
||||
|
||||
$debug_info['acf'] = array(
|
||||
'label' => __( 'ACF', 'acf' ),
|
||||
'description' => __( 'This section contains debug information about your ACF configuration which can be useful to provide to support.', 'acf' ),
|
||||
'fields' => $data,
|
||||
);
|
||||
|
||||
return $debug_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the values for all data in the ACF site health section.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_site_health_values(): array {
|
||||
global $wpdb;
|
||||
|
||||
$fields = array();
|
||||
$is_pro = acf_is_pro();
|
||||
$license = $is_pro ? acf_pro_get_license() : array();
|
||||
$license_status = $is_pro ? acf_pro_get_license_status() : array();
|
||||
$field_groups = acf_get_field_groups();
|
||||
$post_types = acf_get_post_types();
|
||||
$taxonomies = acf_get_taxonomies();
|
||||
|
||||
$yes = __( 'Yes', 'acf' );
|
||||
$no = __( 'No', 'acf' );
|
||||
|
||||
$fields['version'] = array(
|
||||
'label' => __( 'Plugin Version', 'acf' ),
|
||||
'value' => defined( 'ACF_VERSION' ) ? ACF_VERSION : '',
|
||||
);
|
||||
|
||||
$fields['plugin_type'] = array(
|
||||
'label' => __( 'Plugin Type', 'acf' ),
|
||||
'value' => $is_pro ? __( 'PRO', 'acf' ) : __( 'Free', 'acf' ),
|
||||
'debug' => $is_pro ? 'PRO' : 'Free',
|
||||
);
|
||||
|
||||
if ( $is_pro ) {
|
||||
$fields['activated'] = array(
|
||||
'label' => __( 'License Activated', 'acf' ),
|
||||
'value' => ! empty( $license ) ? $yes : $no,
|
||||
'debug' => ! empty( $license ),
|
||||
);
|
||||
|
||||
$fields['activated_url'] = array(
|
||||
'label' => __( 'Licensed URL', 'acf' ),
|
||||
'value' => ! empty( $license['url'] ) ? $license['url'] : '',
|
||||
);
|
||||
|
||||
$fields['license_type'] = array(
|
||||
'label' => __( 'License Type', 'acf' ),
|
||||
'value' => $license_status['name'],
|
||||
);
|
||||
|
||||
$fields['license_status'] = array(
|
||||
'label' => __( 'License Status', 'acf' ),
|
||||
'value' => $license_status['status'],
|
||||
);
|
||||
|
||||
$expiry = ! empty( $license_status['expiry'] ) ? $license_status['expiry'] : '';
|
||||
$format = get_option( 'date_format', 'F j, Y' );
|
||||
|
||||
$fields['subscription_expires'] = array(
|
||||
'label' => __( 'Subscription Expiry Date', 'acf' ),
|
||||
'value' => is_numeric( $expiry ) ? date_i18n( $format, $expiry ) : '',
|
||||
'debug' => $expiry,
|
||||
);
|
||||
}
|
||||
|
||||
$fields['wp_version'] = array(
|
||||
'label' => __( 'WordPress Version', 'acf' ),
|
||||
'value' => get_bloginfo( 'version' ),
|
||||
);
|
||||
|
||||
$fields['mysql_version'] = array(
|
||||
'label' => __( 'MySQL Version', 'acf' ),
|
||||
'value' => $wpdb->db_server_info(),
|
||||
);
|
||||
|
||||
$fields['is_multisite'] = array(
|
||||
'label' => __( 'Is Multisite', 'acf' ),
|
||||
'value' => is_multisite() ? __( 'Yes', 'acf' ) : __( 'No', 'acf' ),
|
||||
'debug' => is_multisite(),
|
||||
);
|
||||
|
||||
$active_theme = wp_get_theme();
|
||||
$parent_theme = $active_theme->parent();
|
||||
|
||||
$fields['active_theme'] = array(
|
||||
'label' => __( 'Active Theme', 'acf' ),
|
||||
'value' => array(
|
||||
'name' => $active_theme->get( 'Name' ),
|
||||
'version' => $active_theme->get( 'Version' ),
|
||||
'theme_uri' => $active_theme->get( 'ThemeURI' ),
|
||||
'stylesheet' => $active_theme->get( 'Stylesheet' ),
|
||||
),
|
||||
);
|
||||
|
||||
if ( $parent_theme ) {
|
||||
$fields['parent_theme'] = array(
|
||||
'label' => __( 'Parent Theme', 'acf' ),
|
||||
'value' => array(
|
||||
'name' => $parent_theme->get( 'Name' ),
|
||||
'version' => $parent_theme->get( 'Version' ),
|
||||
'theme_uri' => $parent_theme->get( 'ThemeURI' ),
|
||||
'stylesheet' => $parent_theme->get( 'Stylesheet' ),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
$active_plugins = array();
|
||||
$plugins = get_plugins();
|
||||
|
||||
foreach ( $plugins as $plugin_path => $plugin ) {
|
||||
if ( ! is_plugin_active( $plugin_path ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$active_plugins[ $plugin_path ] = array(
|
||||
'name' => $plugin['Name'],
|
||||
'version' => $plugin['Version'],
|
||||
'plugin_uri' => empty( $plugin['PluginURI'] ) ? '' : $plugin['PluginURI'],
|
||||
);
|
||||
}
|
||||
|
||||
$fields['active_plugins'] = array(
|
||||
'label' => __( 'Active Plugins', 'acf' ),
|
||||
'value' => $active_plugins,
|
||||
);
|
||||
|
||||
$ui_field_groups = array_filter(
|
||||
$field_groups,
|
||||
function ( $field_group ) {
|
||||
return empty( $field_group['local'] );
|
||||
}
|
||||
);
|
||||
|
||||
$fields['ui_field_groups'] = array(
|
||||
'label' => __( 'Registered Field Groups (UI)', 'acf' ),
|
||||
'value' => number_format_i18n( count( $ui_field_groups ) ),
|
||||
);
|
||||
|
||||
$php_field_groups = array_filter(
|
||||
$field_groups,
|
||||
function ( $field_group ) {
|
||||
return ! empty( $field_group['local'] ) && 'PHP' === $field_group['local'];
|
||||
}
|
||||
);
|
||||
|
||||
$fields['php_field_groups'] = array(
|
||||
'label' => __( 'Registered Field Groups (PHP)', 'acf' ),
|
||||
'value' => number_format_i18n( count( $php_field_groups ) ),
|
||||
);
|
||||
|
||||
$json_field_groups = array_filter(
|
||||
$field_groups,
|
||||
function ( $field_group ) {
|
||||
return ! empty( $field_group['local'] ) && 'json' === $field_group['local'];
|
||||
}
|
||||
);
|
||||
|
||||
$fields['json_field_groups'] = array(
|
||||
'label' => __( 'Registered Field Groups (JSON)', 'acf' ),
|
||||
'value' => number_format_i18n( count( $json_field_groups ) ),
|
||||
);
|
||||
|
||||
$rest_field_groups = array_filter(
|
||||
$field_groups,
|
||||
function ( $field_group ) {
|
||||
return ! empty( $field_group['show_in_rest'] );
|
||||
}
|
||||
);
|
||||
|
||||
$fields['rest_field_groups'] = array(
|
||||
'label' => __( 'Field Groups Enabled for REST API', 'acf' ),
|
||||
'value' => number_format_i18n( count( $rest_field_groups ) ),
|
||||
);
|
||||
|
||||
$graphql_field_groups = array_filter(
|
||||
$field_groups,
|
||||
function ( $field_group ) {
|
||||
return ! empty( $field_group['show_in_graphql'] );
|
||||
}
|
||||
);
|
||||
|
||||
if ( is_plugin_active( 'wpgraphql-acf/wpgraphql-acf.php' ) ) {
|
||||
$fields['graphql_field_groups'] = array(
|
||||
'label' => __( 'Field Groups Enabled for GraphQL', 'acf' ),
|
||||
'value' => number_format_i18n( count( $graphql_field_groups ) ),
|
||||
);
|
||||
}
|
||||
|
||||
$all_fields = array();
|
||||
foreach ( $field_groups as $field_group ) {
|
||||
$all_fields = array_merge( $all_fields, acf_get_fields( $field_group ) );
|
||||
}
|
||||
|
||||
$fields_by_type = array();
|
||||
$third_party_fields_by_type = array();
|
||||
$core_field_types = array_keys( acf_get_field_types() );
|
||||
|
||||
foreach ( $all_fields as $field ) {
|
||||
if ( in_array( $field['type'], $core_field_types, true ) ) {
|
||||
if ( ! isset( $fields_by_type[ $field['type'] ] ) ) {
|
||||
$fields_by_type[ $field['type'] ] = 0;
|
||||
}
|
||||
|
||||
++$fields_by_type[ $field['type'] ];
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ! isset( $third_party_fields_by_type[ $field['type'] ] ) ) {
|
||||
$third_party_fields_by_type[ $field['type'] ] = 0;
|
||||
}
|
||||
|
||||
++$third_party_fields_by_type[ $field['type'] ];
|
||||
}
|
||||
|
||||
$fields['number_of_fields_by_type'] = array(
|
||||
'label' => __( 'Number of Fields by Field Type', 'acf' ),
|
||||
'value' => $fields_by_type,
|
||||
);
|
||||
|
||||
$fields['number_of_third_party_fields_by_type'] = array(
|
||||
'label' => __( 'Number of Third Party Fields by Field Type', 'acf' ),
|
||||
'value' => $third_party_fields_by_type,
|
||||
);
|
||||
|
||||
$enable_post_types = acf_get_setting( 'enable_post_types' );
|
||||
|
||||
$fields['post_types_enabled'] = array(
|
||||
'label' => __( 'Post Types and Taxonomies Enabled', 'acf' ),
|
||||
'value' => $enable_post_types ? $yes : $no,
|
||||
'debug' => $enable_post_types,
|
||||
);
|
||||
|
||||
$ui_post_types = array_filter(
|
||||
$post_types,
|
||||
function ( $post_type ) {
|
||||
return empty( $post_type['local'] );
|
||||
}
|
||||
);
|
||||
|
||||
$fields['ui_post_types'] = array(
|
||||
'label' => __( 'Registered Post Types (UI)', 'acf' ),
|
||||
'value' => number_format_i18n( count( $ui_post_types ) ),
|
||||
);
|
||||
|
||||
$json_post_types = array_filter(
|
||||
$post_types,
|
||||
function ( $post_type ) {
|
||||
return ! empty( $post_type['local'] ) && 'json' === $post_type['local'];
|
||||
}
|
||||
);
|
||||
|
||||
$fields['json_post_types'] = array(
|
||||
'label' => __( 'Registered Post Types (JSON)', 'acf' ),
|
||||
'value' => number_format_i18n( count( $json_post_types ) ),
|
||||
);
|
||||
|
||||
$ui_taxonomies = array_filter(
|
||||
$taxonomies,
|
||||
function ( $taxonomy ) {
|
||||
return empty( $taxonomy['local'] );
|
||||
}
|
||||
);
|
||||
|
||||
$fields['ui_taxonomies'] = array(
|
||||
'label' => __( 'Registered Taxonomies (UI)', 'acf' ),
|
||||
'value' => number_format_i18n( count( $ui_taxonomies ) ),
|
||||
);
|
||||
|
||||
$json_taxonomies = array_filter(
|
||||
$taxonomies,
|
||||
function ( $taxonomy ) {
|
||||
return ! empty( $taxonomy['local'] ) && 'json' === $taxonomy['local'];
|
||||
}
|
||||
);
|
||||
|
||||
$fields['json_taxonomies'] = array(
|
||||
'label' => __( 'Registered Taxonomies (JSON)', 'acf' ),
|
||||
'value' => number_format_i18n( count( $json_taxonomies ) ),
|
||||
);
|
||||
|
||||
if ( $is_pro ) {
|
||||
$enable_options_pages_ui = acf_get_setting( 'enable_options_pages_ui' );
|
||||
|
||||
$fields['ui_options_pages_enabled'] = array(
|
||||
'label' => __( 'Options Pages UI Enabled', 'acf' ),
|
||||
'value' => $enable_options_pages_ui ? $yes : $no,
|
||||
'debug' => $enable_options_pages_ui,
|
||||
);
|
||||
|
||||
$options_pages = acf_get_options_pages();
|
||||
$ui_options_pages = array();
|
||||
|
||||
if ( empty( $options_pages ) || ! is_array( $options_pages ) ) {
|
||||
$options_pages = array();
|
||||
}
|
||||
|
||||
if ( $enable_options_pages_ui ) {
|
||||
$ui_options_pages = acf_get_ui_options_pages();
|
||||
|
||||
$ui_options_pages_in_ui = array_filter(
|
||||
$ui_options_pages,
|
||||
function ( $ui_options_page ) {
|
||||
return empty( $ui_options_page['local'] );
|
||||
}
|
||||
);
|
||||
|
||||
$json_options_pages = array_filter(
|
||||
$ui_options_pages,
|
||||
function ( $ui_options_page ) {
|
||||
return ! empty( $ui_options_page['local'] );
|
||||
}
|
||||
);
|
||||
|
||||
$fields['ui_options_pages'] = array(
|
||||
'label' => __( 'Registered Options Pages (UI)', 'acf' ),
|
||||
'value' => number_format_i18n( count( $ui_options_pages_in_ui ) ),
|
||||
);
|
||||
|
||||
$fields['json_options_pages'] = array(
|
||||
'label' => __( 'Registered Options Pages (JSON)', 'acf' ),
|
||||
'value' => number_format_i18n( count( $json_options_pages ) ),
|
||||
);
|
||||
}
|
||||
|
||||
$ui_options_page_slugs = array_column( $ui_options_pages, 'menu_slug' );
|
||||
$php_options_pages = array_filter(
|
||||
$options_pages,
|
||||
function ( $options_page ) use ( $ui_options_page_slugs ) {
|
||||
return ! in_array( $options_page['menu_slug'], $ui_options_page_slugs, true );
|
||||
}
|
||||
);
|
||||
|
||||
$fields['php_options_pages'] = array(
|
||||
'label' => __( 'Registered Options Pages (PHP)', 'acf' ),
|
||||
'value' => number_format_i18n( count( $php_options_pages ) ),
|
||||
);
|
||||
}
|
||||
|
||||
$rest_api_format = acf_get_setting( 'rest_api_format' );
|
||||
|
||||
$fields['rest_api_format'] = array(
|
||||
'label' => __( 'REST API Format', 'acf' ),
|
||||
'value' => 'standard' === $rest_api_format ? __( 'Standard', 'acf' ) : __( 'Light', 'acf' ),
|
||||
'debug' => $rest_api_format,
|
||||
);
|
||||
|
||||
if ( $is_pro ) {
|
||||
$fields['registered_acf_blocks'] = array(
|
||||
'label' => __( 'Registered ACF Blocks', 'acf' ),
|
||||
'value' => number_format_i18n( acf_pro_get_registered_block_count() ),
|
||||
);
|
||||
|
||||
$blocks = acf_get_block_types();
|
||||
$block_api_versions = array();
|
||||
$acf_block_versions = array();
|
||||
$blocks_using_post_meta = 0;
|
||||
|
||||
foreach ( $blocks as $block ) {
|
||||
if ( ! isset( $block_api_versions[ 'v' . $block['api_version'] ] ) ) {
|
||||
$block_api_versions[ 'v' . $block['api_version'] ] = 0;
|
||||
}
|
||||
|
||||
if ( ! isset( $acf_block_versions[ 'v' . $block['acf_block_version'] ] ) ) {
|
||||
$acf_block_versions[ 'v' . $block['acf_block_version'] ] = 0;
|
||||
}
|
||||
|
||||
if ( ! empty( $block['use_post_meta'] ) ) {
|
||||
++$blocks_using_post_meta;
|
||||
}
|
||||
|
||||
++$block_api_versions[ 'v' . $block['api_version'] ];
|
||||
++$acf_block_versions[ 'v' . $block['acf_block_version'] ];
|
||||
}
|
||||
|
||||
$fields['blocks_per_api_version'] = array(
|
||||
'label' => __( 'Blocks Per API Version', 'acf' ),
|
||||
'value' => $block_api_versions,
|
||||
);
|
||||
|
||||
$fields['blocks_per_acf_block_version'] = array(
|
||||
'label' => __( 'Blocks Per ACF Block Version', 'acf' ),
|
||||
'value' => $acf_block_versions,
|
||||
);
|
||||
|
||||
$fields['blocks_using_post_meta'] = array(
|
||||
'label' => __( 'Blocks Using Post Meta', 'acf' ),
|
||||
'value' => number_format_i18n( $blocks_using_post_meta ),
|
||||
);
|
||||
|
||||
$preload_blocks = acf_get_setting( 'preload_blocks' );
|
||||
|
||||
$fields['preload_blocks'] = array(
|
||||
'label' => __( 'Block Preloading Enabled', 'acf' ),
|
||||
'value' => ! empty( $preload_blocks ) ? $yes : $no,
|
||||
'debug' => $preload_blocks,
|
||||
);
|
||||
}
|
||||
|
||||
$show_admin = acf_get_setting( 'show_admin' );
|
||||
|
||||
$fields['admin_ui_enabled'] = array(
|
||||
'label' => __( 'Admin UI Enabled', 'acf' ),
|
||||
'value' => $show_admin ? $yes : $no,
|
||||
'debug' => $show_admin,
|
||||
);
|
||||
|
||||
$field_type_modal_enabled = apply_filters( 'acf/field_group/enable_field_browser', true );
|
||||
|
||||
$fields['field_type-modal_enabled'] = array(
|
||||
'label' => __( 'Field Type Modal Enabled', 'acf' ),
|
||||
'value' => ! empty( $field_type_modal_enabled ) ? $yes : $no,
|
||||
'debug' => $field_type_modal_enabled,
|
||||
);
|
||||
|
||||
$field_settings_tabs_enabled = apply_filters( 'acf/field_group/disable_field_settings_tabs', false );
|
||||
|
||||
$fields['field_settings_tabs_enabled'] = array(
|
||||
'label' => __( 'Field Settings Tabs Enabled', 'acf' ),
|
||||
'value' => empty( $field_settings_tabs_enabled ) ? $yes : $no,
|
||||
'debug' => $field_settings_tabs_enabled,
|
||||
);
|
||||
|
||||
$shortcode_enabled = acf_get_setting( 'enable_shortcode' );
|
||||
|
||||
$fields['shortcode_enabled'] = array(
|
||||
'label' => __( 'Shortcode Enabled', 'acf' ),
|
||||
'value' => ! empty( $shortcode_enabled ) ? $yes : $no,
|
||||
'debug' => $shortcode_enabled,
|
||||
);
|
||||
|
||||
$fields['registered_acf_forms'] = array(
|
||||
'label' => __( 'Registered ACF Forms', 'acf' ),
|
||||
'value' => number_format_i18n( count( acf_get_forms() ) ),
|
||||
);
|
||||
|
||||
$local_json = acf_get_instance( 'ACF_Local_JSON' );
|
||||
$save_paths = $local_json->get_save_paths();
|
||||
$load_paths = $local_json->get_load_paths();
|
||||
|
||||
$fields['json_save_paths'] = array(
|
||||
'label' => __( 'JSON Save Paths', 'acf' ),
|
||||
'value' => number_format_i18n( count( $save_paths ) ),
|
||||
'debug' => count( $save_paths ),
|
||||
);
|
||||
|
||||
$fields['json_load_paths'] = array(
|
||||
'label' => __( 'JSON Load Paths', 'acf' ),
|
||||
'value' => number_format_i18n( count( $load_paths ) ),
|
||||
'debug' => count( $load_paths ),
|
||||
);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
}
|
||||
|
||||
acf_new_instance( 'ACF_Site_Health' );
|
||||
}
|
||||
@@ -22,36 +22,31 @@ if ( ! class_exists( 'acf_fields' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function __construct() {
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function will register a field type instance
|
||||
* This function will register a field type instance based on a class name or instance.
|
||||
* It will return the instance for further use.
|
||||
*
|
||||
* @type function
|
||||
* @date 6/07/2016
|
||||
* @since 5.4.0
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @param $class (string)
|
||||
* @return n/a
|
||||
* @param mixed $field_class Either a class name (string) or instance of acf_field.
|
||||
* @return acf_field The instance of acf_field.
|
||||
*/
|
||||
|
||||
function register_field_type( $class ) {
|
||||
|
||||
// allow instance
|
||||
if ( $class instanceof acf_field ) {
|
||||
$this->types[ $class->name ] = $class;
|
||||
|
||||
// allow class name
|
||||
} else {
|
||||
$instance = new $class();
|
||||
$this->types[ $instance->name ] = $instance;
|
||||
public function register_field_type( $field_class ) {
|
||||
// Allow registering an instance.
|
||||
if ( $field_class instanceof acf_field ) {
|
||||
$this->types[ $field_class->name ] = $field_class;
|
||||
return $field_class;
|
||||
}
|
||||
}
|
||||
|
||||
// Allow registering a loaded class name.
|
||||
$instance = new $field_class();
|
||||
$this->types[ $instance->name ] = $instance;
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will return a field type instance
|
||||
@@ -63,7 +58,6 @@ if ( ! class_exists( 'acf_fields' ) ) :
|
||||
* @param $name (string)
|
||||
* @return (mixed)
|
||||
*/
|
||||
|
||||
function get_field_type( $name ) {
|
||||
return isset( $this->types[ $name ] ) ? $this->types[ $name ] : null;
|
||||
}
|
||||
@@ -79,7 +73,6 @@ if ( ! class_exists( 'acf_fields' ) ) :
|
||||
* @param $name (string)
|
||||
* @return (mixed)
|
||||
*/
|
||||
|
||||
function is_field_type( $name ) {
|
||||
return isset( $this->types[ $name ] );
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ if ( ! class_exists( 'acf_field__accordion' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -47,7 +46,6 @@ if ( ! class_exists( 'acf_field__accordion' ) ) :
|
||||
* @param array $field
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -122,7 +120,6 @@ if ( ! class_exists( 'acf_field__accordion' ) ) :
|
||||
*
|
||||
* @return $field - the field array holding all the field options
|
||||
*/
|
||||
|
||||
function load_field( $field ) {
|
||||
|
||||
// remove name to avoid caching issue
|
||||
|
||||
@@ -16,7 +16,6 @@ if ( ! class_exists( 'acf_field_button_group' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -224,7 +223,6 @@ if ( ! class_exists( 'acf_field_button_group' ) ) :
|
||||
* @param array $field The field array holding all the field options
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function update_field( $field ) {
|
||||
|
||||
return acf_get_field_type( 'radio' )->update_field( $field );
|
||||
@@ -242,7 +240,6 @@ if ( ! class_exists( 'acf_field_button_group' ) ) :
|
||||
* @param array $field The field array holding all the field options
|
||||
* @return $value
|
||||
*/
|
||||
|
||||
function load_value( $value, $post_id, $field ) {
|
||||
|
||||
return acf_get_field_type( 'radio' )->load_value( $value, $post_id, $field );
|
||||
@@ -258,7 +255,6 @@ if ( ! class_exists( 'acf_field_button_group' ) ) :
|
||||
* @param array $field The field array holding all the field options
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function translate_field( $field ) {
|
||||
|
||||
return acf_get_field_type( 'radio' )->translate_field( $field );
|
||||
@@ -276,7 +272,6 @@ if ( ! class_exists( 'acf_field_button_group' ) ) :
|
||||
* @param array $field The field array holding all the field options
|
||||
* @return $value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
return acf_get_field_type( 'radio' )->format_value( $value, $post_id, $field );
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_checkbox' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -50,7 +49,6 @@ if ( ! class_exists( 'acf_field_checkbox' ) ) :
|
||||
* @param $field (array) the $field being edited
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// reset vars
|
||||
@@ -109,7 +107,6 @@ if ( ! class_exists( 'acf_field_checkbox' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function render_field_choices( $field ) {
|
||||
|
||||
// walk
|
||||
@@ -151,7 +148,6 @@ if ( ! class_exists( 'acf_field_checkbox' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function render_field_toggle( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -186,7 +182,6 @@ if ( ! class_exists( 'acf_field_checkbox' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function render_field_custom( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -443,7 +438,6 @@ if ( ! class_exists( 'acf_field_checkbox' ) ) :
|
||||
*
|
||||
* @return $field - the modified field
|
||||
*/
|
||||
|
||||
function update_field( $field ) {
|
||||
|
||||
// Decode choices (convert to array).
|
||||
@@ -466,7 +460,6 @@ if ( ! class_exists( 'acf_field_checkbox' ) ) :
|
||||
*
|
||||
* @return $value - the modified value
|
||||
*/
|
||||
|
||||
function update_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if is empty
|
||||
@@ -530,7 +523,6 @@ if ( ! class_exists( 'acf_field_checkbox' ) ) :
|
||||
* @param $field (array)
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function translate_field( $field ) {
|
||||
|
||||
return acf_get_field_type( 'select' )->translate_field( $field );
|
||||
@@ -550,7 +542,6 @@ if ( ! class_exists( 'acf_field_checkbox' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
// Bail early if is empty.
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_color_picker' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -43,7 +42,6 @@ if ( ! class_exists( 'acf_field_color_picker' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function input_admin_enqueue_scripts() {
|
||||
|
||||
// Register scripts for non-admin.
|
||||
@@ -107,7 +105,6 @@ if ( ! class_exists( 'acf_field_color_picker' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
$text_input = acf_get_sub_array( $field, array( 'id', 'class', 'name', 'value' ) );
|
||||
$hidden_input = acf_get_sub_array( $field, array( 'name', 'value' ) );
|
||||
@@ -138,7 +135,6 @@ if ( ! class_exists( 'acf_field_color_picker' ) ) :
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*/
|
||||
|
||||
function render_field_settings( $field ) {
|
||||
|
||||
// display_format
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_date_picker' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -43,7 +42,6 @@ if ( ! class_exists( 'acf_field_date_picker' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function input_admin_enqueue_scripts() {
|
||||
|
||||
// bail early if no enqueue
|
||||
@@ -87,7 +85,6 @@ if ( ! class_exists( 'acf_field_date_picker' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -243,7 +240,6 @@ if ( ! class_exists( 'acf_field_date_picker' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
// save_format - compatibility with ACF < 5.0.0
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_date_and_time_picker' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -43,7 +42,6 @@ if ( ! class_exists( 'acf_field_date_and_time_picker' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function input_admin_enqueue_scripts() {
|
||||
|
||||
// bail early if no enqueue
|
||||
@@ -98,7 +96,6 @@ if ( ! class_exists( 'acf_field_date_and_time_picker' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// Set value.
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_email' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -42,7 +41,6 @@ if ( ! class_exists( 'acf_field_email' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_file' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -48,7 +47,6 @@ if ( ! class_exists( 'acf_field_file' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function input_admin_enqueue_scripts() {
|
||||
|
||||
// localize
|
||||
@@ -71,7 +69,6 @@ if ( ! class_exists( 'acf_field_file' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -297,7 +294,6 @@ if ( ! class_exists( 'acf_field_file' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if no value
|
||||
@@ -335,7 +331,6 @@ if ( ! class_exists( 'acf_field_file' ) ) :
|
||||
* @param $vars (array)
|
||||
* @return $vars
|
||||
*/
|
||||
|
||||
function get_media_item_args( $vars ) {
|
||||
|
||||
$vars['send'] = true;
|
||||
@@ -356,7 +351,6 @@ if ( ! class_exists( 'acf_field_file' ) ) :
|
||||
*
|
||||
* @return $value - the modified value
|
||||
*/
|
||||
|
||||
function update_value( $value, $post_id, $field ) {
|
||||
|
||||
// Bail early if no value.
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_google_map' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -50,7 +49,6 @@ if ( ! class_exists( 'acf_field_google_map' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function input_admin_enqueue_scripts() {
|
||||
|
||||
// localize
|
||||
@@ -107,7 +105,6 @@ if ( ! class_exists( 'acf_field_google_map' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// Apply defaults.
|
||||
@@ -176,7 +173,6 @@ if ( ! class_exists( 'acf_field_google_map' ) ) :
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*/
|
||||
|
||||
function render_field_settings( $field ) {
|
||||
|
||||
// center_lat
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -48,7 +47,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
*
|
||||
* @return $field - the field array holding all the field options
|
||||
*/
|
||||
|
||||
function load_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -76,7 +74,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
* @param $field (array) the field array holding all the field options
|
||||
* @return $value
|
||||
*/
|
||||
|
||||
function load_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if no sub fields
|
||||
@@ -154,7 +151,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
*
|
||||
* @return $value - the modified value
|
||||
*/
|
||||
|
||||
function update_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if no value
|
||||
@@ -210,7 +206,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
* @param $field (array)
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function prepare_field_for_db( $field ) {
|
||||
|
||||
// bail early if no sub fields
|
||||
@@ -239,7 +234,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// bail early if no sub fields
|
||||
@@ -289,7 +283,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function render_field_block( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -316,7 +309,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function render_field_table( $field ) {
|
||||
|
||||
?>
|
||||
@@ -381,7 +373,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*/
|
||||
|
||||
function render_field_settings( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -435,7 +426,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function validate_value( $valid, $value, $field, $input ) {
|
||||
|
||||
// bail early if no $value
|
||||
@@ -484,7 +474,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
*
|
||||
* @return $field - the modified field
|
||||
*/
|
||||
|
||||
function duplicate_field( $field ) {
|
||||
|
||||
// get sub fields
|
||||
@@ -561,7 +550,6 @@ if ( ! class_exists( 'acf_field__group' ) ) :
|
||||
* @param array $field The field settings
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function delete_value( $post_id, $meta_key, $field ) {
|
||||
|
||||
// bail early if no sub fields
|
||||
|
||||
@@ -0,0 +1,686 @@
|
||||
<?php
|
||||
/**
|
||||
* This is a PHP file containing the code for the acf_field_icon_picker class.
|
||||
*
|
||||
* @package Advanced_Custom_Fields_Pro
|
||||
*/
|
||||
|
||||
if ( ! class_exists( 'acf_field_icon_picker' ) ) :
|
||||
|
||||
/**
|
||||
* Class acf_field_icon_picker.
|
||||
*/
|
||||
class acf_field_icon_picker extends acf_field {
|
||||
/**
|
||||
* Initialize icon picker field
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initialize() {
|
||||
$this->name = 'icon_picker';
|
||||
$this->label = __( 'Icon Picker', 'acf' );
|
||||
$this->public = true;
|
||||
$this->category = 'advanced';
|
||||
$this->description = __( 'An interactive UI for selecting an icon. Select from Dashicons, the media library, or a standalone URL input.', 'acf' );
|
||||
$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-icon-picker.png';
|
||||
$this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/icon-picker/', 'docs', 'field-type-selection' );
|
||||
$this->defaults = array(
|
||||
'library' => 'all',
|
||||
'tabs' => array_keys( $this->get_tabs() ),
|
||||
'return_format' => 'string',
|
||||
'default_value' => array(
|
||||
'type' => null,
|
||||
'value' => null,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the available tabs for the icon picker field.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_tabs() {
|
||||
$tabs = array(
|
||||
'dashicons' => esc_html__( 'Dashicons', 'acf' ),
|
||||
);
|
||||
|
||||
if ( current_user_can( 'upload_files' ) ) {
|
||||
$tabs['media_library'] = esc_html__( 'Media Library', 'acf' );
|
||||
}
|
||||
|
||||
$tabs['url'] = esc_html__( 'URL', 'acf' );
|
||||
|
||||
/**
|
||||
* Allows filtering the tabs used by the icon picker.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param array $tabs An associative array of tabs in key => label format.
|
||||
* @return array
|
||||
*/
|
||||
return apply_filters( 'acf/fields/icon_picker/tabs', $tabs );
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders icon picker field
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param object $field The ACF Field
|
||||
* @return void
|
||||
*/
|
||||
public function render_field( $field ) {
|
||||
$uploader = acf_get_setting( 'uploader' );
|
||||
|
||||
// Enqueue uploader scripts
|
||||
if ( $uploader === 'wp' ) {
|
||||
acf_enqueue_uploader();
|
||||
}
|
||||
|
||||
$div = array(
|
||||
'id' => $field['id'],
|
||||
'class' => $field['class'] . ' acf-icon-picker',
|
||||
);
|
||||
|
||||
echo '<div ' . acf_esc_attrs( $div ) . '>';
|
||||
|
||||
acf_hidden_input(
|
||||
array(
|
||||
'name' => $field['name'] . '[type]',
|
||||
'value' => $field['value']['type'],
|
||||
'data-hidden-type' => 'type',
|
||||
)
|
||||
);
|
||||
acf_hidden_input(
|
||||
array(
|
||||
'name' => $field['name'] . '[value]',
|
||||
'value' => $field['value']['value'],
|
||||
'data-hidden-type' => 'value',
|
||||
)
|
||||
);
|
||||
|
||||
if ( ! is_array( $field['tabs'] ) ) {
|
||||
$field['tabs'] = array();
|
||||
}
|
||||
|
||||
$tabs = $this->get_tabs();
|
||||
$shown = array_filter(
|
||||
$tabs,
|
||||
function ( $tab ) use ( $field ) {
|
||||
return in_array( $tab, $field['tabs'], true );
|
||||
},
|
||||
ARRAY_FILTER_USE_KEY
|
||||
);
|
||||
|
||||
foreach ( $shown as $name => $label ) {
|
||||
if ( count( $shown ) > 1 ) {
|
||||
acf_render_field_wrap(
|
||||
array(
|
||||
'type' => 'tab',
|
||||
'label' => $label,
|
||||
'key' => 'acf_icon_picker_tabs',
|
||||
'selected' => $name === $field['value']['type'],
|
||||
'unique_tab_key' => $name,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$wrapper_class = str_replace( '_', '-', $name );
|
||||
echo '<div class="acf-icon-picker-tabs acf-icon-picker-' . esc_attr( $wrapper_class ) . '-tabs">';
|
||||
|
||||
switch ( $name ) {
|
||||
case 'dashicons':
|
||||
echo '<div class="acf-dashicons-search-wrap">';
|
||||
acf_text_input(
|
||||
array(
|
||||
'class' => 'acf-dashicons-search-input',
|
||||
'placeholder' => esc_html__( 'Search icons...', 'acf' ),
|
||||
'type' => 'search',
|
||||
)
|
||||
);
|
||||
echo '</div>';
|
||||
echo '<div class="acf-dashicons-list"></div>';
|
||||
?>
|
||||
<div class="acf-dashicons-list-empty">
|
||||
<img src="<?php echo esc_url( acf_get_url( 'assets/images/face-sad.svg' ) ); ?>" />
|
||||
<p class="acf-no-results-text">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: The invalid search term */
|
||||
esc_html__( "No search results for '%s'", 'acf' ),
|
||||
'<span class="acf-invalid-dashicon-search-term"></span>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
break;
|
||||
case 'media_library':
|
||||
?>
|
||||
<div class="acf-icon-picker-tab" data-category="<?php echo esc_attr( $name ); ?>">
|
||||
<div class="acf-icon-picker-media-library">
|
||||
<button
|
||||
aria-label="<?php esc_attr_e( 'Click to change the icon in the Media Library', 'acf' ); ?>"
|
||||
class="acf-icon-picker-media-library-preview"
|
||||
style="<?php echo esc_attr( 'media_library' === $field['value']['type'] || 'dashicons' === $field['value']['type'] && ! empty( $field['value']['value'] ) ? '' : 'display: none;' ); ?>"
|
||||
>
|
||||
<div class="acf-icon-picker-media-library-preview-img" style="<?php echo esc_attr( 'media_library' !== $field['value']['type'] ? 'display: none;' : '' ); ?>">
|
||||
<?php
|
||||
$img_url = wp_get_attachment_image_url( $field['value']['value'], 'thumbnail' );
|
||||
// If the type is media_library, then we need to show the media library preview.
|
||||
?>
|
||||
<img src="<?php echo esc_url( $img_url ); ?>" alt="<?php esc_attr_e( 'The currently selected image preview', 'acf' ); ?>" />
|
||||
</div>
|
||||
<div class="acf-icon-picker-media-library-preview-dashicon" style="<?php echo esc_attr( 'dashicons' !== $field['value']['type'] ? 'display: none;' : '' ); ?>">
|
||||
<div class="dashicons <?php echo esc_attr( $field['value']['value'] ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
<button class="acf-icon-picker-media-library-button">
|
||||
<div class="acf-icon-picker-media-library-button-icon dashicons dashicons-admin-media"></div>
|
||||
<span><?php esc_html_e( 'Browse Media Library', 'acf' ); ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
case 'url':
|
||||
echo '<div class="acf-icon-picker-url">';
|
||||
acf_text_input(
|
||||
array(
|
||||
'class' => 'acf-icon_url',
|
||||
'value' => $field['value']['type'] === 'url' ? $field['value']['value'] : '',
|
||||
)
|
||||
);
|
||||
|
||||
// Helper Text
|
||||
?>
|
||||
<p class="description"><?php esc_html_e( 'The URL to the icon you\'d like to use, or svg as Data URI', 'acf' ); ?></p>
|
||||
<?php
|
||||
echo '</div>';
|
||||
break;
|
||||
default:
|
||||
do_action( 'acf/fields/icon_picker/tab/' . $name, $field );
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders field settings for the icon picker field.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param array $field The icon picker field object.
|
||||
* @return void
|
||||
*/
|
||||
public function render_field_settings( $field ) {
|
||||
acf_render_field_setting(
|
||||
$field,
|
||||
array(
|
||||
'label' => __( 'Tabs', 'acf' ),
|
||||
'instructions' => __( 'Select where content editors can choose the icon from.', 'acf' ),
|
||||
'type' => 'checkbox',
|
||||
'name' => 'tabs',
|
||||
'choices' => $this->get_tabs(),
|
||||
)
|
||||
);
|
||||
|
||||
$return_format_doc = sprintf(
|
||||
'<a href="%s" target="_blank">%s</a>',
|
||||
acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/icon-picker/', 'docs', 'icon-picker-return-format' ),
|
||||
__( 'Learn More', 'acf' )
|
||||
);
|
||||
|
||||
$return_format_instructions = sprintf(
|
||||
/* translators: %s - link to documentation */
|
||||
__( 'Specify the return format for the icon. %s', 'acf' ),
|
||||
$return_format_doc
|
||||
);
|
||||
|
||||
acf_render_field_setting(
|
||||
$field,
|
||||
array(
|
||||
'label' => __( 'Return Format', 'acf' ),
|
||||
'instructions' => $return_format_instructions,
|
||||
'type' => 'radio',
|
||||
'name' => 'return_format',
|
||||
'choices' => array(
|
||||
'string' => __( 'String', 'acf' ),
|
||||
'array' => __( 'Array', 'acf' ),
|
||||
),
|
||||
'layout' => 'horizontal',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Localizes text for Icon Picker
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function input_admin_enqueue_scripts() {
|
||||
acf_localize_data(
|
||||
array(
|
||||
'iconPickerA11yStrings' => array(
|
||||
'noResultsForSearchTerm' => esc_html__( 'No results found for that search term', 'acf' ),
|
||||
'newResultsFoundForSearchTerm' => esc_html__( 'The available icons matching your search query have been updated in the icon picker below.', 'acf' ),
|
||||
),
|
||||
'iconPickeri10n' => $this->get_dashicons(),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the field value before it is saved into the database.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param integer $valid The current validation status.
|
||||
* @param mixed $value The value of the field.
|
||||
* @param array $field The field array holding all the field options.
|
||||
* @param string $input The corresponding input name for $_POST value.
|
||||
* @return boolean true If the value is valid, false if not.
|
||||
*/
|
||||
public function validate_value( $valid, $value, $field, $input ) {
|
||||
// If the value is empty, return true. You're allowed to save nothing.
|
||||
if ( empty( $value ) && empty( $field['required'] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the value is not an array, return $valid status.
|
||||
if ( ! is_array( $value ) ) {
|
||||
return $valid;
|
||||
}
|
||||
|
||||
// If the value is an array, but the type is not set, fail validation.
|
||||
if ( ! isset( $value['type'] ) ) {
|
||||
return __( 'Icon picker requires an icon type.', 'acf' );
|
||||
}
|
||||
|
||||
// If the value is an array, but the value is not set, fail validation.
|
||||
if ( ! isset( $value['value'] ) ) {
|
||||
return __( 'Icon picker requires a value.', 'acf' );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* format_value()
|
||||
*
|
||||
* This filter is appied to the $value after it is loaded from the db and before it is returned to the template
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param mixed $value The value which was loaded from the database.
|
||||
* @param integer $post_id The $post_id from which the value was loaded.
|
||||
* @param array $field The field array holding all the field options.
|
||||
* @return mixed $value The modified value.
|
||||
*/
|
||||
public function format_value( $value, $post_id, $field ) {
|
||||
// Handle empty values.
|
||||
if ( empty( $value ) ) {
|
||||
// Return the default value if there is one.
|
||||
if ( isset( $field['default_value'] ) ) {
|
||||
return $field['default_value'];
|
||||
} else {
|
||||
// Otherwise return false.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// If media_library, behave the same as an image field.
|
||||
if ( $value['type'] === 'media_library' ) {
|
||||
// convert to int
|
||||
$value['value'] = intval( $value['value'] );
|
||||
|
||||
// format
|
||||
if ( $field['return_format'] === 'string' ) {
|
||||
return wp_get_attachment_url( $value['value'] );
|
||||
} elseif ( $field['return_format'] === 'array' ) {
|
||||
$value['value'] = acf_get_attachment( $value['value'] );
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
// If the desired return format is a string
|
||||
if ( $field['return_format'] === 'string' ) {
|
||||
return $value['value'];
|
||||
}
|
||||
|
||||
// If nothing specific matched the return format, just return the value.
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_dashicons()
|
||||
*
|
||||
* This function will return an array of dashicons.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @return array $dashicons an array of dashicons.
|
||||
*/
|
||||
public function get_dashicons() {
|
||||
$dashicons = array(
|
||||
'dashicons-admin-generic' => esc_html__( 'Generic icon', 'acf' ),
|
||||
'dashicons-admin-appearance' => esc_html__( 'Appearance icon', 'acf' ),
|
||||
'dashicons-admin-collapse' => esc_html__( 'Collapse icon', 'acf' ),
|
||||
'dashicons-admin-comments' => esc_html__( 'Comments icon', 'acf' ),
|
||||
'dashicons-admin-customizer' => esc_html__( 'Customizer icon', 'acf' ),
|
||||
'dashicons-admin-home' => esc_html__( 'Home icon', 'acf' ),
|
||||
'dashicons-admin-links' => esc_html__( 'Links icon', 'acf' ),
|
||||
'dashicons-admin-media' => esc_html__( 'Media icon', 'acf' ),
|
||||
'dashicons-admin-multisite' => esc_html__( 'Multisite icon', 'acf' ),
|
||||
'dashicons-admin-network' => esc_html__( 'Network icon', 'acf' ),
|
||||
'dashicons-admin-page' => esc_html__( 'Page icon', 'acf' ),
|
||||
'dashicons-admin-plugins' => esc_html__( 'Plugins icon', 'acf' ),
|
||||
'dashicons-admin-post' => esc_html__( 'Post icon', 'acf' ),
|
||||
'dashicons-admin-settings' => esc_html__( 'Settings icon', 'acf' ),
|
||||
'dashicons-admin-site' => esc_html__( 'Site icon', 'acf' ),
|
||||
'dashicons-admin-tools' => esc_html__( 'Tools icon', 'acf' ),
|
||||
'dashicons-admin-users' => esc_html__( 'Users icon', 'acf' ),
|
||||
'dashicons-album' => esc_html__( 'Album icon', 'acf' ),
|
||||
'dashicons-align-center' => esc_html__( 'Align-center icon', 'acf' ),
|
||||
'dashicons-align-left' => esc_html__( 'Align-left icon', 'acf' ),
|
||||
'dashicons-align-none' => esc_html__( 'Align-none icon', 'acf' ),
|
||||
'dashicons-align-right' => esc_html__( 'Align-right icon', 'acf' ),
|
||||
'dashicons-analytics' => esc_html__( 'Analytics icon', 'acf' ),
|
||||
'dashicons-archive' => esc_html__( 'Archive icon', 'acf' ),
|
||||
'dashicons-arrow-down' => esc_html__( 'Arrow down icon', 'acf' ),
|
||||
'dashicons-arrow-down-alt' => esc_html__( 'Arrow down-alt icon', 'acf' ),
|
||||
'dashicons-arrow-down-alt2' => esc_html__( 'Arrow down-alt2 icon', 'acf' ),
|
||||
'dashicons-arrow-left' => esc_html__( 'Arrow left icon', 'acf' ),
|
||||
'dashicons-arrow-left-alt' => esc_html__( 'Arrow left-alt icon', 'acf' ),
|
||||
'dashicons-arrow-left-alt2' => esc_html__( 'Arrow left-alt2 icon', 'acf' ),
|
||||
'dashicons-arrow-right' => esc_html__( 'Arrow right icon', 'acf' ),
|
||||
'dashicons-arrow-right-alt' => esc_html__( 'Arrow right-alt icon', 'acf' ),
|
||||
'dashicons-arrow-right-alt2' => esc_html__( 'Arrow right-alt2 icon', 'acf' ),
|
||||
'dashicons-arrow-up' => esc_html__( 'Arrow up icon', 'acf' ),
|
||||
'dashicons-arrow-up-alt' => esc_html__( 'Arrow up-alt icon', 'acf' ),
|
||||
'dashicons-arrow-up-alt2' => esc_html__( 'Arrow up-alt2 icon', 'acf' ),
|
||||
'dashicons-art' => esc_html__( 'Art icon', 'acf' ),
|
||||
'dashicons-awards' => esc_html__( 'Awards icon', 'acf' ),
|
||||
'dashicons-backup' => esc_html__( 'Backup icon', 'acf' ),
|
||||
'dashicons-book' => esc_html__( 'Book icon', 'acf' ),
|
||||
'dashicons-book-alt' => esc_html__( 'Book alt icon', 'acf' ),
|
||||
'dashicons-building' => esc_html__( 'Building icon', 'acf' ),
|
||||
'dashicons-businessman' => esc_html__( 'Businessman icon', 'acf' ),
|
||||
'dashicons-calendar' => esc_html__( 'Calendar icon', 'acf' ),
|
||||
'dashicons-calendar-alt' => esc_html__( 'Calendar alt icon', 'acf' ),
|
||||
'dashicons-camera' => esc_html__( 'Camera icon', 'acf' ),
|
||||
'dashicons-carrot' => esc_html__( 'Carrot icon', 'acf' ),
|
||||
'dashicons-cart' => esc_html__( 'Cart icon', 'acf' ),
|
||||
'dashicons-category' => esc_html__( 'Category icon', 'acf' ),
|
||||
'dashicons-chart-area' => esc_html__( 'Chart area icon', 'acf' ),
|
||||
'dashicons-chart-bar' => esc_html__( 'Chart bar icon', 'acf' ),
|
||||
'dashicons-chart-line' => esc_html__( 'Chart line icon', 'acf' ),
|
||||
'dashicons-chart-pie' => esc_html__( 'Chart pie icon', 'acf' ),
|
||||
'dashicons-clipboard' => esc_html__( 'Clipboard icon', 'acf' ),
|
||||
'dashicons-clock' => esc_html__( 'Clock icon', 'acf' ),
|
||||
'dashicons-cloud' => esc_html__( 'Cloud icon', 'acf' ),
|
||||
'dashicons-controls-back' => esc_html__( 'Controls back icon', 'acf' ),
|
||||
'dashicons-controls-forward' => esc_html__( 'Controls forward icon', 'acf' ),
|
||||
'dashicons-controls-pause' => esc_html__( 'Controls pause icon', 'acf' ),
|
||||
'dashicons-controls-play' => esc_html__( 'Controls play icon', 'acf' ),
|
||||
'dashicons-controls-repeat' => esc_html__( 'Controls repeat icon', 'acf' ),
|
||||
'dashicons-controls-skipback' => esc_html__( 'Controls skipback icon', 'acf' ),
|
||||
'dashicons-controls-skipforward' => esc_html__( 'Controls skipforward icon', 'acf' ),
|
||||
'dashicons-controls-volumeoff' => esc_html__( 'Controls volumeoff icon', 'acf' ),
|
||||
'dashicons-controls-volumeon' => esc_html__( 'Controls volumeon icon', 'acf' ),
|
||||
'dashicons-dashboard' => esc_html__( 'Dashboard icon', 'acf' ),
|
||||
'dashicons-desktop' => esc_html__( 'Desktop icon', 'acf' ),
|
||||
'dashicons-dismiss' => esc_html__( 'Dismiss icon', 'acf' ),
|
||||
'dashicons-download' => esc_html__( 'Download icon', 'acf' ),
|
||||
'dashicons-edit' => esc_html__( 'Edit icon', 'acf' ),
|
||||
'dashicons-editor-aligncenter' => esc_html__( 'aligncenter icon', 'acf' ),
|
||||
'dashicons-editor-alignleft' => esc_html__( 'alignleft icon', 'acf' ),
|
||||
'dashicons-editor-alignright' => esc_html__( 'alignright icon', 'acf' ),
|
||||
'dashicons-editor-bold' => esc_html__( 'Bold icon', 'acf' ),
|
||||
'dashicons-editor-break' => esc_html__( 'Break icon', 'acf' ),
|
||||
'dashicons-editor-code' => esc_html__( 'Code icon', 'acf' ),
|
||||
'dashicons-editor-contract' => esc_html__( 'Contract icon', 'acf' ),
|
||||
'dashicons-editor-customchar' => esc_html__( 'Customchar icon', 'acf' ),
|
||||
'dashicons-editor-expand' => esc_html__( 'Expand icon', 'acf' ),
|
||||
'dashicons-editor-help' => esc_html__( 'Help icon', 'acf' ),
|
||||
'dashicons-editor-indent' => esc_html__( 'Indent icon', 'acf' ),
|
||||
'dashicons-editor-insertmore' => esc_html__( 'Insertmore icon', 'acf' ),
|
||||
'dashicons-editor-italic' => esc_html__( 'Italic icon', 'acf' ),
|
||||
'dashicons-editor-justify' => esc_html__( 'Justify icon', 'acf' ),
|
||||
'dashicons-editor-kitchensink' => esc_html__( 'Kitchensink icon', 'acf' ),
|
||||
'dashicons-editor-ol' => esc_html__( 'Ol icon', 'acf' ),
|
||||
'dashicons-editor-outdent' => esc_html__( 'Outdent icon', 'acf' ),
|
||||
'dashicons-editor-paragraph' => esc_html__( 'Paragraph icon', 'acf' ),
|
||||
'dashicons-editor-paste-text' => esc_html__( 'Paste text icon', 'acf' ),
|
||||
'dashicons-editor-paste-word' => esc_html__( 'Paste word icon', 'acf' ),
|
||||
'dashicons-editor-quote' => esc_html__( 'Quote icon', 'acf' ),
|
||||
'dashicons-editor-removeformatting' => esc_html__( 'Removeformatting icon', 'acf' ),
|
||||
'dashicons-editor-rtl' => esc_html__( 'Rtl icon', 'acf' ),
|
||||
'dashicons-editor-spellcheck' => esc_html__( 'Spellcheck icon', 'acf' ),
|
||||
'dashicons-editor-strikethrough' => esc_html__( 'Strikethrough icon', 'acf' ),
|
||||
'dashicons-editor-table' => esc_html__( 'Table icon', 'acf' ),
|
||||
'dashicons-editor-textcolor' => esc_html__( 'Textcolor icon', 'acf' ),
|
||||
'dashicons-editor-ul' => esc_html__( 'Ul icon', 'acf' ),
|
||||
'dashicons-editor-underline' => esc_html__( 'Underline icon', 'acf' ),
|
||||
'dashicons-editor-unlink' => esc_html__( 'Unlink icon', 'acf' ),
|
||||
'dashicons-editor-video' => esc_html__( 'Video icon', 'acf' ),
|
||||
'dashicons-email' => esc_html__( 'Email icon', 'acf' ),
|
||||
'dashicons-email-alt' => esc_html__( 'Email alt icon', 'acf' ),
|
||||
'dashicons-exerpt-view' => esc_html__( 'Exerpt-view icon', 'acf' ),
|
||||
'dashicons-external' => esc_html__( 'External icon', 'acf' ),
|
||||
'dashicons-facebook' => esc_html__( 'Facebook icon', 'acf' ),
|
||||
'dashicons-facebook-alt' => esc_html__( 'Facebook alt icon', 'acf' ),
|
||||
'dashicons-feedback' => esc_html__( 'Feedback icon', 'acf' ),
|
||||
'dashicons-filter' => esc_html__( 'Filter icon', 'acf' ),
|
||||
'dashicons-flag' => esc_html__( 'Flag icon', 'acf' ),
|
||||
'dashicons-format-aside' => esc_html__( 'Format aside icon', 'acf' ),
|
||||
'dashicons-format-audio' => esc_html__( 'Format audio icon', 'acf' ),
|
||||
'dashicons-format-chat' => esc_html__( 'Format chat icon', 'acf' ),
|
||||
'dashicons-format-gallery' => esc_html__( 'Format gallery icon', 'acf' ),
|
||||
'dashicons-format-image' => esc_html__( 'Format image icon', 'acf' ),
|
||||
'dashicons-format-quote' => esc_html__( 'Format quote icon', 'acf' ),
|
||||
'dashicons-format-status' => esc_html__( 'Format status icon', 'acf' ),
|
||||
'dashicons-format-video' => esc_html__( 'Format video icon', 'acf' ),
|
||||
'dashicons-forms' => esc_html__( 'Forms icon', 'acf' ),
|
||||
'dashicons-googleplus' => esc_html__( 'Googleplus icon', 'acf' ),
|
||||
'dashicons-grid-view' => esc_html__( 'Grid-view icon', 'acf' ),
|
||||
'dashicons-groups' => esc_html__( 'Groups icon', 'acf' ),
|
||||
'dashicons-hammer' => esc_html__( 'Hammer icon', 'acf' ),
|
||||
'dashicons-heart' => esc_html__( 'Heart icon', 'acf' ),
|
||||
'dashicons-hidden' => esc_html__( 'Hidden icon', 'acf' ),
|
||||
'dashicons-id' => esc_html__( 'Id icon', 'acf' ),
|
||||
'dashicons-id-alt' => esc_html__( 'Id-alt icon', 'acf' ),
|
||||
'dashicons-image-crop' => esc_html__( 'Image crop icon', 'acf' ),
|
||||
'dashicons-image-filter' => esc_html__( 'Image filter icon', 'acf' ),
|
||||
'dashicons-image-flip-horizontal' => esc_html__( 'Image flip-horizontal icon', 'acf' ),
|
||||
'dashicons-image-flip-vertical' => esc_html__( 'Image flip-vertical icon', 'acf' ),
|
||||
'dashicons-image-rotate' => esc_html__( 'Image rotate icon', 'acf' ),
|
||||
'dashicons-image-rotate-left' => esc_html__( 'Image rotate-left icon', 'acf' ),
|
||||
'dashicons-image-rotate-right' => esc_html__( 'Image rotate-right icon', 'acf' ),
|
||||
'dashicons-images-alt' => esc_html__( 'Images-alt icon', 'acf' ),
|
||||
'dashicons-images-alt2' => esc_html__( 'Images-alt2 icon', 'acf' ),
|
||||
'dashicons-index-card' => esc_html__( 'Index-card icon', 'acf' ),
|
||||
'dashicons-info' => esc_html__( 'Info icon', 'acf' ),
|
||||
'dashicons-laptop' => esc_html__( 'Laptop icon', 'acf' ),
|
||||
'dashicons-layout' => esc_html__( 'Layout icon', 'acf' ),
|
||||
'dashicons-leftright' => esc_html__( 'Leftright icon', 'acf' ),
|
||||
'dashicons-lightbulb' => esc_html__( 'Lightbulb icon', 'acf' ),
|
||||
'dashicons-list-view' => esc_html__( 'List-view icon', 'acf' ),
|
||||
'dashicons-location' => esc_html__( 'Location icon', 'acf' ),
|
||||
'dashicons-location-alt' => esc_html__( 'Location-alt icon', 'acf' ),
|
||||
'dashicons-lock' => esc_html__( 'Lock icon', 'acf' ),
|
||||
'dashicons-marker' => esc_html__( 'Marker icon', 'acf' ),
|
||||
'dashicons-media-archive' => esc_html__( 'Media archive icon', 'acf' ),
|
||||
'dashicons-media-audio' => esc_html__( 'Media audio icon', 'acf' ),
|
||||
'dashicons-media-code' => esc_html__( 'Media code icon', 'acf' ),
|
||||
'dashicons-media-default' => esc_html__( 'Media default icon', 'acf' ),
|
||||
'dashicons-media-document' => esc_html__( 'Media document icon', 'acf' ),
|
||||
'dashicons-media-interactive' => esc_html__( 'Media interactive icon', 'acf' ),
|
||||
'dashicons-media-spreadsheet' => esc_html__( 'Media spreadsheet icon', 'acf' ),
|
||||
'dashicons-media-text' => esc_html__( 'Media text icon', 'acf' ),
|
||||
'dashicons-media-video' => esc_html__( 'Media video icon', 'acf' ),
|
||||
'dashicons-megaphone' => esc_html__( 'Megaphone icon', 'acf' ),
|
||||
'dashicons-menu' => esc_html__( 'Menu icon', 'acf' ),
|
||||
'dashicons-microphone' => esc_html__( 'Microphone icon', 'acf' ),
|
||||
'dashicons-migrate' => esc_html__( 'Migrate icon', 'acf' ),
|
||||
'dashicons-minus' => esc_html__( 'Minus icon', 'acf' ),
|
||||
'dashicons-money' => esc_html__( 'Money icon', 'acf' ),
|
||||
'dashicons-move' => esc_html__( 'Move icon', 'acf' ),
|
||||
'dashicons-nametag' => esc_html__( 'Nametag icon', 'acf' ),
|
||||
'dashicons-networking' => esc_html__( 'Networking icon', 'acf' ),
|
||||
'dashicons-no' => esc_html__( 'No icon', 'acf' ),
|
||||
'dashicons-no-alt' => esc_html__( 'No alternative icon', 'acf' ),
|
||||
'dashicons-palmtree' => esc_html__( 'Palmtree icon', 'acf' ),
|
||||
'dashicons-paperclip' => esc_html__( 'Paperclip icon', 'acf' ),
|
||||
'dashicons-performance' => esc_html__( 'Performance icon', 'acf' ),
|
||||
'dashicons-phone' => esc_html__( 'Phone icon', 'acf' ),
|
||||
'dashicons-playlist-audio' => esc_html__( 'Playlist-audio icon', 'acf' ),
|
||||
'dashicons-playlist-video' => esc_html__( 'Playlist-video icon', 'acf' ),
|
||||
'dashicons-plus' => esc_html__( 'Plus icon', 'acf' ),
|
||||
'dashicons-plus-alt' => esc_html__( 'Plus-alt icon', 'acf' ),
|
||||
'dashicons-portfolio' => esc_html__( 'Portfolio icon', 'acf' ),
|
||||
'dashicons-post-status' => esc_html__( 'Post-status icon', 'acf' ),
|
||||
'dashicons-pressthis' => esc_html__( 'Pressthis icon', 'acf' ),
|
||||
'dashicons-products' => esc_html__( 'Products icon', 'acf' ),
|
||||
'dashicons-randomize' => esc_html__( 'Randomize icon', 'acf' ),
|
||||
'dashicons-redo' => esc_html__( 'Redo icon', 'acf' ),
|
||||
'dashicons-rss' => esc_html__( 'Rss icon', 'acf' ),
|
||||
'dashicons-schedule' => esc_html__( 'Schedule icon', 'acf' ),
|
||||
'dashicons-screenoptions' => esc_html__( 'Screenoptions icon', 'acf' ),
|
||||
'dashicons-search' => esc_html__( 'Search icon', 'acf' ),
|
||||
'dashicons-share' => esc_html__( 'Share icon', 'acf' ),
|
||||
'dashicons-share-alt' => esc_html__( 'Share-alt icon', 'acf' ),
|
||||
'dashicons-share-alt2' => esc_html__( 'Share-alt2 icon', 'acf' ),
|
||||
'dashicons-shield' => esc_html__( 'Shield icon', 'acf' ),
|
||||
'dashicons-shield-alt' => esc_html__( 'Shield-alt icon', 'acf' ),
|
||||
'dashicons-slides' => esc_html__( 'Slides icon', 'acf' ),
|
||||
'dashicons-smartphone' => esc_html__( 'Smartphone icon', 'acf' ),
|
||||
'dashicons-smiley' => esc_html__( 'Smiley icon', 'acf' ),
|
||||
'dashicons-sort' => esc_html__( 'Sort icon', 'acf' ),
|
||||
'dashicons-sos' => esc_html__( 'Sos icon', 'acf' ),
|
||||
'dashicons-star-empty' => esc_html__( 'Star-empty icon', 'acf' ),
|
||||
'dashicons-star-filled' => esc_html__( 'Star-filled icon', 'acf' ),
|
||||
'dashicons-star-half' => esc_html__( 'Star-half icon', 'acf' ),
|
||||
'dashicons-sticky' => esc_html__( 'Sticky icon', 'acf' ),
|
||||
'dashicons-store' => esc_html__( 'Store icon', 'acf' ),
|
||||
'dashicons-tablet' => esc_html__( 'Tablet icon', 'acf' ),
|
||||
'dashicons-tag' => esc_html__( 'Tag icon', 'acf' ),
|
||||
'dashicons-tagcloud' => esc_html__( 'Tagcloud icon', 'acf' ),
|
||||
'dashicons-testimonial' => esc_html__( 'Testimonial icon', 'acf' ),
|
||||
'dashicons-text' => esc_html__( 'Text icon', 'acf' ),
|
||||
'dashicons-thumbs-down' => esc_html__( 'Thumbs-down icon', 'acf' ),
|
||||
'dashicons-thumbs-up' => esc_html__( 'Thumbs-up icon', 'acf' ),
|
||||
'dashicons-tickets' => esc_html__( 'Tickets icon', 'acf' ),
|
||||
'dashicons-tickets-alt' => esc_html__( 'Tickets alternative icon', 'acf' ),
|
||||
'dashicons-translation' => esc_html__( 'Translation icon', 'acf' ),
|
||||
'dashicons-trash' => esc_html__( 'Trash icon', 'acf' ),
|
||||
'dashicons-twitter' => esc_html__( 'Twitter icon', 'acf' ),
|
||||
'dashicons-undo' => esc_html__( 'Undo icon', 'acf' ),
|
||||
'dashicons-universal-access' => esc_html__( 'Universal access icon', 'acf' ),
|
||||
'dashicons-universal-access-alt' => esc_html__( 'Universal access alternative icon', 'acf' ),
|
||||
'dashicons-unlock' => esc_html__( 'Unlock icon', 'acf' ),
|
||||
'dashicons-update' => esc_html__( 'Update icon', 'acf' ),
|
||||
'dashicons-upload' => esc_html__( 'Upload icon', 'acf' ),
|
||||
'dashicons-vault' => esc_html__( 'Vault icon', 'acf' ),
|
||||
'dashicons-video-alt' => esc_html__( 'Video-alt icon', 'acf' ),
|
||||
'dashicons-video-alt2' => esc_html__( 'Video-alt2 icon', 'acf' ),
|
||||
'dashicons-video-alt3' => esc_html__( 'Video-alt3 icon', 'acf' ),
|
||||
'dashicons-visibility' => esc_html__( 'Visibility icon', 'acf' ),
|
||||
'dashicons-warning' => esc_html__( 'Warning icon', 'acf' ),
|
||||
'dashicons-welcome-add-page' => esc_html__( 'Welcome add-page icon', 'acf' ),
|
||||
'dashicons-welcome-comments' => esc_html__( 'Welcome comments icon', 'acf' ),
|
||||
'dashicons-welcome-learn-more' => esc_html__( 'Welcome learn-more icon', 'acf' ),
|
||||
'dashicons-welcome-view-site' => esc_html__( 'Welcome view-site icon', 'acf' ),
|
||||
'dashicons-welcome-widgets-menus' => esc_html__( 'Welcome widgets-menus icon', 'acf' ),
|
||||
'dashicons-welcome-write-blog' => esc_html__( 'Welcome write-blog icon', 'acf' ),
|
||||
'dashicons-wordpress' => esc_html__( 'Wordpress icon', 'acf' ),
|
||||
'dashicons-wordpress-alt' => esc_html__( 'Wordpress-alt icon', 'acf' ),
|
||||
'dashicons-yes' => esc_html__( 'Yes icon', 'acf' ),
|
||||
);
|
||||
|
||||
return apply_filters( 'acf/fields/icon_picker/dashicons', $dashicons );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the schema used by the REST API.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param array $field The main field array.
|
||||
* @return array
|
||||
*/
|
||||
public function get_rest_schema( array $field ): array {
|
||||
return array(
|
||||
'type' => array( 'object', 'null' ),
|
||||
'required' => ! empty( $field['required'] ),
|
||||
'properties' => array(
|
||||
'type' => array(
|
||||
'description' => esc_html__( 'The type of icon to save.', 'acf' ),
|
||||
'type' => array( 'string' ),
|
||||
'required' => true,
|
||||
'enum' => array_keys( $this->get_tabs() ),
|
||||
),
|
||||
'value' => array(
|
||||
'description' => esc_html__( 'The value of icon to save.', 'acf' ),
|
||||
'type' => array( 'string', 'int' ),
|
||||
'required' => true,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a value sent via the REST API.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param boolean $valid The current validity boolean.
|
||||
* @param array|null $value The value of the field.
|
||||
* @param array $field The main field array.
|
||||
* @return boolean|WP_Error
|
||||
*/
|
||||
public function validate_rest_value( $valid, $value, $field ) {
|
||||
if ( is_null( $value ) ) {
|
||||
if ( ! empty( $field['required'] ) ) {
|
||||
return new WP_Error(
|
||||
'rest_property_required',
|
||||
/* translators: %s - field name */
|
||||
sprintf( __( '%s is a required property of acf.', 'acf' ), $field['name'] )
|
||||
);
|
||||
} else {
|
||||
return $valid;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $value['type'] ) && 'media_library' === $value['type'] ) {
|
||||
$param = sprintf( '%s[%s][value]', $field['prefix'], $field['name'] );
|
||||
$data = array(
|
||||
'param' => $param,
|
||||
'value' => (int) $value['value'],
|
||||
);
|
||||
|
||||
if ( ! is_int( $value['value'] ) || 'attachment' !== get_post_type( $value['value'] ) ) {
|
||||
/* translators: %s - field/param name */
|
||||
$error = sprintf( __( '%s requires a valid attachment ID when type is set to media_library.', 'acf' ), $param );
|
||||
return new WP_Error( 'rest_invalid_param', $error, $data );
|
||||
}
|
||||
}
|
||||
|
||||
return $valid;
|
||||
}
|
||||
}
|
||||
|
||||
acf_register_field_type( 'acf_field_icon_picker' );
|
||||
endif;
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_image' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -53,7 +52,6 @@ if ( ! class_exists( 'acf_field_image' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function input_admin_enqueue_scripts() {
|
||||
|
||||
// localize
|
||||
@@ -172,7 +170,6 @@ if ( ! class_exists( 'acf_field_image' ) ) :
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*/
|
||||
|
||||
function render_field_settings( $field ) {
|
||||
acf_render_field_setting(
|
||||
$field,
|
||||
@@ -348,7 +345,6 @@ if ( ! class_exists( 'acf_field_image' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if no value
|
||||
@@ -386,7 +382,6 @@ if ( ! class_exists( 'acf_field_image' ) ) :
|
||||
* @param $vars (array)
|
||||
* @return $vars
|
||||
*/
|
||||
|
||||
function get_media_item_args( $vars ) {
|
||||
|
||||
$vars['send'] = true;
|
||||
@@ -407,7 +402,6 @@ if ( ! class_exists( 'acf_field_image' ) ) :
|
||||
*
|
||||
* @return $value - the modified value
|
||||
*/
|
||||
|
||||
function update_value( $value, $post_id, $field ) {
|
||||
|
||||
return acf_get_field_type( 'file' )->update_value( $value, $post_id, $field );
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_link' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -41,7 +40,6 @@ if ( ! class_exists( 'acf_field_link' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function get_link( $value = '' ) {
|
||||
|
||||
// vars
|
||||
@@ -171,7 +169,6 @@ if ( ! class_exists( 'acf_field_link' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if no value
|
||||
@@ -202,7 +199,6 @@ if ( ! class_exists( 'acf_field_link' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function validate_value( $valid, $value, $field, $input ) {
|
||||
|
||||
// bail early if not required
|
||||
@@ -233,7 +229,6 @@ if ( ! class_exists( 'acf_field_link' ) ) :
|
||||
*
|
||||
* @return $value - the modified value
|
||||
*/
|
||||
|
||||
function update_value( $value, $post_id, $field ) {
|
||||
|
||||
// Check if value is an empty array and convert to empty string.
|
||||
|
||||
@@ -16,7 +16,6 @@ if ( ! class_exists( 'acf_field_message' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -43,7 +42,6 @@ if ( ! class_exists( 'acf_field_message' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -127,7 +125,6 @@ if ( ! class_exists( 'acf_field_message' ) ) :
|
||||
* @param $field (array)
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function translate_field( $field ) {
|
||||
|
||||
// translate
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_number' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -45,7 +44,6 @@ if ( ! class_exists( 'acf_field_number' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -106,7 +104,6 @@ if ( ! class_exists( 'acf_field_number' ) ) :
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*/
|
||||
|
||||
function render_field_settings( $field ) {
|
||||
|
||||
// default_value
|
||||
@@ -211,7 +208,6 @@ if ( ! class_exists( 'acf_field_number' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function validate_value( $valid, $value, $field, $input ) {
|
||||
|
||||
// remove ','
|
||||
@@ -262,7 +258,6 @@ if ( ! class_exists( 'acf_field_number' ) ) :
|
||||
*
|
||||
* @return $value - the modified value
|
||||
*/
|
||||
|
||||
function update_value( $value, $post_id, $field ) {
|
||||
|
||||
// no formatting needed for empty value
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_oembed' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -51,7 +50,6 @@ if ( ! class_exists( 'acf_field_oembed' ) ) :
|
||||
* @param $field (array)
|
||||
* @return (int)
|
||||
*/
|
||||
|
||||
function prepare_field( $field ) {
|
||||
|
||||
// defaults
|
||||
@@ -107,7 +105,6 @@ if ( ! class_exists( 'acf_field_oembed' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function ajax_query() {
|
||||
|
||||
// validate
|
||||
@@ -133,7 +130,6 @@ if ( ! class_exists( 'acf_field_oembed' ) ) :
|
||||
* @param $options (array)
|
||||
* @return (array)
|
||||
*/
|
||||
|
||||
function get_ajax_query( $args = array() ) {
|
||||
|
||||
// defaults
|
||||
@@ -176,7 +172,6 @@ if ( ! class_exists( 'acf_field_oembed' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// atts
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_output' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -40,7 +39,6 @@ if ( ! class_exists( 'acf_field_output' ) ) :
|
||||
* @param $field (array) the $field being edited
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// bail early if no html
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -36,8 +35,29 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
// extra
|
||||
add_action( 'wp_ajax_acf/fields/page_link/query', array( $this, 'ajax_query' ) );
|
||||
add_action( 'wp_ajax_nopriv_acf/fields/page_link/query', array( $this, 'ajax_query' ) );
|
||||
add_filter( 'acf/conditional_logic/choices', array( $this, 'render_field_page_link_conditional_choices' ), 10, 3 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters choices in page link conditions.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param array $choices The selected choice.
|
||||
* @param array $conditional_field The conditional field settings object.
|
||||
* @param string $rule_value The rule value.
|
||||
* @return array
|
||||
*/
|
||||
public function render_field_page_link_conditional_choices( $choices, $conditional_field, $rule_value ) {
|
||||
if ( ! is_array( $conditional_field ) || $conditional_field['type'] !== 'page_link' ) {
|
||||
return $choices;
|
||||
}
|
||||
if ( ! empty( $rule_value ) ) {
|
||||
$post_title = get_the_title( $rule_value );
|
||||
$choices = array( $rule_value => $post_title );
|
||||
}
|
||||
return $choices;
|
||||
}
|
||||
|
||||
/**
|
||||
* description
|
||||
@@ -49,7 +69,6 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function ajax_query() {
|
||||
|
||||
// validate
|
||||
@@ -65,6 +84,7 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
's' => '',
|
||||
'field_key' => '',
|
||||
'paged' => 1,
|
||||
'include' => '',
|
||||
)
|
||||
);
|
||||
|
||||
@@ -128,6 +148,10 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $options['include'] ) ) {
|
||||
$args['include'] = $options['include'];
|
||||
}
|
||||
|
||||
// filters
|
||||
$args = apply_filters( 'acf/fields/page_link/query', $args, $field, $options['post_id'] );
|
||||
$args = apply_filters( 'acf/fields/page_link/query/name=' . $field['name'], $args, $field, $options['post_id'] );
|
||||
@@ -166,6 +190,11 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
}
|
||||
}
|
||||
|
||||
// If there is an include set, we will unset search to avoid attempting to further filter by the search term.
|
||||
if ( isset( $args['include'] ) ) {
|
||||
unset( $args['s'] );
|
||||
}
|
||||
|
||||
// get posts grouped by post type
|
||||
$groups = acf_get_grouped_posts( $args );
|
||||
|
||||
@@ -223,7 +252,6 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
* @param $text (string)
|
||||
* @return (array)
|
||||
*/
|
||||
|
||||
function get_post_result( $id, $text ) {
|
||||
|
||||
// vars
|
||||
@@ -258,7 +286,6 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
* @param $post_id (int) the post_id to which this value is saved to
|
||||
* @return (string)
|
||||
*/
|
||||
|
||||
function get_post_title( $post, $field, $post_id = 0, $is_search = 0 ) {
|
||||
|
||||
// get post_id
|
||||
@@ -289,7 +316,6 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
* @param $value (array)
|
||||
* @return $value
|
||||
*/
|
||||
|
||||
function get_posts( $value, $field ) {
|
||||
|
||||
// force value to array
|
||||
@@ -352,7 +378,6 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// Change Field into a select
|
||||
@@ -505,7 +530,6 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
// ACF4 null
|
||||
@@ -559,7 +583,6 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
*
|
||||
* @return $value - the modified value
|
||||
*/
|
||||
|
||||
function update_value( $value, $post_id, $field ) {
|
||||
|
||||
// Bail early if no value.
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_password' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -41,7 +40,6 @@ if ( ! class_exists( 'acf_field_password' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
acf_get_field_type( 'text' )->render_field( $field );
|
||||
|
||||
@@ -8,8 +8,6 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
/**
|
||||
* This function will setup the field type data
|
||||
*
|
||||
* @type function
|
||||
* @date 5/03/2014
|
||||
* @since 5.0.0
|
||||
*/
|
||||
public function initialize() {
|
||||
@@ -32,23 +30,36 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
// extra
|
||||
add_action( 'wp_ajax_acf/fields/post_object/query', array( $this, 'ajax_query' ) );
|
||||
add_action( 'wp_ajax_nopriv_acf/fields/post_object/query', array( $this, 'ajax_query' ) );
|
||||
add_filter( 'acf/conditional_logic/choices', array( $this, 'render_field_post_object_conditional_choices' ), 10, 3 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters choices in post object conditions.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param array $choices The selected choice.
|
||||
* @param array $conditional_field The conditional field settings object.
|
||||
* @param string $rule_value The rule value.
|
||||
* @return array
|
||||
*/
|
||||
public function render_field_post_object_conditional_choices( $choices, $conditional_field, $rule_value ) {
|
||||
if ( ! is_array( $conditional_field ) || $conditional_field['type'] !== 'post_object' ) {
|
||||
return $choices;
|
||||
}
|
||||
if ( ! empty( $rule_value ) ) {
|
||||
$post_title = get_the_title( $rule_value );
|
||||
$choices = array( $rule_value => $post_title );
|
||||
}
|
||||
return $choices;
|
||||
}
|
||||
|
||||
/**
|
||||
* description
|
||||
* AJAX query handler for post object fields.
|
||||
*
|
||||
* @type function
|
||||
* @date 24/10/13
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function ajax_query() {
|
||||
|
||||
// validate
|
||||
public function ajax_query() {
|
||||
if ( ! acf_verify_ajax() ) {
|
||||
die();
|
||||
}
|
||||
@@ -64,15 +75,12 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
/**
|
||||
* This function will return an array of data formatted for use in a select2 AJAX response
|
||||
*
|
||||
* @type function
|
||||
* @date 15/10/2014
|
||||
* @since 5.0.9
|
||||
*
|
||||
* @param $options (array)
|
||||
* @return (array)
|
||||
* @param array $options The options being queried for the ajax request.
|
||||
* @return array The AJAX response array.
|
||||
*/
|
||||
|
||||
function get_ajax_query( $options = array() ) {
|
||||
public function get_ajax_query( $options = array() ) {
|
||||
|
||||
// defaults
|
||||
$options = acf_parse_args(
|
||||
@@ -82,6 +90,7 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
's' => '',
|
||||
'field_key' => '',
|
||||
'paged' => 1,
|
||||
'include' => '',
|
||||
)
|
||||
);
|
||||
|
||||
@@ -112,6 +121,10 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
$is_search = true;
|
||||
}
|
||||
|
||||
if ( ! empty( $options['include'] ) ) {
|
||||
$args['include'] = $options['include'];
|
||||
}
|
||||
|
||||
// post_type
|
||||
if ( ! empty( $field['post_type'] ) ) {
|
||||
$args['post_type'] = acf_get_array( $field['post_type'] );
|
||||
@@ -126,6 +139,11 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
$args['post_status'] = acf_get_array( $field['post_status'] );
|
||||
}
|
||||
|
||||
// If there is an include set, we will unset search to avoid attempting to further filter by the search term.
|
||||
if ( isset( $args['include'] ) ) {
|
||||
unset( $args['s'] );
|
||||
}
|
||||
|
||||
// taxonomy
|
||||
if ( ! empty( $field['taxonomy'] ) ) {
|
||||
|
||||
@@ -172,7 +190,7 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
|
||||
// convert post objects to post titles
|
||||
foreach ( array_keys( $posts ) as $post_id ) {
|
||||
$posts[ $post_id ] = $this->get_post_title( $posts[ $post_id ], $field, $options['post_id'], $is_search );
|
||||
$posts[ $post_id ] = $this->get_post_title( $posts[ $post_id ], $field, $options['post_id'], $is_search, true );
|
||||
}
|
||||
|
||||
// order posts by search
|
||||
@@ -209,16 +227,13 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
/**
|
||||
* This function will return an array containing id, text and maybe description data
|
||||
*
|
||||
* @type function
|
||||
* @date 7/07/2016
|
||||
* @since 5.4.0
|
||||
*
|
||||
* @param $id (mixed)
|
||||
* @param $text (string)
|
||||
* @return (array)
|
||||
* @param mixed $id The ID of the post result.
|
||||
* @param string $text The text for the response item.
|
||||
* @return array The combined result array.
|
||||
*/
|
||||
|
||||
function get_post_result( $id, $text ) {
|
||||
public function get_post_result( $id, $text ) {
|
||||
|
||||
// vars
|
||||
$result = array(
|
||||
@@ -241,19 +256,18 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
|
||||
|
||||
/**
|
||||
* This function returns the HTML for a result
|
||||
* This function post object's filtered output post title
|
||||
*
|
||||
* @type function
|
||||
* @date 1/11/2013
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param $post (object)
|
||||
* @param $field (array)
|
||||
* @param $post_id (int) the post_id to which this value is saved to
|
||||
* @return (string)
|
||||
* @param WP_Post $post The WordPress post.
|
||||
* @param array $field The field being output.
|
||||
* @param integer $post_id The post_id to which this value is saved to.
|
||||
* @param integer $is_search An int-as-boolean value for whether we're performing a search.
|
||||
* @param boolean $unescape Should we return an unescaped post title.
|
||||
* @return string A potentially user filtered post title for the post, which may contain unsafe HTML.
|
||||
*/
|
||||
|
||||
function get_post_title( $post, $field, $post_id = 0, $is_search = 0 ) {
|
||||
public function get_post_title( $post, $field, $post_id = 0, $is_search = 0, $unescape = false ) {
|
||||
|
||||
// get post_id
|
||||
if ( ! $post_id ) {
|
||||
@@ -263,27 +277,29 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
// vars
|
||||
$title = acf_get_post_title( $post, $is_search );
|
||||
|
||||
// unescape for select2 output which handles the escaping.
|
||||
if ( $unescape ) {
|
||||
$title = html_entity_decode( $title );
|
||||
}
|
||||
|
||||
// filters
|
||||
$title = apply_filters( 'acf/fields/post_object/result', $title, $post, $field, $post_id );
|
||||
$title = apply_filters( 'acf/fields/post_object/result/name=' . $field['_name'], $title, $post, $field, $post_id );
|
||||
$title = apply_filters( 'acf/fields/post_object/result/key=' . $field['key'], $title, $post, $field, $post_id );
|
||||
|
||||
// return
|
||||
// return untrusted output.
|
||||
return $title;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create the HTML interface for your field
|
||||
* Create the HTML interface for the post object field.
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
* @since 3.6
|
||||
*
|
||||
* @type action
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
* @param array $field An array holding all the field's data.
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
public function render_field( $field ) {
|
||||
|
||||
// Change Field into a select
|
||||
$field['type'] = 'select';
|
||||
@@ -311,16 +327,14 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
|
||||
|
||||
/**
|
||||
* Create extra options for your field. This is rendered when editing a field.
|
||||
* The value of $field['name'] can be used (like bellow) to save extra data to the $field
|
||||
* Create extra options for post object field. This is rendered when editing.
|
||||
* The value of $field['name'] can be used (like below) to save extra data to the $field.
|
||||
*
|
||||
* @type action
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
* @since 3.6
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
* @param array $field An array holding all the field's data.
|
||||
*/
|
||||
function render_field_settings( $field ) {
|
||||
public function render_field_settings( $field ) {
|
||||
acf_render_field_setting(
|
||||
$field,
|
||||
array(
|
||||
@@ -401,7 +415,7 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
* @param array $field The field settings array.
|
||||
* @return void
|
||||
*/
|
||||
function render_field_validation_settings( $field ) {
|
||||
public function render_field_validation_settings( $field ) {
|
||||
acf_render_field_setting(
|
||||
$field,
|
||||
array(
|
||||
@@ -429,17 +443,14 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
/**
|
||||
* This filter is applied to the $value after it is loaded from the db
|
||||
*
|
||||
* @type filter
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*
|
||||
* @param $value (mixed) the value found in the database
|
||||
* @param $post_id (mixed) the post_id from which the value was loaded
|
||||
* @param $field (array) the field array holding all the field options
|
||||
* @return $value
|
||||
* @param mixed $value The value found in the database
|
||||
* @param mixed $post_id The post_id from which the value was loaded
|
||||
* @param array $field The field array holding all the field options
|
||||
* @return mixed $value
|
||||
*/
|
||||
|
||||
function load_value( $value, $post_id, $field ) {
|
||||
public function load_value( $value, $post_id, $field ) {
|
||||
|
||||
// ACF4 null
|
||||
if ( $value === 'null' ) {
|
||||
@@ -454,20 +465,14 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
/**
|
||||
* This filter is appied to the $value after it is loaded from the db and before it is returned to the template
|
||||
*
|
||||
* @type filter
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
* @since 3.6
|
||||
*
|
||||
* @param $value (mixed) the value which was loaded from the database
|
||||
* @param $post_id (mixed) the post_id from which the value was loaded
|
||||
* @param $field (array) the field array holding all the field options
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
* @param mixed $value The value found in the database
|
||||
* @param mixed $post_id The post_id from which the value was loaded
|
||||
* @param array $field The field array holding all the field options
|
||||
* @return mixed $value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
// numeric
|
||||
public function format_value( $value, $post_id, $field ) {
|
||||
$value = acf_get_numeric( $value );
|
||||
|
||||
// bail early if no value
|
||||
@@ -529,15 +534,13 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
/**
|
||||
* This function will return an array of posts for a given field value
|
||||
*
|
||||
* @type function
|
||||
* @date 13/06/2014
|
||||
* @since 5.0.0
|
||||
* @since 5.0
|
||||
*
|
||||
* @param $value (array)
|
||||
* @return $value
|
||||
* @param mixed $value The value of the field.
|
||||
* @param array $field The field array holding all the field options.
|
||||
* @return array $value An array of post objects.
|
||||
*/
|
||||
|
||||
function get_posts( $value, $field ) {
|
||||
public function get_posts( $value, $field ) {
|
||||
|
||||
// numeric
|
||||
$value = acf_get_numeric( $value );
|
||||
@@ -562,6 +565,8 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
/**
|
||||
* Validates post object fields updated via the REST API.
|
||||
*
|
||||
* @since 5.11
|
||||
*
|
||||
* @param boolean $valid The current validity booleean
|
||||
* @param integer $value The value of the field
|
||||
* @param array $field The field array
|
||||
@@ -662,7 +667,9 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
/**
|
||||
* Return the schema array for the REST API.
|
||||
*
|
||||
* @param array $field
|
||||
* @since 5.11
|
||||
*
|
||||
* @param array $field The field array.
|
||||
* @return array
|
||||
*/
|
||||
public function get_rest_schema( array $field ) {
|
||||
@@ -686,10 +693,14 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
}
|
||||
|
||||
/**
|
||||
* REST link attributes generator for this field.
|
||||
*
|
||||
* @since 5.11
|
||||
* @see \acf_field::get_rest_links()
|
||||
*
|
||||
* @param mixed $value The raw (unformatted) field value.
|
||||
* @param integer|string $post_id
|
||||
* @param array $field
|
||||
* @param integer|string $post_id The post ID being queried.
|
||||
* @param array $field The field array.
|
||||
* @return array
|
||||
*/
|
||||
public function get_rest_links( $value, $post_id, array $field ) {
|
||||
@@ -722,9 +733,11 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
/**
|
||||
* Apply basic formatting to prepare the value for default REST output.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @param string|integer $post_id
|
||||
* @param array $field
|
||||
* @since 5.11
|
||||
*
|
||||
* @param mixed $value The raw (unformatted) field value.
|
||||
* @param integer|string $post_id The post ID being queried.
|
||||
* @param array $field The field array.
|
||||
* @return mixed
|
||||
*/
|
||||
public function format_value_for_rest( $value, $post_id, array $field ) {
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_radio' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -49,7 +48,6 @@ if ( ! class_exists( 'acf_field_radio' ) ) :
|
||||
* @param $field (array) the $field being edited
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -174,7 +172,6 @@ if ( ! class_exists( 'acf_field_radio' ) ) :
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*/
|
||||
|
||||
function render_field_settings( $field ) {
|
||||
// Encode choices (convert from array).
|
||||
$field['choices'] = acf_encode_choices( $field['choices'] );
|
||||
@@ -301,7 +298,6 @@ if ( ! class_exists( 'acf_field_radio' ) ) :
|
||||
*
|
||||
* @return $field - the modified field
|
||||
*/
|
||||
|
||||
function update_field( $field ) {
|
||||
|
||||
// decode choices (convert to array)
|
||||
@@ -326,7 +322,6 @@ if ( ! class_exists( 'acf_field_radio' ) ) :
|
||||
*
|
||||
* @return $value - the modified value
|
||||
*/
|
||||
|
||||
function update_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if no value (allow 0 to be saved)
|
||||
@@ -382,7 +377,6 @@ if ( ! class_exists( 'acf_field_radio' ) ) :
|
||||
*
|
||||
* @return $value - the value to be saved in te database
|
||||
*/
|
||||
|
||||
function load_value( $value, $post_id, $field ) {
|
||||
|
||||
// must be single value
|
||||
@@ -405,7 +399,6 @@ if ( ! class_exists( 'acf_field_radio' ) ) :
|
||||
* @param $field (array)
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function translate_field( $field ) {
|
||||
|
||||
return acf_get_field_type( 'select' )->translate_field( $field );
|
||||
@@ -425,7 +418,6 @@ if ( ! class_exists( 'acf_field_radio' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
return acf_get_field_type( 'select' )->format_value( $value, $post_id, $field );
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_range' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -44,7 +43,6 @@ if ( ! class_exists( 'acf_field_range' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -148,7 +146,6 @@ if ( ! class_exists( 'acf_field_range' ) ) :
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*/
|
||||
|
||||
function render_field_settings( $field ) {
|
||||
acf_render_field_setting(
|
||||
$field,
|
||||
|
||||
@@ -29,12 +29,33 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
'return_format' => 'object',
|
||||
'bidirectional_target' => array(),
|
||||
);
|
||||
add_filter( 'acf/conditional_logic/choices', array( $this, 'render_field_relation_conditional_choices' ), 10, 3 );
|
||||
|
||||
// extra
|
||||
add_action( 'wp_ajax_acf/fields/relationship/query', array( $this, 'ajax_query' ) );
|
||||
add_action( 'wp_ajax_nopriv_acf/fields/relationship/query', array( $this, 'ajax_query' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters choices in relation conditions.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param array $choices The selected choice.
|
||||
* @param array $conditional_field The conditional field settings object.
|
||||
* @param string $rule_value The rule value.
|
||||
* @return array
|
||||
*/
|
||||
public function render_field_relation_conditional_choices( $choices, $conditional_field, $rule_value ) {
|
||||
if ( ! is_array( $conditional_field ) || $conditional_field['type'] !== 'relationship' ) {
|
||||
return $choices;
|
||||
}
|
||||
if ( ! empty( $rule_value ) ) {
|
||||
$post_title = get_the_title( $rule_value );
|
||||
$choices = array( $rule_value => $post_title );
|
||||
}
|
||||
return $choices;
|
||||
}
|
||||
|
||||
/**
|
||||
* description
|
||||
@@ -46,7 +67,6 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function input_admin_enqueue_scripts() {
|
||||
|
||||
// localize
|
||||
@@ -71,7 +91,6 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function ajax_query() {
|
||||
|
||||
// validate
|
||||
@@ -97,7 +116,6 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
* @param $options (array)
|
||||
* @return (array)
|
||||
*/
|
||||
|
||||
function get_ajax_query( $options = array() ) {
|
||||
|
||||
// defaults
|
||||
@@ -109,6 +127,7 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
'field_key' => '',
|
||||
'paged' => 1,
|
||||
'post_type' => '',
|
||||
'include' => '',
|
||||
'taxonomy' => '',
|
||||
)
|
||||
);
|
||||
@@ -130,8 +149,7 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
$args['paged'] = intval( $options['paged'] );
|
||||
|
||||
// search
|
||||
if ( $options['s'] !== '' ) {
|
||||
|
||||
if ( $options['s'] !== '' && empty( $options['include'] ) ) {
|
||||
// strip slashes (search may be integer)
|
||||
$s = wp_unslash( strval( $options['s'] ) );
|
||||
|
||||
@@ -191,6 +209,11 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $options['include'] ) ) {
|
||||
// If we have an include, we need to return only the selected posts.
|
||||
$args['post__in'] = array( $options['include'] );
|
||||
}
|
||||
|
||||
// filters
|
||||
$args = apply_filters( 'acf/fields/relationship/query', $args, $field, $options['post_id'] );
|
||||
$args = apply_filters( 'acf/fields/relationship/query/name=' . $field['name'], $args, $field, $options['post_id'] );
|
||||
@@ -262,7 +285,6 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
* @param $text (string)
|
||||
* @return (array)
|
||||
*/
|
||||
|
||||
function get_post_result( $id, $text ) {
|
||||
|
||||
// vars
|
||||
@@ -288,7 +310,6 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
* @param $post_id (int) the post_id to which this value is saved to
|
||||
* @return (string)
|
||||
*/
|
||||
|
||||
function get_post_title( $post, $field, $post_id = 0, $is_search = 0 ) {
|
||||
|
||||
// get post_id
|
||||
@@ -334,7 +355,6 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -681,7 +701,6 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if no value
|
||||
@@ -722,7 +741,6 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function validate_value( $valid, $value, $field, $input ) {
|
||||
|
||||
// default
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_select' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -52,7 +51,6 @@ if ( ! class_exists( 'acf_field_select' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function input_admin_enqueue_scripts() {
|
||||
|
||||
// bail early if no enqueue
|
||||
@@ -125,7 +123,6 @@ if ( ! class_exists( 'acf_field_select' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function ajax_query() {
|
||||
|
||||
// validate
|
||||
@@ -223,7 +220,6 @@ if ( ! class_exists( 'acf_field_select' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// convert
|
||||
@@ -334,7 +330,6 @@ if ( ! class_exists( 'acf_field_select' ) ) :
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*/
|
||||
|
||||
function render_field_settings( $field ) {
|
||||
|
||||
// encode choices (convert from array)
|
||||
@@ -490,7 +485,6 @@ if ( ! class_exists( 'acf_field_select' ) ) :
|
||||
*
|
||||
* @return $field - the modified field
|
||||
*/
|
||||
|
||||
function update_field( $field ) {
|
||||
|
||||
// decode choices (convert to array)
|
||||
@@ -520,7 +514,6 @@ if ( ! class_exists( 'acf_field_select' ) ) :
|
||||
*
|
||||
* @return $value - the modified value
|
||||
*/
|
||||
|
||||
function update_value( $value, $post_id, $field ) {
|
||||
|
||||
// Bail early if no value.
|
||||
@@ -549,7 +542,6 @@ if ( ! class_exists( 'acf_field_select' ) ) :
|
||||
* @param $field (array)
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function translate_field( $field ) {
|
||||
|
||||
// translate
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_separator' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -36,7 +35,6 @@ if ( ! class_exists( 'acf_field_separator' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
/* do nothing */
|
||||
@@ -54,7 +52,6 @@ if ( ! class_exists( 'acf_field_separator' ) ) :
|
||||
*
|
||||
* @return $field - the field array holding all the field options
|
||||
*/
|
||||
|
||||
function load_field( $field ) {
|
||||
|
||||
// remove name to avoid caching issue
|
||||
|
||||
@@ -16,7 +16,6 @@ if ( ! class_exists( 'acf_field_tab' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -30,42 +29,45 @@ if ( ! class_exists( 'acf_field_tab' ) ) :
|
||||
$this->defaults = array(
|
||||
'placement' => 'top',
|
||||
'endpoint' => 0, // added in 5.2.8
|
||||
'selected' => 0, // added in 6.3
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create the HTML interface for your field
|
||||
* Output the HTML required for a tab.
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
* @since 3.6
|
||||
*
|
||||
* @type action
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
* @param array $field An array of the field data.
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
public function render_field( $field ) {
|
||||
$atts = array(
|
||||
'href' => '',
|
||||
'class' => 'acf-tab-button',
|
||||
'data-placement' => $field['placement'],
|
||||
'data-endpoint' => $field['endpoint'],
|
||||
'data-key' => $field['key'],
|
||||
'data-selected' => $field['selected'],
|
||||
);
|
||||
|
||||
if ( isset( $field['unique_tab_key'] ) && ! empty( $field['unique_tab_key'] ) ) {
|
||||
$atts['data-unique-tab-key'] = $field['unique_tab_key'];
|
||||
}
|
||||
|
||||
if ( isset( $field['settings-type'] ) ) {
|
||||
$atts['class'] .= ' acf-settings-type-' . acf_slugify( $field['settings-type'] );
|
||||
$atts['data-settings-type'] = acf_slugify( $field['settings-type'] );
|
||||
$atts['class'] .= ' acf-settings-type-' . acf_slugify( $field['settings-type'] );
|
||||
}
|
||||
|
||||
if ( isset( $field['class'] ) && ! empty( $field['class'] ) ) {
|
||||
$atts['class'] .= ' ' . $field['class'];
|
||||
}
|
||||
|
||||
?>
|
||||
<a <?php echo acf_esc_attrs( $atts ); ?>><?php echo acf_esc_html( $field['label'] ); ?></a>
|
||||
<a <?php echo acf_esc_attrs( $atts ); ?>><?php echo acf_esc_html( $field['label'] ); ?></a>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Create extra options for your field. This is rendered when editing a field.
|
||||
* The value of $field['name'] can be used (like bellow) to save extra data to the $field
|
||||
@@ -76,7 +78,6 @@ if ( ! class_exists( 'acf_field_tab' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field_settings( $field ) {
|
||||
|
||||
/*
|
||||
|
||||
@@ -42,6 +42,7 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
add_action( 'wp_ajax_acf/fields/taxonomy/query', array( $this, 'ajax_query' ) );
|
||||
add_action( 'wp_ajax_nopriv_acf/fields/taxonomy/query', array( $this, 'ajax_query' ) );
|
||||
add_action( 'wp_ajax_acf/fields/taxonomy/add_term', array( $this, 'ajax_add_term' ) );
|
||||
add_filter( 'acf/conditional_logic/choices', array( $this, 'render_field_taxonomy_conditional_choices' ), 10, 3 );
|
||||
|
||||
// actions
|
||||
add_action( 'acf/save_post', array( $this, 'save_post' ), 15, 1 );
|
||||
@@ -58,7 +59,6 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function ajax_query() {
|
||||
|
||||
// validate
|
||||
@@ -84,32 +84,36 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
* @param $options (array)
|
||||
* @return (array)
|
||||
*/
|
||||
|
||||
function get_ajax_query( $options = array() ) {
|
||||
|
||||
// defaults
|
||||
$options = acf_parse_args(
|
||||
$options,
|
||||
array(
|
||||
'post_id' => 0,
|
||||
's' => '',
|
||||
'field_key' => '',
|
||||
'paged' => 0,
|
||||
'term_id' => '',
|
||||
'include' => '',
|
||||
'paged' => 1,
|
||||
)
|
||||
);
|
||||
|
||||
// load field
|
||||
$field = acf_get_field( $options['field_key'] );
|
||||
if ( ! $field ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// bail early if taxonomy does not exist
|
||||
// if options include isset, then we are loading a specific term.
|
||||
if ( ! empty( $options['include'] ) ) {
|
||||
$options['term_id'] = $options['include'];
|
||||
// paged should be 1.
|
||||
$options['paged'] = 1;
|
||||
}
|
||||
|
||||
// Bail early if taxonomy does not exist.
|
||||
if ( ! taxonomy_exists( $field['taxonomy'] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// vars
|
||||
$results = array();
|
||||
$is_hierarchical = is_taxonomy_hierarchical( $field['taxonomy'] );
|
||||
$is_pagination = ( $options['paged'] > 0 );
|
||||
@@ -117,14 +121,12 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
$limit = 20;
|
||||
$offset = 20 * ( $options['paged'] - 1 );
|
||||
|
||||
// args
|
||||
$args = array(
|
||||
'taxonomy' => $field['taxonomy'],
|
||||
'hide_empty' => false,
|
||||
);
|
||||
|
||||
// pagination
|
||||
// - don't bother for hierarchial terms, we will need to load all terms anyway
|
||||
// Don't bother for hierarchial terms, we will need to load all terms anyway.
|
||||
if ( $is_pagination && ! $is_hierarchical ) {
|
||||
$args['number'] = $limit;
|
||||
$args['offset'] = $offset;
|
||||
@@ -136,83 +138,82 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
// strip slashes (search may be integer)
|
||||
$s = wp_unslash( strval( $options['s'] ) );
|
||||
|
||||
// update vars
|
||||
$args['search'] = $s;
|
||||
$args['search'] = isset( $options['term_id'] ) && $options['term_id'] ? '' : $s;
|
||||
$is_search = true;
|
||||
}
|
||||
|
||||
// filters
|
||||
$args = apply_filters( 'acf/fields/taxonomy/query', $args, $field, $options['post_id'] );
|
||||
|
||||
// get terms
|
||||
if ( ! empty( $options['include'] ) ) {
|
||||
// Limit search to a specific id if one is provided.
|
||||
$args['include'] = $options['include'];
|
||||
}
|
||||
|
||||
$terms = acf_get_terms( $args );
|
||||
|
||||
// sort into hierachial order!
|
||||
// Sort hierachial.
|
||||
if ( $is_hierarchical ) {
|
||||
|
||||
// update vars
|
||||
$limit = acf_maybe_get( $args, 'number', $limit );
|
||||
$offset = acf_maybe_get( $args, 'offset', $offset );
|
||||
|
||||
// get parent
|
||||
$parent = acf_maybe_get( $args, 'parent', 0 );
|
||||
$parent = acf_maybe_get( $args, 'child_of', $parent );
|
||||
|
||||
// this will fail if a search has taken place because parents wont exist
|
||||
// This will fail if a search has taken place because parents wont exist.
|
||||
if ( ! $is_search ) {
|
||||
|
||||
// order terms
|
||||
$ordered_terms = _get_term_children( $parent, $terms, $field['taxonomy'] );
|
||||
|
||||
// check for empty array (possible if parent did not exist within original data)
|
||||
// Check for empty array. Possible if parent did not exist within original data.
|
||||
if ( ! empty( $ordered_terms ) ) {
|
||||
$terms = $ordered_terms;
|
||||
}
|
||||
}
|
||||
|
||||
// fake pagination
|
||||
if ( $is_pagination ) {
|
||||
// Fake pagination.
|
||||
if ( $is_pagination && ! $options['include'] ) {
|
||||
$terms = array_slice( $terms, $offset, $limit );
|
||||
}
|
||||
}
|
||||
|
||||
// append to r
|
||||
// Append to r.
|
||||
foreach ( $terms as $term ) {
|
||||
|
||||
// add to json
|
||||
// Add to json.
|
||||
$results[] = array(
|
||||
'id' => $term->term_id,
|
||||
'text' => $this->get_term_title( $term, $field, $options['post_id'] ),
|
||||
'text' => $this->get_term_title( $term, $field, $options['post_id'], true ),
|
||||
);
|
||||
}
|
||||
|
||||
// vars
|
||||
$response = array(
|
||||
'results' => $results,
|
||||
'limit' => $limit,
|
||||
);
|
||||
|
||||
// return
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Term's title displayed in the field UI.
|
||||
*
|
||||
* @date 1/11/2013
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param WP_Term $term The term object.
|
||||
* @param array $field The field settings.
|
||||
* @param mixed $post_id The post_id being edited.
|
||||
* @param WP_Term $term The term object.
|
||||
* @param array $field The field settings.
|
||||
* @param mixed $post_id The post_id being edited.
|
||||
* @param boolean $unescape Should we return an unescaped post title.
|
||||
* @return string
|
||||
*/
|
||||
function get_term_title( $term, $field, $post_id = 0 ) {
|
||||
function get_term_title( $term, $field, $post_id = 0, $unescape = false ) {
|
||||
$title = acf_get_term_title( $term );
|
||||
|
||||
// Default $post_id to current post being edited.
|
||||
$post_id = $post_id ? $post_id : acf_get_form_data( 'post_id' );
|
||||
|
||||
// unescape for select2 output which handles the escaping.
|
||||
if ( $unescape ) {
|
||||
$title = html_entity_decode( $title );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the term title.
|
||||
*
|
||||
@@ -238,7 +239,6 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
* @param $value (array)
|
||||
* @return $value
|
||||
*/
|
||||
|
||||
function get_terms( $value, $taxonomy = 'category' ) {
|
||||
|
||||
// load terms in 1 query to save multiple DB calls from following code
|
||||
@@ -278,7 +278,6 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
*
|
||||
* @return $value - the value to be saved in te database
|
||||
*/
|
||||
|
||||
function load_value( $value, $post_id, $field ) {
|
||||
|
||||
// get valid terms
|
||||
@@ -430,7 +429,6 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if no value
|
||||
@@ -467,7 +465,6 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// force value to array
|
||||
@@ -481,7 +478,6 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
'data-taxonomy' => $field['taxonomy'],
|
||||
'data-allow_null' => $field['allow_null'],
|
||||
);
|
||||
|
||||
// get taxonomy
|
||||
$taxonomy = get_taxonomy( $field['taxonomy'] );
|
||||
|
||||
@@ -528,7 +524,6 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*/
|
||||
|
||||
function render_field_select( $field ) {
|
||||
|
||||
// Change Field into a select
|
||||
@@ -734,16 +729,36 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
}
|
||||
|
||||
/**
|
||||
* description
|
||||
* Filters choices in taxonomy conditions.
|
||||
*
|
||||
* @type function
|
||||
* @date 17/04/2015
|
||||
* @since 5.2.3
|
||||
* @since 6.3
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
* @param array $choices The selected choice.
|
||||
* @param array $conditional_field The conditional field settings object.
|
||||
* @param string $rule_value The rule value.
|
||||
* @return mixed
|
||||
*/
|
||||
public function render_field_taxonomy_conditional_choices( $choices, $conditional_field, $rule_value ) {
|
||||
if ( is_array( $conditional_field ) && $conditional_field['type'] === 'taxonomy' ) {
|
||||
if ( ! empty( $rule_value ) ) {
|
||||
$term = get_term( $rule_value );
|
||||
$choices = array( $rule_value => $term->name );
|
||||
}
|
||||
}
|
||||
return $choices;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ajax_add_term
|
||||
*
|
||||
* @since 5.2.3
|
||||
*
|
||||
* @type function
|
||||
* @date 17/04/2015
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function ajax_add_term() {
|
||||
|
||||
// verify nonce
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_text' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -43,7 +42,6 @@ if ( ! class_exists( 'acf_field_text' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
$html = '';
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_textarea' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -43,7 +42,6 @@ if ( ! class_exists( 'acf_field_textarea' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -180,7 +178,6 @@ if ( ! class_exists( 'acf_field_textarea' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
// bail early if no value or not for template
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_time_picker' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -41,7 +40,6 @@ if ( ! class_exists( 'acf_field_time_picker' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// Set value.
|
||||
|
||||
@@ -15,7 +15,6 @@ if ( ! class_exists( 'acf_field_true_false' ) ) :
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
|
||||
function initialize() {
|
||||
|
||||
// vars
|
||||
@@ -44,7 +43,6 @@ if ( ! class_exists( 'acf_field_true_false' ) ) :
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*/
|
||||
|
||||
function render_field( $field ) {
|
||||
|
||||
// vars
|
||||
@@ -209,7 +207,6 @@ if ( ! class_exists( 'acf_field_true_false' ) ) :
|
||||
*
|
||||
* @return $value (mixed) the modified value
|
||||
*/
|
||||
|
||||
function format_value( $value, $post_id, $field ) {
|
||||
|
||||
return empty( $value ) ? false : true;
|
||||
@@ -226,7 +223,6 @@ if ( ! class_exists( 'acf_field_true_false' ) ) :
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
*/
|
||||
|
||||
function validate_value( $valid, $value, $field, $input ) {
|
||||
|
||||
// bail early if not required
|
||||
@@ -254,7 +250,6 @@ if ( ! class_exists( 'acf_field_true_false' ) ) :
|
||||
* @param $field (array)
|
||||
* @return $field
|
||||
*/
|
||||
|
||||
function translate_field( $field ) {
|
||||
|
||||
// translate
|
||||
|
||||
@@ -29,12 +29,41 @@ if ( ! class_exists( 'ACF_Field_User' ) ) :
|
||||
acf_add_filter_variations( 'acf/fields/user/query', array( 'name', 'key' ), 1 );
|
||||
acf_add_filter_variations( 'acf/fields/user/result', array( 'name', 'key' ), 2 );
|
||||
acf_add_filter_variations( 'acf/fields/user/search_columns', array( 'name', 'key' ), 3 );
|
||||
add_filter( 'acf/conditional_logic/choices', array( $this, 'render_field_user_conditional_choices' ), 10, 3 );
|
||||
|
||||
// Add AJAX query.
|
||||
add_action( 'wp_ajax_acf/fields/user/query', array( $this, 'ajax_query' ) );
|
||||
add_action( 'wp_ajax_nopriv_acf/fields/user/query', array( $this, 'ajax_query' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters choices in user conditions.
|
||||
*
|
||||
* @since 6.3
|
||||
*
|
||||
* @param array $choices The selected choice.
|
||||
* @param array $conditional_field The conditional field settings object.
|
||||
* @param string $rule_value The rule value.
|
||||
* @return array
|
||||
*/
|
||||
public function render_field_user_conditional_choices( $choices, $conditional_field, $rule_value ) {
|
||||
if ( ! is_array( $conditional_field ) || $conditional_field['type'] !== 'user' ) {
|
||||
return $choices;
|
||||
}
|
||||
if ( ! empty( $rule_value ) ) {
|
||||
$user = acf_get_users(
|
||||
array(
|
||||
'include' => array( $rule_value ),
|
||||
)
|
||||
);
|
||||
|
||||
$user_result = acf_get_user_result( $user[0] );
|
||||
$choices = array( $user_result['id'] => $user_result['text'] );
|
||||
}
|
||||
|
||||
return $choices;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the field settings HTML.
|
||||
*
|
||||
@@ -165,7 +194,7 @@ if ( ! class_exists( 'ACF_Field_User' ) ) :
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result text for a fiven WP_User object.
|
||||
* Returns the result text for a given WP_User object.
|
||||
*
|
||||
* @date 1/11/2013
|
||||
* @since 5.0.0
|
||||
@@ -353,7 +382,6 @@ if ( ! class_exists( 'ACF_Field_User' ) ) :
|
||||
add_filter( 'acf/ajax/query_users/args', array( $this, 'ajax_query_args' ), 10, 3 );
|
||||
add_filter( 'acf/ajax/query_users/result', array( $this, 'ajax_query_result' ), 10, 3 );
|
||||
add_filter( 'acf/ajax/query_users/search_columns', array( $this, 'ajax_query_search_columns' ), 10, 4 );
|
||||
|
||||
// Simulate AJAX request.
|
||||
acf_get_instance( 'ACF_Ajax_Query_Users' )->request();
|
||||
}
|
||||
|
||||