This commit is contained in:
Toby Inkster 2021-08-13 12:49:20 +01:00
parent 0ae843eb59
commit 648f759e03
54 changed files with 8256 additions and 338 deletions

View File

@ -3,8 +3,8 @@
Plugin Name: Advanced Custom Fields PRO
Plugin URI: https://www.advancedcustomfields.com
Description: Customize WordPress with powerful, professional and intuitive fields.
Version: 5.9.6
Author: Elliot Condon
Version: 5.9.9
Author: Delicious Brains
Author URI: https://www.advancedcustomfields.com
Text Domain: acf
Domain Path: /lang
@ -17,7 +17,7 @@ if( ! class_exists('ACF') ) :
class ACF {
/** @var string The plugin version number. */
var $version = '5.9.6';
var $version = '5.9.9';
/** @var array The plugin settings array. */
var $settings = array();

View File

@ -0,0 +1,316 @@
/*--------------------------------------------------------------------------------------------
*
* Dark mode
*
* WordPress plugin: https://en-au.wordpress.org/plugins/dark-mode/
* Github Documentation: https://github.com/danieltj27/Dark-Mode/wiki/Help:-Plugin-Compatibility-Guide
*
*--------------------------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------------------------
*
* Global
*
*---------------------------------------------------------------------------------------------*/
.acf-box {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
.acf-box .title,
.acf-box .footer {
border-color: #23282d;
}
.acf-box h2 {
color: #bbc8d4;
}
.acf-box table, .acf-box tbody, .acf-box tr {
background: transparent !important;
}
.acf-thead {
color: #bbc8d4;
border-color: #191f25;
}
.acf-tfoot {
background-color: #2d3136;
border-color: #23282d;
}
.acf-table.-clear,
.acf-table.-clear tr {
background: transparent !important;
}
.acf-loading-overlay {
background: rgba(0, 0, 0, 0.5);
}
/*---------------------------------------------------------------------------------------------
*
* Fields
*
*---------------------------------------------------------------------------------------------*/
.acf-fields > .acf-field {
border-color: #23282d;
}
.acf-fields.-left > .acf-field:before {
background: rgba(0, 0, 0, 0.1);
border-color: #23282d;
}
.acf-fields.-border {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
.acf-field[data-width] + .acf-field[data-width] {
border-color: #23282d;
}
.acf-input-prepend,
.acf-input-append {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
.acf-fields > .acf-tab-wrap {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
.acf-fields > .acf-tab-wrap .acf-tab-group {
background-color: #2d3136;
border-color: #23282d;
}
.acf-fields > .acf-tab-wrap .acf-tab-group li a {
background-color: #2d3136;
border-color: #23282d;
}
.acf-fields > .acf-tab-wrap .acf-tab-group li a:hover {
background-color: #2d3136;
border-color: #23282d;
color: #bbc8d4;
}
.acf-fields > .acf-tab-wrap .acf-tab-group li.active a {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
.acf-fields.-sidebar:before {
background-color: #2d3136;
border-color: #23282d;
}
.acf-fields.-sidebar.-left:before {
background-color: #2d3136;
border-color: #23282d;
background: #23282d;
}
.acf-fields.-sidebar.-left > .acf-tab-wrap.-left .acf-tab-group li a {
background-color: #2d3136;
border-color: #23282d;
}
.acf-fields.-sidebar.-left > .acf-tab-wrap.-left .acf-tab-group li.active a {
background-color: #2d3136;
border-color: #23282d;
}
.acf-file-uploader .show-if-value {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
.acf-file-uploader .show-if-value .file-icon {
background-color: #2d3136;
border-color: #23282d;
}
.acf-oembed {
background-color: #2d3136;
border-color: #23282d;
}
.acf-oembed .title {
background-color: #50626f;
border-color: #191f25;
color: #fff;
}
.acf-gallery {
background-color: #2d3136;
border-color: #23282d;
}
.acf-gallery .acf-gallery-main {
background: #23282d;
}
.acf-gallery .acf-gallery-attachment .margin {
background-color: #2d3136;
border-color: #23282d;
}
.acf-gallery .acf-gallery-side {
background-color: #2d3136;
border-color: #23282d;
}
.acf-gallery .acf-gallery-side .acf-gallery-side-info {
background-color: #2d3136;
border-color: #23282d;
}
.acf-gallery .acf-gallery-toolbar {
background-color: #2d3136;
border-color: #23282d;
}
.acf-button-group label:not(.selected) {
background-color: #2d3136;
border-color: #23282d;
}
.acf-switch:not(.-on) {
background-color: #2d3136;
border-color: #23282d;
}
.acf-switch:not(.-on) .acf-switch-slider {
background-color: #50626f;
border-color: #191f25;
color: #fff;
}
.acf-link .link-wrap {
background-color: #2d3136;
border-color: #23282d;
}
.acf-relationship .filters {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
.acf-relationship .selection {
background-color: #2d3136;
border-color: #23282d;
}
.acf-relationship .selection .choices,
.acf-relationship .selection .choices-list,
.acf-relationship .selection .values {
background-color: #2d3136;
border-color: #23282d;
}
.acf-taxonomy-field .categorychecklist-holder {
background-color: #2d3136;
border-color: #23282d;
}
.acf-google-map {
background-color: #2d3136;
border-color: #23282d;
}
.acf-google-map .title {
background-color: #50626f;
border-color: #191f25;
color: #fff;
}
.acf-accordion {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
.acf-field.acf-accordion .acf-accordion-content > .acf-fields {
border-color: #191f25;
}
.acf-flexible-content .layout {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
.acf-flexible-content .layout .acf-fc-layout-handle {
background-color: #2d3136;
border-color: #23282d;
}
.acf-flexible-content .layout .acf-fc-layout-handle .acf-fc-layout-order {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
#wpbody .acf-table {
background-color: #2d3136;
border-color: #23282d;
}
#wpbody .acf-table > tbody > tr,
#wpbody .acf-table > thead > tr {
background: transparent;
}
#wpbody .acf-table > tbody > tr > td,
#wpbody .acf-table > tbody > tr > th,
#wpbody .acf-table > thead > tr > td,
#wpbody .acf-table > thead > tr > th {
border-color: #191f25;
}
.acf-field select optgroup, .acf-field select optgroup:nth-child(2n) {
background: #50626f;
}
/*---------------------------------------------------------------------------------------------
*
* Field Group
*
*---------------------------------------------------------------------------------------------*/
#acf-field-group-fields .acf-field-list-wrap {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
#acf-field-group-fields .acf-field-list .no-fields-message {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
}
#acf-field-group-fields .acf-field-object {
background-color: #32373c;
border-color: #191f25;
color: #bbc8d4;
border-color: #23282d;
}
#acf-field-group-fields .acf-field-object table, #acf-field-group-fields .acf-field-object tbody, #acf-field-group-fields .acf-field-object tr, #acf-field-group-fields .acf-field-object td, #acf-field-group-fields .acf-field-object th {
background: transparent;
border-color: #23282d;
}
#acf-field-group-fields .acf-field-object .acf-field .acf-label {
background-color: #2d3136;
border-color: #23282d;
}
#acf-field-group-fields .acf-field-object.ui-sortable-helper {
border-color: #191f25;
box-shadow: none;
}
#acf-field-group-fields .acf-field-object.ui-sortable-placeholder {
background-color: #2d3136;
border-color: #23282d;
box-shadow: none;
}
#acf-field-group-fields .acf-field-object + .acf-field-object-tab::before,
#acf-field-group-fields .acf-field-object + .acf-field-object-accordion::before {
background-color: #2d3136;
border-color: #23282d;
}
/*---------------------------------------------------------------------------------------------
*
* Admin: Tools
*
*---------------------------------------------------------------------------------------------*/
.acf-meta-box-wrap .acf-fields {
background-color: #50626f;
border-color: #191f25;
color: #fff;
background: transparent;
}

1
assets/build/css/acf-dark.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,481 @@
/*--------------------------------------------------------------------------------------------
*
* Vars
*
*--------------------------------------------------------------------------------------------*/
/* colors */
/* acf-field */
/* responsive */
/*--------------------------------------------------------------------------------------------
*
* Mixins
*
*--------------------------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------
*
* Field Group
*
*--------------------------------------------------------------------------------------------*/
#acf-field-group-fields > .inside,
#acf-field-group-locations > .inside,
#acf-field-group-options > .inside {
padding: 0;
margin: 0;
}
.postbox .handle-order-higher,
.postbox .handle-order-lower {
display: none;
}
/*---------------------------------------------------------------------------------------------
*
* Postbox: Publish
*
*---------------------------------------------------------------------------------------------*/
#minor-publishing-actions,
#misc-publishing-actions #visibility,
#misc-publishing-actions .edit-timestamp {
display: none;
}
#minor-publishing {
border-bottom: 0 none;
}
#misc-pub-section {
border-bottom: 0 none;
}
#misc-publishing-actions .misc-pub-section {
border-bottom-color: #F5F5F5;
}
/*---------------------------------------------------------------------------------------------
*
* Postbox: Fields
*
*---------------------------------------------------------------------------------------------*/
#acf-field-group-fields {
border: 0 none;
box-shadow: none;
/* links */
/* table header */
/* show keys */
/* fields */
}
#acf-field-group-fields > .postbox-header,
#acf-field-group-fields > .handlediv,
#acf-field-group-fields > .hndle {
display: none;
}
#acf-field-group-fields a {
text-decoration: none;
}
#acf-field-group-fields a:active, #acf-field-group-fields a:focus {
outline: none;
box-shadow: none;
}
#acf-field-group-fields .li-field-order {
width: 20%;
}
#acf-field-group-fields .li-field-label {
width: 30%;
}
#acf-field-group-fields .li-field-name {
width: 25%;
}
#acf-field-group-fields .li-field-type {
width: 25%;
}
#acf-field-group-fields .li-field-key {
display: none;
}
#acf-field-group-fields.show-field-keys .li-field-label,
#acf-field-group-fields.show-field-keys .li-field-name,
#acf-field-group-fields.show-field-keys .li-field-type,
#acf-field-group-fields.show-field-keys .li-field-key {
width: 20%;
}
#acf-field-group-fields.show-field-keys .li-field-key {
display: block;
}
#acf-field-group-fields .acf-field-list-wrap {
border: #ccd0d4 solid 1px;
}
#acf-field-group-fields .acf-field-list {
background: #f5f5f5;
margin-top: -1px;
/* no fields */
/* empty */
}
#acf-field-group-fields .acf-field-list .no-fields-message {
padding: 15px 15px;
background: #fff;
display: none;
}
#acf-field-group-fields .acf-field-list.-empty .no-fields-message {
display: block;
}
.acf-admin-3-8 #acf-field-group-fields .acf-field-list-wrap {
border-color: #dfdfdf;
}
/* field object */
.acf-field-object {
border-top: #eeeeee solid 1px;
background: #fff;
/* sortable */
/* meta */
/* handle */
/* open */
/*
// debug
&[data-save="meta"] {
> .handle {
border-left: #ffb700 solid 5px !important;
}
}
&[data-save="settings"] {
> .handle {
border-left: #0ec563 solid 5px !important;
}
}
*/
/* hover */
/* settings */
/* conditional logic */
}
.acf-field-object.ui-sortable-helper {
border-top-color: #fff;
box-shadow: 0 0 0 1px #DFDFDF, 0 1px 4px rgba(0, 0, 0, 0.1);
}
.acf-field-object.ui-sortable-placeholder {
box-shadow: 0 -1px 0 0 #DFDFDF;
visibility: visible !important;
background: #F9F9F9;
border-top-color: transparent;
min-height: 54px;
}
.acf-field-object.ui-sortable-placeholder:after, .acf-field-object.ui-sortable-placeholder:before {
visibility: hidden;
}
.acf-field-object > .meta {
display: none;
}
.acf-field-object > .handle a {
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
transition: none;
}
.acf-field-object > .handle li {
padding-top: 10px;
padding-bottom: 10px;
word-wrap: break-word;
}
.acf-field-object > .handle .acf-icon {
margin: 1px 0 0;
cursor: move;
background: transparent;
float: left;
height: 28px;
line-height: 26px;
width: 28px;
font-size: 13px;
color: #444;
position: relative;
z-index: 1;
}
.acf-field-object > .handle strong {
display: block;
padding-bottom: 6px;
font-size: 14px;
line-height: 14px;
min-height: 14px;
}
.acf-field-object > .handle .row-options {
visibility: hidden;
}
.acf-field-object > .handle .row-options a {
margin-right: 4px;
}
.acf-field-object > .handle .row-options a.delete-field {
color: #a00;
}
.acf-field-object > .handle .row-options a.delete-field:hover {
color: #f00;
}
.acf-field-object.open + .acf-field-object {
border-top-color: #E1E1E1;
}
.acf-field-object.open > .handle {
background: #2a9bd9;
border: #2696d3 solid 1px;
text-shadow: #268FBB 0 1px 0;
color: #fff;
position: relative;
margin: -1px -1px 0 -1px;
}
.acf-field-object.open > .handle a {
color: #fff !important;
}
.acf-field-object.open > .handle a:hover {
text-decoration: underline !important;
}
.acf-field-object.open > .handle .acf-icon {
border-color: #fff;
color: #fff;
}
.acf-field-object.open > .handle .acf-required {
color: #fff;
}
.acf-field-object:hover > .handle .row-options, .acf-field-object.-hover > .handle .row-options {
visibility: visible;
}
.acf-field-object > .settings {
display: none;
width: 100%;
}
.acf-field-object > .settings > .acf-table {
border: none;
}
.acf-field-object .rule-groups {
margin-top: 20px;
}
/*---------------------------------------------------------------------------------------------
*
* Postbox: Locations
*
*---------------------------------------------------------------------------------------------*/
.rule-groups h4 {
margin: 3px 0;
}
.rule-groups .rule-group {
margin: 0 0 5px;
/* Don't allow user to delete the first field group */
}
.rule-groups .rule-group h4 {
margin: 0 0 3px;
}
.rule-groups .rule-group td.param {
width: 35%;
}
.rule-groups .rule-group td.operator {
width: 20%;
}
.rule-groups .rule-group td.add {
width: 40px;
}
.rule-groups .rule-group td.remove {
width: 28px;
vertical-align: middle;
}
.rule-groups .rule-group td.remove a {
visibility: hidden;
}
.rule-groups .rule-group tr:hover td.remove a {
visibility: visible;
}
.rule-groups .rule-group:first-child tr:first-child td.remove a {
visibility: hidden !important;
}
.rule-groups .rule-group select:empty {
background: #f8f8f8;
}
/*---------------------------------------------------------------------------------------------
*
* Options
*
*---------------------------------------------------------------------------------------------*/
#acf-field-group-options tr[data-name=hide_on_screen] li {
float: left;
width: 33%;
}
@media (max-width: 1100px) {
#acf-field-group-options tr[data-name=hide_on_screen] li {
width: 50%;
}
}
/*---------------------------------------------------------------------------------------------
*
* Conditional Logic
*
*---------------------------------------------------------------------------------------------*/
table.conditional-logic-rules {
background: transparent;
border: 0 none;
border-radius: 0;
}
table.conditional-logic-rules tbody td {
background: transparent;
border: 0 none !important;
padding: 5px 2px !important;
}
/*---------------------------------------------------------------------------------------------
*
* Field: Tab
*
*---------------------------------------------------------------------------------------------*/
.acf-field-object-tab .acf-field-setting-name, .acf-field-object-accordion .acf-field-setting-name,
.acf-field-object-tab .acf-field-setting-instructions,
.acf-field-object-accordion .acf-field-setting-instructions,
.acf-field-object-tab .acf-field-setting-required,
.acf-field-object-accordion .acf-field-setting-required,
.acf-field-object-tab .acf-field-setting-warning,
.acf-field-object-accordion .acf-field-setting-warning,
.acf-field-object-tab .acf-field-setting-wrapper,
.acf-field-object-accordion .acf-field-setting-wrapper {
display: none;
}
.acf-field-object-tab .li-field-name, .acf-field-object-accordion .li-field-name {
visibility: hidden;
}
.acf-field-object + .acf-field-object-tab:before, .acf-field-object + .acf-field-object-accordion:before {
display: block;
content: "";
height: 5px;
width: 100%;
background: #f5f5f5;
border-top: #e1e1e1 solid 1px;
border-bottom: #e1e1e1 solid 1px;
margin-top: -1px;
}
.acf-admin-3-8 .acf-field-object + .acf-field-object-tab:before, .acf-admin-3-8 .acf-field-object + .acf-field-object-accordion:before {
border-color: #E5E5E5;
}
.acf-field-object-tab p:first-child, .acf-field-object-accordion p:first-child {
margin: 0.5em 0;
}
/*---------------------------------------------------------------------------------------------
*
* Field: Accordion
*
*---------------------------------------------------------------------------------------------*/
.acf-field-object-accordion .acf-field-setting-instructions {
display: table-row;
}
/*---------------------------------------------------------------------------------------------
*
* Field: Message
*
*---------------------------------------------------------------------------------------------*/
.acf-field-object-message tr[data-name=name],
.acf-field-object-message tr[data-name=instructions],
.acf-field-object-message tr[data-name=required] {
display: none !important;
}
.acf-field-object-message .li-field-name {
visibility: hidden;
}
.acf-field-object-message textarea {
height: 175px !important;
}
/*---------------------------------------------------------------------------------------------
*
* Field: Separator
*
*---------------------------------------------------------------------------------------------*/
.acf-field-object-separator tr[data-name=name],
.acf-field-object-separator tr[data-name=instructions],
.acf-field-object-separator tr[data-name=required] {
display: none !important;
}
/*---------------------------------------------------------------------------------------------
*
* Field: Date Picker
*
*---------------------------------------------------------------------------------------------*/
.acf-field-object-date-picker .acf-radio-list li,
.acf-field-object-time-picker .acf-radio-list li,
.acf-field-object-date-time-picker .acf-radio-list li {
line-height: 25px;
}
.acf-field-object-date-picker .acf-radio-list span,
.acf-field-object-time-picker .acf-radio-list span,
.acf-field-object-date-time-picker .acf-radio-list span {
display: inline-block;
min-width: 10em;
}
.acf-field-object-date-picker .acf-radio-list input[type=text],
.acf-field-object-time-picker .acf-radio-list input[type=text],
.acf-field-object-date-time-picker .acf-radio-list input[type=text] {
width: 100px;
}
.acf-field-object-date-time-picker .acf-radio-list span {
min-width: 15em;
}
.acf-field-object-date-time-picker .acf-radio-list input[type=text] {
width: 200px;
}
/*--------------------------------------------------------------------------------------------
*
* Slug
*
*--------------------------------------------------------------------------------------------*/
#slugdiv .inside {
padding: 12px;
margin: 0;
}
#slugdiv input[type=text] {
width: 100%;
height: 28px;
font-size: 14px;
}
/*--------------------------------------------------------------------------------------------
*
* RTL
*
*--------------------------------------------------------------------------------------------*/
html[dir=rtl] .acf-field-object.open > .handle {
margin: -1px -1px 0;
}
html[dir=rtl] .acf-field-object.open > .handle .acf-icon {
float: right;
}
html[dir=rtl] .acf-field-object.open > .handle .li-field-order {
padding-left: 0 !important;
padding-right: 15px !important;
}
/*---------------------------------------------------------------------------------------------
*
* Device
*
*---------------------------------------------------------------------------------------------*/
@media only screen and (max-width: 850px) {
tr.acf-field,
td.acf-label,
td.acf-input {
display: block !important;
width: auto !important;
border: 0 none !important;
}
tr.acf-field {
border-top: #ededed solid 1px !important;
margin-bottom: 0 !important;
}
td.acf-label {
background: transparent !important;
padding-bottom: 0 !important;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

1
assets/build/css/acf-global.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

1
assets/build/css/acf-input.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,67 @@
/*--------------------------------------------------------------------------------------------
*
* Vars
*
*--------------------------------------------------------------------------------------------*/
/* colors */
/* acf-field */
/* responsive */
/*--------------------------------------------------------------------------------------------
*
* Mixins
*
*--------------------------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------------------------
*
* Flexible Content
*
*---------------------------------------------------------------------------------------------*/
.acf-field-setting-fc_layout .acf-fc-meta {
margin: 0 0 10px;
padding: 0;
}
.acf-field-setting-fc_layout .acf-fc-meta li {
margin: 0 0 10px;
padding: 0;
}
.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-display,
.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-min {
float: left;
width: 33%;
padding-right: 10px;
}
.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-label .acf-input-prepend,
.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-name .acf-input-prepend,
.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-display .acf-input-prepend {
min-width: 60px;
}
.acf-field-setting-fc_layout .acf-fl-actions {
visibility: hidden;
}
.acf-field-setting-fc_layout .acf-fl-actions .reorder-layout {
cursor: move;
}
.acf-field-setting-fc_layout .acf-fl-actions a {
padding: 1px 0;
font-size: 13px;
line-height: 20px;
}
.acf-field-setting-fc_layout:hover .acf-fl-actions, .acf-field-setting-fc_layout.-hover .acf-fl-actions {
visibility: visible;
}
/*---------------------------------------------------------------------------------------------
*
* Clone
*
*---------------------------------------------------------------------------------------------*/
.acf-field-object-clone {
/* group */
/* seamless */
}
.acf-field-object-clone[data-display=seamless] .acf-field-setting-instructions,
.acf-field-object-clone[data-display=seamless] .acf-field-setting-layout,
.acf-field-object-clone[data-display=seamless] .acf-field-setting-wrapper,
.acf-field-object-clone[data-display=seamless] .acf-field-setting-conditional_logic {
display: none;
}

View File

@ -0,0 +1 @@
.acf-field-setting-fc_layout .acf-fc-meta{margin:0 0 10px;padding:0}.acf-field-setting-fc_layout .acf-fc-meta li{margin:0 0 10px;padding:0}.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-display,.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-min{float:left;width:33%;padding-right:10px}.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-display .acf-input-prepend,.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-label .acf-input-prepend,.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-name .acf-input-prepend{min-width:60px}.acf-field-setting-fc_layout .acf-fl-actions{visibility:hidden}.acf-field-setting-fc_layout .acf-fl-actions .reorder-layout{cursor:move}.acf-field-setting-fc_layout .acf-fl-actions a{padding:1px 0;font-size:13px;line-height:20px}.acf-field-setting-fc_layout.-hover .acf-fl-actions,.acf-field-setting-fc_layout:hover .acf-fl-actions{visibility:visible}.acf-field-object-clone[data-display=seamless] .acf-field-setting-conditional_logic,.acf-field-object-clone[data-display=seamless] .acf-field-setting-instructions,.acf-field-object-clone[data-display=seamless] .acf-field-setting-layout,.acf-field-object-clone[data-display=seamless] .acf-field-setting-wrapper{display:none}

View File

@ -0,0 +1,683 @@
/*--------------------------------------------------------------------------------------------
*
* Vars
*
*--------------------------------------------------------------------------------------------*/
/* colors */
/* acf-field */
/* responsive */
/*--------------------------------------------------------------------------------------------
*
* Mixins
*
*--------------------------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------------------------
*
* Repeater
*
*---------------------------------------------------------------------------------------------*/
.acf-repeater {
/* table */
/* row handle (add/remove) */
/* add in spacer to th (force correct width) */
/* row */
/* sortable */
/* layouts */
/*
&.-row > table > tbody > tr:before,
&.-block > table > tbody > tr:before {
content: "";
display: table-row;
height: 2px;
background: #f00;
}
*/
/* empty */
/* collapsed */
/* collapsed (block layout) */
/* collapsed (table layout) */
}
.acf-repeater > table {
margin: 0 0 8px;
background: #F9F9F9;
}
.acf-repeater .acf-row-handle {
width: 16px;
text-align: center !important;
vertical-align: middle !important;
position: relative;
/* icons */
/* .order */
/* remove */
}
.acf-repeater .acf-row-handle .acf-icon {
display: none;
position: absolute;
top: 0;
margin: -8px 0 0 -2px;
/* minus icon */
}
.acf-repeater .acf-row-handle .acf-icon.-minus {
top: 50%;
/* ie fix */
}
body.browser-msie .acf-repeater .acf-row-handle .acf-icon.-minus {
top: 25px;
}
.acf-repeater .acf-row-handle.order {
background: #f4f4f4;
cursor: move;
color: #aaa;
text-shadow: #fff 0 1px 0;
}
.acf-repeater .acf-row-handle.order:hover {
color: #666;
}
.acf-repeater .acf-row-handle.order + td {
border-left-color: #DFDFDF;
}
.acf-repeater .acf-row-handle.remove {
background: #F9F9F9;
border-left-color: #DFDFDF;
}
.acf-repeater th.acf-row-handle:before {
content: "";
width: 16px;
display: block;
height: 1px;
}
.acf-repeater .acf-row {
/* hide clone */
/* hover */
}
.acf-repeater .acf-row.acf-clone {
display: none !important;
}
.acf-repeater .acf-row:hover, .acf-repeater .acf-row.-hover {
/* icons */
}
.acf-repeater .acf-row:hover > .acf-row-handle .acf-icon, .acf-repeater .acf-row.-hover > .acf-row-handle .acf-icon {
display: block;
}
.acf-repeater .acf-row:hover > .acf-row-handle .acf-icon.show-on-shift, .acf-repeater .acf-row.-hover > .acf-row-handle .acf-icon.show-on-shift {
display: none;
}
body.acf-keydown-shift .acf-repeater .acf-row:hover > .acf-row-handle .acf-icon.show-on-shift, body.acf-keydown-shift .acf-repeater .acf-row.-hover > .acf-row-handle .acf-icon.show-on-shift {
display: block;
}
body.acf-keydown-shift .acf-repeater .acf-row:hover > .acf-row-handle .acf-icon.hide-on-shift, body.acf-keydown-shift .acf-repeater .acf-row.-hover > .acf-row-handle .acf-icon.hide-on-shift {
display: none;
}
.acf-repeater > table > tbody > tr.ui-sortable-helper {
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}
.acf-repeater > table > tbody > tr.ui-sortable-placeholder {
visibility: visible !important;
}
.acf-repeater > table > tbody > tr.ui-sortable-placeholder td {
background: #F9F9F9;
}
.acf-repeater.-row > table > tbody > tr > td, .acf-repeater.-block > table > tbody > tr > td {
border-top-color: #E1E1E1;
}
.acf-repeater.-empty > table > thead > tr > th {
border-bottom: 0 none;
}
.acf-repeater.-empty.-row > table, .acf-repeater.-empty.-block > table {
display: none;
}
.acf-repeater .acf-row.-collapsed > .acf-field {
display: none !important;
}
.acf-repeater .acf-row.-collapsed > td.acf-field.-collapsed-target {
display: table-cell !important;
}
.acf-repeater .acf-row.-collapsed > .acf-fields > * {
display: none !important;
}
.acf-repeater .acf-row.-collapsed > .acf-fields > .acf-field.-collapsed-target {
display: block !important;
}
.acf-repeater .acf-row.-collapsed > .acf-fields > .acf-field.-collapsed-target[data-width] {
float: none !important;
width: auto !important;
}
.acf-repeater.-table .acf-row.-collapsed .acf-field.-collapsed-target {
border-left-color: #dfdfdf;
}
.acf-repeater.-max .acf-icon[data-event=add-row] {
display: none !important;
}
/*---------------------------------------------------------------------------------------------
*
* Flexible Content
*
*---------------------------------------------------------------------------------------------*/
.acf-flexible-content {
position: relative;
}
.acf-flexible-content > .clones {
display: none;
}
.acf-flexible-content > .values {
margin: 0 0 8px;
}
.acf-flexible-content > .values > .ui-sortable-placeholder {
visibility: visible !important;
border: 1px dashed #b4b9be;
box-shadow: none;
background: transparent;
}
.acf-flexible-content .layout {
position: relative;
margin: 20px 0 0;
background: #fff;
border: 1px solid #ccd0d4;
}
.acf-flexible-content .layout:first-child {
margin-top: 0;
}
.acf-flexible-content .layout .acf-fc-layout-handle {
display: block;
position: relative;
padding: 8px 10px;
cursor: move;
border-bottom: #ccd0d4 solid 1px;
color: #444;
font-size: 14px;
line-height: 1.4em;
}
.acf-flexible-content .layout .acf-fc-layout-order {
display: block;
width: 20px;
height: 20px;
border-radius: 10px;
display: inline-block;
text-align: center;
line-height: 20px;
margin: 0 2px 0 0;
background: #F1F1F1;
font-size: 12px;
color: #444;
}
html[dir=rtl] .acf-flexible-content .layout .acf-fc-layout-order {
float: right;
margin-right: 0;
margin-left: 5px;
}
.acf-flexible-content .layout .acf-fc-layout-controls {
position: absolute;
top: 8px;
right: 8px;
}
.acf-flexible-content .layout .acf-fc-layout-controls .acf-icon {
display: block;
float: left;
margin: 0 0 0 5px;
}
.acf-flexible-content .layout .acf-fc-layout-controls .acf-icon.-plus, .acf-flexible-content .layout .acf-fc-layout-controls .acf-icon.-minus, .acf-flexible-content .layout .acf-fc-layout-controls .acf-icon.-duplicate {
visibility: hidden;
}
html[dir=rtl] .acf-flexible-content .layout .acf-fc-layout-controls {
right: auto;
left: 9px;
}
.acf-flexible-content .layout.is-selected {
border-color: #7e8993;
}
.acf-flexible-content .layout.is-selected .acf-fc-layout-handle {
border-color: #7e8993;
}
.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-plus, .acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-minus, .acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-duplicate, .acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-plus, .acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-minus, .acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-duplicate {
visibility: visible;
}
.acf-flexible-content .layout.-collapsed > .acf-fc-layout-handle {
border-bottom-width: 0;
}
.acf-flexible-content .layout.-collapsed > .acf-fields,
.acf-flexible-content .layout.-collapsed > .acf-table {
display: none;
}
.acf-flexible-content .layout > .acf-table {
border: 0 none;
box-shadow: none;
}
.acf-flexible-content .layout > .acf-table > tbody > tr {
background: #fff;
}
.acf-flexible-content .layout > .acf-table > thead > tr > th {
background: #F9F9F9;
}
.acf-flexible-content .no-value-message {
padding: 19px;
border: #ccc dashed 2px;
text-align: center;
display: none;
}
.acf-flexible-content.-empty > .no-value-message {
display: block;
}
.acf-fc-popup {
padding: 5px 0;
z-index: 900001;
min-width: 135px;
}
.acf-fc-popup ul, .acf-fc-popup li {
list-style: none;
display: block;
margin: 0;
padding: 0;
}
.acf-fc-popup li {
position: relative;
float: none;
white-space: nowrap;
}
.acf-fc-popup .badge {
display: inline-block;
border-radius: 8px;
font-size: 9px;
line-height: 15px;
padding: 0 5px;
background: #d54e21;
text-align: center;
color: #fff;
vertical-align: top;
margin: 0 0 0 5px;
}
.acf-fc-popup a {
color: #eee;
padding: 5px 10px;
display: block;
text-decoration: none;
position: relative;
}
.acf-fc-popup a:hover {
background: #0073aa;
color: #fff;
}
.acf-fc-popup a.disabled {
color: #888;
background: transparent;
}
/*---------------------------------------------------------------------------------------------
*
* Galery
*
*---------------------------------------------------------------------------------------------*/
.acf-gallery {
border: #ccd0d4 solid 1px;
height: 400px;
position: relative;
/* main */
/* attachments */
/* attachment */
/* toolbar */
/* sidebar */
/* side info */
/* side data */
/* column widths */
/* resizable */
}
.acf-gallery .acf-gallery-main {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: #fff;
z-index: 2;
}
.acf-gallery .acf-gallery-attachments {
position: absolute;
top: 0;
right: 0;
bottom: 48px;
left: 0;
padding: 5px;
overflow: auto;
overflow-x: hidden;
}
.acf-gallery .acf-gallery-attachment {
width: 25%;
float: left;
cursor: pointer;
position: relative;
/* hover */
/* sortable */
/* active */
/* icon */
/* rtl */
}
.acf-gallery .acf-gallery-attachment .margin {
margin: 5px;
border: #d5d9dd solid 1px;
position: relative;
overflow: hidden;
background: #eee;
}
.acf-gallery .acf-gallery-attachment .margin:before {
content: "";
display: block;
padding-top: 100%;
}
.acf-gallery .acf-gallery-attachment .thumbnail {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform: translate(50%, 50%);
}
html[dir=rtl] .acf-gallery .acf-gallery-attachment .thumbnail {
transform: translate(-50%, 50%);
}
.acf-gallery .acf-gallery-attachment .thumbnail img {
display: block;
height: auto;
max-height: 100%;
width: auto;
transform: translate(-50%, -50%);
}
html[dir=rtl] .acf-gallery .acf-gallery-attachment .thumbnail img {
transform: translate(50%, -50%);
}
.acf-gallery .acf-gallery-attachment .filename {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 5%;
background: #F4F4F4;
background: rgba(255, 255, 255, 0.8);
border-top: #DFDFDF solid 1px;
font-weight: bold;
text-align: center;
word-wrap: break-word;
max-height: 90%;
overflow: hidden;
}
.acf-gallery .acf-gallery-attachment .actions {
position: absolute;
top: 0;
right: 0;
display: none;
}
.acf-gallery .acf-gallery-attachment:hover .actions {
display: block;
}
.acf-gallery .acf-gallery-attachment.ui-sortable-helper .margin {
border: none;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.acf-gallery .acf-gallery-attachment.ui-sortable-placeholder .margin {
background: #F1F1F1;
border: none;
}
.acf-gallery .acf-gallery-attachment.ui-sortable-placeholder .margin * {
display: none !important;
}
.acf-gallery .acf-gallery-attachment.active .margin {
box-shadow: 0 0 0 1px #FFFFFF, 0 0 0 5px #0073aa;
}
.acf-gallery .acf-gallery-attachment.-icon .thumbnail img {
transform: translate(-50%, -70%);
}
html[dir=rtl] .acf-gallery .acf-gallery-attachment {
float: right;
}
.acf-gallery.sidebar-open {
/* hide attachment actions when sidebar is open */
/* allow sidebar to move over main for small widths (widget edit box) */
}
.acf-gallery.sidebar-open .acf-gallery-attachment .actions {
display: none;
}
.acf-gallery.sidebar-open .acf-gallery-side {
z-index: 2;
}
.acf-gallery .acf-gallery-toolbar {
position: absolute;
right: 0;
bottom: 0;
left: 0;
padding: 10px;
border-top: #d5d9dd solid 1px;
background: #fff;
min-height: 28px;
}
.acf-gallery .acf-gallery-toolbar .acf-hl li {
line-height: 24px;
}
.acf-gallery .acf-gallery-toolbar .bulk-actions-select {
width: auto;
margin: 0 1px 0 0;
}
.acf-gallery .acf-gallery-side {
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 0;
background: #F9F9F9;
border-left: #ccd0d4 solid 1px;
z-index: 1;
overflow: hidden;
}
.acf-gallery .acf-gallery-side .acf-gallery-side-inner {
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 349px;
}
.acf-gallery .acf-gallery-side-info {
position: relative;
width: 100%;
padding: 10px;
margin: -10px 0 15px -10px;
background: #F1F1F1;
border-bottom: #DFDFDF solid 1px;
}
.acf-gallery .acf-gallery-side-info:after {
display: block;
clear: both;
content: "";
}
html[dir=rtl] .acf-gallery .acf-gallery-side-info {
margin-left: 0;
margin-right: -10px;
}
.acf-gallery .acf-gallery-side-info img {
float: left;
width: auto;
max-width: 65px;
max-height: 65px;
margin: 0 10px 1px 0;
background: #FFFFFF;
padding: 3px;
border: #ccd0d4 solid 1px;
border-radius: 1px;
/* rtl */
}
html[dir=rtl] .acf-gallery .acf-gallery-side-info img {
float: right;
margin: 0 0 0 10px;
}
.acf-gallery .acf-gallery-side-info p {
font-size: 13px;
line-height: 15px;
margin: 3px 0;
word-break: break-all;
color: #666;
}
.acf-gallery .acf-gallery-side-info p strong {
color: #000;
}
.acf-gallery .acf-gallery-side-info a {
text-decoration: none;
}
.acf-gallery .acf-gallery-side-info a.acf-gallery-edit {
color: #21759b;
}
.acf-gallery .acf-gallery-side-info a.acf-gallery-remove {
color: #bc0b0b;
}
.acf-gallery .acf-gallery-side-info a:hover {
text-decoration: underline;
}
.acf-gallery .acf-gallery-side-data {
position: absolute;
top: 0;
right: 0;
bottom: 48px;
left: 0;
overflow: auto;
overflow-x: inherit;
padding: 10px;
}
.acf-gallery .acf-gallery-side-data .acf-label,
.acf-gallery .acf-gallery-side-data th.label {
color: #666666;
font-size: 12px;
line-height: 25px;
padding: 0 4px 8px 0 !important;
width: auto !important;
vertical-align: top;
}
html[dir=rtl] .acf-gallery .acf-gallery-side-data .acf-label,
html[dir=rtl] .acf-gallery .acf-gallery-side-data th.label {
padding: 0 0 8px 4px !important;
}
.acf-gallery .acf-gallery-side-data .acf-label label,
.acf-gallery .acf-gallery-side-data th.label label {
font-weight: normal;
}
.acf-gallery .acf-gallery-side-data .acf-input,
.acf-gallery .acf-gallery-side-data td.field {
padding: 0 0 8px !important;
}
.acf-gallery .acf-gallery-side-data textarea {
min-height: 0;
height: 60px;
}
.acf-gallery .acf-gallery-side-data p.help {
font-size: 12px;
}
.acf-gallery .acf-gallery-side-data p.help:hover {
font-weight: normal;
}
.acf-gallery[data-columns="1"] .acf-gallery-attachment {
width: 100%;
}
.acf-gallery[data-columns="2"] .acf-gallery-attachment {
width: 50%;
}
.acf-gallery[data-columns="3"] .acf-gallery-attachment {
width: 33.333%;
}
.acf-gallery[data-columns="4"] .acf-gallery-attachment {
width: 25%;
}
.acf-gallery[data-columns="5"] .acf-gallery-attachment {
width: 20%;
}
.acf-gallery[data-columns="6"] .acf-gallery-attachment {
width: 16.666%;
}
.acf-gallery[data-columns="7"] .acf-gallery-attachment {
width: 14.285%;
}
.acf-gallery[data-columns="8"] .acf-gallery-attachment {
width: 12.5%;
}
.acf-gallery .ui-resizable-handle {
display: block;
position: absolute;
}
.acf-gallery .ui-resizable-s {
bottom: -5px;
cursor: ns-resize;
height: 7px;
left: 0;
width: 100%;
}
/* media modal selected */
.acf-media-modal .attachment.acf-selected {
box-shadow: 0 0 0 3px #fff inset, 0 0 0 7px #0073aa inset !important;
}
.acf-media-modal .attachment.acf-selected .check {
display: none !important;
}
.acf-media-modal .attachment.acf-selected .thumbnail {
opacity: 0.25 !important;
}
.acf-media-modal .attachment.acf-selected .attachment-preview:before {
background: rgba(0, 0, 0, 0.15);
z-index: 1;
position: relative;
}
/*--------------------------------------------------------------------------------------------
*
* ACF Blocks
*
*--------------------------------------------------------------------------------------------*/
.acf-block-component .components-placeholder {
margin: 0;
}
.acf-block-component .acf-block-fields {
background: #fff;
text-align: left;
font-size: 13px;
line-height: 1.4em;
color: #444;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
html[dir=rtl] .acf-block-component .acf-block-fields {
text-align: right;
}
.acf-block-component .acf-block-fields p {
font-size: 13px;
line-height: 1.5;
}
.acf-block-body .acf-block-fields {
border: #adb2ad solid 1px;
}
.acf-block-body .acf-block-fields .acf-tab-wrap .acf-tab-group {
margin-left: 0;
padding: 16px 20px 0;
}
.acf-block-body .acf-fields > .acf-field {
padding: 16px 20px;
}
.acf-block-body .acf-fields > .acf-field.acf-accordion {
border-color: #adb2ad;
}
.acf-block-body .acf-fields > .acf-field.acf-accordion .acf-accordion-title {
padding: 16px 20px;
}
.acf-block-body .acf-block-preview {
min-height: 10px;
}
.acf-block-panel .acf-block-fields {
border-top: #e2e4e7 solid 1px;
min-height: 1px;
}
.acf-block-panel .acf-block-fields:empty {
border-top: none;
}
.acf-block-panel .acf-block-fields .acf-tab-wrap {
background: transparent;
}
.components-panel__body .acf-block-panel {
margin: 16px -16px -16px;
}

File diff suppressed because one or more lines are too long

View File

@ -44,7 +44,7 @@
alert( acf.__('Field group title is required') );
// focus
$title.focus();
$title.trigger('focus');
}
},
@ -180,7 +180,6 @@
});
})(jQuery);
(function($, undefined){
acf.FieldObject = acf.Model.extend({
@ -407,7 +406,33 @@
},
initialize: function(){
// do nothing
this.addProFields();
},
addProFields: function() {
// Make sure we're only running this on free version.
if (acf.data.fieldTypes.hasOwnProperty('clone')) {
return;
}
// Make sure we haven't appended these fields before.
var $fieldTypeSelect = $('.field-type').not('.acf-free-field-type');
// Append pro fields to "Layout" group.
var $layoutGroup = $fieldTypeSelect.find('optgroup option[value="group"]').parent();
$layoutGroup.append(
'<option value="null" disabled="disabled">' + acf.__('Repeater (Pro only)') + '</option>' +
'<option value="null" disabled="disabled">' + acf.__('Flexible Content (Pro only)') + '</option>' +
'<option value="null" disabled="disabled">' + acf.__('Clone (Pro only)') + '</option>'
);
// Add pro fields to "Content" group.
var $contentGroup = $fieldTypeSelect.find('optgroup option[value="image"]').parent();
$contentGroup.append(
'<option value="null" disabled="disabled">' + acf.__('Gallery (Pro only)') + '</option>'
);
$fieldTypeSelect.addClass('acf-free-field-type');
},
render: function(){
@ -714,8 +739,8 @@
// focus label
var $label = newField.$setting('label input');
setTimeout(function(){
$label.focus();
}, 251);
$label.trigger('focus');
}, 251);
// update newField label / name
var label = newField.prop('label');
@ -994,7 +1019,6 @@
});
})(jQuery);
(function($, undefined){
/**
@ -1243,7 +1267,6 @@
acf.registerFieldSetting( TimePickerReturnFormatFieldSetting );
})(jQuery);
(function($, undefined){
/**
@ -1647,7 +1670,6 @@
},
});
})(jQuery);
(function($, undefined){
/**
@ -2100,7 +2122,7 @@
// focus label
var $label = newField.$input('label');
setTimeout(function(){
$label.focus();
$label.trigger('focus');
}, 251);
// open
@ -2116,7 +2138,6 @@
});
})(jQuery);
(function($, undefined){
/**
@ -2221,7 +2242,6 @@
});
})(jQuery);
(function($, undefined){
var _acf = acf.getCompatibility( acf );
@ -2503,11 +2523,3 @@
});
})(jQuery);
// @codekit-prepend "_field-group.js";
// @codekit-prepend "_field-group-field.js";
// @codekit-prepend "_field-group-settings.js";
// @codekit-prepend "_field-group-conditions.js";
// @codekit-prepend "_field-group-fields.js";
// @codekit-prepend "_field-group-locations.js";
// @codekit-prepend "_field-group-compatibility.js";

File diff suppressed because one or more lines are too long

View File

@ -526,7 +526,6 @@
};
})(jQuery);
(function($, undefined){
/**
@ -919,7 +918,6 @@
});
})(jQuery);
(function($, undefined){
var i = 0;
@ -1164,7 +1162,6 @@
});
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -1210,7 +1207,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -1321,7 +1317,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -1399,7 +1394,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -1562,7 +1556,6 @@
};
})(jQuery);
(function($, undefined){
var Field = acf.models.DatePickerField.extend({
@ -1662,7 +1655,6 @@
};
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -2259,7 +2251,6 @@
}
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -2449,7 +2440,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.models.ImageField.extend({
@ -2570,7 +2560,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -2767,7 +2756,6 @@
});
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -2931,7 +2919,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -3000,7 +2987,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -3043,7 +3029,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -3422,7 +3407,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -3488,7 +3472,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
// vars
@ -4001,7 +3984,6 @@
});
})(jQuery);
(function($, undefined){
var Field = acf.models.SelectField.extend({
@ -4011,7 +3993,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.models.SelectField.extend({
@ -4021,7 +4002,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.models.SelectField.extend({
@ -4031,7 +4011,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -4150,7 +4129,7 @@
$button = popup.$('.acf-submit-button');
// focus
$name.focus();
$name.trigger('focus');
// submit form
popup.on('submit', 'form', step3);
@ -4165,7 +4144,7 @@
// basic validation
if( $name.val() === '' ) {
$name.focus();
$name.trigger('focus');
return false;
}
@ -4231,7 +4210,7 @@
}
// focus
$name.focus();
$name.trigger('focus');
};
// step 5.
@ -4355,7 +4334,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.models.DatePickerField.extend({
@ -4433,7 +4411,6 @@
};
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -4529,7 +4506,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -4594,7 +4570,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
var Field = acf.Field.extend({
@ -4698,7 +4673,6 @@
acf.registerFieldType( Field );
})(jQuery);
(function($, undefined){
// vars
@ -4948,7 +4922,6 @@
};
})(jQuery);
(function($, undefined){
// vars
@ -5255,7 +5228,6 @@
});
})(jQuery);
(function($, undefined){
var __ = acf.__;
@ -5703,7 +5675,6 @@
acf.registerConditionType( SelectionLessThan );
})(jQuery);
(function($, undefined){
acf.unload = new acf.Model({
@ -5766,7 +5737,6 @@
});
})(jQuery);
(function($, undefined){
/**
@ -5995,7 +5965,6 @@
});
})(jQuery);
(function($, undefined){
/**
@ -6828,7 +6797,6 @@
});
})(jQuery);
(function($, undefined){
acf.screen = new acf.Model({
@ -7446,7 +7414,6 @@
});
})(jQuery);
(function($, undefined){
/**
@ -8236,7 +8203,6 @@
});
})(jQuery);
(function($, undefined){
acf.tinymce = {
@ -8639,7 +8605,6 @@
});
})(jQuery);
(function($, undefined){
/**
@ -9769,7 +9734,6 @@
});
})(jQuery);
(function($, undefined){
/**
@ -10156,7 +10120,6 @@
});
})(jQuery);
(function($, undefined){
/**
@ -10918,42 +10881,3 @@
_acf.ajax = acf.screen;
})(jQuery);
// @codekit-prepend "_acf-field.js";
// @codekit-prepend "_acf-fields.js";
// @codekit-prepend "_acf-field-accordion.js";
// @codekit-prepend "_acf-field-button-group.js";
// @codekit-prepend "_acf-field-checkbox.js";
// @codekit-prepend "_acf-field-color-picker.js";
// @codekit-prepend "_acf-field-date-picker.js";
// @codekit-prepend "_acf-field-date-time-picker.js";
// @codekit-prepend "_acf-field-google-map.js";
// @codekit-prepend "_acf-field-image.js";
// @codekit-prepend "_acf-field-file.js";
// @codekit-prepend "_acf-field-link.js";
// @codekit-prepend "_acf-field-oembed.js";
// @codekit-prepend "_acf-field-radio.js";
// @codekit-prepend "_acf-field-range.js";
// @codekit-prepend "_acf-field-relationship.js";
// @codekit-prepend "_acf-field-select.js";
// @codekit-prepend "_acf-field-tab.js";
// @codekit-prepend "_acf-field-post-object.js";
// @codekit-prepend "_acf-field-page-link.js";
// @codekit-prepend "_acf-field-user.js";
// @codekit-prepend "_acf-field-taxonomy.js";
// @codekit-prepend "_acf-field-time-picker.js";
// @codekit-prepend "_acf-field-true-false.js";
// @codekit-prepend "_acf-field-url.js";
// @codekit-prepend "_acf-field-wysiwyg.js";
// @codekit-prepend "_acf-condition.js";
// @codekit-prepend "_acf-conditions.js";
// @codekit-prepend "_acf-condition-types.js";
// @codekit-prepend "_acf-unload.js";
// @codekit-prepend "_acf-postbox.js";
// @codekit-prepend "_acf-media.js";
// @codekit-prepend "_acf-screen.js";
// @codekit-prepend "_acf-select2.js";
// @codekit-prepend "_acf-tinymce.js";
// @codekit-prepend "_acf-validation.js";
// @codekit-prepend "_acf-helpers.js";
// @codekit-prepend "_acf-compatibility";

1
assets/build/js/acf-input.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1940,7 +1940,7 @@
};
// modern browsers
var file = acf.isget( $input[0], 'files', 0);
var file = $input[0].files.length ? acf.isget($input[0].files, 0) : false;
if( file ){
// update data
@ -2580,7 +2580,6 @@
});
})(jQuery);
( function( window, undefined ) {
"use strict";
@ -2833,7 +2832,6 @@
acf.hooks = new EventManager();
} )( window );
(function($, undefined){
// Cached regex to split keys for `addEvent`.
@ -3742,7 +3740,6 @@
};
})(jQuery);
(function($, undefined){
acf.models.Popup = acf.Model.extend({
@ -3857,7 +3854,6 @@
};
})(jQuery);
(function($, undefined){
acf.models.Modal = acf.Model.extend({
@ -3947,7 +3943,6 @@
};
})(jQuery);
(function($, undefined){
var panel = new acf.Model({
@ -3982,7 +3977,6 @@
});
})(jQuery);
(function($, undefined){
var Notice = acf.Model.extend({
@ -4129,7 +4123,6 @@
})(jQuery);
(function($, undefined){
acf.newTooltip = function( props ){
@ -4454,12 +4447,3 @@
});
})(jQuery);
// @codekit-prepend "_acf.js";
// @codekit-prepend "_acf-hooks.js";
// @codekit-prepend "_acf-model.js";
// @codekit-prepend "_acf-popup.js";
// @codekit-prepend "_acf-modal.js";
// @codekit-prepend "_acf-panel.js";
// @codekit-prepend "_acf-notice.js";
// @codekit-prepend "_acf-tooltip.js";

1
assets/build/js/acf.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -55,7 +55,6 @@
acf.registerFieldSetting( RepeaterCollapsedFieldSetting );
})(jQuery);
(function($){
/**
@ -324,7 +323,6 @@
});
})(jQuery);
(function($){
/**
@ -480,7 +478,3 @@
});
})(jQuery);
// @codekit-prepend "_acf-setting-repeater.js
// @codekit-prepend "_acf-setting-flexible-content.js
// @codekit-prepend "_acf-setting-clone.js

View File

@ -0,0 +1 @@
!function(){var e=acf.FieldSetting.extend({type:"repeater",name:"collapsed",events:{"focus select":"onFocus"},onFocus:function(e,t){var i=t,a=[];a.push({label:i.find('option[value=""]').text(),value:""});t=this.fieldObject.$(".acf-field-list:first");acf.getFieldObjects({list:t}).map(function(e){a.push({label:e.prop("label"),value:e.prop("key")})}),acf.renderSelect(i,a)}});acf.registerFieldSetting(e)}(jQuery),function(t){var e=acf.FieldSetting.extend({type:"flexible_content",name:"fc_layout",events:{"blur .layout-label":"onChangeLabel","click .add-layout":"onClickAdd","click .duplicate-layout":"onClickDuplicate","click .delete-layout":"onClickDelete"},$input:function(e){return t("#"+this.getInputId()+"-"+e)},$list:function(){return this.$(".acf-field-list:first")},getInputId:function(){return this.fieldObject.getInputId()+"-layouts-"+this.field.get("id")},getFields:function(){return acf.getFieldObjects({parent:this.$el})},getChildren:function(){return acf.getFieldObjects({list:this.$list()})},initialize:function(){var e=this.$el.parent();e.hasClass("ui-sortable")||e.sortable({items:"> .acf-field-setting-fc_layout",handle:".reorder-layout",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,stop:this.proxy(function(e,t){this.fieldObject.save()})}),this.updateFieldLayouts()},updateFieldLayouts:function(){this.getChildren().map(this.updateFieldLayout,this)},updateFieldLayout:function(e){e.prop("parent_layout",this.get("id"))},onChangeLabel:function(e,t){var i=t.val(),t=this.$input("name");""==t.val()&&acf.val(t,acf.strSanitize(i))},onClickAdd:function(e,t){var i=this.get("id"),a=acf.uniqid("layout_");$layout=acf.duplicate({$el:this.$el,search:i,replace:a,after:function(e,t){var i=t.find(".acf-field-list:first");i.children(".acf-field-object").remove(),i.addClass("-empty"),t.find(".acf-fc-meta input").val("")}}),acf.getFieldSetting($layout).$input("key").val(a),this.fieldObject.save()},onClickDuplicate:function(e,t){var i=this.get("id"),a=acf.uniqid("layout_");$layout=acf.duplicate({$el:this.$el,search:i,replace:a});i=acf.getFieldObjects({parent:$layout});i.length&&(i.map(function(e){e.wipe(),e.updateParent()}),acf.doAction("duplicate_field_objects",i,this.fieldObject,this.fieldObject)),acf.getFieldSetting($layout).$input("key").val(a),this.fieldObject.save()},onClickDelete:function(e,t){if(e.shiftKey)return this.delete();this.$el.addClass("-hover");acf.newTooltip({confirmRemove:!0,target:t,context:this,confirm:function(){this.delete()},cancel:function(){this.$el.removeClass("-hover")}})},delete:function(){if(!this.$el.siblings(".acf-field-setting-fc_layout").length)return alert(acf.__("Flexible Content requires at least 1 layout")),!1;this.getFields().map(function(e){e.delete({animate:!1})}),acf.remove(this.$el),this.fieldObject.save()}});acf.registerFieldSetting(e);new acf.Model({actions:{sortstop_field_object:"updateParentLayout",change_field_object_parent:"updateParentLayout"},updateParentLayout:function(e){var t=e.getParent();t&&"flexible_content"===t.prop("type")?(t=e.$el.closest(".acf-field-setting-fc_layout"),t=acf.getFieldSetting(t),e.has("parent_layout")||e.prop("parent_layout",0),e.prop("parent_layout",t.get("id"))):e.prop("parent_layout",null)}})}(jQuery),function(e){var t=acf.FieldSetting.extend({type:"clone",name:"display",render:function(){var e=this.field.val();this.$fieldObject.attr("data-display",e)}});acf.registerFieldSetting(t);t=acf.FieldSetting.extend({type:"clone",name:"prefix_label",render:function(){var e="";this.field.val()&&(e=this.fieldObject.prop("label")+" "),this.$("code").html(e+"%field_label%")}});acf.registerFieldSetting(t);t=acf.FieldSetting.extend({type:"clone",name:"prefix_name",render:function(){var e="";this.field.val()&&(e=this.fieldObject.prop("name")+"_"),this.$("code").html(e+"%field_name%")}});acf.registerFieldSetting(t);new acf.Model({filters:{select2_args:"select2Args"},select2Args:function(e,t,i,a,l){return"acf/fields/clone/query"==i.ajaxAction&&(e.closeOnSelect=!1,l.data.ajaxData=this.ajaxData),e},ajaxData:function(t){return t.fields={},acf.getFieldObjects().map(function(e){t.fields[e.prop("key")]={key:e.prop("key"),type:e.prop("type"),label:e.prop("label"),ancestors:e.getParents().length}}),t.title=e("#title").val(),t}})}(jQuery);

View File

@ -529,7 +529,6 @@
});
})(jQuery);
(function($){
var Field = acf.Field.extend({
@ -1223,7 +1222,6 @@
});
})(jQuery);
(function($){
var Field = acf.Field.extend({
@ -1850,7 +1848,3 @@
acf.registerConditionForFieldType('selectionGreaterThan', 'gallery');
})(jQuery);
// @codekit-prepend "_acf-field-repeater.js";
// @codekit-prepend "_acf-field-flexible-content.js";
// @codekit-prepend "_acf-field-gallery.js";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,6 @@
<svg width="16" height="14" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.0007 5.3894H1.03223" stroke="#425FDD" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8.8642 12.6272C8.4484 13.0748 7.74042 13.1294 7.26844 12.7363C7.22349 12.6927 7.17854 12.6599 7.14482 12.6162L1.27873 6.04436H1.2776C0.929234 5.6513 0.906759 5.08353 1.22142 4.66863L3.70495 1.43674C3.90723 1.15286 4.24437 1 4.60397 1H11.3466C11.695 1 12.0321 1.15286 12.2456 1.43674L14.7404 4.65771C15.0551 5.0617 15.0326 5.62946 14.6842 6.02253L8.8642 12.6272Z" stroke="#425FDD" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.12207 1.15283L7.83052 12.9885" stroke="#425FDD" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M11.9096 1.15283L8.24609 12.9776" stroke="#425FDD" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 936 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -203,7 +203,10 @@ function acf_get_text_input( $attrs = array() ) {
$attrs = wp_parse_args($attrs, array(
'type' => 'text'
));
return sprintf( '<input %s/>', acf_esc_attrs($attrs) );
if ( isset( $attrs['value'] ) && is_string( $attrs['value'] ) ) {
$attrs['value'] = htmlspecialchars( $attrs['value'] );
}
return sprintf( '<input %s/>', acf_esc_attrs( $attrs ) );
}
/**

View File

@ -191,6 +191,12 @@ class acf_admin_field_group {
'Value is less than' => __('Value is less than', 'acf'),
'Selection is greater than' => __('Selection is greater than', 'acf'),
'Selection is less than' => __('Selection is less than', 'acf'),
// Pro-only fields
'Repeater (Pro only)' => __('Repeater (Pro only)', 'acf'),
'Flexibly Content (Pro only)' => __('Flexible Content (Pro only)', 'acf'),
'Clone (Pro only)' => __('Clone (Pro only)', 'acf'),
'Gallery (Pro only)' => __('Gallery (Pro only)', 'acf'),
));
// localize data

View File

@ -45,7 +45,7 @@ class ACF_Admin {
$cap = acf_get_setting('capability');
// Add menu items.
add_menu_page( __("Custom Fields",'acf'), __("Custom Fields",'acf'), $cap, $slug, false, 'dashicons-welcome-widgets-menus', '80.025' );
add_menu_page( __("Custom Fields",'acf'), __("Custom Fields",'acf'), $cap, $slug, false, 'dashicons-welcome-widgets-menus', 80 );
add_submenu_page( $slug, __('Field Groups','acf'), __('Field Groups','acf'), $cap, $slug );
add_submenu_page( $slug, __('Add New','acf'), __('Add New','acf'), $cap, 'post-new.php?post_type=acf-field-group' );
}

View File

@ -78,4 +78,12 @@ if( $tabs === false ) {
acf_esc_html( $tab['text'] )
);
} ?>
<?php if ( ! defined( 'ACF_PRO' ) || ! ACF_PRO ) : ?>
<a target="_blank" href="https://www.advancedcustomfields.com/pro/?utm_source=ACF%2BFree&utm_medium=insideplugin&utm_campaign=ACF%2Bupgrade" class="btn-upgrade">
<img src="<?php echo acf_get_url('assets/images/icon-upgrade-pro.svg' ); ?>" />
<p><?php _e('Upgrade to Pro', 'acf'); ?></p>
</a>
<?php endif; ?>
</div>

View File

@ -3436,13 +3436,13 @@ function acf_get_valid_terms( $terms = false, $taxonomy = 'category' ) {
/*
* acf_validate_attachment
*
* This function will validate an attachment based on a field's resrictions and return an array of errors
* This function will validate an attachment based on a field's restrictions and return an array of errors
*
* @type function
* @date 3/07/2015
* @since 5.2.3
*
* @param $attachment (array) attachment data. Cahnges based on context
* @param $attachment (array) attachment data. Changes based on context
* @param $field (array) field settings containing restrictions
* @param $context (string) $file is different when uploading / preparing
* @return $errors (array)
@ -3478,7 +3478,8 @@ function acf_validate_attachment( $attachment, $field, $context = 'prepare' ) {
// prepare
} elseif( $context == 'prepare' ) {
$file['type'] = pathinfo($attachment['url'], PATHINFO_EXTENSION);
$use_path = isset($attachment['filename']) ? $attachment['filename'] : $attachment['url'];
$file['type'] = pathinfo($use_path, PATHINFO_EXTENSION);
$file['size'] = acf_maybe_get($attachment, 'filesizeInBytes', 0);
$file['width'] = acf_maybe_get($attachment, 'width', 0);
$file['height'] = acf_maybe_get($attachment, 'height', 0);
@ -3487,7 +3488,8 @@ function acf_validate_attachment( $attachment, $field, $context = 'prepare' ) {
} else {
$file = array_merge($file, $attachment);
$file['type'] = pathinfo($attachment['url'], PATHINFO_EXTENSION);
$use_path = isset($attachment['filename']) ? $attachment['filename'] : $attachment['url'];
$file['type'] = pathinfo($use_path, PATHINFO_EXTENSION);
}

View File

@ -1041,7 +1041,7 @@ function delete_field( $selector, $post_id = false ) {
// delete
return acf_delete_value( $post_id, $field );
return $field ? acf_delete_value( $post_id, $field ) : false;
}

View File

@ -104,20 +104,19 @@ class ACF_Assets {
* @return void
*/
public function register_scripts() {
// Extract vars.
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
$version = acf_get_setting('version');
// Register scripts.
wp_register_script( 'acf', acf_get_url( 'assets/js/acf' . $suffix . '.js' ), array( 'jquery' ), $version );
wp_register_script( 'acf-input', acf_get_url( 'assets/js/acf-input' . $suffix . '.js' ), array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-resizable', 'acf' ), $version );
wp_register_script( 'acf-field-group', acf_get_url( 'assets/js/acf-field-group' . $suffix . '.js' ), array( 'acf-input' ), $version );
wp_register_script( 'acf', acf_get_url( 'assets/build/js/acf' . $suffix . '.js' ), array( 'jquery' ), $version );
wp_register_script( 'acf-input', acf_get_url( 'assets/build/js/acf-input' . $suffix . '.js' ), array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-resizable', 'acf' ), $version );
wp_register_script( 'acf-field-group', acf_get_url( 'assets/build/js/acf-field-group' . $suffix . '.js' ), array( 'acf-input' ), $version );
// Register styles.
wp_register_style( 'acf-global', acf_get_url( 'assets/css/acf-global.css' ), array( 'dashicons' ), $version );
wp_register_style( 'acf-input', acf_get_url( 'assets/css/acf-input.css' ), array( 'acf-global' ), $version );
wp_register_style( 'acf-field-group', acf_get_url( 'assets/css/acf-field-group.css' ), array( 'acf-input' ), $version );
wp_register_style( 'acf-global', acf_get_url( 'assets/build/css/acf-global.css' ), array( 'dashicons' ), $version );
wp_register_style( 'acf-input', acf_get_url( 'assets/build/css/acf-input.css' ), array( 'acf-global' ), $version );
wp_register_style( 'acf-field-group', acf_get_url( 'assets/build/css/acf-field-group.css' ), array( 'acf-input' ), $version );
/**
* Fires after core scripts and styles have been registered.

View File

@ -163,7 +163,9 @@ class acf_field_email extends acf_field {
* @return bool|string
*/
public function validate_value( $valid, $value, $field, $input ) {
if ( $value && filter_var( wp_unslash($value), FILTER_VALIDATE_EMAIL ) === false ) {
$flags = defined( 'FILTER_FLAG_EMAIL_UNICODE' ) ? FILTER_FLAG_EMAIL_UNICODE : 0;
if ( $value && filter_var( wp_unslash($value), FILTER_VALIDATE_EMAIL, $flags ) === false ) {
return sprintf( __( "'%s' is not a valid email address", 'acf' ), esc_html( $value ) );
}

View File

@ -237,7 +237,7 @@ class acf_field_wysiwyg extends acf_field {
}
// must be logged in tp upload
// must be logged in to upload
if( !current_user_can('upload_files') ) {
$field['media_upload'] = 0;
@ -250,6 +250,7 @@ class acf_field_wysiwyg extends acf_field {
// filter
add_filter( 'acf_the_editor_content', 'format_for_editor', 10, 2 );
$field['value'] = apply_filters( 'acf_the_editor_content', $field['value'], $default_editor );

View File

@ -6,49 +6,40 @@ if( ! class_exists('ACF_Media') ) :
class ACF_Media {
/**
* Constructor.
*
* @date 23/06/12
* @since 5.0.0
*
* @param void
* @return void
*/
public function __construct() {
/*
* __construct
*
* Initialize filters, action, variables and includes
*
* @type function
* @date 23/06/12
* @since 5.0.0
*
* @param N/A
* @return N/A
*/
// Localize media strings.
add_action( 'acf/enqueue_scripts', array( $this, 'enqueue_scripts' ) );
function __construct() {
// Save files uploaded from basic `$_FILE` field.
add_action( 'acf/save_post', array( $this, 'save_files' ), 5, 1 );
// actions
add_action('acf/enqueue_scripts', array($this, 'enqueue_scripts'));
add_action('acf/save_post', array($this, 'save_files'), 5, 1);
// Hook into Media Upload to run additional logic.
add_filter( 'wp_handle_upload_prefilter', array( $this, 'handle_upload_prefilter' ), 10, 1 );
// filters
add_filter('wp_handle_upload_prefilter', array($this, 'handle_upload_prefilter'), 10, 1);
// ajax
add_action('wp_ajax_query-attachments', array($this, 'wp_ajax_query_attachments'), -1);
// Hook into Media Modal Query to run additional logic.
add_action( 'wp_ajax_query-attachments', array( $this, 'wp_ajax_query_attachments' ), -1 );
}
/**
* enqueue_scripts
*
* Localizes data
*
* @date 27/4/18
* @since 5.6.9
*
* @param void
* @return void
*/
function enqueue_scripts(){
* Fires when ACF scrtips are enqueued.
*
* @date 27/4/18
* @since 5.6.9
*
* @param void
* @return void
*/
public function enqueue_scripts(){
if( wp_script_is('acf-input') ) {
acf_localize_text(array(
'Select.verb' => _x('Select', 'verb', 'acf'),
@ -67,148 +58,162 @@ class ACF_Media {
}
}
/*
* handle_upload_prefilter
*
* description
*
* @type function
* @date 16/02/2015
* @since 5.1.5
*
* @param $post_id (int)
* @return $post_id (int)
*/
function handle_upload_prefilter( $file ) {
// bail early if no acf field
if( empty($_POST['_acfuploader']) ) {
return $file;
/**
* Uploads attachments found in the basic `$_FILES` array.
*
* @date 24/10/2014
* @since 5.0.9
*
* @param string|int $post_id The post ID being saved.
* @return void
*/
public function save_files( $post_id = 0 ) {
if( isset( $_FILES['acf']['name'] ) ) {
acf_upload_files();
}
}
// load field
$field = acf_get_field( $_POST['_acfuploader'] );
/**
* Filters data for the current file being uploaded.
*
* @date 16/02/2015
* @since 5.1.5
*
* @param array $file An array of data for a single file.
* @return array
*/
public function handle_upload_prefilter( $file ) {
$field = $this->get_source_field();
if( !$field ) {
return $file;
}
// get errors
// Validate the attachment and append any errors.
$errors = acf_validate_attachment( $file, $field, 'upload' );
/**
* Filters the errors for a file before it is uploaded to WordPress.
*
* @date 16/02/2015
* @since 5.1.5
*
* @param array $errors An array of errors.
* @param array $file An array of data for a single file.
* @param array $field The field array.
*/
* Filters the errors for a file before it is uploaded to WordPress.
*
* @date 16/02/2015
* @since 5.1.5
*
* @param array $errors An array of errors.
* @param array $file An array of data for a single file.
* @param array $field The field array.
*/
$errors = apply_filters( "acf/upload_prefilter/type={$field['type']}", $errors, $file, $field );
$errors = apply_filters( "acf/upload_prefilter/name={$field['_name']}", $errors, $file, $field );
$errors = apply_filters( "acf/upload_prefilter/key={$field['key']}", $errors, $file, $field );
$errors = apply_filters( "acf/upload_prefilter", $errors, $file, $field );
// append error
// Append errors.
if( !empty($errors) ) {
$file['error'] = implode("\n", $errors);
}
// Ensure newly uploaded image contains "preview_size" within the "size" data.
add_filter( 'image_size_names_choose', array( $this, 'image_size_names_choose' ), 10, 1 );
// return
// Return.
return $file;
}
/*
* save_files
*
* This function will save the $_FILES data
*
* @type function
* @date 24/10/2014
* @since 5.0.9
*
* @param $post_id (int)
* @return $post_id (int)
*/
function save_files( $post_id = 0 ) {
// bail early if no $_FILES data
if( empty($_FILES['acf']['name']) ) {
return;
/**
* Returns the field responsible for the current Media query or upload context.
*
* @date 21/5/21
* @since 5.9.7
*
* @param void
* @return array| false.
*/
private function get_source_field() {
$field = false;
// Search for field key within available data.
// Case 1) Media modal query.
if( isset( $_POST['query']['_acfuploader'] ) ) {
$field_key = (string) $_POST['query']['_acfuploader'];
// Case 2) Media modal upload.
} elseif( isset( $_POST['_acfuploader'] ) ) {
$field_key = (string) $_POST['_acfuploader'];
}
// upload files
acf_upload_files();
// Attempt to load field.
// Note the `acf_get_field()` function will return false if not found.
if( isset( $field_key ) ) {
$field = acf_get_field( $field_key );
}
return $field;
}
/*
* wp_ajax_query_attachments
*
* description
*
* @type function
* @date 26/06/2015
* @since 5.2.3
*
* @param $post_id (int)
* @return $post_id (int)
*/
/**
* Fires during the WP Modal Query AJAX call.
*
* @date 26/06/2015
* @since 5.2.3
*
* @param void
* @return void
*/
function wp_ajax_query_attachments() {
add_filter('wp_prepare_attachment_for_js', array($this, 'wp_prepare_attachment_for_js'), 10, 3);
if( $this->get_source_field() ) {
add_filter( 'wp_prepare_attachment_for_js', array( $this, 'wp_prepare_attachment_for_js' ), 10, 3 );
add_filter( 'image_size_names_choose', array( $this, 'image_size_names_choose' ), 10, 1 );
}
}
/**
* Filters attachment data as it is being prepared for JS.
*
* @date 21/5/21
* @since 5.9.7
*
* @param array $response Array of prepared attachment data.
* @param WP_Post $attachment Attachment object.
* @param array|false $meta Array of attachment meta data, or false if there is none.
* @return array
*/
function wp_prepare_attachment_for_js( $response, $attachment, $meta ) {
$field = $this->get_source_field();
// append attribute
$response['acf_errors'] = false;
// bail early if no acf field
if( empty($_POST['query']['_acfuploader']) ) {
return $response;
}
// load field
$field = acf_get_field( $_POST['query']['_acfuploader'] );
if( !$field ) {
return $response;
}
// get errors
// Validate the attachment and append any errors.
$errors = acf_validate_attachment( $response, $field, 'prepare' );
// append errors
$response['acf_errors'] = false;
if( !empty($errors) ) {
$response['acf_errors'] = implode('<br />', $errors);
}
// return
// Return.
return $response;
}
/**
* Filters the names and labels of the default image sizes.
*
* @date 21/5/21
* @since 5.9.7
*
* @param array $size_names Array of image size labels keyed by their name.
* @return array
*/
function image_size_names_choose( $size_names ) {
$field = $this->get_source_field();
// Append "preview_size" setting to array of image sizes so WP will include in prepared JS data.
if( isset( $field['preview_size'] ) ) {
$name = (string) $field['preview_size'];
$size_names[ $name ] = $name; // Don't worry about size label, it is never used.
}
return $size_names;
}
}
// instantiate
acf_new_instance('ACF_Media');
// Instantiate.
acf_new_instance( 'ACF_Media' );
endif; // class_exists check
?>

View File

@ -116,13 +116,13 @@ class acf_pro {
// register scripts
wp_register_script( 'acf-pro-input', acf_get_url( "pro/assets/js/acf-pro-input{$min}.js" ), array('acf-input'), $version );
wp_register_script( 'acf-pro-field-group', acf_get_url( "pro/assets/js/acf-pro-field-group{$min}.js" ), array('acf-field-group'), $version );
wp_register_script( 'acf-pro-input', acf_get_url( "assets/build/js/pro/acf-pro-input{$min}.js" ), array('acf-input'), $version );
wp_register_script( 'acf-pro-field-group', acf_get_url( "assets/build/js/pro/acf-pro-field-group{$min}.js" ), array('acf-field-group'), $version );
// register styles
wp_register_style( 'acf-pro-input', acf_get_url( 'pro/assets/css/acf-pro-input.css' ), array('acf-input'), $version );
wp_register_style( 'acf-pro-field-group', acf_get_url( 'pro/assets/css/acf-pro-field-group.css' ), array('acf-input'), $version );
wp_register_style( 'acf-pro-input', acf_get_url( 'assets/build/css/pro/acf-pro-input.css' ), array('acf-input'), $version );
wp_register_style( 'acf-pro-field-group', acf_get_url( 'assets/build/css/pro/acf-pro-field-group.css' ), array('acf-input'), $version );
}

View File

@ -16,7 +16,7 @@ $readonly = $active ? 1 : 0;
<h3><?php _e('License Information', 'acf'); ?></h3>
</div>
<div class="inner">
<p><?php printf(__('To unlock updates, please enter your license key below. If you don\'t have a licence key, please see <a href="%s" target="_blank">details & pricing</a>.','acf'), esc_url('https://www.advancedcustomfields.com/pro')); ?></p>
<p><?php printf(__('To unlock updates, please enter your license key below. If you don\'t have a licence key, please see <a href="%s" target="_blank">details & pricing</a>.','acf'), esc_url('https://www.advancedcustomfields.com/pro/?utm_source=ACF%2Bpro%2Bplugin&utm_medium=insideplugin&utm_campaign=ACF%2Bupgrade&utm_content=license%2Bactivations')); ?></p>
<form action="" method="post">
<?php acf_nonce_input( $nonce ); ?>
<table class="form-table">

View File

@ -1 +0,0 @@
.acf-field-setting-fc_layout .acf-fc-meta{margin:0 0 10px;padding:0}.acf-field-setting-fc_layout .acf-fc-meta li{margin:0 0 10px;padding:0}.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-display,.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-min{float:left;width:33%;padding-right:10px}.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-label .acf-input-prepend,.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-name .acf-input-prepend,.acf-field-setting-fc_layout .acf-fc-meta .acf-fc-meta-display .acf-input-prepend{min-width:60px}.acf-field-setting-fc_layout .acf-fl-actions{visibility:hidden}.acf-field-setting-fc_layout .acf-fl-actions .reorder-layout{cursor:move}.acf-field-setting-fc_layout .acf-fl-actions a{padding:1px 0;font-size:13px;line-height:20px}.acf-field-setting-fc_layout:hover .acf-fl-actions,.acf-field-setting-fc_layout.-hover .acf-fl-actions{visibility:visible}.acf-field-object-clone[data-display="seamless"] .acf-field-setting-instructions,.acf-field-object-clone[data-display="seamless"] .acf-field-setting-layout,.acf-field-object-clone[data-display="seamless"] .acf-field-setting-wrapper,.acf-field-object-clone[data-display="seamless"] .acf-field-setting-conditional_logic{display:none}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
!function(e){var t=acf.FieldSetting.extend({type:"repeater",name:"collapsed",events:{"focus select":"onFocus"},onFocus:function(e,t){var i=t,a=[];a.push({label:i.find('option[value=""]').text(),value:""});var l=this.fieldObject.$(".acf-field-list:first"),n;acf.getFieldObjects({list:l}).map((function(e){a.push({label:e.prop("label"),value:e.prop("key")})})),acf.renderSelect(i,a)}});acf.registerFieldSetting(t)}(jQuery),function(e){var t=acf.FieldSetting.extend({type:"flexible_content",name:"fc_layout",events:{"blur .layout-label":"onChangeLabel","click .add-layout":"onClickAdd","click .duplicate-layout":"onClickDuplicate","click .delete-layout":"onClickDelete"},$input:function(t){return e("#"+this.getInputId()+"-"+t)},$list:function(){return this.$(".acf-field-list:first")},getInputId:function(){return this.fieldObject.getInputId()+"-layouts-"+this.field.get("id")},getFields:function(){return acf.getFieldObjects({parent:this.$el})},getChildren:function(){return acf.getFieldObjects({list:this.$list()})},initialize:function(){var e=this.$el.parent();e.hasClass("ui-sortable")||e.sortable({items:"> .acf-field-setting-fc_layout",handle:".reorder-layout",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,stop:this.proxy((function(e,t){this.fieldObject.save()}))}),this.updateFieldLayouts()},updateFieldLayouts:function(){this.getChildren().map(this.updateFieldLayout,this)},updateFieldLayout:function(e){e.prop("parent_layout",this.get("id"))},onChangeLabel:function(e,t){var i=t.val(),a=this.$input("name");""==a.val()&&acf.val(a,acf.strSanitize(i))},onClickAdd:function(e,t){var i=this.get("id"),a=acf.uniqid("layout_"),l;$layout=acf.duplicate({$el:this.$el,search:i,replace:a,after:function(e,t){var i=t.find(".acf-field-list:first");i.children(".acf-field-object").remove(),i.addClass("-empty"),t.find(".acf-fc-meta input").val("")}}),acf.getFieldSetting($layout).$input("key").val(a),this.fieldObject.save()},onClickDuplicate:function(e,t){var i=this.get("id"),a=acf.uniqid("layout_");$layout=acf.duplicate({$el:this.$el,search:i,replace:a});var l=acf.getFieldObjects({parent:$layout}),n;l.length&&(l.map((function(e){e.wipe(),e.updateParent()})),acf.doAction("duplicate_field_objects",l,this.fieldObject,this.fieldObject)),acf.getFieldSetting($layout).$input("key").val(a),this.fieldObject.save()},onClickDelete:function(e,t){if(e.shiftKey)return this.delete();this.$el.addClass("-hover");var i=acf.newTooltip({confirmRemove:!0,target:t,context:this,confirm:function(){this.delete()},cancel:function(){this.$el.removeClass("-hover")}})},delete:function(){var e;if(!this.$el.siblings(".acf-field-setting-fc_layout").length)return alert(acf.__("Flexible Content requires at least 1 layout")),!1;this.getFields().map((function(e){e.delete({animate:!1})})),acf.remove(this.$el),this.fieldObject.save()}});acf.registerFieldSetting(t);var i=new acf.Model({actions:{sortstop_field_object:"updateParentLayout",change_field_object_parent:"updateParentLayout"},updateParentLayout:function(e){var t=e.getParent();if(t&&"flexible_content"===t.prop("type")){var i=e.$el.closest(".acf-field-setting-fc_layout"),a=acf.getFieldSetting(i);e.has("parent_layout")||e.prop("parent_layout",0),e.prop("parent_layout",a.get("id"))}else e.prop("parent_layout",null)}})}(jQuery),function(e){var t=acf.FieldSetting.extend({type:"clone",name:"display",render:function(){var e=this.field.val();this.$fieldObject.attr("data-display",e)}});acf.registerFieldSetting(t);var i=acf.FieldSetting.extend({type:"clone",name:"prefix_label",render:function(){var e="";this.field.val()&&(e=this.fieldObject.prop("label")+" "),this.$("code").html(e+"%field_label%")}});acf.registerFieldSetting(i);var a=acf.FieldSetting.extend({type:"clone",name:"prefix_name",render:function(){var e="";this.field.val()&&(e=this.fieldObject.prop("name")+"_"),this.$("code").html(e+"%field_name%")}});acf.registerFieldSetting(a);var l=new acf.Model({filters:{select2_args:"select2Args"},select2Args:function(e,t,i,a,l){return"acf/fields/clone/query"==i.ajaxAction&&(e.closeOnSelect=!1,l.data.ajaxData=this.ajaxData),e},ajaxData:function(t){return t.fields={},acf.getFieldObjects().map((function(e){t.fields[e.prop("key")]={key:e.prop("key"),type:e.prop("type"),label:e.prop("label"),ancestors:e.getParents().length}})),t.title=e("#title").val(),t}})}(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -453,31 +453,16 @@ function acf_enqueue_block_assets() {
$block_types = acf_get_block_types();
// Localize data.
acf_localize_data(array(
'blockTypes' => array_values( $block_types ),
// List of attributes to replace for HTML to JSX compatibility.
// https://github.com/facebook/react/blob/master/packages/react-dom/src/shared/possibleStandardNames.js
'jsxAttributes' => array(
'cellpadding' => 'cellPadding',
'cellspacing' => 'cellSpacing',
'class' => 'className',
'colspan' => 'colSpan',
'datetime' => 'dateTime',
'for' => 'htmlFor',
'hreflang' => 'hrefLang',
'readonly' => 'readOnly',
'rowspan' => 'rowSpan',
'srclang' => 'srcLang',
'srcset' => 'srcSet',
'allowedblocks' => 'allowedBlocks',
'templatelock' => 'templateLock'
),
'postType' => get_post_type()
));
acf_localize_data(
array(
'blockTypes' => array_values( $block_types ),
'postType' => get_post_type(),
)
);
// Enqueue script.
wp_enqueue_script( 'acf-blocks', acf_get_url("pro/assets/js/acf-pro-blocks.min.js"), array('acf-input', 'wp-blocks'), ACF_VERSION, true );
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_script( 'acf-blocks', acf_get_url("assets/build/js/pro/acf-pro-blocks{$min}.js"), array('acf-input', 'wp-blocks'), ACF_VERSION, true );
// Enqueue block assets.
array_map( 'acf_enqueue_block_type_assets', $block_types );

View File

@ -97,6 +97,9 @@ class acf_options_page {
$page['menu_slug'] = 'acf-options-' . sanitize_title( $page['menu_title'] );
}
// Standardize on position being either null or int.
$page['position'] = is_numeric( $page['position'] ) ? (int) $page['position'] : null;
/**
* Filters the $page array after it has been validated.
*

View File

@ -94,7 +94,7 @@ class acf_pro_updates {
// display message
echo '<br />' . sprintf( __('To enable updates, please enter your license key on the <a href="%s">Updates</a> page. If you don\'t have a licence key, please see <a href="%s">details & pricing</a>.', 'acf'), admin_url('edit.php?post_type=acf-field-group&page=acf-settings-updates'), 'https://www.advancedcustomfields.com/pro' );
echo '<br />' . sprintf( __('To enable updates, please enter your license key on the <a href="%s">Updates</a> page. If you don\'t have a licence key, please see <a href="%s" target="_blank">details & pricing</a>.', 'acf'), admin_url('edit.php?post_type=acf-field-group&page=acf-settings-updates'), 'https://www.advancedcustomfields.com/pro/?utm_source=ACF%2Bpro%2Bplugin&utm_medium=insideplugin&utm_campaign=ACF%2Bupgrade&utm_content=updates' );
}

View File

@ -2,8 +2,9 @@
Contributors: elliotcondon
Tags: acf, fields, custom fields, meta, repeater
Requires at least: 4.7
Tested up to: 5.7
Tested up to: 5.8
Requires PHP: 5.6
Stable tag: 5.9.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@ -51,8 +52,6 @@ From your WordPress dashboard
= What kind of support do you provide? =
**Help Desk.** Support is currently provided via our email help desk. Questions are generally answered within 24 hours, with the exception of weekends and holidays. We answer questions related to ACF, its usage and provide minor customization guidance. We cannot guarantee support for questions which include custom theme code, or 3rd party plugin conflicts & compatibility. [Open a Support Ticket](https://www.advancedcustomfields.com/support/)
**Support Forums.** Our Community Forums provide a great resource for searching and finding previously answered and asked support questions. You may create a new thread on these forums, however, it is not guaranteed that you will receive an answer from our support team. This is more of an area for developers to talk to one another, post ideas, plugins and provide basic help. [View the Support Forum](https://support.advancedcustomfields.com/)
@ -67,6 +66,31 @@ From your WordPress dashboard
== Changelog ==
= 5.9.9 =
*Release Date - 20 July 2021*
* Fix - Fixed warning when deleting fields which don't exist
* Fix - Fixed issues with older browsers and the blocks JavaScript
* Fix - Fixed file size & file type validation for front end forms using the basic uploader
= 5.9.8 =
*Release Date - 08 July 2021*
* Fix - Fixed bug causing multiple image fields to not validate files properly
* Fix - Fixed bug preventing case-sensitive HTML tags from working in blocks
* Fix - Fixed bug causing JSX-enabled blocks to improperly remove whitespace in preview
* Fix - Fixed bug causing text fields to remove HTML entities when editing saved fields
* Fix - Fixed deprecated jQuery notices on "Add Field Group" page
= 5.9.7 =
*Release Date - 22 June 2021*
* Fix - Fixed PHP warnings logged due to incorrect parameter type for `add_menu_page()`/`add_submenu_page()`
* Fix - Fixed bug causing WYSIWYG field to not keep line breaks
* Fix - Fixed bug causing Email field to incorrectly invalidate emails with unicode characters
* Fix - Fixed bug causing file type validation to fail in some cases
* Fix - Fixed bug where newly uploaded or selected images do not contain custom preview size data
= 5.9.6 =
*Release Date - 20 May 2021*