Updates to 6.2.2

This commit is contained in:
ACF 2023-10-26 10:14:49 +00:00
parent 81dca1b4d5
commit cb3352093e
137 changed files with 20944 additions and 20135 deletions

View File

@ -9,7 +9,7 @@
* Plugin Name: Advanced Custom Fields PRO
* Plugin URI: https://www.advancedcustomfields.com
* Description: Customize WordPress with powerful, professional and intuitive fields.
* Version: 6.2.1.1
* Version: 6.2.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
@ -36,7 +36,7 @@ if ( ! class_exists( 'ACF' ) ) {
*
* @var string
*/
public $version = '6.2.1.1';
public $version = '6.2.2';
/**
* The plugin settings array.
@ -228,6 +228,10 @@ if ( ! class_exists( 'ACF' ) ) {
// Include PRO.
acf_include( 'pro/acf-pro.php' );
if ( is_admin() && function_exists( 'acf_is_pro' ) && ! acf_is_pro() ) {
acf_include( 'includes/admin/admin-options-pages-preview.php' );
}
// Add actions.
add_action( 'init', array( $this, 'register_post_status' ), 4 );
add_action( 'init', array( $this, 'init' ), 5 );

View File

@ -2285,18 +2285,27 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-field-groups-wrapper .acf-no-taxonomies-inner h2,
.acf-no-field-groups-wrapper .acf-no-post-types-inner h2,
.acf-no-field-groups-wrapper .acf-no-options-pages-inner h2,
.acf-no-field-groups-wrapper .acf-options-preview-inner h2,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner h2,
.acf-no-taxonomies-wrapper .acf-no-taxonomies-inner h2,
.acf-no-taxonomies-wrapper .acf-no-post-types-inner h2,
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner h2,
.acf-no-taxonomies-wrapper .acf-options-preview-inner h2,
.acf-no-post-types-wrapper .acf-no-field-groups-inner h2,
.acf-no-post-types-wrapper .acf-no-taxonomies-inner h2,
.acf-no-post-types-wrapper .acf-no-post-types-inner h2,
.acf-no-post-types-wrapper .acf-no-options-pages-inner h2,
.acf-no-post-types-wrapper .acf-options-preview-inner h2,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner h2,
.acf-no-options-pages-wrapper .acf-no-taxonomies-inner h2,
.acf-no-options-pages-wrapper .acf-no-post-types-inner h2,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner h2, .acf-page-title, .acf-admin-page h2,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner h2,
.acf-no-options-pages-wrapper .acf-options-preview-inner h2,
.acf-options-preview-wrapper .acf-no-field-groups-inner h2,
.acf-options-preview-wrapper .acf-no-taxonomies-inner h2,
.acf-options-preview-wrapper .acf-no-post-types-inner h2,
.acf-options-preview-wrapper .acf-no-options-pages-inner h2,
.acf-options-preview-wrapper .acf-options-preview-inner h2, .acf-page-title, .acf-admin-page h2,
.acf-headerbar h2 {
font-size: 18px;
font-weight: 400;
@ -2331,6 +2340,8 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-field-groups-wrapper .acf-no-post-types-inner .acf-admin-page p,
.acf-admin-page .acf-no-field-groups-wrapper .acf-no-options-pages-inner p,
.acf-no-field-groups-wrapper .acf-no-options-pages-inner .acf-admin-page p,
.acf-admin-page .acf-no-field-groups-wrapper .acf-options-preview-inner p,
.acf-no-field-groups-wrapper .acf-options-preview-inner .acf-admin-page p,
.acf-admin-page .acf-no-taxonomies-wrapper .acf-no-field-groups-inner p,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner .acf-admin-page p,
.acf-admin-page .acf-no-taxonomies-wrapper .acf-no-taxonomies-inner p,
@ -2339,6 +2350,8 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-taxonomies-wrapper .acf-no-post-types-inner .acf-admin-page p,
.acf-admin-page .acf-no-taxonomies-wrapper .acf-no-options-pages-inner p,
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner .acf-admin-page p,
.acf-admin-page .acf-no-taxonomies-wrapper .acf-options-preview-inner p,
.acf-no-taxonomies-wrapper .acf-options-preview-inner .acf-admin-page p,
.acf-admin-page .acf-no-post-types-wrapper .acf-no-field-groups-inner p,
.acf-no-post-types-wrapper .acf-no-field-groups-inner .acf-admin-page p,
.acf-admin-page .acf-no-post-types-wrapper .acf-no-taxonomies-inner p,
@ -2347,6 +2360,8 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-post-types-wrapper .acf-no-post-types-inner .acf-admin-page p,
.acf-admin-page .acf-no-post-types-wrapper .acf-no-options-pages-inner p,
.acf-no-post-types-wrapper .acf-no-options-pages-inner .acf-admin-page p,
.acf-admin-page .acf-no-post-types-wrapper .acf-options-preview-inner p,
.acf-no-post-types-wrapper .acf-options-preview-inner .acf-admin-page p,
.acf-admin-page .acf-no-options-pages-wrapper .acf-no-field-groups-inner p,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner .acf-admin-page p,
.acf-admin-page .acf-no-options-pages-wrapper .acf-no-taxonomies-inner p,
@ -2354,7 +2369,19 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-admin-page .acf-no-options-pages-wrapper .acf-no-post-types-inner p,
.acf-no-options-pages-wrapper .acf-no-post-types-inner .acf-admin-page p,
.acf-admin-page .acf-no-options-pages-wrapper .acf-no-options-pages-inner p,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner .acf-admin-page p, .acf-admin-page #acf-admin-tools .acf-meta-box-wrap .acf-fields .acf-label, #acf-admin-tools .acf-meta-box-wrap .acf-fields .acf-admin-page .acf-label {
.acf-no-options-pages-wrapper .acf-no-options-pages-inner .acf-admin-page p,
.acf-admin-page .acf-no-options-pages-wrapper .acf-options-preview-inner p,
.acf-no-options-pages-wrapper .acf-options-preview-inner .acf-admin-page p,
.acf-admin-page .acf-options-preview-wrapper .acf-no-field-groups-inner p,
.acf-options-preview-wrapper .acf-no-field-groups-inner .acf-admin-page p,
.acf-admin-page .acf-options-preview-wrapper .acf-no-taxonomies-inner p,
.acf-options-preview-wrapper .acf-no-taxonomies-inner .acf-admin-page p,
.acf-admin-page .acf-options-preview-wrapper .acf-no-post-types-inner p,
.acf-options-preview-wrapper .acf-no-post-types-inner .acf-admin-page p,
.acf-admin-page .acf-options-preview-wrapper .acf-no-options-pages-inner p,
.acf-options-preview-wrapper .acf-no-options-pages-inner .acf-admin-page p,
.acf-admin-page .acf-options-preview-wrapper .acf-options-preview-inner p,
.acf-options-preview-wrapper .acf-options-preview-inner .acf-admin-page p, .acf-admin-page #acf-admin-tools .acf-meta-box-wrap .acf-fields .acf-label, #acf-admin-tools .acf-meta-box-wrap .acf-fields .acf-admin-page .acf-label {
font-size: 14px;
}
.acf-admin-page .p3, .acf-admin-page .acf-internal-post-type .wp-list-table .post-state, .acf-internal-post-type .wp-list-table .acf-admin-page .post-state, .acf-admin-page .subtitle {
@ -2362,7 +2389,7 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
}
.acf-admin-page .p4, .acf-admin-page .acf-admin-toolbar a.acf-admin-toolbar-upgrade-btn p, .acf-admin-toolbar a.acf-admin-toolbar-upgrade-btn .acf-admin-page p, .acf-admin-page #acf-update-information .form-table th, #acf-update-information .form-table .acf-admin-page th,
.acf-admin-page #acf-update-information .form-table td,
#acf-update-information .form-table .acf-admin-page td, .acf-admin-page #acf-admin-tools.tool-export .acf-panel h3, #acf-admin-tools.tool-export .acf-panel .acf-admin-page h3, .acf-admin-page .acf-btn.acf-btn-sm, .acf-admin-page .acf-admin-toolbar .acf-tab, .acf-admin-toolbar .acf-admin-page .acf-tab, .acf-admin-page .acf-internal-post-type .subsubsub li, .acf-internal-post-type .subsubsub .acf-admin-page li, .acf-admin-page .acf-internal-post-type .wp-list-table tbody th, .acf-internal-post-type .wp-list-table tbody .acf-admin-page th,
#acf-update-information .form-table .acf-admin-page td, .acf-admin-page #acf-admin-tools.tool-export .acf-panel h3, #acf-admin-tools.tool-export .acf-panel .acf-admin-page h3, .acf-admin-page .acf-btn.acf-btn-sm, .acf-admin-page .acf-admin-toolbar .acf-tab, .acf-admin-toolbar .acf-admin-page .acf-tab, .acf-admin-page .acf-options-preview .acf-options-pages-preview-upgrade-button p, .acf-options-preview .acf-options-pages-preview-upgrade-button .acf-admin-page p, .acf-admin-page .acf-internal-post-type .subsubsub li, .acf-internal-post-type .subsubsub .acf-admin-page li, .acf-admin-page .acf-internal-post-type .wp-list-table tbody th, .acf-internal-post-type .wp-list-table tbody .acf-admin-page th,
.acf-admin-page .acf-internal-post-type .wp-list-table tbody td,
.acf-internal-post-type .wp-list-table tbody .acf-admin-page td, .acf-admin-page .acf-internal-post-type .wp-list-table thead th, .acf-internal-post-type .wp-list-table thead .acf-admin-page th, .acf-admin-page .acf-internal-post-type .wp-list-table thead td, .acf-internal-post-type .wp-list-table thead .acf-admin-page td,
.acf-admin-page .acf-internal-post-type .wp-list-table tfoot th,
@ -2387,6 +2414,8 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-field-groups-wrapper .acf-no-post-types-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-field-groups-wrapper .acf-no-options-pages-inner p.acf-small,
.acf-no-field-groups-wrapper .acf-no-options-pages-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-field-groups-wrapper .acf-options-preview-inner p.acf-small,
.acf-no-field-groups-wrapper .acf-options-preview-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-taxonomies-wrapper .acf-no-field-groups-inner p.acf-small,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-taxonomies-wrapper .acf-no-taxonomies-inner p.acf-small,
@ -2395,6 +2424,8 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-taxonomies-wrapper .acf-no-post-types-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-taxonomies-wrapper .acf-no-options-pages-inner p.acf-small,
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-taxonomies-wrapper .acf-options-preview-inner p.acf-small,
.acf-no-taxonomies-wrapper .acf-options-preview-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-post-types-wrapper .acf-no-field-groups-inner p.acf-small,
.acf-no-post-types-wrapper .acf-no-field-groups-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-post-types-wrapper .acf-no-taxonomies-inner p.acf-small,
@ -2403,6 +2434,8 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-post-types-wrapper .acf-no-post-types-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-post-types-wrapper .acf-no-options-pages-inner p.acf-small,
.acf-no-post-types-wrapper .acf-no-options-pages-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-post-types-wrapper .acf-options-preview-inner p.acf-small,
.acf-no-post-types-wrapper .acf-options-preview-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-options-pages-wrapper .acf-no-field-groups-inner p.acf-small,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-options-pages-wrapper .acf-no-taxonomies-inner p.acf-small,
@ -2410,7 +2443,19 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-admin-page .acf-no-options-pages-wrapper .acf-no-post-types-inner p.acf-small,
.acf-no-options-pages-wrapper .acf-no-post-types-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-options-pages-wrapper .acf-no-options-pages-inner p.acf-small,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner .acf-admin-page p.acf-small, .acf-admin-page .acf-internal-post-type .row-actions, .acf-internal-post-type .acf-admin-page .row-actions, .acf-admin-page .acf-small {
.acf-no-options-pages-wrapper .acf-no-options-pages-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-no-options-pages-wrapper .acf-options-preview-inner p.acf-small,
.acf-no-options-pages-wrapper .acf-options-preview-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-options-preview-wrapper .acf-no-field-groups-inner p.acf-small,
.acf-options-preview-wrapper .acf-no-field-groups-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-options-preview-wrapper .acf-no-taxonomies-inner p.acf-small,
.acf-options-preview-wrapper .acf-no-taxonomies-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-options-preview-wrapper .acf-no-post-types-inner p.acf-small,
.acf-options-preview-wrapper .acf-no-post-types-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-options-preview-wrapper .acf-no-options-pages-inner p.acf-small,
.acf-options-preview-wrapper .acf-no-options-pages-inner .acf-admin-page p.acf-small,
.acf-admin-page .acf-options-preview-wrapper .acf-options-preview-inner p.acf-small,
.acf-options-preview-wrapper .acf-options-preview-inner .acf-admin-page p.acf-small, .acf-admin-page .acf-internal-post-type .row-actions, .acf-internal-post-type .acf-admin-page .row-actions, .acf-admin-page .acf-small {
font-size: 12px;
}
.acf-admin-page .p7, .acf-admin-page .acf-tooltip, .acf-admin-page .acf-notice p.help,
@ -3715,7 +3760,8 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-field-groups-wrapper,
.acf-no-taxonomies-wrapper,
.acf-no-post-types-wrapper,
.acf-no-options-pages-wrapper {
.acf-no-options-pages-wrapper,
.acf-options-preview-wrapper {
display: flex;
justify-content: center;
padding-top: 48px;
@ -3725,25 +3771,34 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-field-groups-wrapper .acf-no-taxonomies-inner,
.acf-no-field-groups-wrapper .acf-no-post-types-inner,
.acf-no-field-groups-wrapper .acf-no-options-pages-inner,
.acf-no-field-groups-wrapper .acf-options-preview-inner,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner,
.acf-no-taxonomies-wrapper .acf-no-taxonomies-inner,
.acf-no-taxonomies-wrapper .acf-no-post-types-inner,
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner,
.acf-no-taxonomies-wrapper .acf-options-preview-inner,
.acf-no-post-types-wrapper .acf-no-field-groups-inner,
.acf-no-post-types-wrapper .acf-no-taxonomies-inner,
.acf-no-post-types-wrapper .acf-no-post-types-inner,
.acf-no-post-types-wrapper .acf-no-options-pages-inner,
.acf-no-post-types-wrapper .acf-options-preview-inner,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner,
.acf-no-options-pages-wrapper .acf-no-taxonomies-inner,
.acf-no-options-pages-wrapper .acf-no-post-types-inner,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner {
.acf-no-options-pages-wrapper .acf-no-options-pages-inner,
.acf-no-options-pages-wrapper .acf-options-preview-inner,
.acf-options-preview-wrapper .acf-no-field-groups-inner,
.acf-options-preview-wrapper .acf-no-taxonomies-inner,
.acf-options-preview-wrapper .acf-no-post-types-inner,
.acf-options-preview-wrapper .acf-no-options-pages-inner,
.acf-options-preview-wrapper .acf-options-preview-inner {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: center;
align-items: flex-start;
text-align: center;
max-width: 380px;
max-width: 420px;
min-height: 320px;
}
.acf-no-field-groups-wrapper .acf-no-field-groups-inner img,
@ -3758,6 +3813,9 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-field-groups-wrapper .acf-no-options-pages-inner img,
.acf-no-field-groups-wrapper .acf-no-options-pages-inner h2,
.acf-no-field-groups-wrapper .acf-no-options-pages-inner p,
.acf-no-field-groups-wrapper .acf-options-preview-inner img,
.acf-no-field-groups-wrapper .acf-options-preview-inner h2,
.acf-no-field-groups-wrapper .acf-options-preview-inner p,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner img,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner h2,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner p,
@ -3770,6 +3828,9 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner img,
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner h2,
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner p,
.acf-no-taxonomies-wrapper .acf-options-preview-inner img,
.acf-no-taxonomies-wrapper .acf-options-preview-inner h2,
.acf-no-taxonomies-wrapper .acf-options-preview-inner p,
.acf-no-post-types-wrapper .acf-no-field-groups-inner img,
.acf-no-post-types-wrapper .acf-no-field-groups-inner h2,
.acf-no-post-types-wrapper .acf-no-field-groups-inner p,
@ -3782,6 +3843,9 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-post-types-wrapper .acf-no-options-pages-inner img,
.acf-no-post-types-wrapper .acf-no-options-pages-inner h2,
.acf-no-post-types-wrapper .acf-no-options-pages-inner p,
.acf-no-post-types-wrapper .acf-options-preview-inner img,
.acf-no-post-types-wrapper .acf-options-preview-inner h2,
.acf-no-post-types-wrapper .acf-options-preview-inner p,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner img,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner h2,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner p,
@ -3793,46 +3857,83 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-options-pages-wrapper .acf-no-post-types-inner p,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner img,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner h2,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner p {
.acf-no-options-pages-wrapper .acf-no-options-pages-inner p,
.acf-no-options-pages-wrapper .acf-options-preview-inner img,
.acf-no-options-pages-wrapper .acf-options-preview-inner h2,
.acf-no-options-pages-wrapper .acf-options-preview-inner p,
.acf-options-preview-wrapper .acf-no-field-groups-inner img,
.acf-options-preview-wrapper .acf-no-field-groups-inner h2,
.acf-options-preview-wrapper .acf-no-field-groups-inner p,
.acf-options-preview-wrapper .acf-no-taxonomies-inner img,
.acf-options-preview-wrapper .acf-no-taxonomies-inner h2,
.acf-options-preview-wrapper .acf-no-taxonomies-inner p,
.acf-options-preview-wrapper .acf-no-post-types-inner img,
.acf-options-preview-wrapper .acf-no-post-types-inner h2,
.acf-options-preview-wrapper .acf-no-post-types-inner p,
.acf-options-preview-wrapper .acf-no-options-pages-inner img,
.acf-options-preview-wrapper .acf-no-options-pages-inner h2,
.acf-options-preview-wrapper .acf-no-options-pages-inner p,
.acf-options-preview-wrapper .acf-options-preview-inner img,
.acf-options-preview-wrapper .acf-options-preview-inner h2,
.acf-options-preview-wrapper .acf-options-preview-inner p {
flex: 1 0 100%;
}
.acf-no-field-groups-wrapper .acf-no-field-groups-inner h2,
.acf-no-field-groups-wrapper .acf-no-taxonomies-inner h2,
.acf-no-field-groups-wrapper .acf-no-post-types-inner h2,
.acf-no-field-groups-wrapper .acf-no-options-pages-inner h2,
.acf-no-field-groups-wrapper .acf-options-preview-inner h2,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner h2,
.acf-no-taxonomies-wrapper .acf-no-taxonomies-inner h2,
.acf-no-taxonomies-wrapper .acf-no-post-types-inner h2,
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner h2,
.acf-no-taxonomies-wrapper .acf-options-preview-inner h2,
.acf-no-post-types-wrapper .acf-no-field-groups-inner h2,
.acf-no-post-types-wrapper .acf-no-taxonomies-inner h2,
.acf-no-post-types-wrapper .acf-no-post-types-inner h2,
.acf-no-post-types-wrapper .acf-no-options-pages-inner h2,
.acf-no-post-types-wrapper .acf-options-preview-inner h2,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner h2,
.acf-no-options-pages-wrapper .acf-no-taxonomies-inner h2,
.acf-no-options-pages-wrapper .acf-no-post-types-inner h2,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner h2 {
.acf-no-options-pages-wrapper .acf-no-options-pages-inner h2,
.acf-no-options-pages-wrapper .acf-options-preview-inner h2,
.acf-options-preview-wrapper .acf-no-field-groups-inner h2,
.acf-options-preview-wrapper .acf-no-taxonomies-inner h2,
.acf-options-preview-wrapper .acf-no-post-types-inner h2,
.acf-options-preview-wrapper .acf-no-options-pages-inner h2,
.acf-options-preview-wrapper .acf-options-preview-inner h2 {
margin-top: 32px;
margin-bottom: 0;
padding: 0;
color: #344054;
line-height: 1.6rem;
}
.acf-no-field-groups-wrapper .acf-no-field-groups-inner p,
.acf-no-field-groups-wrapper .acf-no-taxonomies-inner p,
.acf-no-field-groups-wrapper .acf-no-post-types-inner p,
.acf-no-field-groups-wrapper .acf-no-options-pages-inner p,
.acf-no-field-groups-wrapper .acf-options-preview-inner p,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner p,
.acf-no-taxonomies-wrapper .acf-no-taxonomies-inner p,
.acf-no-taxonomies-wrapper .acf-no-post-types-inner p,
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner p,
.acf-no-taxonomies-wrapper .acf-options-preview-inner p,
.acf-no-post-types-wrapper .acf-no-field-groups-inner p,
.acf-no-post-types-wrapper .acf-no-taxonomies-inner p,
.acf-no-post-types-wrapper .acf-no-post-types-inner p,
.acf-no-post-types-wrapper .acf-no-options-pages-inner p,
.acf-no-post-types-wrapper .acf-options-preview-inner p,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner p,
.acf-no-options-pages-wrapper .acf-no-taxonomies-inner p,
.acf-no-options-pages-wrapper .acf-no-post-types-inner p,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner p {
.acf-no-options-pages-wrapper .acf-no-options-pages-inner p,
.acf-no-options-pages-wrapper .acf-options-preview-inner p,
.acf-options-preview-wrapper .acf-no-field-groups-inner p,
.acf-options-preview-wrapper .acf-no-taxonomies-inner p,
.acf-options-preview-wrapper .acf-no-post-types-inner p,
.acf-options-preview-wrapper .acf-no-options-pages-inner p,
.acf-options-preview-wrapper .acf-options-preview-inner p {
margin-top: 12px;
margin-bottom: 0;
padding: 0;
@ -3842,18 +3943,27 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-field-groups-wrapper .acf-no-taxonomies-inner p.acf-small,
.acf-no-field-groups-wrapper .acf-no-post-types-inner p.acf-small,
.acf-no-field-groups-wrapper .acf-no-options-pages-inner p.acf-small,
.acf-no-field-groups-wrapper .acf-options-preview-inner p.acf-small,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner p.acf-small,
.acf-no-taxonomies-wrapper .acf-no-taxonomies-inner p.acf-small,
.acf-no-taxonomies-wrapper .acf-no-post-types-inner p.acf-small,
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner p.acf-small,
.acf-no-taxonomies-wrapper .acf-options-preview-inner p.acf-small,
.acf-no-post-types-wrapper .acf-no-field-groups-inner p.acf-small,
.acf-no-post-types-wrapper .acf-no-taxonomies-inner p.acf-small,
.acf-no-post-types-wrapper .acf-no-post-types-inner p.acf-small,
.acf-no-post-types-wrapper .acf-no-options-pages-inner p.acf-small,
.acf-no-post-types-wrapper .acf-options-preview-inner p.acf-small,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner p.acf-small,
.acf-no-options-pages-wrapper .acf-no-taxonomies-inner p.acf-small,
.acf-no-options-pages-wrapper .acf-no-post-types-inner p.acf-small,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner p.acf-small {
.acf-no-options-pages-wrapper .acf-no-options-pages-inner p.acf-small,
.acf-no-options-pages-wrapper .acf-options-preview-inner p.acf-small,
.acf-options-preview-wrapper .acf-no-field-groups-inner p.acf-small,
.acf-options-preview-wrapper .acf-no-taxonomies-inner p.acf-small,
.acf-options-preview-wrapper .acf-no-post-types-inner p.acf-small,
.acf-options-preview-wrapper .acf-no-options-pages-inner p.acf-small,
.acf-options-preview-wrapper .acf-options-preview-inner p.acf-small {
display: block;
position: relative;
margin-top: 32px;
@ -3862,18 +3972,27 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-field-groups-wrapper .acf-no-taxonomies-inner img,
.acf-no-field-groups-wrapper .acf-no-post-types-inner img,
.acf-no-field-groups-wrapper .acf-no-options-pages-inner img,
.acf-no-field-groups-wrapper .acf-options-preview-inner img,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner img,
.acf-no-taxonomies-wrapper .acf-no-taxonomies-inner img,
.acf-no-taxonomies-wrapper .acf-no-post-types-inner img,
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner img,
.acf-no-taxonomies-wrapper .acf-options-preview-inner img,
.acf-no-post-types-wrapper .acf-no-field-groups-inner img,
.acf-no-post-types-wrapper .acf-no-taxonomies-inner img,
.acf-no-post-types-wrapper .acf-no-post-types-inner img,
.acf-no-post-types-wrapper .acf-no-options-pages-inner img,
.acf-no-post-types-wrapper .acf-options-preview-inner img,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner img,
.acf-no-options-pages-wrapper .acf-no-taxonomies-inner img,
.acf-no-options-pages-wrapper .acf-no-post-types-inner img,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner img {
.acf-no-options-pages-wrapper .acf-no-options-pages-inner img,
.acf-no-options-pages-wrapper .acf-options-preview-inner img,
.acf-options-preview-wrapper .acf-no-field-groups-inner img,
.acf-options-preview-wrapper .acf-no-taxonomies-inner img,
.acf-options-preview-wrapper .acf-no-post-types-inner img,
.acf-options-preview-wrapper .acf-no-options-pages-inner img,
.acf-options-preview-wrapper .acf-options-preview-inner img {
max-width: 284px;
margin-bottom: 0;
}
@ -3881,18 +4000,27 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-field-groups-wrapper .acf-no-taxonomies-inner .acf-btn,
.acf-no-field-groups-wrapper .acf-no-post-types-inner .acf-btn,
.acf-no-field-groups-wrapper .acf-no-options-pages-inner .acf-btn,
.acf-no-field-groups-wrapper .acf-options-preview-inner .acf-btn,
.acf-no-taxonomies-wrapper .acf-no-field-groups-inner .acf-btn,
.acf-no-taxonomies-wrapper .acf-no-taxonomies-inner .acf-btn,
.acf-no-taxonomies-wrapper .acf-no-post-types-inner .acf-btn,
.acf-no-taxonomies-wrapper .acf-no-options-pages-inner .acf-btn,
.acf-no-taxonomies-wrapper .acf-options-preview-inner .acf-btn,
.acf-no-post-types-wrapper .acf-no-field-groups-inner .acf-btn,
.acf-no-post-types-wrapper .acf-no-taxonomies-inner .acf-btn,
.acf-no-post-types-wrapper .acf-no-post-types-inner .acf-btn,
.acf-no-post-types-wrapper .acf-no-options-pages-inner .acf-btn,
.acf-no-post-types-wrapper .acf-options-preview-inner .acf-btn,
.acf-no-options-pages-wrapper .acf-no-field-groups-inner .acf-btn,
.acf-no-options-pages-wrapper .acf-no-taxonomies-inner .acf-btn,
.acf-no-options-pages-wrapper .acf-no-post-types-inner .acf-btn,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner .acf-btn {
.acf-no-options-pages-wrapper .acf-no-options-pages-inner .acf-btn,
.acf-no-options-pages-wrapper .acf-options-preview-inner .acf-btn,
.acf-options-preview-wrapper .acf-no-field-groups-inner .acf-btn,
.acf-options-preview-wrapper .acf-no-taxonomies-inner .acf-btn,
.acf-options-preview-wrapper .acf-no-post-types-inner .acf-btn,
.acf-options-preview-wrapper .acf-no-options-pages-inner .acf-btn,
.acf-options-preview-wrapper .acf-options-preview-inner .acf-btn {
margin-top: 32px;
}
.acf-no-field-groups-wrapper .acf-no-post-types-inner img,
@ -3902,14 +4030,17 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-post-types-wrapper .acf-no-post-types-inner img,
.acf-no-post-types-wrapper .acf-no-options-pages-inner img,
.acf-no-options-pages-wrapper .acf-no-post-types-inner img,
.acf-no-options-pages-wrapper .acf-no-options-pages-inner img {
.acf-no-options-pages-wrapper .acf-no-options-pages-inner img,
.acf-options-preview-wrapper .acf-no-post-types-inner img,
.acf-options-preview-wrapper .acf-no-options-pages-inner img {
width: 106px;
height: 88px;
}
.acf-no-field-groups-wrapper .acf-no-taxonomies-inner img,
.acf-no-taxonomies-wrapper .acf-no-taxonomies-inner img,
.acf-no-post-types-wrapper .acf-no-taxonomies-inner img,
.acf-no-options-pages-wrapper .acf-no-taxonomies-inner img {
.acf-no-options-pages-wrapper .acf-no-taxonomies-inner img,
.acf-options-preview-wrapper .acf-no-taxonomies-inner img {
width: 98px;
height: 88px;
}
@ -3948,11 +4079,83 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-no-options-pages .wp-list-table tfoot {
display: none;
}
.acf-no-field-groups .wp-list-table a.acf-btn,
.acf-no-post-types .wp-list-table a.acf-btn,
.acf-no-taxonomies .wp-list-table a.acf-btn,
.acf-no-options-pages .wp-list-table a.acf-btn {
border: 1px solid rgba(0, 0, 0, 0.16);
box-shadow: none;
}
.acf-internal-post-type #the-list .no-items td {
vertical-align: middle;
}
/*---------------------------------------------------------------------------------------------
*
* Options Page Preview
*
*---------------------------------------------------------------------------------------------*/
.acf-options-preview .acf-btn {
margin-left: 8px;
}
.acf-options-preview .disabled {
background-color: #F2F4F7 !important;
color: #98A2B3 !important;
border: 1px #D0D5DD solid;
cursor: default !important;
}
.acf-options-preview .acf-options-pages-preview-upgrade-button {
height: 48px;
padding: 8px 48px 8px 48px !important;
border-radius: 6px;
border: 1px;
gap: 6px;
display: inline-flex;
align-items: center;
align-self: stretch;
background: linear-gradient(90.52deg, #3E8BFF 0.44%, #A45CFF 113.3%);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
background-size: 180% 80%;
background-position: 100% 0;
transition: background-position 0.5s;
border-radius: 6px;
text-decoration: none;
}
.acf-options-preview .acf-options-pages-preview-upgrade-button:hover {
background-position: 0 0;
}
.acf-options-preview .acf-options-pages-preview-upgrade-button:focus {
border: none;
outline: none;
box-shadow: none;
}
.acf-options-preview .acf-options-pages-preview-upgrade-button p {
margin: 0;
padding-top: 8px;
padding-bottom: 8px;
font-weight: normal;
text-transform: none;
color: #fff;
}
.acf-options-preview .acf-options-pages-preview-upgrade-button .acf-icon {
width: 20px;
height: 20px;
margin-right: 6px;
margin-left: -2px;
background-color: #F9FAFB;
}
.acf-options-preview .acf_options_preview_wrap a.acf-btn i {
margin-right: -2px !important;
margin-left: 0px !important;
}
.acf-options-preview .acf-pro-label {
vertical-align: middle;
}
.acf-options-preview .acf_options_preview_wrap img {
max-height: 88px;
}
/*---------------------------------------------------------------------------------------------
*
* Small screen list table info toggle
@ -4352,8 +4555,12 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
align-items: center;
justify-content: space-between;
max-width: 1440px;
gap: 8px;
}
.acf-headerbar .acf-page-title {
display: flex;
align-items: center;
gap: 8px;
margin-top: 0;
margin-right: 16px;
margin-bottom: 0;
@ -4366,6 +4573,10 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-headerbar .acf-page-title .acf-duplicated-from {
color: #98A2B3;
}
.acf-headerbar .acf-page-title .acf-pro-label {
box-shadow: none;
border: 1px solid rgba(0, 0, 0, 0.2);
}
@media screen and (max-width: 880px) {
.acf-headerbar {
position: static;
@ -4549,6 +4760,18 @@ html[dir=rtl] .acf-table > tbody > tr > td.order + td {
.acf-btn.acf-btn-secondary:hover {
background-color: #f3f9fc;
}
.acf-btn.acf-btn-muted {
background-color: #667085;
color: white;
height: 48px;
padding: 8px 28px 8px 28px !important;
border-radius: 6px;
border: 1px;
gap: 6px;
}
.acf-btn.acf-btn-muted:hover {
background-color: #475467 !important;
}
.acf-btn.acf-btn-tertiary {
background-color: transparent;
color: #667085 !important;
@ -5440,15 +5663,92 @@ h3.acf-sub-field-list-title:before,
flex: 1 1 65%;
margin-right: 32px;
}
#acf-license-information .inner {
padding: 0;
}
#acf-license-information .inner .acf-license-defined {
padding: 24px;
margin: 0;
}
#acf-license-information .inner .acf-retry-activation {
padding: 0 24px 24px 24px;
}
#acf-license-information .inner .acf-activation-form {
padding: 24px;
}
#acf-license-information .inner .acf-activation-form .acf-manage-license-btn {
float: right;
line-height: 40px;
align-items: center;
display: inline-flex;
}
#acf-license-information .inner .acf-activation-form .acf-manage-license-btn.acf-renew-subscription {
float: none;
line-height: initial;
}
#acf-license-information .inner .acf-activation-form .acf-manage-license-btn i {
margin: 0 0 0 5px;
width: 19px;
height: 19px;
}
#acf-license-information .inner .acf-activation-form .acf-recheck-license {
float: right;
line-height: 40px;
}
#acf-license-information .inner .acf-activation-form .acf-recheck-license i {
margin-right: 8px;
vertical-align: middle;
}
#acf-license-information .inner .acf-license-status-wrap {
background: #F9FAFB;
border-top: 1px solid #EAECF0;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}
#acf-license-information .inner .acf-license-status-wrap .acf-license-status-table {
font-size: 14px;
padding: 24px 24px 16px 24px;
}
#acf-license-information .inner .acf-license-status-wrap .acf-license-status-table th {
width: 160px;
font-weight: 500;
text-align: left;
padding-bottom: 16px;
}
#acf-license-information .inner .acf-license-status-wrap .acf-license-status-table td {
padding-bottom: 16px;
}
#acf-license-information .inner .acf-license-status-wrap .acf-license-status-table td .acf-license-status {
display: inline-block;
height: 24px;
line-height: 24px;
border-radius: 100px;
background: #EAECF0;
padding: 0 13px 1px 12px;
border: 1px solid rgba(0, 0, 0, 0.12);
color: #667085;
}
#acf-license-information .inner .acf-license-status-wrap .acf-license-status-table td .acf-license-status.active {
background: rgba(18, 183, 106, 0.15);
border: 1px solid rgba(18, 183, 106, 0.24);
color: rgb(18, 183, 106);
}
#acf-license-information .inner .acf-license-status-wrap .acf-license-status-table td .acf-license-status.expired, #acf-license-information .inner .acf-license-status-wrap .acf-license-status-table td .acf-license-status.cancelled {
background: rgba(209, 55, 55, 0.24);
border: 1px solid rgba(209, 55, 55, 0.24);
color: rgb(209, 55, 55);
}
#acf-license-information .inner .acf-license-status-wrap .acf-no-license-view-pricing {
padding: 12px 24px;
border-top: 1px solid #EAECF0;
color: #667085;
}
@media screen and (max-width: 1024px) {
#acf-license-information {
margin-right: 0;
margin-bottom: 32px;
}
}
#acf-license-information .acf-activation-form {
margin-top: 24px;
}
#acf-license-information label {
font-weight: 500;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1474,14 +1474,14 @@ html[dir=rtl] .pac-container .pac-item {
max-height: 20px;
margin-top: 1px;
}
.acf-relationship .list .acf-rel-item:hover {
.acf-relationship .list .acf-rel-item:hover, .acf-relationship .list .acf-rel-item.relationship-hover {
background: #3875d7;
color: #fff;
}
.acf-relationship .list .acf-rel-item:hover .thumbnail {
.acf-relationship .list .acf-rel-item:hover .thumbnail, .acf-relationship .list .acf-rel-item.relationship-hover .thumbnail {
background: #a2bfec;
}
.acf-relationship .list .acf-rel-item:hover .thumbnail.-icon {
.acf-relationship .list .acf-rel-item:hover .thumbnail.-icon, .acf-relationship .list .acf-rel-item.relationship-hover .thumbnail.-icon {
background: #fff;
}
.acf-relationship .list .acf-rel-item.disabled {
@ -1539,7 +1539,7 @@ html[dir=rtl] .acf-relationship .selection .values .acf-icon {
right: auto;
left: 7px;
}
.acf-relationship .selection .values .acf-rel-item:hover .acf-icon {
.acf-relationship .selection .values .acf-rel-item:hover .acf-icon, .acf-relationship .selection .values .acf-rel-item.relationship-hover .acf-icon {
display: block;
}
.acf-relationship .selection .values .acf-rel-item {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -11,8 +11,8 @@
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
/**
* Extends acf.models.Modal to create the field browser.
*
@ -3077,14 +3077,14 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _typeof; }
/* harmony export */ });
function _typeof(obj) {
function _typeof(o) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o);
}
/***/ })

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3686,7 +3686,8 @@
'click .choices-list .acf-rel-item': 'onClickAdd',
'keypress .choices-list .acf-rel-item': 'onKeypressFilter',
'keypress .values-list .acf-rel-item': 'onKeypressFilter',
'click [data-name="remove_item"]': 'onClickRemove'
'click [data-name="remove_item"]': 'onClickRemove',
'touchstart .values-list .acf-rel-item': 'onTouchStartValues'
},
$control: function () {
return this.$('.acf-relationship');
@ -3858,6 +3859,10 @@
// trigger change
this.$input().trigger('change');
},
onTouchStartValues: function (e, $el) {
$(this.$listItems('values')).removeClass('relationship-hover');
$el.addClass('relationship-hover');
},
maybeFetch: function () {
// vars
var timeout = this.get('timeout');
@ -4250,6 +4255,7 @@
active: false,
actions: {
refresh: 'onRefresh',
resize: 'onRefresh',
close_field_object: 'onCloseFieldObject'
},
data: {
@ -4422,21 +4428,28 @@
return tab;
},
onRefresh: function () {
// only for left placements
if (this.get('placement') !== 'left') {
// Don't run on field group tabs.
if (['acf_field_settings_tabs', 'acf_field_group_settings_tabs'].includes(this.get('key'))) {
return;
}
// vars
var $parent = this.$el.parent();
var $list = this.$el.children('ul');
var attribute = $parent.is('td') ? 'height' : 'min-height';
// Block editor needs timeout to run after script is finished.
setTimeout(() => {
const $list = this.$el.children('ul');
let $element = this.$el;
let attribute = 'height';
let height;
if (this.get('placement') === 'left') {
$element = this.$el.parent();
attribute = $element.is('td') ? 'height' : 'min-height';
// find height (minus 1 for border-bottom)
var height = $list.position().top + $list.outerHeight(true) - 1;
// add css
$parent.css(attribute, height);
// Find height (minus 1 for border-bottom).
height = $list.position().top + $list.outerHeight(true) - 1;
} else {
height = Math.ceil($list.outerHeight(true));
}
$element.css(attribute, height);
}, 0);
},
onCloseFieldObject: function (fieldObject) {
const tab = this.getVisible().find(item => {
@ -6335,11 +6348,13 @@
refresh: 'renderGroups'
},
renderGroups: function () {
// loop
var self = this;
$('.acf-fields:visible').each(function () {
self.renderGroup($(this));
});
// Set timeout so the editor fires at the right time.
setTimeout(() => {
var self = this;
$('.acf-fields:visible').each(function () {
self.renderGroup($(this));
});
}, 0);
},
renderGroup: function ($el) {
// vars
@ -7838,7 +7853,7 @@
wait: 'prepare',
initialize: function () {
// Bail early if not Gutenberg.
if (!acf.isGutenberg()) {
if (!acf.isGutenbergPostEditor()) {
return;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3965,16 +3965,27 @@
*
* Returns true if the Gutenberg editor is being used.
*
* @date 14/11/18
* @since 5.8.0
*
* @param vois
* @return bool
*/
acf.isGutenberg = function () {
return !!(window.wp && wp.data && wp.data.select && wp.data.select('core/editor'));
};
/**
* acf.isGutenbergPostEditor
*
* Returns true if the Gutenberg post editor is being used.
*
* @since 6.2.2
*
* @return bool
*/
acf.isGutenbergPostEditor = function () {
return !!(window.wp && wp.data && wp.data.select && wp.data.select('core/edit-post'));
};
/**
* acf.objectToArray
*

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,12 +10,12 @@
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "./node_modules/react/index.js");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
(($, undefined) => {
// Dependencies.
@ -199,7 +199,7 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
// Handle svg HTML.
if (typeof blockType.icon === 'string' && blockType.icon.substr(0, 4) === '<svg') {
const iconHTML = blockType.icon;
blockType.icon = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Div, null, iconHTML);
blockType.icon = (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(Div, null, iconHTML);
}
// Remove icon if empty to allow for default "block".
@ -264,8 +264,8 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
}
// Set edit and save functions.
blockType.edit = props => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(ThisBlockEdit, _objectSpread({}, props));
blockType.save = () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(ThisBlockSave, null);
blockType.edit = props => (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(ThisBlockEdit, _objectSpread({}, props));
blockType.save = () => (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(ThisBlockSave, null);
// Add to storage.
blockTypes[blockType.name] = blockType;
@ -496,7 +496,7 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
nodeAttrs[name] = value;
});
if ('ACFInnerBlocks' === nodeName) {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(ACFInnerBlocks, _objectSpread({}, nodeAttrs));
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(ACFInnerBlocks, _objectSpread({}, nodeAttrs));
}
// Define args for React.createElement().
@ -574,7 +574,7 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
const innerBlockProps = useInnerBlocksProps({
className: className
}, props);
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", _objectSpread({}, innerBlockProps), innerBlockProps.children);
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", _objectSpread({}, innerBlockProps), innerBlockProps.children);
}
/**
@ -708,7 +708,7 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
}
}
render() {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockListBlock, _objectSpread({}, this.props));
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockListBlock, _objectSpread({}, this.props));
}
}, 'withDefaultAttributes');
wp.hooks.addFilter('editor.BlockListBlock', 'acf/with-default-attributes', withDefaultAttributes);
@ -720,7 +720,7 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
* @since 5.9.0
*/
function BlockSave() {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(InnerBlocks.Content, null);
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(InnerBlocks.Content, null);
}
/**
@ -796,14 +796,14 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
}
// Return template.
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, null, showToggle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(ToolbarGroup, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(ToolbarButton, {
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, null, showToggle && (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(ToolbarGroup, null, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(ToolbarButton, {
className: "components-icon-button components-toolbar__control",
label: toggleText,
icon: toggleIcon,
onClick: toggleMode
}))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(InspectorControls, null, mode === 'preview' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
}))), (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(InspectorControls, null, mode === 'preview' && (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
className: "acf-block-component acf-block-panel"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, _objectSpread({}, this.props)))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockBody, _objectSpread({}, this.props)));
}, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, _objectSpread({}, this.props)))), (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockBody, _objectSpread({}, this.props)));
}
}
@ -829,13 +829,13 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
showForm = false;
}
if (getBlockVersion(name) > 1) {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", _objectSpread({}, useBlockProps({
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", _objectSpread({}, useBlockProps({
className: additionalClasses
})), showForm ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, _objectSpread({}, props)) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockPreview, _objectSpread({}, props)));
})), showForm ? (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, _objectSpread({}, props)) : (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockPreview, _objectSpread({}, props)));
} else {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", _objectSpread({}, useBlockProps()), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
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,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, _objectSpread({}, props)) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockPreview, _objectSpread({}, props))));
}, showForm ? (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockForm, _objectSpread({}, props)) : (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockPreview, _objectSpread({}, props))));
}
}
@ -863,7 +863,7 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
*/
class Div extends Component {
render() {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
dangerouslySetInnerHTML: {
__html: this.props.children
}
@ -885,7 +885,7 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
*/
class Script extends Component {
render() {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
ref: el => this.el = el
});
}
@ -1009,16 +1009,16 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
this.setRef(this.state.jsx);
return this.state.jsx;
} else {
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
ref: this.setRef
}, this.state.jsx);
}
}
// Return HTML.
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
ref: this.setRef
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Placeholder, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Spinner, null)));
}, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(Placeholder, null, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(Spinner, null)));
}
shouldComponentUpdate({
index
@ -1471,13 +1471,13 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
alignContent: validateAlignment(alignContent)
});
}
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, {
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, {
group: "block"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(AlignmentComponent, {
}, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(AlignmentComponent, {
label: acf.__('Change content alignment'),
value: validateAlignment(alignContent),
onChange: onChangeAlignContent
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(OriginalBlockEdit, _objectSpread({}, this.props)));
})), (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(OriginalBlockEdit, _objectSpread({}, this.props)));
}
};
}
@ -1513,12 +1513,12 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
alignText: validateAlignment(alignText)
});
}
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, {
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, {
group: "block"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(AlignmentToolbar, {
}, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(AlignmentToolbar, {
value: validateAlignment(alignText),
onChange: onChangeAlignText
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(OriginalBlockEdit, _objectSpread({}, this.props)));
})), (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(OriginalBlockEdit, _objectSpread({}, this.props)));
}
};
}
@ -1551,12 +1551,12 @@ const md5 = __webpack_require__(/*! md5 */ "./node_modules/md5/md5.js");
fullHeight
});
}
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, {
return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockControls, {
group: "block"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockFullHeightAlignmentControl, {
}, (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(BlockFullHeightAlignmentControl, {
isActive: fullHeight,
onToggle: onToggleFullHeight
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(OriginalBlockEdit, _objectSpread({}, this.props)));
})), (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(OriginalBlockEdit, _objectSpread({}, this.props)));
}
};
}
@ -5116,14 +5116,14 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": function() { return /* binding */ _typeof; }
/* harmony export */ });
function _typeof(obj) {
function _typeof(o) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o);
}
/***/ })

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1368,7 +1368,7 @@
},
listenForSavedMetaBoxes: function () {
if (!acf.isGutenberg() || !this.get('pagination')) {
if (!acf.isGutenbergPostEditor() || !this.get('pagination')) {
return;
}
let checkedMetaBoxes = true;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,14 +4,14 @@
* Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
* Only run in input and is defined data alpha in true
*
* Version: 3.0.0
* Version: 3.0.3
* https://github.com/kallookoo/wp-color-picker-alpha
* Licensed under the GPLv2 license or later.
*/
( function ( $, undef ) {
var wpColorPickerAlpha = {
version: 300,
'version': 302,
};
// Always try to use the last version of this script.
@ -32,7 +32,7 @@
// Create new method to replace the `Color.toString()` inside the scripts.
Color.fn.to_s = function ( type ) {
type = type || 'hex';
type = ( type || 'hex' );
// Change hex to rgba to return the correct color.
if ( 'hex' === type && this._alpha < 1 ) {
type = 'rgba';
@ -117,6 +117,8 @@
alphaReset: false,
alphaColorType: 'hex',
alphaColorWithSpace: false,
alphaSkipDebounce: false,
alphaDebounceTimeout: 100,
} );
this._super();
@ -131,7 +133,6 @@
*/
_addInputListeners: function ( input ) {
var self = this,
debounceTimeout = 100,
callback = function ( event ) {
var val = input.val(),
color = new Color( val ),
@ -165,9 +166,11 @@
}
};
input
.on( 'change', callback )
.on( 'keyup', self._debounce( callback, debounceTimeout ) );
input.on( 'change', callback );
if( ! self.alphaOptions.alphaSkipDebounce ) {
input.on( 'keyup', self._debounce( callback, self.alphaOptions.alphaDebounceTimeout ) );
}
// If we initialized hidden, show on first focus. The rest is up to you.
if ( self.options.hide ) {
@ -267,17 +270,13 @@
// The margin for the sliders
stripMargin = Math.round( stripWidth / 2 );
// The total width of the elements.
totalWidth = Math.round(
squareWidth + stripWidth * 2 + stripMargin * 2
);
totalWidth = Math.round(squareWidth + ( stripWidth * 2 ) + ( stripMargin * 2 ) );
// Check and change if necessary.
while ( totalWidth > innerWidth ) {
stripWidth = Math.round( stripWidth - 2 );
stripMargin = Math.round( stripMargin - 1 );
totalWidth = Math.round(
squareWidth + stripWidth * 2 + stripMargin * 2
);
totalWidth = Math.round( squareWidth + ( stripWidth * 2 ) + ( stripMargin * 2 ) );
}
square.css( 'margin', '0' );
@ -301,24 +300,12 @@
self._super();
if ( self.alphaOptions.alphaEnabled ) {
var controls = self.controls,
var controls = self.controls,
alpha = parseInt( self._color._alpha * 100 ),
color = self._color.toRgb(),
gradient = [
'rgb(' +
color.r +
',' +
color.g +
',' +
color.b +
') 0%',
'rgba(' +
color.r +
',' +
color.g +
',' +
color.b +
', 0) 100%',
'rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%',
'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%'
],
target = self.picker
.closest( '.wp-picker-container' )
@ -326,23 +313,14 @@
self.options.color = self._getColor();
// Generate background slider alpha, only for CSS3.
controls.stripAlpha.css( {
background:
'linear-gradient(to bottom, ' +
gradient.join( ', ' ) +
'), url(' +
backgroundImage +
')',
} );
controls.stripAlpha.css( {'background' : 'linear-gradient(to bottom, ' + gradient.join( ', ' ) + '), url(' + backgroundImage + ')' } );
// Update alpha value
if ( active ) {
controls.stripAlphaSlider.slider( 'value', alpha );
}
if ( ! self._color.error ) {
self.element
.removeClass( 'iris-error' )
.val( self.options.color );
self.element.removeClass( 'iris-error' ).val( self.options.color );
}
self.picker
@ -460,32 +438,33 @@
*/
_getAlphaOptions: function () {
var el = this.element,
type = el.data( 'type' ) || this.options.type,
color = el.data( 'defaultColor' ) || el.val(),
type = ( el.data( 'type' ) || this.options.type ),
color = ( el.data( 'defaultColor' ) || el.val() ),
options = {
alphaEnabled: el.data( 'alphaEnabled' ) || false,
alphaEnabled: ( el.data( 'alphaEnabled' ) || false ),
alphaCustomWidth: 130,
alphaReset: false,
alphaColorType: 'rgb',
alphaColorWithSpace: false,
alphaSkipDebounce: ( !!el.data( 'alphaSkipDebounce' ) || false ),
};
if ( options.alphaEnabled ) {
options.alphaEnabled = el.is( 'input' ) && 'full' === type;
options.alphaEnabled = ( el.is( 'input' ) && 'full' === type );
}
if ( ! options.alphaEnabled ) {
return options;
}
options.alphaColorWithSpace = color && color.match( /\s/ );
options.alphaColorWithSpace = ( color && color.match( /\s/ ) );
$.each( options, function ( name, defaultValue ) {
var value = el.data( name ) || defaultValue;
var value = ( el.data( name ) || defaultValue );
switch ( name ) {
case 'alphaCustomWidth':
value = value ? parseInt( value, 10 ) : 0;
value = isNaN( value ) ? defaultValue : value;
value = ( value ? parseInt( value, 10 ) : 0 );
value = ( isNaN( value ) ? defaultValue : value );
break;
case 'alphaColorType':
if ( ! value.match( /^(hex|(rgb|hsl)a?)$/ ) ) {
@ -556,7 +535,7 @@
}
self.toggler.css( {
position: 'relative',
'position': 'relative',
'background-image': 'url(' + backgroundImage + ')',
} );
@ -567,10 +546,10 @@
}
self.colorAlpha = self.toggler.find( 'span.color-alpha' ).css( {
width: '30px',
height: '100%',
position: 'absolute',
top: 0,
'width': '30px',
'height': '100%',
'position': 'absolute',
'top': 0,
'background-color': el.val(),
} );
@ -579,13 +558,13 @@
self.colorAlpha.css( {
'border-bottom-left-radius': '2px',
'border-top-left-radius': '2px',
left: 0,
'left': 0,
} );
} else {
self.colorAlpha.css( {
'border-bottom-right-radius': '2px',
'border-top-right-radius': '2px',
right: 0,
'right': 0,
} );
}
@ -611,7 +590,7 @@
} );
// fire change callback if we have one
if ( $.isFunction( self.options.change ) ) {
if ( typeof self.options.change === 'function' ) {
self.options.change.call( this, event, ui );
}
},
@ -635,7 +614,7 @@
*
* @since 3.0.0
*/
self.toggler.click( function () {
self.toggler.on( 'click', function () {
if ( self.toggler.hasClass( 'wp-picker-open' ) ) {
self.close();
} else {
@ -653,7 +632,7 @@
*
* @return {void}
*/
el.change( function ( event ) {
el.on( 'change', function ( event ) {
var val = $( this ).val();
if (
@ -668,7 +647,7 @@
self.colorAlpha.css( 'background-color', '' );
// fire clear callback if we have one
if ( $.isFunction( self.options.clear ) ) {
if ( typeof self.options.clear === 'function' ) {
self.options.clear.call( this, event );
}
}
@ -683,7 +662,7 @@
*
* @return {void}
*/
self.button.click( function ( event ) {
self.button.on( 'click', function ( event ) {
if ( $( this ).hasClass( 'wp-picker-default' ) ) {
el.val( self.options.defaultColor ).change();
} else if ( $( this ).hasClass( 'wp-picker-clear' ) ) {
@ -695,7 +674,7 @@
self.colorAlpha.css( 'background-color', '' );
// fire clear callback if we have one
if ( $.isFunction( self.options.clear ) ) {
if ( typeof self.options.clear === 'function' ) {
self.options.clear.call( this, event );
}
@ -704,4 +683,4 @@
} );
},
} );
} )( jQuery );
} )( jQuery );

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,69 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'ACF_Admin_Options_Preview' ) ) :
class ACF_Admin_Options_Preview {
/**
* Constructor.
*
* @since 6.2.2
*/
public function __construct() {
add_action( 'admin_menu', array( $this, 'admin_menu' ), 10 );
}
/**
* Adds the Options Pages menu item to the admin menu.
*
* @since 6.2.2
*/
public function admin_menu() {
if ( ! acf_get_setting( 'show_admin' ) ) {
return;
}
$page = add_submenu_page( 'edit.php?post_type=acf-field-group', __( 'Options Pages', 'acf' ), __( 'Options Pages', 'acf' ), acf_get_setting( 'capability' ), 'acf_options_preview', array( $this, 'render' ) );
add_action( 'load-' . $page, array( $this, 'load' ) );
}
/**
* Load the body class and scripts.
*
* @since 6.2.2
*/
public function load() {
add_action( 'admin_body_class', array( $this, 'admin_body_class' ) );
acf_enqueue_scripts();
}
/**
* Modifies the admin body class.
*
* @since 6.2.2
*
* @param string $classes Space-separated list of CSS classes.
* @return string
*/
public function admin_body_class( $classes ) {
$classes .= ' acf-admin-page acf-internal-post-type acf-options-preview acf-no-options-pages';
return $classes;
}
/**
* The render for the options page preview view.
*
* @since 6.2.2
*/
public function render() {
$screen = get_current_screen();
$view = array( 'screen_id' => $screen->id );
acf_get_view( 'options-page-preview', $view );
}
}
new ACF_Admin_Options_Preview();
endif;

View File

@ -216,6 +216,8 @@ if ( ! class_exists( 'ACF_Admin' ) ) :
if ( isset( $screen->base ) && 'post' === $screen->base ) {
acf_get_view( 'global/form-top' );
}
do_action( 'acf/in_admin_header' );
}
/**

View File

@ -12,7 +12,7 @@ $acf_wpengine_logo_link = acf_add_url_utm_tags( 'https://wpengine.co
<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>
<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="_blank" href="<?php echo $acf_learn_more_link; ?>" class="acf-btn acf-pro-features-learn-more"><?php esc_html_e( 'Learn More', 'acf' ); ?> <i class="acf-icon acf-icon-arrow-up-right"></i></a>
<a target="_blank" href="<?php echo $acf_learn_more_link; ?>" class="acf-btn acf-btn-muted acf-pro-features-learn-more"><?php esc_html_e( 'Learn More', 'acf' ); ?> <i class="acf-icon acf-icon-arrow-up-right"></i></a>
<a target="_blank" href="<?php echo $acf_pricing_link; ?>" class="acf-btn acf-pro-features-upgrade"><?php esc_html_e( 'View Pricing & Upgrade', 'acf' ); ?> <i class="acf-icon acf-icon-arrow-up-right"></i></a>
</div>
</div>

View File

@ -7,6 +7,8 @@ $post_new_file = sprintf(
is_string( $post_type ) ? $post_type : 'acf-field-group'
);
$acf_is_options_page_preview = acf_request_arg( 'page' ) === 'acf_options_preview';
$page_title = false;
if ( isset( $acf_page_title ) ) {
$page_title = $acf_page_title;
@ -21,8 +23,18 @@ if ( $page_title ) {
<?php
echo esc_html( $page_title );
?>
<?php if ( $acf_is_options_page_preview ) { ?>
<div class="acf-pro-label">PRO</div>
<?php
}
?>
</h1>
<?php if ( $acf_is_options_page_preview ) { ?>
<a href="#" class="acf-btn acf-btn-sm disabled">
<i class="acf-icon acf-icon-plus"></i>
<?php esc_html_e( 'Add Options Page', 'acf' ); ?>
</a>
<?php } ?>
<?php
if ( ! empty( $post_type_object ) && current_user_can( $post_type_object->cap->create_posts ) ) {
echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="acf-btn acf-btn-sm"><i class="acf-icon acf-icon-plus"></i>' . esc_html( $post_type_object->labels->add_new ) . '</a>';

View File

@ -71,6 +71,10 @@ if ( isset( $submenu[ $parent_slug ] ) ) {
$acf_more_items[] = $menu_item;
} else {
// Third party tabs placed into the "More" menu.
if ( 'acf_options_preview' === $menu_item['class'] ) {
continue;
}
$more_items[] = $menu_item;
}
}
@ -78,9 +82,9 @@ if ( isset( $submenu[ $parent_slug ] ) ) {
if ( ! acf_get_setting( 'pro' ) ) {
$acf_more_items[] = array(
'url' => acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/pro/', 'more-menu', 'options-pages' ),
'url' => 'edit.php?post_type=acf-field-group&page=acf_options_preview',
'text' => __( 'Options Pages', 'acf' ) . '<span class="acf-requires-pro">' . __( 'PRO', 'acf' ) . '</span>',
'target' => '_blank',
'target' => '_self',
);
}
@ -224,6 +228,8 @@ if ( ! in_array( $screen->id, acf_get_internal_post_types(), true ) ) {
$acf_page_title = __( 'Tools', 'acf' );
} elseif ( $plugin_page == 'acf-settings-updates' ) {
$acf_page_title = __( 'Updates', 'acf' );
} elseif ( $plugin_page == 'acf_options_preview' && ! acf_is_pro() ) {
$acf_page_title = __( 'Options Pages', 'acf' );
}
acf_get_view( 'global/header' );
}

View File

@ -0,0 +1,39 @@
<?php
$acf_learn_more_link = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/pro/', 'ACF upgrade', 'no-options-pages' );
$acf_upgrade_button = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/pro/', 'ACF upgrade', 'no-options-pages-pricing', 'pricing-table' );
$acf_options_pages_desc = sprintf(
/* translators: %s URL to ACF options pages documentation */
__( 'ACF <a href="%s" target="_blank">options pages</a> are custom admin pages for managing global settings via fields. You can create multiple pages and sub-pages.', 'acf' ),
acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/options-page/', 'docs', 'no-options-pages' )
);
$acf_getting_started = sprintf(
/* translators: %s url to getting started guide */
__( 'New to ACF? Take a look at our <a href="%s" target="_blank">getting started guide</a>.', 'acf' ),
acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/getting-started-with-acf/', 'docs', 'no-options-pages' )
);
?>
<div class="wrap acf_options_preview_wrap">
<table class="wp-list-table widefat fixed striped">
<tbody id="the-list">
<tr class="no-items">
<td class="colspanchange" colspan="6">
<div class="acf-no-field-groups-wrapper">
<div class="acf-no-field-groups-inner acf-field-group-pro-features-content">
<img src="<?php echo acf_get_url( 'assets/images/empty-post-types.svg' ); ?>" />
<h2><?php echo acf_esc_html( 'Upgrade to ACF PRO to create options pages in just a few clicks', 'acf' ); ?></h2>
<p><?php echo acf_esc_html( $acf_options_pages_desc ); ?></p>
<div class="acf-field-group-pro-features-actions">
<a target="_blank" href="<?php echo $acf_learn_more_link; ?>" class="acf-btn acf-btn-muted"><?php esc_html_e( 'Learn More', 'acf' ); ?> <i class="acf-icon acf-icon-arrow-up-right"></i></a>
<a target="_blank" href="<?php echo $acf_upgrade_button; ?>" class="acf-btn acf-options-pages-preview-upgrade-button"> <?php esc_html_e( 'Upgrade to ACF PRO', 'acf' ); ?> <i class="acf-icon acf-icon-arrow-up-right"></i></a>
</div>
<p class="acf-small"><?php echo acf_esc_html( $acf_getting_started ); ?></p>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>

View File

@ -1,36 +1,25 @@
<?php
/*
* acf_is_array
*
* This function will return true for a non empty array
*
* @type function
* @date 6/07/2016
* @since 5.4.0
*
* @param $array (array)
* @return (boolean)
*/
/**
* This function will return true for a non empty array
*
* @since 5.4.0
*
* @param mixed $array The variable to test.
* @return boolean
*/
function acf_is_array( $array ) {
return ( is_array( $array ) && ! empty( $array ) );
}
/**
* acf_has_setting
* Alias of acf()->has_setting()
*
* alias of acf()->has_setting()
*
* @date 2/2/18
* @since 5.6.5
*
* @param n/a
* @return n/a
* @param string $name Name of the setting to check for.
* @return boolean
*/
function acf_has_setting( $name = '' ) {
return acf()->has_setting( $name );
}
@ -47,7 +36,6 @@ function acf_has_setting( $name = '' ) {
* @param n/a
* @return n/a
*/
function acf_raw_setting( $name = '' ) {
return acf()->get_setting( $name );
}
@ -66,13 +54,11 @@ function acf_raw_setting( $name = '' ) {
* @param $value (mixed)
* @return n/a
*/
function acf_update_setting( $name, $value ) {
// validate name
// validate name.
$name = acf_validate_setting( $name );
// update
// update.
return acf()->update_setting( $name, $value );
}
@ -88,39 +74,31 @@ function acf_update_setting( $name, $value ) {
* @param n/a
* @return n/a
*/
function acf_validate_setting( $name = '' ) {
return apply_filters( 'acf/validate_setting', $name );
}
/*
* acf_get_setting
*
* alias of acf()->get_setting()
*
* @type function
* @date 28/09/13
* @since 5.0.0
*
* @param n/a
* @return n/a
*/
/**
* Alias of acf()->get_setting()
*
* @since 5.0.0
*
* @param string $name The name of the setting to test.
* @param string $value An optional default value for the setting if it doesn't exist.
* @return n/a
*/
function acf_get_setting( $name, $value = null ) {
// validate name
$name = acf_validate_setting( $name );
// check settings
// replace default setting value if it exists.
if ( acf_has_setting( $name ) ) {
$value = acf_raw_setting( $name );
}
// filter
// filter.
$value = apply_filters( "acf/settings/{$name}", $value );
// return
return $value;
}
@ -203,11 +181,11 @@ function acf_set_data( $name, $value ) {
/**
* Appends data to an existing key.
*
* @date 11/06/2020
* @since 5.9.0
*
* @param string $name The data name.
* @return array $data The data array.
* @param string $name The data name.
* @param mixed $data The data to append to name.
* @return void
*/
function acf_append_data( $name, $data ) {
$prev_data = acf()->get_data( $name );
@ -217,23 +195,13 @@ function acf_append_data( $name, $data ) {
acf()->set_data( $name, $data );
}
/*
* acf_init
*
* alias of acf()->init()
*
* @type function
* @date 28/09/13
* @since 5.0.0
*
* @param n/a
* @return n/a
*/
/**
* Alias of acf()->init() - the core ACF init function.
*
* @since 5.0.0
*/
function acf_init() {
acf()->init();
}
@ -265,116 +233,87 @@ function acf_has_done( $name ) {
/*
* acf_get_external_path
*
* This function will return the path to a file within an external folder
*
* @type function
* @date 22/2/17
* @since 5.5.8
*
* @param $file (string)
* @param $path (string)
* @return (string)
*/
/**
* This function will return the path to a file within an external folder
*
* @since 5.5.8
*
* @param string $file Directory path.
* @param string $path Optional file path.
* @return string File path.
*/
function acf_get_external_path( $file, $path = '' ) {
return plugin_dir_path( $file ) . $path;
}
/*
* acf_get_external_dir
*
* This function will return the url to a file within an external folder
*
* @type function
* @date 22/2/17
* @since 5.5.8
*
* @param $file (string)
* @param $path (string)
* @return (string)
*/
function acf_get_external_dir( $file, $path = '' ) {
return acf_plugin_dir_url( $file ) . $path;
}
/**
* acf_plugin_dir_url
* This function will return the url to a file within an internal ACF folder
*
* @since 5.5.8
*
* @param string $file Directory path.
* @param string $path Optional file path.
* @return string File path.
*/
function acf_get_external_dir( $file, $path = '' ) {
return acf_plugin_dir_url( $file ) . $path;
}
/**
* This function will calculate the url to a plugin folder.
* Different to the WP plugin_dir_url(), this function can calculate for urls outside of the plugins folder (theme include).
*
* @date 13/12/17
* @since 5.6.8
*
* @param type $var Description. Default.
* @return type Description.
* @param string $file A file path inside the ACF plugin to get the plugin directory path from.
* @return string The plugin directory path.
*/
function acf_plugin_dir_url( $file ) {
// vars
$path = plugin_dir_path( $file );
$path = wp_normalize_path( $path );
// check plugins
// check plugins.
$check_path = wp_normalize_path( realpath( WP_PLUGIN_DIR ) );
if ( strpos( $path, $check_path ) === 0 ) {
return str_replace( $check_path, plugins_url(), $path );
}
// check wp-content
// check wp-content.
$check_path = wp_normalize_path( realpath( WP_CONTENT_DIR ) );
if ( strpos( $path, $check_path ) === 0 ) {
return str_replace( $check_path, content_url(), $path );
}
// check root
// check root.
$check_path = wp_normalize_path( realpath( ABSPATH ) );
if ( strpos( $path, $check_path ) === 0 ) {
return str_replace( $check_path, site_url( '/' ), $path );
}
// return
// return.
return plugin_dir_url( $file );
}
/*
* acf_parse_args
*
* This function will merge together 2 arrays and also convert any numeric values to ints
*
* @type function
* @date 18/10/13
* @since 5.0.0
*
* @param $args (array)
* @param $defaults (array)
* @return $args (array)
*/
/**
* This function will merge together 2 arrays and also convert any numeric values to ints
*
* @since 5.0.0
*
* @param array $args The configured arguments array.
* @param array $defaults The default properties for the passed args to inherit.
* @return array $args Parsed arguments with defaults applied.
*/
function acf_parse_args( $args, $defaults = array() ) {
// parse args
$args = wp_parse_args( $args, $defaults );
// parse types
$args = acf_parse_types( $args );
// return
return $args;
}
@ -494,89 +433,62 @@ function acf_merge_atts( $atts, $extra = array() ) {
}
}
// return
return $atts;
}
/*
* acf_nonce_input
*
* This function will create a basic nonce input
*
* @type function
* @date 24/5/17
* @since 5.6.0
*
* @param $post_id (int)
* @return $post_id (int)
*/
/**
* This function will create and echo a basic nonce input
*
* @since 5.6.0
*
* @param string $nonce The nonce parameter string.
* @return void
*/
function acf_nonce_input( $nonce = '' ) {
echo '<input type="hidden" name="_acf_nonce" value="' . wp_create_nonce( $nonce ) . '" />';
}
/*
* acf_extract_var
*
* This function will remove the var from the array, and return the var
*
* @type function
* @date 2/10/13
* @since 5.0.0
*
* @param $array (array)
* @param $key (string)
* @return (mixed)
*/
/**
* This function will remove the var from the array, and return the var
*
* @since 5.0.0
*
* @param array $extract_array an array passed as reference to be extracted.
* @param string $key The key to extract from the array.
* @param mixed $default_value The default value if it doesn't exist in the extract array.
* @return mixed Extracted var or default.
*/
function acf_extract_var( &$extract_array, $key, $default_value = null ) {
// check if exists - uses array_key_exists to extract NULL values (isset will fail).
if ( is_array( $extract_array ) && array_key_exists( $key, $extract_array ) ) {
function acf_extract_var( &$array, $key, $default = null ) {
// store and unset value.
$v = $extract_array[ $key ];
unset( $extract_array[ $key ] );
// check if exists
// - uses array_key_exists to extract NULL values (isset will fail)
if ( is_array( $array ) && array_key_exists( $key, $array ) ) {
// store value
$v = $array[ $key ];
// unset
unset( $array[ $key ] );
// return
return $v;
}
// return
return $default;
return $default_value;
}
/*
* acf_extract_vars
*
* This function will remove the vars from the array, and return the vars
*
* @type function
* @date 8/10/13
* @since 5.0.0
*
* @param $post_id (int)
* @return $post_id (int)
*/
function acf_extract_vars( &$array, $keys ) {
/**
* This function will remove the vars from the array, and return the vars
*
* @since 5.0.0
*
* @param array $extract_array an array passed as reference to be extracted.
* @param array $keys An array of keys to extract from the original array.
* @return array An array of extracted values.
*/
function acf_extract_vars( &$extract_array, $keys ) {
$r = array();
foreach ( $keys as $key ) {
$r[ $key ] = acf_extract_var( $array, $key );
$r[ $key ] = acf_extract_var( $extract_array, $key );
}
return $r;
@ -607,7 +519,6 @@ function acf_get_sub_array( $array, $keys ) {
}
return $r;
}
@ -681,7 +592,7 @@ function acf_get_pretty_post_types( $post_types = array() ) {
}
$ref[ $label ]++;
++$ref[ $label ];
}
// get slugs
@ -699,7 +610,6 @@ function acf_get_pretty_post_types( $post_types = array() ) {
// return
return $r;
}
/**
@ -753,7 +663,7 @@ function acf_get_pretty_post_statuses( $post_statuses = array() ) {
$ref[ $label ] = 0;
}
$ref[ $label ]++;
++$ref[ $label ];
}
foreach ( array_keys( $result ) as $i ) {
@ -796,7 +706,6 @@ function acf_get_post_type_label( $post_type ) {
// return
return $label;
}
@ -849,7 +758,6 @@ function acf_verify_nonce( $value ) {
// return
return true;
}
@ -949,7 +857,6 @@ function acf_get_image_sizes() {
// return
return $sizes;
}
function acf_get_image_size( $s = '' ) {
@ -968,7 +875,6 @@ function acf_get_image_size( $s = '' ) {
// return
return $data;
}
/**
@ -1021,7 +927,6 @@ function acf_get_full_version( $version = '1' ) {
// return
return $version;
}
@ -1118,7 +1023,6 @@ function acf_get_taxonomy_terms( $taxonomies = array() ) {
// return
return $r;
}
@ -1167,7 +1071,6 @@ function acf_decode_taxonomy_terms( $strings = false ) {
// return
return $terms;
}
@ -1245,7 +1148,6 @@ function acf_decode_taxonomy_term( $value ) {
// return
return $data;
}
/**
@ -1311,7 +1213,6 @@ function acf_get_array( $var = false, $delimiter = '' ) {
// place in array
return (array) $var;
}
@ -1354,7 +1255,6 @@ function acf_get_numeric( $value = '' ) {
// return
return $numbers;
}
@ -1426,7 +1326,6 @@ function acf_get_posts( $args = array() ) {
array_multisort( $order, $posts );
}
/**
* Filters the results found in the `acf_get_posts()` function.
*
@ -1483,7 +1382,6 @@ function _acf_query_remove_post_type( $sql ) {
// return
return $sql;
}
@ -1617,7 +1515,6 @@ function acf_get_grouped_posts( $args ) {
// return
return $data;
}
@ -1639,7 +1536,6 @@ function _acf_orderby_post_type( $ordeby, $wp_query ) {
// return
return $ordeby;
}
@ -1710,7 +1606,6 @@ function acf_get_post_title( $post = 0, $is_search = false ) {
// return
return $title;
}
@ -1744,7 +1639,7 @@ function acf_order_by_search( $array, $search ) {
// increase weight if match starts at begining of string
if ( $strpos == 0 ) {
$weight++;
++$weight;
}
}
@ -1804,7 +1699,6 @@ function acf_get_pretty_user_roles( $allowed = false ) {
// return
return $roles;
}
@ -1920,7 +1814,7 @@ function acf_get_grouped_users( $args = array() ) {
$user = acf_extract_var( $users, $key );
// increase
$i++;
++$i;
// bail early if too low
if ( $min && $i < $min ) {
@ -1949,7 +1843,6 @@ function acf_get_grouped_users( $args = array() ) {
// return
return $r;
}
/**
@ -2057,7 +1950,6 @@ function acf_debug() {
function acf_debug_start() {
acf_update_setting( 'debug_start', memory_get_usage() );
}
function acf_debug_end() {
@ -2066,7 +1958,6 @@ function acf_debug_end() {
$end = memory_get_usage();
return $end - $start;
}
@ -2120,7 +2011,6 @@ function acf_encode_choices( $array = array(), $show_keys = true ) {
// return
return $string;
}
function acf_decode_choices( $string = '', $array_keys = false ) {
@ -2184,7 +2074,6 @@ function acf_decode_choices( $string = '', $array_keys = false ) {
// return
return $array;
}
@ -2234,7 +2123,6 @@ function acf_str_replace( $string = '', $search_replace = array() ) {
// return
return $string;
}
@ -2350,7 +2238,6 @@ function acf_split_date_time( $date_time = '' ) {
// return
return $data;
}
@ -2375,7 +2262,6 @@ function acf_convert_date_to_php( $date = '' ) {
// return
return acf_str_replace( $date, $js_to_php );
}
/*
@ -2398,7 +2284,6 @@ function acf_convert_date_to_js( $date = '' ) {
// return
return acf_str_replace( $date, $php_to_js );
}
@ -2423,7 +2308,6 @@ function acf_convert_time_to_php( $time = '' ) {
// return
return acf_str_replace( $time, $js_to_php );
}
@ -2447,7 +2331,6 @@ function acf_convert_time_to_js( $time = '' ) {
// return
return acf_str_replace( $time, $php_to_js );
}
@ -2489,7 +2372,6 @@ function acf_update_user_setting( $name, $value ) {
// update user data
return update_metadata( 'user', $user_id, 'acf_user_settings', $settings );
}
@ -2524,7 +2406,6 @@ function acf_get_user_setting( $name = '', $default = false ) {
// return
return $settings[ $name ];
}
@ -2550,7 +2431,6 @@ function acf_in_array( $value = '', $array = false ) {
// find value in array
return in_array( $value, $array );
}
@ -2649,7 +2529,6 @@ function acf_get_valid_post_id( $post_id = 0 ) {
// return
return $post_id;
}
@ -2730,7 +2609,6 @@ function acf_get_post_id_info( $post_id = 0 ) {
// return
return $info;
}
@ -2784,7 +2662,6 @@ function acf_isset_termmeta( $taxonomy = '' ) {
// return
return true;
}
/**
@ -2849,7 +2726,6 @@ function acf_upload_files( $ancestors = array() ) {
// update $_POST
array_unshift( $ancestors, 'acf' );
acf_update_nested_array( $_POST, $ancestors, $attachment_id );
}
/*
@ -2910,7 +2786,6 @@ function acf_upload_file( $uploaded_file ) {
// return new ID
return $id;
}
@ -3012,19 +2887,16 @@ function acf_is_screen( $id = '' ) {
function acf_maybe_get( $array = array(), $key = 0, $default = null ) {
return isset( $array[ $key ] ) ? $array[ $key ] : $default;
}
function acf_maybe_get_POST( $key = '', $default = null ) {
return isset( $_POST[ $key ] ) ? acf_sanitize_request_args( $_POST[ $key ] ) : $default; // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing -- Checked elsewhere.
}
function acf_maybe_get_GET( $key = '', $default = null ) {
return isset( $_GET[ $key ] ) ? acf_sanitize_request_args( $_GET[ $key ] ) : $default; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Checked elsewhere.
}
/**
@ -3091,8 +2963,22 @@ function acf_get_attachment( $attachment ) {
// Append filesize data.
if ( isset( $meta['filesize'] ) ) {
$response['filesize'] = $meta['filesize'];
} elseif ( file_exists( $attached_file ) ) {
$response['filesize'] = filesize( $attached_file );
} else {
/**
* Allows shortcutting our ACF's `filesize` call to prevent us making filesystem calls.
* Mostly useful for third party plugins which may offload media to other services, and filesize calls will induce a remote download.
*
* @since 6.2.2
*
* @param int|null The default filesize.
* @param WP_Post $attachment The attachment post object we're looking for the filesize for.
*/
$shortcut_filesize = apply_filters( 'acf/filesize', null, $attachment );
if ( $shortcut_filesize ) {
$response['filesize'] = intval( $shortcut_filesize );
} elseif ( file_exists( $attached_file ) ) {
$response['filesize'] = filesize( $attached_file );
}
}
// Restrict the loading of image "sizes".
@ -3200,7 +3086,6 @@ function acf_current_user_can_admin() {
// return
return false;
}
@ -3250,7 +3135,6 @@ function acf_get_filesize( $size = 1 ) {
// return
return $bytes;
}
@ -3294,7 +3178,6 @@ function acf_format_filesize( $size = 1 ) {
// return
return $bytes . ' B';
}
@ -3341,7 +3224,6 @@ function acf_get_valid_terms( $terms = false, $taxonomy = 'category' ) {
// return
return $terms;
}
@ -3515,7 +3397,6 @@ function acf_validate_attachment( $attachment, $field, $context = 'prepare' ) {
// return
return $errors;
}
@ -3650,7 +3531,6 @@ function acf_translate( $string ) {
// vars
return __( $string, $textdomain );
}
@ -3681,7 +3561,6 @@ function acf_maybe_add_action( $tag, $function_to_add, $priority = 10, $accepted
add_action( $tag, $function_to_add, $priority, $accepted_args );
}
}
@ -3720,7 +3599,6 @@ function acf_is_row_collapsed( $field_key = '', $row_index = 0 ) {
// collapsed class
return in_array( $row_index, $collapsed );
}
@ -3750,7 +3628,6 @@ function acf_get_attachment_image( $attachment_id = 0, $size = 'thumbnail' ) {
// return
$value = '<img src="' . $url . '" alt="' . $alt . '" />';
}
@ -3823,7 +3700,6 @@ function acf_get_post_thumbnail( $post = null, $size = 'thumbnail' ) {
// return
return $data;
}
/**
@ -3899,7 +3775,6 @@ function acf_is_ajax( $action = '' ) {
// return
return $is_ajax;
}
@ -3941,7 +3816,6 @@ function acf_format_date( $value, $format ) {
// return
return date_i18n( $format, $unixtimestamp );
}
/**
@ -4032,7 +3906,6 @@ function acf_doing( $event = '', $context = '' ) {
acf_update_setting( 'doing', $event );
acf_update_setting( 'doing_context', $context );
}
@ -4071,7 +3944,6 @@ function acf_is_doing( $event = '', $context = '' ) {
// return
return $doing;
}
@ -4104,7 +3976,6 @@ function acf_is_plugin_active() {
// return
return is_plugin_active( $basename );
}
/*
@ -4141,7 +4012,7 @@ function acf_send_ajax_results( $response ) {
foreach ( $response['results'] as $result ) {
// parent
$total++;
++$total;
// children
if ( ! empty( $result['children'] ) ) {
@ -4161,7 +4032,6 @@ function acf_send_ajax_results( $response ) {
// return
wp_send_json( $response );
}
@ -4197,7 +4067,6 @@ function acf_is_sequential_array( $array ) {
// return
return true;
}
@ -4233,7 +4102,6 @@ function acf_is_associative_array( $array ) {
// return
return false;
}
@ -4267,7 +4135,6 @@ function acf_add_array_key_prefix( $array, $prefix ) {
// return
return $array2;
}
@ -4302,7 +4169,6 @@ function acf_remove_array_key_prefix( $array, $prefix ) {
// return
return $array2;
}
@ -4325,7 +4191,6 @@ function acf_strip_protocol( $url ) {
// strip the protical
return str_replace( array( 'http://', 'https://' ), '', $url );
}
@ -4426,7 +4291,6 @@ function acf_encrypt( $data = '' ) {
// The $iv is just as important as the key for decrypting, so save it with our encrypted data using a unique separator (::)
return base64_encode( $encrypted_data . '::' . $iv );
}
@ -4459,7 +4323,6 @@ function acf_decrypt( $data = '' ) {
// decrypt
return openssl_decrypt( $encrypted_data, 'aes-256-cbc', $key, 0, $iv );
}
/**
@ -4557,7 +4420,7 @@ function acf_convert_rules_to_groups( $rules, $anyorall = 'any' ) {
// use $anyorall to determine if a new group is needed
if ( $anyorall == 'any' ) {
$index++;
++$index;
}
}

View File

@ -124,7 +124,7 @@ function get_field_object( $selector, $post_id = false, $format_value = true, $l
* @date 4/08/2015
* @since 5.2.3
*
* @param $selector (mixed) identifyer of field. Can be an ID, key, name or post object
* @param $selector (mixed) identifier of field. Can be an ID, key, name or post object
* @param $post_id (mixed) the post_id of which the value is saved against
* @param $strict (boolean) if true, return a field only when a field key is found.
* @return $field (array)

View File

@ -852,13 +852,14 @@ if ( ! class_exists( 'ACF_Internal_Post_Type' ) ) {
return '';
}
$str_replace = array(
$str_replace = array(
' ' => "\t",
"'!!__(!!\'" => "__('",
"'!!__(!!\'" => "__( '",
"!!\', !!\'" => "', '",
"!!\')!!'" => "')",
"!!\')!!'" => "' )",
'array (' => 'array(',
);
$preg_replace = array(
'/([\t\r\n]+?)array/' => 'array',
'/[0-9]+ => array/' => 'array',

View File

@ -32,7 +32,6 @@ if ( ! class_exists( 'acf_field_color_picker' ) ) :
'enable_opacity' => false,
'return_format' => 'string', // 'string'|'array'
);
}
@ -116,10 +115,9 @@ if ( ! class_exists( 'acf_field_color_picker' ) ) :
*/
function render_field( $field ) {
// vars
$text_input = acf_get_sub_array( $field, array( 'id', 'class', 'name', 'value' ) );
$hidden_input = acf_get_sub_array( $field, array( 'name', 'value' ) );
$text_input = acf_get_sub_array( $field, array( 'id', 'class', 'name', 'value' ) );
$hidden_input = acf_get_sub_array( $field, array( 'name', 'value' ) );
$text_input['data-alpha-skip-debounce'] = true;
// Color picker alpha library requires a specific data attribute to exist.
if ( $field['enable_opacity'] ) {
@ -190,7 +188,6 @@ if ( ! class_exists( 'acf_field_color_picker' ) ) :
),
)
);
}
/**
@ -287,7 +284,6 @@ if ( ! class_exists( 'acf_field_color_picker' ) ) :
'alpha' => (float) 0,
);
}
}
// initialize

View File

@ -287,7 +287,7 @@ if ( ! class_exists( 'acf_field_select' ) ) :
'data-allow_null' => $field['allow_null'],
);
if ( $field['aria-label'] ) {
if ( ! empty( $field['aria-label'] ) ) {
$select['aria-label'] = $field['aria-label'];
}

View File

@ -340,13 +340,13 @@ if ( ! class_exists( 'ACF_Post_Type' ) ) {
$post_id = (int) acf_sanitize_request_args( $_POST['post_id'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Verified elsewhere.
$matches = array_filter(
$store->get_data(),
function( $item ) use ( $post_type_key ) {
function ( $item ) use ( $post_type_key ) {
return $item['post_type'] === $post_type_key && empty( $item['not_registered'] );
}
);
$duplicates = array_filter(
$matches,
function( $item ) use ( $post_id ) {
function ( $item ) use ( $post_id ) {
return $item['ID'] !== $post_id;
}
);
@ -377,17 +377,19 @@ if ( ! class_exists( 'ACF_Post_Type' ) ) {
*
* @since 6.1
*
* @param array $post The main ACF post type settings array.
* @param array $post The main ACF post type settings array.
* @param boolean $escape_labels Determines if the label values should be escaped.
* @return array
*/
public function get_post_type_args( $post ) {
public function get_post_type_args( $post, $escape_labels = true ) {
$args = array();
// Make sure any provided labels are escaped strings and not empty.
$labels = array_filter( $post['labels'] );
$labels = array_map( 'strval', $labels );
$labels = array_map( 'esc_html', $labels );
if ( $escape_labels ) {
$labels = array_map( 'esc_html', $labels );
}
if ( ! empty( $labels ) ) {
$args['labels'] = $labels;
}
@ -620,7 +622,7 @@ if ( ! class_exists( 'ACF_Post_Type' ) ) {
// Validate and prepare the post for export.
$post = $this->validate_post( $post );
$args = $this->get_post_type_args( $post );
$args = $this->get_post_type_args( $post, false );
$code = var_export( $args, true ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions -- Used for PHP export.
if ( ! $code ) {

View File

@ -300,17 +300,19 @@ if ( ! class_exists( 'ACF_Taxonomy' ) ) {
*
* @since 6.1
*
* @param array $post The main ACF taxonomy settings array.
* @param array $post The main ACF taxonomy settings array.
* @param boolean $escape_labels Determines if the label values should be escaped.
* @return array
*/
public function get_taxonomy_args( $post ) {
public function get_taxonomy_args( $post, $escape_labels = true ) {
$args = array();
// Make sure any provided labels are escaped strings and not empty.
$labels = array_filter( $post['labels'] );
$labels = array_map( 'strval', $labels );
$labels = array_map( 'esc_html', $labels );
if ( $escape_labels ) {
$labels = array_map( 'esc_html', $labels );
}
if ( ! empty( $labels ) ) {
$args['labels'] = $labels;
}
@ -517,7 +519,7 @@ if ( ! class_exists( 'ACF_Taxonomy' ) ) {
$taxonomy_key = $post['taxonomy'];
$objects = (array) $post['object_type'];
$objects = var_export( $objects, true ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions -- Used for PHP export.
$args = $this->get_taxonomy_args( $post );
$args = $this->get_taxonomy_args( $post, false );
$args = var_export( $args, true ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions -- Used for PHP export.
if ( ! $args ) {

View File

@ -244,7 +244,6 @@ if ( ! class_exists( 'ACF_Updates' ) ) :
*/
function get_plugin_updates( $force_check = false ) {
// var
$transient_name = 'acf_plugin_updates';
@ -301,6 +300,11 @@ if ( ! class_exists( 'ACF_Updates' ) ) :
// append checked reference
if ( is_array( $response ) ) {
$response['checked'] = $checked;
if ( isset( $response['license_status'] ) && function_exists( 'acf_pro_update_license_status' ) ) {
acf_pro_update_license_status( $response['license_status'] );
unset( $response['license_status'] );
}
}
// allow json to include expiration but force minimum and max for safety

Binary file not shown.

View File

@ -12,7 +12,7 @@
# This file is distributed under the same license as Advanced Custom Fields.
msgid ""
msgstr ""
"PO-Revision-Date: 2023-09-07T15:02:44+00:00\n"
"PO-Revision-Date: 2023-10-25T08:59:42+00:00\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"Language: ar\n"
"MIME-Version: 1.0\n"

Binary file not shown.

View File

@ -12,7 +12,7 @@
# This file is distributed under the same license as Advanced Custom Fields.
msgid ""
msgstr ""
"PO-Revision-Date: 2023-09-07T15:02:44+00:00\n"
"PO-Revision-Date: 2023-10-25T08:59:42+00:00\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"Language: bg_BG\n"
"MIME-Version: 1.0\n"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -12,7 +12,7 @@
# This file is distributed under the same license as Advanced Custom Fields.
msgid ""
msgstr ""
"PO-Revision-Date: 2023-09-07T15:02:44+00:00\n"
"PO-Revision-Date: 2023-10-25T08:59:42+00:00\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"Language: de_CH\n"
"MIME-Version: 1.0\n"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -12,7 +12,7 @@
# This file is distributed under the same license as Advanced Custom Fields.
msgid ""
msgstr ""
"PO-Revision-Date: 2023-09-07T15:02:44+00:00\n"
"PO-Revision-Date: 2023-10-25T08:59:42+00:00\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"Language: fi\n"
"MIME-Version: 1.0\n"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -12,7 +12,7 @@
# This file is distributed under the same license as Advanced Custom Fields.
msgid ""
msgstr ""
"PO-Revision-Date: 2023-09-07T15:02:44+00:00\n"
"PO-Revision-Date: 2023-10-25T08:59:42+00:00\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"Language: he_IL\n"
"MIME-Version: 1.0\n"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -12,7 +12,7 @@
# This file is distributed under the same license as Advanced Custom Fields.
msgid ""
msgstr ""
"PO-Revision-Date: 2023-09-07T15:02:44+00:00\n"
"PO-Revision-Date: 2023-10-25T08:59:42+00:00\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"Language: hu_HU\n"
"MIME-Version: 1.0\n"

Binary file not shown.

View File

@ -12,7 +12,7 @@
# This file is distributed under the same license as Advanced Custom Fields.
msgid ""
msgstr ""
"PO-Revision-Date: 2023-09-07T15:02:44+00:00\n"
"PO-Revision-Date: 2023-10-25T08:59:42+00:00\n"
"Report-Msgid-Bugs-To: http://support.advancedcustomfields.com\n"
"Language: id_ID\n"
"MIME-Version: 1.0\n"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More