├── .gitignore ├── README.md ├── acf.php ├── assets ├── build │ ├── css │ │ ├── acf-dark.min.css │ │ ├── acf-field-group.min.css │ │ ├── acf-global.min.css │ │ ├── acf-input.min.css │ │ ├── index.php │ │ └── pro │ │ │ ├── acf-pro-field-group.min.css │ │ │ ├── acf-pro-input.min.css │ │ │ └── index.php │ ├── index.php │ └── js │ │ ├── acf-escaped-html-notice.min.js │ │ ├── acf-field-group.min.js │ │ ├── acf-input.min.js │ │ ├── acf-internal-post-type.min.js │ │ ├── acf.min.js │ │ ├── index.php │ │ └── pro │ │ ├── acf-pro-blocks.min.js │ │ ├── acf-pro-field-group.min.js │ │ ├── acf-pro-input.min.js │ │ ├── acf-pro-ui-options-page.min.js │ │ └── index.php ├── images │ ├── acf-logo.svg │ ├── acf-pro-logo.svg │ ├── empty-group.svg │ ├── empty-post-types.svg │ ├── empty-taxonomies.svg │ ├── face-sad.svg │ ├── field-preview-grid.png │ ├── field-states │ │ ├── checkbox-active.svg │ │ ├── checkbox-indeterminate.svg │ │ ├── index.php │ │ └── radio-active.svg │ ├── field-type-icons │ │ ├── icon-field-accordion.svg │ │ ├── icon-field-button-group.svg │ │ ├── icon-field-checkbox.svg │ │ ├── icon-field-clone.svg │ │ ├── icon-field-color-picker.svg │ │ ├── icon-field-date-picker.svg │ │ ├── icon-field-date-time-picker.svg │ │ ├── icon-field-default.svg │ │ ├── icon-field-email.svg │ │ ├── icon-field-file.svg │ │ ├── icon-field-flexible-content.svg │ │ ├── icon-field-gallery.svg │ │ ├── icon-field-google-map.svg │ │ ├── icon-field-group.svg │ │ ├── icon-field-icon-picker.svg │ │ ├── icon-field-image.svg │ │ ├── icon-field-link.svg │ │ ├── icon-field-message.svg │ │ ├── icon-field-number.svg │ │ ├── icon-field-oembed.svg │ │ ├── icon-field-page-link.svg │ │ ├── icon-field-password.svg │ │ ├── icon-field-post-object.svg │ │ ├── icon-field-radio.svg │ │ ├── icon-field-range.svg │ │ ├── icon-field-relationship.svg │ │ ├── icon-field-repeater.svg │ │ ├── icon-field-select.svg │ │ ├── icon-field-tab.svg │ │ ├── icon-field-taxonomy.svg │ │ ├── icon-field-text.svg │ │ ├── icon-field-textarea.svg │ │ ├── icon-field-time-picker.svg │ │ ├── icon-field-true-false.svg │ │ ├── icon-field-url.svg │ │ ├── icon-field-user.svg │ │ ├── icon-field-wysiwyg.svg │ │ └── index.php │ ├── field-type-previews │ │ ├── field-preview-accordion.png │ │ ├── field-preview-button-group.png │ │ ├── field-preview-checkbox.png │ │ ├── field-preview-clone.png │ │ ├── field-preview-color-picker.png │ │ ├── field-preview-date-picker.png │ │ ├── field-preview-date-time.png │ │ ├── field-preview-email.png │ │ ├── field-preview-file.png │ │ ├── field-preview-flexible-content.png │ │ ├── field-preview-gallery.png │ │ ├── field-preview-google-map.png │ │ ├── field-preview-group.png │ │ ├── field-preview-icon-picker.png │ │ ├── field-preview-image.png │ │ ├── field-preview-link.png │ │ ├── field-preview-message.png │ │ ├── field-preview-number.png │ │ ├── field-preview-oembed.png │ │ ├── field-preview-page-link.png │ │ ├── field-preview-password.png │ │ ├── field-preview-post-object.png │ │ ├── field-preview-radio-button.png │ │ ├── field-preview-range.png │ │ ├── field-preview-relationship.png │ │ ├── field-preview-repeater.png │ │ ├── field-preview-select.png │ │ ├── field-preview-tabs.png │ │ ├── field-preview-taxonomy.png │ │ ├── field-preview-text.png │ │ ├── field-preview-textarea.png │ │ ├── field-preview-time.png │ │ ├── field-preview-true-false.png │ │ ├── field-preview-url.png │ │ ├── field-preview-user.png │ │ ├── field-preview-wysiwyg.png │ │ └── index.php │ ├── icon-upgrade-pro.svg │ ├── icons │ │ ├── icon-add.svg │ │ ├── icon-alert-triangle.svg │ │ ├── icon-arrow-left.svg │ │ ├── icon-arrow-right.svg │ │ ├── icon-arrow-up-right.svg │ │ ├── icon-check-circle-solid.svg │ │ ├── icon-check.svg │ │ ├── icon-chevron-down.svg │ │ ├── icon-chevron-left-double.svg │ │ ├── icon-chevron-left.svg │ │ ├── icon-chevron-right-double.svg │ │ ├── icon-chevron-right.svg │ │ ├── icon-chevron-up.svg │ │ ├── icon-close-circle.svg │ │ ├── icon-close.svg │ │ ├── icon-copy.svg │ │ ├── icon-document.svg │ │ ├── icon-dots-grid.svg │ │ ├── icon-draggable.svg │ │ ├── icon-export.svg │ │ ├── icon-extended-menu.svg │ │ ├── icon-field-groups.svg │ │ ├── icon-fields.svg │ │ ├── icon-globe.svg │ │ ├── icon-help.svg │ │ ├── icon-hidden.svg │ │ ├── icon-import.svg │ │ ├── icon-info-red.svg │ │ ├── icon-info-solid.svg │ │ ├── icon-info-white.svg │ │ ├── icon-info.svg │ │ ├── icon-key-solid.svg │ │ ├── icon-key.svg │ │ ├── icon-layout.svg │ │ ├── icon-lock.svg │ │ ├── icon-play.svg │ │ ├── icon-post-type.svg │ │ ├── icon-regenerate.svg │ │ ├── icon-search.svg │ │ ├── icon-settings.svg │ │ ├── icon-sliders.svg │ │ ├── icon-stars.svg │ │ ├── icon-taxonomies.svg │ │ ├── icon-time.svg │ │ ├── icon-tools.svg │ │ ├── icon-trash.svg │ │ ├── icon-updates.svg │ │ ├── icon-warning-alt-red.svg │ │ ├── icon-warning-alt.svg │ │ ├── icon-warning.svg │ │ └── index.php │ ├── index.php │ ├── pro-chip-locked.svg │ ├── pro-chip.svg │ ├── pro-upgrade-grid-bg.svg │ ├── pro-upgrade-overlay.svg │ ├── spinner.gif │ ├── spinner@2x.gif │ ├── wp-engine-horizontal-black.svg │ └── wp-engine-horizontal-white.svg └── inc │ ├── color-picker-alpha │ ├── index.php │ ├── wp-color-picker-alpha.js │ └── wp-color-picker-alpha.min.js │ ├── datepicker │ ├── images │ │ ├── index.php │ │ ├── ui-bg_highlight-soft_0_ffffff_1x100.png │ │ ├── ui-icons_444444_256x240.png │ │ ├── ui-icons_DDDDDD_256x240.png │ │ └── ui-icons_ffffff_256x240.png │ ├── index.php │ ├── jquery-ui.css │ └── jquery-ui.min.css │ ├── index.php │ ├── select2 │ ├── 3 │ │ ├── index.php │ │ ├── select2-spinner.gif │ │ ├── select2.css │ │ ├── select2.js │ │ ├── select2.min.js │ │ ├── select2.png │ │ └── select2x2.png │ ├── 4 │ │ ├── index.php │ │ ├── select2.css │ │ ├── select2.full.js │ │ ├── select2.full.min.js │ │ ├── select2.js │ │ ├── select2.min.css │ │ └── select2.min.js │ └── index.php │ └── timepicker │ ├── index.php │ ├── jquery-ui-timepicker-addon.css │ ├── jquery-ui-timepicker-addon.js │ ├── jquery-ui-timepicker-addon.min.css │ └── jquery-ui-timepicker-addon.min.js ├── composer.json ├── includes ├── Updater │ ├── Updater.php │ ├── index.php │ └── init.php ├── acf-bidirectional-functions.php ├── acf-field-functions.php ├── acf-field-group-functions.php ├── acf-form-functions.php ├── acf-helper-functions.php ├── acf-hook-functions.php ├── acf-input-functions.php ├── acf-internal-post-type-functions.php ├── acf-meta-functions.php ├── acf-post-functions.php ├── acf-post-type-functions.php ├── acf-taxonomy-functions.php ├── acf-user-functions.php ├── acf-utility-functions.php ├── acf-value-functions.php ├── acf-wp-functions.php ├── admin │ ├── admin-internal-post-type-list.php │ ├── admin-internal-post-type.php │ ├── admin-notices.php │ ├── admin-options-pages-preview.php │ ├── admin-tools.php │ ├── admin-upgrade.php │ ├── admin.php │ ├── index.php │ ├── post-types │ │ ├── admin-field-group.php │ │ ├── admin-field-groups.php │ │ ├── admin-post-type.php │ │ ├── admin-post-types.php │ │ ├── admin-taxonomies.php │ │ ├── admin-taxonomy.php │ │ └── index.php │ ├── tools │ │ ├── class-acf-admin-tool-export.php │ │ ├── class-acf-admin-tool-import.php │ │ ├── class-acf-admin-tool.php │ │ └── index.php │ └── views │ │ ├── acf-field-group │ │ ├── conditional-logic.php │ │ ├── field.php │ │ ├── fields.php │ │ ├── index.php │ │ ├── list-empty.php │ │ ├── location-group.php │ │ ├── location-rule.php │ │ ├── locations.php │ │ ├── options.php │ │ └── pro-features.php │ │ ├── acf-post-type │ │ ├── advanced-settings.php │ │ ├── basic-settings.php │ │ ├── index.php │ │ └── list-empty.php │ │ ├── acf-taxonomy │ │ ├── advanced-settings.php │ │ ├── basic-settings.php │ │ ├── index.php │ │ └── list-empty.php │ │ ├── browse-fields-modal.php │ │ ├── escaped-html-notice.php │ │ ├── global │ │ ├── form-top.php │ │ ├── header.php │ │ ├── index.php │ │ └── navigation.php │ │ ├── index.php │ │ ├── options-page-preview.php │ │ ├── tools │ │ ├── index.php │ │ └── tools.php │ │ └── upgrade │ │ ├── index.php │ │ ├── network.php │ │ ├── notice.php │ │ └── upgrade.php ├── ajax │ ├── class-acf-ajax-check-screen.php │ ├── class-acf-ajax-local-json-diff.php │ ├── class-acf-ajax-query-users.php │ ├── class-acf-ajax-query.php │ ├── class-acf-ajax-upgrade.php │ ├── class-acf-ajax-user-setting.php │ ├── class-acf-ajax.php │ └── index.php ├── api │ ├── api-helpers.php │ ├── api-template.php │ ├── api-term.php │ └── index.php ├── assets.php ├── class-acf-data.php ├── class-acf-internal-post-type.php ├── compatibility.php ├── deprecated.php ├── fields.php ├── fields │ ├── class-acf-field-accordion.php │ ├── class-acf-field-button-group.php │ ├── class-acf-field-checkbox.php │ ├── class-acf-field-color_picker.php │ ├── class-acf-field-date_picker.php │ ├── class-acf-field-date_time_picker.php │ ├── class-acf-field-email.php │ ├── class-acf-field-file.php │ ├── class-acf-field-google-map.php │ ├── class-acf-field-group.php │ ├── class-acf-field-icon_picker.php │ ├── class-acf-field-image.php │ ├── class-acf-field-link.php │ ├── class-acf-field-message.php │ ├── class-acf-field-number.php │ ├── class-acf-field-oembed.php │ ├── class-acf-field-output.php │ ├── class-acf-field-page_link.php │ ├── class-acf-field-password.php │ ├── class-acf-field-post_object.php │ ├── class-acf-field-radio.php │ ├── class-acf-field-range.php │ ├── class-acf-field-relationship.php │ ├── class-acf-field-select.php │ ├── class-acf-field-separator.php │ ├── class-acf-field-tab.php │ ├── class-acf-field-taxonomy.php │ ├── class-acf-field-text.php │ ├── class-acf-field-textarea.php │ ├── class-acf-field-time_picker.php │ ├── class-acf-field-true_false.php │ ├── class-acf-field-url.php │ ├── class-acf-field-user.php │ ├── class-acf-field-wysiwyg.php │ ├── class-acf-field.php │ └── index.php ├── forms │ ├── form-attachment.php │ ├── form-comment.php │ ├── form-customizer.php │ ├── form-front.php │ ├── form-gutenberg.php │ ├── form-nav-menu.php │ ├── form-post.php │ ├── form-taxonomy.php │ ├── form-user.php │ ├── form-widget.php │ └── index.php ├── index.php ├── l10n.php ├── legacy │ ├── index.php │ └── legacy-locations.php ├── local-fields.php ├── local-json.php ├── local-meta.php ├── locations.php ├── locations │ ├── abstract-acf-legacy-location.php │ ├── abstract-acf-location.php │ ├── class-acf-location-attachment.php │ ├── class-acf-location-comment.php │ ├── class-acf-location-current-user-role.php │ ├── class-acf-location-current-user.php │ ├── class-acf-location-nav-menu-item.php │ ├── class-acf-location-nav-menu.php │ ├── class-acf-location-page-parent.php │ ├── class-acf-location-page-template.php │ ├── class-acf-location-page-type.php │ ├── class-acf-location-page.php │ ├── class-acf-location-post-category.php │ ├── class-acf-location-post-format.php │ ├── class-acf-location-post-status.php │ ├── class-acf-location-post-taxonomy.php │ ├── class-acf-location-post-template.php │ ├── class-acf-location-post-type.php │ ├── class-acf-location-post.php │ ├── class-acf-location-taxonomy.php │ ├── class-acf-location-user-form.php │ ├── class-acf-location-user-role.php │ ├── class-acf-location-widget.php │ └── index.php ├── loop.php ├── media.php ├── post-types │ ├── class-acf-field-group.php │ ├── class-acf-post-type.php │ ├── class-acf-taxonomy.php │ └── index.php ├── rest-api.php ├── rest-api │ ├── acf-rest-api-functions.php │ ├── class-acf-rest-api.php │ ├── class-acf-rest-embed-links.php │ ├── class-acf-rest-request.php │ └── index.php ├── revisions.php ├── third-party.php ├── upgrades.php ├── validation.php ├── walkers │ ├── class-acf-walker-taxonomy-field.php │ └── index.php └── wpml.php ├── index.php ├── lang ├── acf-ar.l10n.php ├── acf-ar.mo ├── acf-ar.po ├── acf-bg_BG.l10n.php ├── acf-bg_BG.mo ├── acf-bg_BG.po ├── acf-ca.l10n.php ├── acf-ca.mo ├── acf-ca.po ├── acf-cs_CZ.l10n.php ├── acf-cs_CZ.mo ├── acf-cs_CZ.po ├── acf-da_DK.l10n.php ├── acf-da_DK.mo ├── acf-da_DK.po ├── acf-de_CH.l10n.php ├── acf-de_CH.mo ├── acf-de_CH.po ├── acf-de_DE.l10n.php ├── acf-de_DE.mo ├── acf-de_DE.po ├── acf-de_DE_formal.l10n.php ├── acf-de_DE_formal.mo ├── acf-de_DE_formal.po ├── acf-el.l10n.php ├── acf-el.mo ├── acf-el.po ├── acf-en_CA.l10n.php ├── acf-en_CA.mo ├── acf-en_CA.po ├── acf-en_GB.l10n.php ├── acf-en_GB.mo ├── acf-en_GB.po ├── acf-en_ZA.l10n.php ├── acf-en_ZA.mo ├── acf-en_ZA.po ├── acf-es_CL.l10n.php ├── acf-es_CL.mo ├── acf-es_CL.po ├── acf-es_CO.l10n.php ├── acf-es_CO.mo ├── acf-es_CO.po ├── acf-es_CR.l10n.php ├── acf-es_CR.mo ├── acf-es_CR.po ├── acf-es_EC.l10n.php ├── acf-es_EC.mo ├── acf-es_EC.po ├── acf-es_ES.l10n.php ├── acf-es_ES.mo ├── acf-es_ES.po ├── acf-es_MX.l10n.php ├── acf-es_MX.mo ├── acf-es_MX.po ├── acf-es_VE.l10n.php ├── acf-es_VE.mo ├── acf-es_VE.po ├── acf-fa_AF.l10n.php ├── acf-fa_AF.mo ├── acf-fa_AF.po ├── acf-fa_IR.l10n.php ├── acf-fa_IR.mo ├── acf-fa_IR.po ├── acf-fi.l10n.php ├── acf-fi.mo ├── acf-fi.po ├── acf-fr_CA.l10n.php ├── acf-fr_CA.mo ├── acf-fr_CA.po ├── acf-fr_FR.l10n.php ├── acf-fr_FR.mo ├── acf-fr_FR.po ├── acf-gl_ES.l10n.php ├── acf-gl_ES.mo ├── acf-gl_ES.po ├── acf-gu.l10n.php ├── acf-gu.mo ├── acf-gu.po ├── acf-he_IL.l10n.php ├── acf-he_IL.mo ├── acf-he_IL.po ├── acf-hr.l10n.php ├── acf-hr.mo ├── acf-hr.po ├── acf-hu_HU.l10n.php ├── acf-hu_HU.mo ├── acf-hu_HU.po ├── acf-id_ID.l10n.php ├── acf-id_ID.mo ├── acf-id_ID.po ├── acf-it_IT.l10n.php ├── acf-it_IT.mo ├── acf-it_IT.po ├── acf-ja.l10n.php ├── acf-ja.mo ├── acf-ja.po ├── acf-ko_KR.l10n.php ├── acf-ko_KR.mo ├── acf-ko_KR.po ├── acf-nb_NO.l10n.php ├── acf-nb_NO.mo ├── acf-nb_NO.po ├── acf-nl_BE.l10n.php ├── acf-nl_BE.mo ├── acf-nl_BE.po ├── acf-nl_NL.l10n.php ├── acf-nl_NL.mo ├── acf-nl_NL.po ├── acf-nl_NL_formal.l10n.php ├── acf-nl_NL_formal.mo ├── acf-nl_NL_formal.po ├── acf-pl_PL.l10n.php ├── acf-pl_PL.mo ├── acf-pl_PL.po ├── acf-pt_AO.l10n.php ├── acf-pt_AO.mo ├── acf-pt_AO.po ├── acf-pt_BR.l10n.php ├── acf-pt_BR.mo ├── acf-pt_BR.po ├── acf-pt_PT.l10n.php ├── acf-pt_PT.mo ├── acf-pt_PT.po ├── acf-ro_RO.l10n.php ├── acf-ro_RO.mo ├── acf-ro_RO.po ├── acf-ru_RU.l10n.php ├── acf-ru_RU.mo ├── acf-ru_RU.po ├── acf-sk_SK.l10n.php ├── acf-sk_SK.mo ├── acf-sk_SK.po ├── acf-sv_SE.l10n.php ├── acf-sv_SE.mo ├── acf-sv_SE.po ├── acf-tr_TR.l10n.php ├── acf-tr_TR.mo ├── acf-tr_TR.po ├── acf-uk.l10n.php ├── acf-uk.mo ├── acf-uk.po ├── acf-vi.l10n.php ├── acf-vi.mo ├── acf-vi.po ├── acf-zh_CN.l10n.php ├── acf-zh_CN.mo ├── acf-zh_CN.po ├── acf-zh_TW.l10n.php ├── acf-zh_TW.mo ├── acf-zh_TW.po ├── index.php └── pro │ ├── acf-ar.po │ ├── acf-bg_BG.po │ ├── acf-ca.po │ ├── acf-cs_CZ.po │ ├── acf-de_CH.po │ ├── acf-de_DE.po │ ├── acf-de_DE_formal.po │ ├── acf-en_GB.po │ ├── acf-es_ES.po │ ├── acf-fa_IR.po │ ├── acf-fi.po │ ├── acf-fr_CA.po │ ├── acf-fr_FR.po │ ├── acf-he_IL.po │ ├── acf-hr.po │ ├── acf-hu_HU.po │ ├── acf-id_ID.po │ ├── acf-it_IT.po │ ├── acf-ja.po │ ├── acf-nb_NO.po │ ├── acf-nl_BE.po │ ├── acf-nl_NL.po │ ├── acf-nl_NL_formal.po │ ├── acf-pl_PL.po │ ├── acf-pt_BR.po │ ├── acf-pt_PT.po │ ├── acf-ro_RO.po │ ├── acf-ru_RU.po │ ├── acf-sk_SK.po │ ├── acf-sv_SE.po │ ├── acf-tr_TR.po │ ├── acf-uk.po │ ├── acf-zh_CN.po │ ├── acf-zh_TW.po │ ├── acf.pot │ └── index.php ├── pro ├── acf-pro.php ├── acf-ui-options-page-functions.php ├── admin │ ├── admin-options-page.php │ ├── admin-updates.php │ ├── index.php │ ├── post-types │ │ ├── admin-ui-options-page.php │ │ ├── admin-ui-options-pages.php │ │ └── index.php │ └── views │ │ ├── acf-ui-options-page │ │ ├── advanced-settings.php │ │ ├── basic-settings.php │ │ ├── create-options-page-modal.php │ │ ├── index.php │ │ └── list-empty.php │ │ ├── html-options-page.php │ │ ├── html-settings-updates.php │ │ └── index.php ├── blocks.php ├── fields │ ├── class-acf-field-clone.php │ ├── class-acf-field-flexible-content.php │ ├── class-acf-field-gallery.php │ ├── class-acf-field-repeater.php │ ├── class-acf-repeater-table.php │ └── index.php ├── index.php ├── locations │ ├── class-acf-location-block.php │ ├── class-acf-location-options-page.php │ └── index.php ├── options-page.php ├── post-types │ ├── acf-ui-options-page.php │ └── index.php └── updates.php ├── readme.txt ├── src ├── Blocks │ ├── Bindings.php │ └── index.php ├── Meta │ ├── Comment.php │ ├── MetaLocation.php │ ├── Option.php │ ├── Post.php │ ├── Term.php │ └── User.php ├── Pro │ ├── Forms │ │ └── WC_Order.php │ └── Meta │ │ └── WooOrder.php └── Site_Health │ └── Site_Health.php └── vendor ├── autoload.php └── composer ├── ClassLoader.php ├── LICENSE ├── autoload_classmap.php ├── autoload_namespaces.php ├── autoload_psr4.php ├── autoload_real.php └── autoload_static.php /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .op 3 | -------------------------------------------------------------------------------- /assets/build/css/index.php: -------------------------------------------------------------------------------- 1 | {var e;(e=jQuery)(".acf-escaped-html-notice").on("click",".acf-show-more-details",(function(t){t.preventDefault();const c=e(t.target),a=c.closest(".acf-escaped-html-notice").find(".acf-error-details");a.is(":hidden")?(a.slideDown(100),c.text(acf_escaped_html_notice.hide_details)):(a.slideUp(100),c.text(acf_escaped_html_notice.show_details))}))})(); -------------------------------------------------------------------------------- /assets/build/js/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /assets/images/empty-post-types.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /assets/images/empty-taxonomies.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /assets/images/face-sad.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/field-preview-grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-premium/advanced-custom-fields-pro/adec36a96078161a71f35cd332322a96740ccda7/assets/images/field-preview-grid.png -------------------------------------------------------------------------------- /assets/images/field-states/checkbox-active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/field-states/checkbox-indeterminate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/field-states/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-button-group.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-checkbox.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-clone.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-color-picker.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-date-picker.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-date-time-picker.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-default.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-email.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-file.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-flexible-content.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-gallery.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-google-map.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-group.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-icon-picker.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-image.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-message.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-number.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-oembed.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-page-link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-password.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-post-object.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-radio.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-range.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-relationship.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-repeater.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-select.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-taxonomy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-text.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-textarea.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-time-picker.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-true-false.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-url.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/icon-field-wysiwyg.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/field-type-icons/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/images/icons/icon-add.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-alert-triangle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/icons/icon-arrow-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-arrow-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-arrow-up-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/images/icons/icon-check-circle-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-chevron-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-chevron-left-double.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-chevron-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-chevron-right-double.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-chevron-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-chevron-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-close-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-copy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-document.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/icons/icon-dots-grid.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /assets/images/icons/icon-draggable.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/icons/icon-export.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/icons/icon-field-groups.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/icons/icon-fields.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-globe.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-help.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-hidden.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-import.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /assets/images/icons/icon-info-red.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-info-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-info-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/images/icons/icon-info.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-key-solid.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/images/icons/icon-key.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/icons/icon-layout.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-lock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/icons/icon-post-type.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/icons/icon-regenerate.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/icons/icon-search.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-settings.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-sliders.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/icons/icon-stars.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-taxonomies.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/icons/icon-time.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-tools.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-trash.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-updates.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-warning-alt-red.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/icons/icon-warning-alt.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/icon-warning.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/icons/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /assets/images/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-premium/advanced-custom-fields-pro/adec36a96078161a71f35cd332322a96740ccda7/assets/images/spinner.gif -------------------------------------------------------------------------------- /assets/images/spinner@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-premium/advanced-custom-fields-pro/adec36a96078161a71f35cd332322a96740ccda7/assets/images/spinner@2x.gif -------------------------------------------------------------------------------- /assets/inc/color-picker-alpha/index.php: -------------------------------------------------------------------------------- 1 | div { display:inline-block; margin:0; } 25 | .ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before, 26 | .ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before { content:':'; display:inline-block; } 27 | .ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before, 28 | .ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before { content:'.'; display:inline-block; } 29 | .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide, 30 | .ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{ display: none; } -------------------------------------------------------------------------------- /assets/inc/timepicker/jquery-ui-timepicker-addon.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20 2 | * http://trentrichardson.com/examples/timepicker 3 | * Copyright (c) 2016 Trent Richardson; Licensed MIT */ 4 | 5 | .ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:0 0;border:0;margin:0;padding:0}.ui-timepicker-div .ui_tpicker_unit_hide{display:none}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input{background:0 0;color:inherit;border:0;outline:0;border-bottom:solid 1px #555;width:95%}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus{border-bottom-color:#aaa}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px}.ui-timepicker-div.ui-timepicker-oneLine{padding-right:2px}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time,.ui-timepicker-div.ui-timepicker-oneLine dt{display:none}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label{display:block;padding-top:2px}.ui-timepicker-div.ui-timepicker-oneLine dl{text-align:right}.ui-timepicker-div.ui-timepicker-oneLine dl dd,.ui-timepicker-div.ui-timepicker-oneLine dl dd>div{display:inline-block;margin:0}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before{content:':';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before{content:'.';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{display:none} -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wordpress-premium/advanced-custom-fields-pro", 3 | "type": "wordpress-plugin", 4 | "description": "Advanced Custom Fields for WordPress Developers.", 5 | "license": "GPL-2.0-or-later", 6 | "require": {} 7 | } 8 | -------------------------------------------------------------------------------- /includes/Updater/index.php: -------------------------------------------------------------------------------- 1 | get_page_templates( null, $post_type ); 29 | if ( $templates ) { 30 | $post_templates[ $post_type ] = $templates; 31 | } 32 | } 33 | } 34 | 35 | // Update store. 36 | acf_set_data( 'post_templates', $post_templates ); 37 | 38 | // Return templates. 39 | return $post_templates; 40 | } 41 | -------------------------------------------------------------------------------- /includes/admin/admin-options-pages-preview.php: -------------------------------------------------------------------------------- 1 | $screen->id ); 63 | acf_get_view( 'options-page-preview', $view ); 64 | } 65 | } 66 | 67 | new ACF_Admin_Options_Preview(); 68 | endif; 69 | -------------------------------------------------------------------------------- /includes/admin/index.php: -------------------------------------------------------------------------------- 1 | 9 |
10 |
11 | 12 |

13 |

14 | field groups to group custom fields together, and then attach those fields to edit screens.', 'acf' ), 19 | acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/creating-a-field-group/', 'docs', 'no-field-groups' ) 20 | ) 21 | ); 22 | ?> 23 |

24 | 25 |

26 | getting started guide.', 'acf' ), 31 | acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/getting-started-with-acf/', 'docs', 'no-field-groups' ) 32 | ) 33 | ); 34 | ?> 35 |

36 |
37 |
38 | -------------------------------------------------------------------------------- /includes/admin/views/acf-field-group/location-group.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |

4 | 5 | 6 | 7 | $rule ) : 9 | 10 | // validate rule 11 | $rule = acf_validate_location_rule( $rule ); 12 | 13 | // append id and group 14 | $rule['id'] = "rule_{$i}"; 15 | $rule['group'] = $group_id; 16 | 17 | // view 18 | acf_get_view( 19 | 'acf-field-group/location-rule', 20 | array( 21 | 'rule' => $rule, 22 | ) 23 | ); 24 | endforeach; 25 | ?> 26 | 27 |
28 | 29 |
30 | -------------------------------------------------------------------------------- /includes/admin/views/acf-field-group/location-rule.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 'select', 19 | 'name' => 'param', 20 | 'prefix' => $prefix, 21 | 'value' => $rule['param'], 22 | 'choices' => $choices, 23 | 'class' => 'refresh-location-rule', 24 | ) 25 | ); 26 | } 27 | 28 | ?> 29 | 30 | 31 | 'select', 42 | 'name' => 'operator', 43 | 'prefix' => $prefix, 44 | 'value' => $rule['operator'], 45 | 'choices' => $choices, 46 | ) 47 | ); 48 | 49 | // custom 50 | } else { 51 | echo acf_esc_html( $choices ); 52 | } 53 | 54 | ?> 55 | 56 | 57 | 'select', 68 | 'name' => 'value', 69 | 'class' => 'location-rule-value', 70 | 'prefix' => $prefix, 71 | 'value' => $rule['value'], 72 | 'choices' => $choices, 73 | ) 74 | ); 75 | 76 | // custom 77 | } else { 78 | echo acf_esc_html( $choices ); 79 | } 80 | 81 | ?> 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /includes/admin/views/acf-field-group/locations.php: -------------------------------------------------------------------------------- 1 | 7 |
8 |
9 | 10 | ? 11 |
12 |
13 |
14 | 15 | $group ) : 17 | 18 | // bail early if no group 19 | if ( empty( $group ) ) { 20 | return; 21 | } 22 | 23 | 24 | // view 25 | acf_get_view( 26 | 'acf-field-group/location-group', 27 | array( 28 | 'group' => $group, 29 | 'group_id' => "group_{$i}", 30 | ) 31 | ); 32 | endforeach; 33 | ?> 34 | 35 |

36 | 37 | 38 | 39 |
40 |
41 |
42 | 52 | -------------------------------------------------------------------------------- /includes/admin/views/acf-post-type/index.php: -------------------------------------------------------------------------------- 1 | 9 |
10 |
11 | 12 |

13 |

14 | 15 |

16 | getting started guide.', 'acf' ), 21 | acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/getting-started-with-acf/', 'docs', 'no-post-types' ) 22 | ) 23 | ); 24 | ?> 25 |

26 |
27 |
28 | -------------------------------------------------------------------------------- /includes/admin/views/acf-taxonomy/index.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |
12 | 13 |

14 |

15 | 16 |

17 | getting started guide.', 'acf' ), 22 | acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/getting-started-with-acf/', 'docs', 'no-taxonomies' ) 23 | ) 24 | ); 25 | ?> 26 |

27 |
28 |
29 | -------------------------------------------------------------------------------- /includes/admin/views/global/header.php: -------------------------------------------------------------------------------- 1 | labels->name; 17 | } 18 | if ( $page_title ) { 19 | ?> 20 |
21 | 22 |

23 | 26 | 27 |
<?php esc_attr_e( 'ACF PRO logo', 'acf' ); ?>
28 | 31 |

32 | 33 | 34 | 35 | 36 | 37 | 38 | cap->create_posts ) ) { 40 | $class = 'acf-btn acf-btn-sm'; 41 | if ( 'acf-ui-options-page' === $post_type && acf_is_pro() && ! acf_pro_is_license_active() ) { 42 | $class .= ' disabled'; 43 | } 44 | 45 | printf( 46 | '%3$s', 47 | esc_url( admin_url( $post_new_file ) ), 48 | esc_attr( $class ), 49 | esc_html( $post_type_object->labels->add_new ) 50 | ); 51 | } 52 | ?> 53 | 54 |
55 | 56 | -------------------------------------------------------------------------------- /includes/admin/views/global/index.php: -------------------------------------------------------------------------------- 1 | options pages are custom admin pages for managing global settings via fields. You can create multiple pages and sub-pages.', 'acf' ), 8 | acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/options-page/', 'docs', 'no-options-pages' ) 9 | ); 10 | 11 | $acf_getting_started = sprintf( 12 | /* translators: %s url to getting started guide */ 13 | __( 'New to ACF? Take a look at our getting started guide.', 'acf' ), 14 | acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/getting-started-with-acf/', 'docs', 'no-options-pages' ) 15 | ); 16 | 17 | ?> 18 |
19 | 20 | 21 | 22 | 36 | 37 | 38 |
23 |
24 |
25 | 26 |

27 |

28 |
29 | 30 | 31 |
32 |

33 |
34 |
35 |
39 |
40 | -------------------------------------------------------------------------------- /includes/admin/views/tools/index.php: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 |

14 | 15 | 16 | 17 | 18 |

19 | 20 |
21 | 22 |
23 | 24 | 29 |
30 | -------------------------------------------------------------------------------- /includes/admin/views/upgrade/index.php: -------------------------------------------------------------------------------- 1 | 22 |
23 |
24 |
25 | 26 |

27 | 28 |


29 |

30 | 31 | 32 |

33 | 34 |
35 |
36 | 37 |
38 | 39 |
40 |
41 | 42 | 51 | 52 | -------------------------------------------------------------------------------- /includes/admin/views/upgrade/upgrade.php: -------------------------------------------------------------------------------- 1 | 11 | 21 |
22 | 23 |

24 | 25 | 26 | 27 |

28 | 29 |

30 |

31 | 32 |

See what\'s new', 'acf' ), esc_url( admin_url( 'edit.php?post_type=acf-field-group' ) ) ) ); ?>

33 | 34 | 90 | 91 | 92 | 93 |

94 | 95 | 96 |
97 | -------------------------------------------------------------------------------- /includes/ajax/class-acf-ajax-upgrade.php: -------------------------------------------------------------------------------- 1 | has( 'value' ) ) { 43 | return acf_update_user_setting( $this->get( 'name' ), $this->get( 'value' ) ); 44 | 45 | // get 46 | } else { 47 | return acf_get_user_setting( $this->get( 'name' ) ); 48 | } 49 | } 50 | } 51 | 52 | acf_new_instance( 'ACF_Ajax_User_Setting' ); 53 | endif; // class_exists check 54 | -------------------------------------------------------------------------------- /includes/ajax/index.php: -------------------------------------------------------------------------------- 1 | name = 'output'; 20 | $this->label = 'output'; 21 | $this->public = false; 22 | $this->defaults = array( 23 | 'html' => false, 24 | ); 25 | } 26 | 27 | 28 | /** 29 | * The render field call. Deprecated since ACF 6.3.2. 30 | * 31 | * @param array $field The $field being edited 32 | * @return false 33 | */ 34 | public function render_field( $field ) { 35 | 36 | // Deprecated since 6.3.2 and will be removed in a future release. 37 | _deprecated_function( __FUNCTION__, '6.3.2' ); 38 | return false; 39 | } 40 | } 41 | 42 | 43 | // initialize 44 | acf_register_field_type( 'acf_field_output' ); 45 | endif; // class_exists check 46 | -------------------------------------------------------------------------------- /includes/fields/class-acf-field-separator.php: -------------------------------------------------------------------------------- 1 | name = 'separator'; 22 | $this->label = __( 'Separator', 'acf' ); 23 | $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-separator.png'; 24 | $this->supports = array( 'required' => false ); 25 | $this->category = 'layout'; 26 | } 27 | 28 | 29 | /** 30 | * Create the HTML interface for your field 31 | * 32 | * @param $field - an array holding all the field's data 33 | * 34 | * @type action 35 | * @since 3.6 36 | * @date 23/01/13 37 | */ 38 | function render_field( $field ) { 39 | 40 | /* do nothing */ 41 | } 42 | 43 | 44 | /** 45 | * This filter is appied to the $field after it is loaded from the database 46 | * 47 | * @type filter 48 | * @since 3.6 49 | * @date 23/01/13 50 | * 51 | * @param $field - the field array holding all the field options 52 | * 53 | * @return $field - the field array holding all the field options 54 | */ 55 | function load_field( $field ) { 56 | 57 | // remove name to avoid caching issue 58 | $field['name'] = ''; 59 | 60 | // remove required to avoid JS issues 61 | $field['required'] = 0; 62 | 63 | // set value other than 'null' to avoid ACF loading / caching issue 64 | $field['value'] = false; 65 | 66 | // return 67 | return $field; 68 | } 69 | } 70 | 71 | 72 | // initialize 73 | acf_register_field_type( 'acf_field_separator' ); 74 | endif; // class_exists check 75 | -------------------------------------------------------------------------------- /includes/fields/index.php: -------------------------------------------------------------------------------- 1 | name}", array( $this, 'rule_match' ), 5, 3 ); 24 | } 25 | if ( method_exists( $this, 'rule_operators' ) ) { 26 | add_filter( "acf/location/rule_operators/{$this->name}", array( $this, 'rule_operators' ), 5, 2 ); 27 | } 28 | if ( method_exists( $this, 'rule_values' ) ) { 29 | add_filter( "acf/location/rule_values/{$this->name}", array( $this, 'rule_values' ), 5, 2 ); 30 | } 31 | } 32 | 33 | /** 34 | * Magic __call method for backwards compatibility. 35 | * 36 | * @date 10/4/20 37 | * @since 5.9.0 38 | * 39 | * @param string $name The method name. 40 | * @param array $arguments The array of arguments. 41 | * @return mixed 42 | */ 43 | public function __call( $name, $arguments ) { 44 | 45 | // Add backwards compatibility for legacy methods. 46 | // - Combine 3x legacy filters cases together (remove first args). 47 | switch ( $name ) { 48 | case 'rule_match': 49 | $method = isset( $method ) ? $method : 'match'; 50 | $arguments[3] = isset( $arguments[3] ) ? $arguments[3] : false; // Add $field_group param. 51 | case 'rule_operators': 52 | $method = isset( $method ) ? $method : 'get_operators'; 53 | case 'rule_values': 54 | $method = isset( $method ) ? $method : 'get_values'; 55 | array_shift( $arguments ); 56 | return call_user_func_array( array( $this, $method ), $arguments ); 57 | case 'compare': 58 | return call_user_func_array( array( $this, 'compare_to_rule' ), $arguments ); 59 | } 60 | } 61 | } 62 | 63 | endif; // class_exists check 64 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-attachment.php: -------------------------------------------------------------------------------- 1 | name = 'attachment'; 22 | $this->label = __( 'Attachment', 'acf' ); 23 | $this->category = 'forms'; 24 | $this->object_type = 'attachment'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | 40 | // Check screen args. 41 | if ( isset( $screen['attachment'] ) ) { 42 | $attachment = $screen['attachment']; 43 | } else { 44 | return false; 45 | } 46 | 47 | // Get attachment mime type 48 | $mime_type = get_post_mime_type( $attachment ); 49 | 50 | // Allow for unspecific mim_type matching such as "image" or "video". 51 | if ( ! strpos( $rule['value'], '/' ) ) { 52 | 53 | // Explode mime_type into bits ([0] => type, [1] => subtype) and match type. 54 | $bits = explode( '/', $mime_type ); 55 | if ( $bits[0] === $rule['value'] ) { 56 | $mime_type = $rule['value']; 57 | } 58 | } 59 | return $this->compare_to_rule( $mime_type, $rule ); 60 | } 61 | 62 | /** 63 | * Returns an array of possible values for this rule type. 64 | * 65 | * @date 9/4/20 66 | * @since 5.9.0 67 | * 68 | * @param array $rule A location rule. 69 | * @return array 70 | */ 71 | public function get_values( $rule ) { 72 | $choices = array( 73 | 'all' => __( 'All', 'acf' ), 74 | ); 75 | 76 | // Get mime types and append into optgroups. 77 | $mime_types = get_allowed_mime_types(); 78 | foreach ( $mime_types as $regex => $mime_type ) { 79 | 80 | // Get type "image" from mime_type "image/jpeg". 81 | $type = current( explode( '/', $mime_type ) ); 82 | 83 | // Append group and mimetype. 84 | $choices[ $type ][ $type ] = sprintf( __( 'All %s formats', 'acf' ), $type ); 85 | $choices[ $type ][ $mime_type ] = "$regex ($mime_type)"; 86 | } 87 | 88 | // return 89 | return $choices; 90 | } 91 | } 92 | 93 | // Register. 94 | acf_register_location_type( 'ACF_Location_Attachment' ); 95 | endif; // class_exists check 96 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-comment.php: -------------------------------------------------------------------------------- 1 | name = 'comment'; 22 | $this->label = __( 'Comment', 'acf' ); 23 | $this->category = 'forms'; 24 | $this->object_type = 'comment'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | 40 | // Check screen args. 41 | if ( isset( $screen['comment'] ) ) { 42 | $comment = $screen['comment']; 43 | } else { 44 | return false; 45 | } 46 | return $this->compare_to_rule( $comment, $rule ); 47 | } 48 | 49 | /** 50 | * Returns an array of possible values for this rule type. 51 | * 52 | * @date 9/4/20 53 | * @since 5.9.0 54 | * 55 | * @param array $rule A location rule. 56 | * @return array 57 | */ 58 | public function get_values( $rule ) { 59 | return array_merge( 60 | array( 61 | 'all' => __( 'All', 'acf' ), 62 | ), 63 | acf_get_pretty_post_types() // Todo: Change to post types that support comments. 64 | ); 65 | } 66 | } 67 | 68 | // Register. 69 | acf_register_location_type( 'ACF_Location_Comment' ); 70 | endif; // class_exists check 71 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-current-user-role.php: -------------------------------------------------------------------------------- 1 | name = 'current_user_role'; 22 | $this->label = __( 'Current User Role', 'acf' ); 23 | $this->category = 'user'; 24 | } 25 | 26 | /** 27 | * Matches the provided rule against the screen args returning a bool result. 28 | * 29 | * @date 9/4/20 30 | * @since 5.9.0 31 | * 32 | * @param array $rule The location rule. 33 | * @param array $screen The screen args. 34 | * @param array $field_group The field group settings. 35 | * @return boolean 36 | */ 37 | public function match( $rule, $screen, $field_group ) { 38 | 39 | // Get current user. 40 | $user = wp_get_current_user(); 41 | if ( ! $user ) { 42 | return false; 43 | } 44 | 45 | // Check super_admin value. 46 | if ( $rule['value'] == 'super_admin' ) { 47 | $result = is_super_admin( $user->ID ); 48 | 49 | // Check role. 50 | } else { 51 | $result = in_array( $rule['value'], $user->roles ); 52 | } 53 | 54 | // Reverse result for "!=" operator. 55 | if ( $rule['operator'] === '!=' ) { 56 | return ! $result; 57 | } 58 | return $result; 59 | } 60 | 61 | /** 62 | * Returns an array of possible values for this rule type. 63 | * 64 | * @date 9/4/20 65 | * @since 5.9.0 66 | * 67 | * @param array $rule A location rule. 68 | * @return array 69 | */ 70 | public function get_values( $rule ) { 71 | $choices = wp_roles()->get_names(); 72 | 73 | // Prepend Super Admin choice. 74 | if ( is_multisite() ) { 75 | return array_merge( 76 | array( 77 | 'super_admin' => __( 'Super Admin', 'acf' ), 78 | ), 79 | $choices 80 | ); 81 | } 82 | return $choices; 83 | } 84 | } 85 | 86 | // Register. 87 | acf_register_location_type( 'ACF_Location_Current_User_Role' ); 88 | endif; // class_exists check 89 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-current-user.php: -------------------------------------------------------------------------------- 1 | name = 'current_user'; 22 | $this->label = __( 'Current User', 'acf' ); 23 | $this->category = 'user'; 24 | } 25 | 26 | /** 27 | * Matches the provided rule against the screen args returning a bool result. 28 | * 29 | * @date 9/4/20 30 | * @since 5.9.0 31 | * 32 | * @param array $rule The location rule. 33 | * @param array $screen The screen args. 34 | * @param array $field_group The field group settings. 35 | * @return boolean 36 | */ 37 | public function match( $rule, $screen, $field_group ) { 38 | switch ( $rule['value'] ) { 39 | case 'logged_in': 40 | $result = is_user_logged_in(); 41 | break; 42 | case 'viewing_front': 43 | $result = ! is_admin(); 44 | break; 45 | case 'viewing_back': 46 | $result = is_admin(); 47 | break; 48 | default: 49 | $result = false; 50 | break; 51 | } 52 | 53 | // Reverse result for "!=" operator. 54 | if ( $rule['operator'] === '!=' ) { 55 | return ! $result; 56 | } 57 | return $result; 58 | } 59 | 60 | /** 61 | * Returns an array of possible values for this rule type. 62 | * 63 | * @date 9/4/20 64 | * @since 5.9.0 65 | * 66 | * @param array $rule A location rule. 67 | * @return array 68 | */ 69 | public function get_values( $rule ) { 70 | return array( 71 | 'logged_in' => __( 'Logged in', 'acf' ), 72 | 'viewing_front' => __( 'Viewing front end', 'acf' ), 73 | 'viewing_back' => __( 'Viewing back end', 'acf' ), 74 | ); 75 | } 76 | } 77 | 78 | // Register. 79 | acf_register_location_type( 'ACF_Location_Current_User' ); 80 | endif; // class_exists check 81 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-nav-menu-item.php: -------------------------------------------------------------------------------- 1 | name = 'nav_menu_item'; 22 | $this->label = __( 'Menu Item', 'acf' ); 23 | $this->category = 'forms'; 24 | $this->object_type = 'menu_item'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | 40 | // Check screen args. 41 | if ( isset( $screen['nav_menu_item'] ) ) { 42 | $nav_menu_item = $screen['nav_menu_item']; 43 | } else { 44 | return false; 45 | } 46 | 47 | // Append "nav_menu" global data to $screen and call 'nav_menu' logic. 48 | if ( ! isset( $screen['nav_menu'] ) ) { 49 | $screen['nav_menu'] = acf_get_data( 'nav_menu_id' ); 50 | } 51 | return acf_get_location_type( 'nav_menu' )->match( $rule, $screen, $field_group ); 52 | } 53 | 54 | /** 55 | * Returns an array of possible values for this rule type. 56 | * 57 | * @date 9/4/20 58 | * @since 5.9.0 59 | * 60 | * @param array $rule A location rule. 61 | * @return array 62 | */ 63 | public function get_values( $rule ) { 64 | return acf_get_location_type( 'nav_menu' )->get_values( $rule ); 65 | } 66 | } 67 | 68 | // Register. 69 | acf_register_location_type( 'ACF_Location_Nav_Menu_Item' ); 70 | endif; // class_exists check 71 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-page-parent.php: -------------------------------------------------------------------------------- 1 | name = 'page_parent'; 22 | $this->label = __( 'Page Parent', 'acf' ); 23 | $this->category = 'page'; 24 | $this->object_type = 'post'; 25 | $this->object_subtype = 'page'; 26 | } 27 | 28 | /** 29 | * Matches the provided rule against the screen args returning a bool result. 30 | * 31 | * @date 9/4/20 32 | * @since 5.9.0 33 | * 34 | * @param array $rule The location rule. 35 | * @param array $screen The screen args. 36 | * @param array $field_group The field group settings. 37 | * @return boolean 38 | */ 39 | public function match( $rule, $screen, $field_group ) { 40 | 41 | // Check screen args. 42 | if ( isset( $screen['page_parent'] ) ) { 43 | $page_parent = $screen['page_parent']; 44 | } elseif ( isset( $screen['post_id'] ) ) { 45 | $post = get_post( $screen['post_id'] ); 46 | $page_parent = $post ? $post->post_parent : false; 47 | } else { 48 | return false; 49 | } 50 | 51 | // Compare rule against $page_parent. 52 | return $this->compare_to_rule( $page_parent, $rule ); 53 | } 54 | 55 | /** 56 | * Returns an array of possible values for this rule type. 57 | * 58 | * @date 9/4/20 59 | * @since 5.9.0 60 | * 61 | * @param array $rule A location rule. 62 | * @return array 63 | */ 64 | public function get_values( $rule ) { 65 | return acf_get_location_type( 'page' )->get_values( $rule ); 66 | } 67 | } 68 | 69 | // Register. 70 | acf_register_location_type( 'ACF_Location_Page_Parent' ); 71 | endif; // class_exists check 72 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-page-template.php: -------------------------------------------------------------------------------- 1 | name = 'page_template'; 22 | $this->label = __( 'Page Template', 'acf' ); 23 | $this->category = 'page'; 24 | $this->object_type = 'post'; 25 | $this->object_subtype = 'page'; 26 | } 27 | 28 | /** 29 | * Matches the provided rule against the screen args returning a bool result. 30 | * 31 | * @date 9/4/20 32 | * @since 5.9.0 33 | * 34 | * @param array $rule The location rule. 35 | * @param array $screen The screen args. 36 | * @param array $field_group The field group settings. 37 | * @return boolean 38 | */ 39 | public function match( $rule, $screen, $field_group ) { 40 | 41 | // Check screen args. 42 | if ( isset( $screen['post_type'] ) ) { 43 | $post_type = $screen['post_type']; 44 | } elseif ( isset( $screen['post_id'] ) ) { 45 | $post_type = get_post_type( $screen['post_id'] ); 46 | } else { 47 | return false; 48 | } 49 | 50 | // Page templates were extended in WordPress version 4.7 for all post types. 51 | // Prevent this rule (which is scoped to the "page" post type) appearing on all post types without a template selected (default template). 52 | if ( $rule['value'] === 'default' && $post_type !== 'page' ) { 53 | return false; 54 | } 55 | 56 | // Match rule using Post Template logic. 57 | return acf_get_location_type( 'post_template' )->match( $rule, $screen, $field_group ); 58 | } 59 | 60 | /** 61 | * Returns an array of possible values for this rule type. 62 | * 63 | * @date 9/4/20 64 | * @since 5.9.0 65 | * 66 | * @param array $rule A location rule. 67 | * @return array 68 | */ 69 | public function get_values( $rule ) { 70 | $post_templates = acf_get_post_templates(); 71 | return array_merge( 72 | array( 73 | 'default' => apply_filters( 'default_page_template_title', __( 'Default Template', 'acf' ), 'meta-box' ), 74 | ), 75 | $post_templates['page'] 76 | ); 77 | } 78 | } 79 | 80 | // Register. 81 | acf_register_location_type( 'ACF_Location_Page_Template' ); 82 | endif; // class_exists check. 83 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-page.php: -------------------------------------------------------------------------------- 1 | name = 'page'; 22 | $this->label = __( 'Page', 'acf' ); 23 | $this->category = 'page'; 24 | $this->object_type = 'post'; 25 | $this->object_subtype = 'page'; 26 | } 27 | 28 | /** 29 | * Matches the provided rule against the screen args returning a bool result. 30 | * 31 | * @date 9/4/20 32 | * @since 5.9.0 33 | * 34 | * @param array $rule The location rule. 35 | * @param array $screen The screen args. 36 | * @param array $field_group The field group settings. 37 | * @return boolean 38 | */ 39 | public function match( $rule, $screen, $field_group ) { 40 | return acf_get_location_type( 'post' )->match( $rule, $screen, $field_group ); 41 | } 42 | 43 | /** 44 | * Returns an array of possible values for this rule type. 45 | * 46 | * @date 9/4/20 47 | * @since 5.9.0 48 | * 49 | * @param array $rule A location rule. 50 | * @return array 51 | */ 52 | public function get_values( $rule ) { 53 | $choices = array(); 54 | 55 | // Get grouped posts. 56 | $groups = acf_get_grouped_posts( 57 | array( 58 | 'post_type' => array( 'page' ), 59 | ) 60 | ); 61 | 62 | // Get first group. 63 | $posts = reset( $groups ); 64 | 65 | // Append to choices. 66 | if ( $posts ) { 67 | foreach ( $posts as $post ) { 68 | $choices[ $post->ID ] = acf_get_post_title( $post ); 69 | } 70 | } 71 | return $choices; 72 | } 73 | } 74 | 75 | // Register. 76 | acf_register_location_type( 'ACF_Location_Page' ); 77 | endif; // class_exists check 78 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-post-category.php: -------------------------------------------------------------------------------- 1 | name = 'post_category'; 22 | $this->label = __( 'Post Category', 'acf' ); 23 | $this->category = 'post'; 24 | $this->object_type = 'post'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | return acf_get_location_type( 'post_taxonomy' )->match( $rule, $screen, $field_group ); 40 | } 41 | 42 | /** 43 | * Returns an array of possible values for this rule type. 44 | * 45 | * @date 9/4/20 46 | * @since 5.9.0 47 | * 48 | * @param array $rule A location rule. 49 | * @return array 50 | */ 51 | public function get_values( $rule ) { 52 | $choices = acf_get_taxonomy_terms( array( 'category' ) ); 53 | if ( $choices ) { 54 | return reset( $choices ); 55 | } 56 | return array(); 57 | } 58 | 59 | /** 60 | * Returns the object_subtype connected to this location. 61 | * 62 | * @date 1/4/20 63 | * @since 5.9.0 64 | * 65 | * @param array $rule A location rule. 66 | * @return string|array 67 | */ 68 | public function get_object_subtype( $rule ) { 69 | return acf_get_location_type( 'post_taxonomy' )->get_object_subtype( $rule ); 70 | } 71 | } 72 | 73 | // initialize 74 | acf_register_location_rule( 'ACF_Location_Post_Category' ); 75 | endif; // class_exists check 76 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-post-format.php: -------------------------------------------------------------------------------- 1 | name = 'post_format'; 22 | $this->label = __( 'Post Format', 'acf' ); 23 | $this->category = 'post'; 24 | $this->object_type = 'post'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | 40 | // Check screen args. 41 | if ( isset( $screen['post_format'] ) ) { 42 | $post_format = $screen['post_format']; 43 | } elseif ( isset( $screen['post_id'] ) ) { 44 | $post_type = get_post_type( $screen['post_id'] ); 45 | $post_format = get_post_format( $screen['post_id'] ); 46 | 47 | // Treat new posts (that support post-formats) without a saved format as "standard". 48 | if ( ! $post_format && post_type_supports( $post_type, 'post-formats' ) ) { 49 | $post_format = 'standard'; 50 | } 51 | } else { 52 | return false; 53 | } 54 | 55 | // Compare rule against $post_format. 56 | return $this->compare_to_rule( $post_format, $rule ); 57 | } 58 | 59 | /** 60 | * Returns an array of possible values for this rule type. 61 | * 62 | * @date 9/4/20 63 | * @since 5.9.0 64 | * 65 | * @param array $rule A location rule. 66 | * @return array 67 | */ 68 | public function get_values( $rule ) { 69 | return get_post_format_strings(); 70 | } 71 | } 72 | 73 | // initialize 74 | acf_register_location_type( 'ACF_Location_Post_Format' ); 75 | endif; // class_exists check 76 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-post-status.php: -------------------------------------------------------------------------------- 1 | name = 'post_status'; 22 | $this->label = __( 'Post Status', 'acf' ); 23 | $this->category = 'post'; 24 | $this->object_type = 'post'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | 40 | // Check screen args. 41 | if ( isset( $screen['post_status'] ) ) { 42 | $post_status = $screen['post_status']; 43 | } elseif ( isset( $screen['post_id'] ) ) { 44 | $post_status = get_post_status( $screen['post_id'] ); 45 | } else { 46 | return false; 47 | } 48 | 49 | // Treat "auto-draft" as "draft". 50 | if ( $post_status === 'auto-draft' ) { 51 | $post_status = 'draft'; 52 | } 53 | 54 | // Compare rule against $post_status. 55 | return $this->compare_to_rule( $post_status, $rule ); 56 | } 57 | 58 | /** 59 | * Returns an array of possible values for this rule type. 60 | * 61 | * @date 9/4/20 62 | * @since 5.9.0 63 | * 64 | * @param array $rule A location rule. 65 | * @return array 66 | */ 67 | public function get_values( $rule ) { 68 | global $wp_post_statuses; 69 | 70 | // Append to choices. 71 | $choices = array(); 72 | if ( $wp_post_statuses ) { 73 | foreach ( $wp_post_statuses as $status ) { 74 | $choices[ $status->name ] = $status->label; 75 | } 76 | } 77 | return $choices; 78 | } 79 | } 80 | 81 | // initialize 82 | acf_register_location_type( 'ACF_Location_Post_Status' ); 83 | endif; // class_exists check 84 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-post-type.php: -------------------------------------------------------------------------------- 1 | name = 'post_type'; 22 | $this->label = __( 'Post Type', 'acf' ); 23 | $this->category = 'post'; 24 | $this->object_type = 'post'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | 40 | // Check screen args. 41 | if ( isset( $screen['post_type'] ) ) { 42 | $post_type = $screen['post_type']; 43 | } elseif ( isset( $screen['post_id'] ) ) { 44 | $post_type = get_post_type( $screen['post_id'] ); 45 | } else { 46 | return false; 47 | } 48 | 49 | // Compare rule against $post_type. 50 | return $this->compare_to_rule( $post_type, $rule ); 51 | } 52 | 53 | /** 54 | * Returns an array of possible values for this rule type. 55 | * 56 | * @date 9/4/20 57 | * @since 5.9.0 58 | * 59 | * @param array $rule A location rule. 60 | * @return array 61 | */ 62 | public function get_values( $rule ) { 63 | 64 | // Get post types. 65 | $post_types = acf_get_post_types( 66 | array( 67 | 'show_ui' => 1, 68 | 'exclude' => array( 'attachment' ), 69 | ) 70 | ); 71 | 72 | // Return array of [type => label]. 73 | return acf_get_pretty_post_types( $post_types ); 74 | } 75 | 76 | /** 77 | * Returns the object_subtype connected to this location. 78 | * 79 | * @date 1/4/20 80 | * @since 5.9.0 81 | * 82 | * @param array $rule A location rule. 83 | * @return string|array 84 | */ 85 | public function get_object_subtype( $rule ) { 86 | if ( $rule['operator'] === '==' ) { 87 | return $rule['value']; 88 | } 89 | return ''; 90 | } 91 | } 92 | 93 | // initialize 94 | acf_register_location_type( 'ACF_Location_Post_Type' ); 95 | endif; // class_exists check 96 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-post.php: -------------------------------------------------------------------------------- 1 | name = 'post'; 22 | $this->label = __( 'Post', 'acf' ); 23 | $this->category = 'post'; 24 | $this->object_type = 'post'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | 40 | // Check screen args. 41 | if ( isset( $screen['post_id'] ) ) { 42 | $post_id = $screen['post_id']; 43 | } else { 44 | return false; 45 | } 46 | 47 | // Compare rule against post_id. 48 | return $this->compare_to_rule( $post_id, $rule ); 49 | } 50 | 51 | /** 52 | * Returns an array of possible values for this rule type. 53 | * 54 | * @date 9/4/20 55 | * @since 5.9.0 56 | * 57 | * @param array $rule A location rule. 58 | * @return array 59 | */ 60 | public function get_values( $rule ) { 61 | $choices = array(); 62 | 63 | // Get post types. 64 | $post_types = acf_get_post_types( 65 | array( 66 | 'show_ui' => 1, 67 | 'exclude' => array( 'page', 'attachment' ), 68 | ) 69 | ); 70 | 71 | // Get grouped posts. 72 | $groups = acf_get_grouped_posts( 73 | array( 74 | 'post_type' => $post_types, 75 | ) 76 | ); 77 | 78 | // Append to choices. 79 | if ( $groups ) { 80 | foreach ( $groups as $label => $posts ) { 81 | $choices[ $label ] = array(); 82 | foreach ( $posts as $post ) { 83 | $choices[ $label ][ $post->ID ] = acf_get_post_title( $post ); 84 | } 85 | } 86 | } 87 | return $choices; 88 | } 89 | } 90 | 91 | // initialize 92 | acf_register_location_type( 'ACF_Location_Post' ); 93 | endif; // class_exists check 94 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-taxonomy.php: -------------------------------------------------------------------------------- 1 | name = 'taxonomy'; 22 | $this->label = __( 'Taxonomy', 'acf' ); 23 | $this->category = 'forms'; 24 | $this->object_type = 'term'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | 40 | // Check screen args. 41 | if ( isset( $screen['taxonomy'] ) ) { 42 | $taxonomy = $screen['taxonomy']; 43 | } else { 44 | return false; 45 | } 46 | 47 | // Compare rule against $taxonomy. 48 | return $this->compare_to_rule( $taxonomy, $rule ); 49 | } 50 | 51 | /** 52 | * Returns an array of possible values for this rule type. 53 | * 54 | * @date 9/4/20 55 | * @since 5.9.0 56 | * 57 | * @param array $rule A location rule. 58 | * @return array 59 | */ 60 | public function get_values( $rule ) { 61 | return array_merge( 62 | array( 63 | 'all' => __( 'All', 'acf' ), 64 | ), 65 | acf_get_taxonomy_labels() 66 | ); 67 | } 68 | 69 | /** 70 | * Returns the object_subtype connected to this location. 71 | * 72 | * @date 1/4/20 73 | * @since 5.9.0 74 | * 75 | * @param array $rule A location rule. 76 | * @return string|array 77 | */ 78 | function get_object_subtype( $rule ) { 79 | if ( $rule['operator'] === '==' ) { 80 | return $rule['value']; 81 | } 82 | return ''; 83 | } 84 | } 85 | 86 | // initialize 87 | acf_register_location_type( 'ACF_Location_Taxonomy' ); 88 | endif; // class_exists check 89 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-user-form.php: -------------------------------------------------------------------------------- 1 | name = 'user_form'; 22 | $this->label = __( 'User Form', 'acf' ); 23 | $this->category = 'user'; 24 | $this->object_type = 'user'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | // REST API has no forms, so we should always allow it. 40 | if ( ! empty( $screen['rest'] ) ) { 41 | return true; 42 | } 43 | 44 | // Check screen args. 45 | if ( isset( $screen['user_form'] ) ) { 46 | $user_form = $screen['user_form']; 47 | } else { 48 | return false; 49 | } 50 | 51 | // The "Add / Edit" choice (foolishly valued "edit") should match true for either "add" or "edit". 52 | if ( $rule['value'] === 'edit' && $user_form === 'add' ) { 53 | $user_form = 'edit'; 54 | } 55 | 56 | // Compare rule against $user_form. 57 | return $this->compare_to_rule( $user_form, $rule ); 58 | } 59 | 60 | /** 61 | * Returns an array of possible values for this rule type. 62 | * 63 | * @date 9/4/20 64 | * @since 5.9.0 65 | * 66 | * @param array $rule A location rule. 67 | * @return array 68 | */ 69 | public function get_values( $rule ) { 70 | return array( 71 | 'all' => __( 'All', 'acf' ), 72 | 'add' => __( 'Add', 'acf' ), 73 | 'edit' => __( 'Add / Edit', 'acf' ), 74 | 'register' => __( 'Register', 'acf' ), 75 | ); 76 | } 77 | } 78 | 79 | // Register. 80 | acf_register_location_type( 'ACF_Location_User_Form' ); 81 | endif; // class_exists check 82 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-user-role.php: -------------------------------------------------------------------------------- 1 | name = 'user_role'; 24 | $this->label = __( 'User Role', 'acf' ); 25 | $this->category = 'user'; 26 | $this->object_type = 'user'; 27 | } 28 | 29 | /** 30 | * Matches the provided rule against the screen args returning a bool result. 31 | * 32 | * @date 9/4/20 33 | * @since 5.9.0 34 | * 35 | * @param array $rule The location rule. 36 | * @param array $screen The screen args. 37 | * @param array $field_group The field group settings. 38 | * @return boolean 39 | */ 40 | public function match( $rule, $screen, $field_group ) { 41 | 42 | // Check screen args. 43 | if ( isset( $screen['user_role'] ) ) { 44 | $user_role = $screen['user_role']; 45 | } elseif ( isset( $screen['user_id'] ) ) { 46 | $user_id = $screen['user_id']; 47 | $user_role = ''; 48 | 49 | // Determine $user_role from $user_id. 50 | if ( $user_id === 'new' ) { 51 | $user_role = get_option( 'default_role' ); 52 | 53 | // Check if user can, and if so, set the value allowing them to match. 54 | } elseif ( user_can( $user_id, $rule['value'] ) ) { 55 | $user_role = $rule['value']; 56 | } 57 | } else { 58 | return false; 59 | } 60 | 61 | // Compare rule against $user_role. 62 | return $this->compare_to_rule( $user_role, $rule ); 63 | } 64 | 65 | /** 66 | * Returns an array of possible values for this rule type. 67 | * 68 | * @date 9/4/20 69 | * @since 5.9.0 70 | * 71 | * @param array $rule A location rule. 72 | * @return array 73 | */ 74 | public function get_values( $rule ) { 75 | global $wp_roles; 76 | return array_merge( 77 | array( 78 | 'all' => __( 'All', 'acf' ), 79 | ), 80 | $wp_roles->get_names() 81 | ); 82 | } 83 | } 84 | 85 | // initialize 86 | acf_register_location_type( 'ACF_Location_User_Role' ); 87 | endif; // class_exists check 88 | -------------------------------------------------------------------------------- /includes/locations/class-acf-location-widget.php: -------------------------------------------------------------------------------- 1 | name = 'widget'; 22 | $this->label = __( 'Widget', 'acf' ); 23 | $this->category = 'forms'; 24 | $this->object_type = 'widget'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | 40 | // Check screen args. 41 | if ( isset( $screen['widget'] ) ) { 42 | $widget = $screen['widget']; 43 | } else { 44 | return false; 45 | } 46 | 47 | // Compare rule against $widget. 48 | return $this->compare_to_rule( $widget, $rule ); 49 | } 50 | 51 | /** 52 | * Returns an array of possible values for this rule type. 53 | * 54 | * @date 9/4/20 55 | * @since 5.9.0 56 | * 57 | * @param array $rule A location rule. 58 | * @return array 59 | */ 60 | public function get_values( $rule ) { 61 | global $wp_widget_factory; 62 | 63 | // Populate choices. 64 | $choices = array( 65 | 'all' => __( 'All', 'acf' ), 66 | ); 67 | if ( $wp_widget_factory->widgets ) { 68 | foreach ( $wp_widget_factory->widgets as $widget ) { 69 | $choices[ $widget->id_base ] = $widget->name; 70 | } 71 | } 72 | return $choices; 73 | } 74 | } 75 | 76 | // initialize 77 | acf_register_location_type( 'ACF_Location_Widget' ); 78 | endif; // class_exists check 79 | -------------------------------------------------------------------------------- /includes/locations/index.php: -------------------------------------------------------------------------------- 1 | 2 | __( 'Page Title', 'acf' ), 17 | /* translators: example options page name */ 18 | 'placeholder' => __( 'Site Settings', 'acf' ), 19 | 'value' => $acf_options_page_prefilled_title, 20 | 'type' => 'text', 21 | 'name' => 'page_title', 22 | 'key' => 'page_title', 23 | 'class' => 'acf_options_page_title acf_slugify_to_key', 24 | 'prefix' => 'acf_ui_options_page', 25 | 'required' => true, 26 | ), 27 | 'div', 28 | 'field' 29 | ); 30 | 31 | acf_render_field_wrap( 32 | array( 33 | 'label' => __( 'Menu Slug', 'acf' ), 34 | 'type' => 'text', 35 | 'name' => 'menu_slug', 36 | 'key' => 'menu_slug', 37 | 'class' => 'acf-options-page-menu_slug acf_slugified_key', 38 | 'prefix' => 'acf_ui_options_page', 39 | 'required' => true, 40 | ), 41 | 'div', 42 | 'field' 43 | ); 44 | 45 | acf_render_field_wrap( 46 | array( 47 | 'label' => __( 'Parent Page', 'acf' ), 48 | 'type' => 'select', 49 | 'name' => 'parent_slug', 50 | 'key' => 'parent_slug', 51 | 'class' => 'acf-options-page-parent_slug', 52 | 'prefix' => 'acf_ui_options_page', 53 | 'choices' => $acf_parent_page_choices, 54 | 'required' => true, 55 | ), 56 | 'div', 57 | 'field' 58 | ); 59 | ?> 60 | 61 |
62 | 63 | 64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /pro/admin/views/acf-ui-options-page/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | 5 |
6 | 7 | 'options', 13 | 'post_id' => $post_id, 14 | ) 15 | ); 16 | 17 | wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); 18 | wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); 19 | 20 | ?> 21 | 22 |
23 | 24 |
25 | 26 |
27 | 28 | 29 | 30 |
31 | 32 |
33 | 34 | 35 | 36 |
37 | 38 |
39 | 40 |
41 | 42 |
43 | 44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /pro/admin/views/index.php: -------------------------------------------------------------------------------- 1 | name = 'options_page'; 22 | $this->label = __( 'Options Page', 'acf' ); 23 | $this->category = 'forms'; 24 | $this->object_type = 'option'; 25 | } 26 | 27 | /** 28 | * Matches the provided rule against the screen args returning a bool result. 29 | * 30 | * @date 9/4/20 31 | * @since 5.9.0 32 | * 33 | * @param array $rule The location rule. 34 | * @param array $screen The screen args. 35 | * @param array $field_group The field group settings. 36 | * @return boolean 37 | */ 38 | public function match( $rule, $screen, $field_group ) { 39 | 40 | // Check screen args. 41 | if ( isset( $screen['options_page'] ) ) { 42 | $options_page = $screen['options_page']; 43 | } else { 44 | return false; 45 | } 46 | 47 | // Compare rule against $nav_menu. 48 | return $this->compare_to_rule( $options_page, $rule ); 49 | } 50 | 51 | /** 52 | * Returns an array of possible values for this rule type. 53 | * 54 | * @date 9/4/20 55 | * @since 5.9.0 56 | * 57 | * @param array $rule A location rule. 58 | * @return array 59 | */ 60 | public function get_values( $rule ) { 61 | $choices = array(); 62 | 63 | // Append pages. 64 | $pages = acf_get_options_pages(); 65 | if ( $pages ) { 66 | foreach ( $pages as $page ) { 67 | $choices[ $page['menu_slug'] ] = $page['page_title']; 68 | } 69 | } else { 70 | $choices[''] = __( 'Select options page...', 'acf' ); 71 | } 72 | 73 | if ( acf_get_setting( 'enable_options_pages_ui' ) ) { 74 | $choices['add_new_options_page'] = __( 'Add New Options Page', 'acf' ); 75 | } 76 | 77 | // Return choices. 78 | return $choices; 79 | } 80 | } 81 | 82 | // initialize 83 | acf_register_location_type( 'ACF_Location_Options_Page' ); 84 | endif; // class_exists check 85 | -------------------------------------------------------------------------------- /pro/locations/index.php: -------------------------------------------------------------------------------- 1 | $baseDir . '/src/Blocks/Bindings.php', 10 | 'ACF\\Meta\\Comment' => $baseDir . '/src/Meta/Comment.php', 11 | 'ACF\\Meta\\MetaLocation' => $baseDir . '/src/Meta/MetaLocation.php', 12 | 'ACF\\Meta\\Option' => $baseDir . '/src/Meta/Option.php', 13 | 'ACF\\Meta\\Post' => $baseDir . '/src/Meta/Post.php', 14 | 'ACF\\Meta\\Term' => $baseDir . '/src/Meta/Term.php', 15 | 'ACF\\Meta\\User' => $baseDir . '/src/Meta/User.php', 16 | 'ACF\\Pro\\Forms\\WC_Order' => $baseDir . '/src/Pro/Forms/WC_Order.php', 17 | 'ACF\\Pro\\Meta\\WooOrder' => $baseDir . '/src/Pro/Meta/WooOrder.php', 18 | 'ACF\\Site_Health\\Site_Health' => $baseDir . '/src/Site_Health/Site_Health.php', 19 | 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 20 | ); 21 | -------------------------------------------------------------------------------- /vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($baseDir . '/src'), 10 | ); 11 | -------------------------------------------------------------------------------- /vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | register(true); 33 | 34 | return $loader; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | 11 | array ( 12 | 'ACF\\' => 4, 13 | ), 14 | ); 15 | 16 | public static $prefixDirsPsr4 = array ( 17 | 'ACF\\' => 18 | array ( 19 | 0 => __DIR__ . '/../..' . '/src', 20 | ), 21 | ); 22 | 23 | public static $classMap = array ( 24 | 'ACF\\Blocks\\Bindings' => __DIR__ . '/../..' . '/src/Blocks/Bindings.php', 25 | 'ACF\\Meta\\Comment' => __DIR__ . '/../..' . '/src/Meta/Comment.php', 26 | 'ACF\\Meta\\MetaLocation' => __DIR__ . '/../..' . '/src/Meta/MetaLocation.php', 27 | 'ACF\\Meta\\Option' => __DIR__ . '/../..' . '/src/Meta/Option.php', 28 | 'ACF\\Meta\\Post' => __DIR__ . '/../..' . '/src/Meta/Post.php', 29 | 'ACF\\Meta\\Term' => __DIR__ . '/../..' . '/src/Meta/Term.php', 30 | 'ACF\\Meta\\User' => __DIR__ . '/../..' . '/src/Meta/User.php', 31 | 'ACF\\Pro\\Forms\\WC_Order' => __DIR__ . '/../..' . '/src/Pro/Forms/WC_Order.php', 32 | 'ACF\\Pro\\Meta\\WooOrder' => __DIR__ . '/../..' . '/src/Pro/Meta/WooOrder.php', 33 | 'ACF\\Site_Health\\Site_Health' => __DIR__ . '/../..' . '/src/Site_Health/Site_Health.php', 34 | 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 35 | ); 36 | 37 | public static function getInitializer(ClassLoader $loader) 38 | { 39 | return \Closure::bind(function () use ($loader) { 40 | $loader->prefixLengthsPsr4 = ComposerStaticInit94e23cbc47a4750e27ee21b7644f1866::$prefixLengthsPsr4; 41 | $loader->prefixDirsPsr4 = ComposerStaticInit94e23cbc47a4750e27ee21b7644f1866::$prefixDirsPsr4; 42 | $loader->classMap = ComposerStaticInit94e23cbc47a4750e27ee21b7644f1866::$classMap; 43 | 44 | }, null, ClassLoader::class); 45 | } 46 | } 47 | --------------------------------------------------------------------------------