├── .gitignore
├── LICENSE
├── README.md
├── api
├── .htaccess
├── acf
│ └── acf-meta-data.json
├── docker-compose.yml.example
└── wp-content
│ ├── plugins
│ ├── acf-to-rest-api
│ │ ├── class-acf-to-rest-api.php
│ │ ├── composer.json
│ │ ├── languages
│ │ │ └── pt_BR.mo
│ │ ├── legacy
│ │ │ └── v2
│ │ │ │ ├── class-acf-to-rest-api-v2.php
│ │ │ │ └── lib
│ │ │ │ └── endpoints
│ │ │ │ ├── class-acf-to-rest-api-attachment-controller.php
│ │ │ │ ├── class-acf-to-rest-api-controller.php
│ │ │ │ ├── class-acf-to-rest-api-option-controller.php
│ │ │ │ └── class-acf-to-rest-api-term-controller.php
│ │ ├── readme.md
│ │ ├── readme.txt
│ │ ├── shared
│ │ │ ├── includes
│ │ │ │ └── admin
│ │ │ │ │ └── views
│ │ │ │ │ ├── html-notice-missing-acf.php
│ │ │ │ │ ├── html-notice-missing-rest-api.php
│ │ │ │ │ ├── html-settings-field.php
│ │ │ │ │ └── html-settings-section.php
│ │ │ └── lib
│ │ │ │ └── class-acf-to-rest-api-settings.php
│ │ └── v3
│ │ │ ├── class-acf-to-rest-api-v3.php
│ │ │ └── lib
│ │ │ ├── class-acf-to-rest-api-acf-api.php
│ │ │ ├── class-acf-to-rest-api-acf-field-settings.php
│ │ │ └── endpoints
│ │ │ ├── class-acf-to-rest-api-attachments-controller.php
│ │ │ ├── class-acf-to-rest-api-comments-controller.php
│ │ │ ├── class-acf-to-rest-api-controller.php
│ │ │ ├── class-acf-to-rest-api-options-controller.php
│ │ │ ├── class-acf-to-rest-api-posts-controller.php
│ │ │ ├── class-acf-to-rest-api-terms-controller.php
│ │ │ └── class-acf-to-rest-api-users-controller.php
│ ├── advanced-custom-fields-pro
│ │ ├── acf.php
│ │ ├── assets
│ │ │ ├── css
│ │ │ │ ├── acf-field-group.css
│ │ │ │ ├── acf-global.css
│ │ │ │ └── acf-input.css
│ │ │ ├── font
│ │ │ │ ├── LICENSE.txt
│ │ │ │ ├── README.txt
│ │ │ │ ├── acf.eot
│ │ │ │ ├── acf.svg
│ │ │ │ ├── acf.ttf
│ │ │ │ ├── acf.woff
│ │ │ │ ├── acf.woff2
│ │ │ │ └── config.json
│ │ │ ├── images
│ │ │ │ ├── spinner.gif
│ │ │ │ ├── spinner@2x.gif
│ │ │ │ ├── sprite.png
│ │ │ │ └── sprite@2x.png
│ │ │ ├── inc
│ │ │ │ ├── datepicker
│ │ │ │ │ ├── images
│ │ │ │ │ │ ├── ui-bg_highlight-soft_0_ffffff_1x100.png
│ │ │ │ │ │ ├── ui-icons_444444_256x240.png
│ │ │ │ │ │ ├── ui-icons_DDDDDD_256x240.png
│ │ │ │ │ │ └── ui-icons_ffffff_256x240.png
│ │ │ │ │ ├── jquery-ui.css
│ │ │ │ │ └── jquery-ui.min.css
│ │ │ │ ├── select2
│ │ │ │ │ ├── 3
│ │ │ │ │ │ ├── select2-spinner.gif
│ │ │ │ │ │ ├── select2.css
│ │ │ │ │ │ ├── select2.js
│ │ │ │ │ │ ├── select2.min.js
│ │ │ │ │ │ ├── select2.png
│ │ │ │ │ │ └── select2x2.png
│ │ │ │ │ └── 4
│ │ │ │ │ │ ├── select2.css
│ │ │ │ │ │ ├── select2.full.js
│ │ │ │ │ │ ├── select2.full.min.js
│ │ │ │ │ │ ├── select2.js
│ │ │ │ │ │ ├── select2.min.css
│ │ │ │ │ │ └── select2.min.js
│ │ │ │ └── timepicker
│ │ │ │ │ ├── jquery-ui-timepicker-addon.css
│ │ │ │ │ ├── jquery-ui-timepicker-addon.js
│ │ │ │ │ ├── jquery-ui-timepicker-addon.min.css
│ │ │ │ │ └── jquery-ui-timepicker-addon.min.js
│ │ │ └── js
│ │ │ │ ├── acf-field-group.js
│ │ │ │ ├── acf-field-group.min.js
│ │ │ │ ├── acf-input.js
│ │ │ │ └── acf-input.min.js
│ │ ├── includes
│ │ │ ├── admin
│ │ │ │ ├── admin-field-group.php
│ │ │ │ ├── admin-field-groups.php
│ │ │ │ ├── admin-tools.php
│ │ │ │ ├── admin.php
│ │ │ │ ├── install-network.php
│ │ │ │ ├── install-updates.php
│ │ │ │ ├── install.php
│ │ │ │ ├── settings-addons.php
│ │ │ │ ├── settings-info.php
│ │ │ │ ├── tools
│ │ │ │ │ ├── class-acf-admin-tool-export.php
│ │ │ │ │ ├── class-acf-admin-tool-import.php
│ │ │ │ │ └── class-acf-admin-tool.php
│ │ │ │ └── views
│ │ │ │ │ ├── field-group-field-conditional-logic.php
│ │ │ │ │ ├── field-group-field.php
│ │ │ │ │ ├── field-group-fields.php
│ │ │ │ │ ├── field-group-locations.php
│ │ │ │ │ ├── field-group-options.php
│ │ │ │ │ ├── html-admin-tools.php
│ │ │ │ │ ├── html-location-group.php
│ │ │ │ │ ├── html-location-rule.php
│ │ │ │ │ ├── install-network.php
│ │ │ │ │ ├── install-notice.php
│ │ │ │ │ ├── install.php
│ │ │ │ │ ├── settings-addons.php
│ │ │ │ │ └── settings-info.php
│ │ │ ├── ajax.php
│ │ │ ├── api
│ │ │ │ ├── api-field-group.php
│ │ │ │ ├── api-field.php
│ │ │ │ ├── api-helpers.php
│ │ │ │ ├── api-input.php
│ │ │ │ ├── api-template.php
│ │ │ │ └── api-value.php
│ │ │ ├── cache.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-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
│ │ │ ├── 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
│ │ │ ├── input.php
│ │ │ ├── json.php
│ │ │ ├── local.php
│ │ │ ├── locations.php
│ │ │ ├── locations
│ │ │ │ ├── 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
│ │ │ │ └── class-acf-location.php
│ │ │ ├── loop.php
│ │ │ ├── media.php
│ │ │ ├── revisions.php
│ │ │ ├── third-party.php
│ │ │ ├── updates.php
│ │ │ ├── validation.php
│ │ │ ├── walkers
│ │ │ │ ├── class-acf-walker-nav-menu-edit.php
│ │ │ │ └── class-acf-walker-taxonomy-field.php
│ │ │ └── wpml.php
│ │ ├── lang
│ │ │ ├── acf-ar.mo
│ │ │ ├── acf-ar.po
│ │ │ ├── acf-bg_BG.mo
│ │ │ ├── acf-bg_BG.po
│ │ │ ├── acf-cs_CZ.mo
│ │ │ ├── acf-cs_CZ.po
│ │ │ ├── acf-de_CH.mo
│ │ │ ├── acf-de_CH.po
│ │ │ ├── acf-de_DE.mo
│ │ │ ├── acf-de_DE.po
│ │ │ ├── acf-de_DE_formal.mo
│ │ │ ├── acf-de_DE_formal.po
│ │ │ ├── acf-es_ES.mo
│ │ │ ├── acf-es_ES.po
│ │ │ ├── acf-fa_IR.mo
│ │ │ ├── acf-fa_IR.po
│ │ │ ├── acf-fi.mo
│ │ │ ├── acf-fi.po
│ │ │ ├── acf-fr_FR.mo
│ │ │ ├── acf-fr_FR.po
│ │ │ ├── acf-he_IL.mo
│ │ │ ├── acf-he_IL.po
│ │ │ ├── acf-hu_HU.mo
│ │ │ ├── acf-hu_HU.po
│ │ │ ├── acf-id_ID.mo
│ │ │ ├── acf-id_ID.po
│ │ │ ├── acf-it_IT.mo
│ │ │ ├── acf-it_IT.po
│ │ │ ├── acf-ja.mo
│ │ │ ├── acf-ja.po
│ │ │ ├── acf-nb_NO.mo
│ │ │ ├── acf-nb_NO.po
│ │ │ ├── acf-nl_NL.mo
│ │ │ ├── acf-nl_NL.po
│ │ │ ├── acf-pl_PL.mo
│ │ │ ├── acf-pl_PL.po
│ │ │ ├── acf-pt_BR.mo
│ │ │ ├── acf-pt_BR.po
│ │ │ ├── acf-pt_PT.mo
│ │ │ ├── acf-pt_PT.po
│ │ │ ├── acf-ro_RO.mo
│ │ │ ├── acf-ro_RO.po
│ │ │ ├── acf-ru_RU.mo
│ │ │ ├── acf-ru_RU.po
│ │ │ ├── acf-sk_SK.mo
│ │ │ ├── acf-sk_SK.po
│ │ │ ├── acf-sv_SE.mo
│ │ │ ├── acf-sv_SE.po
│ │ │ ├── acf-tr_TR.mo
│ │ │ ├── acf-tr_TR.po
│ │ │ ├── acf-uk.mo
│ │ │ ├── acf-uk.po
│ │ │ ├── acf-zh_CN.mo
│ │ │ ├── acf-zh_CN.po
│ │ │ └── acf.pot
│ │ ├── pro
│ │ │ ├── acf-pro.php
│ │ │ ├── admin
│ │ │ │ ├── admin-options-page.php
│ │ │ │ ├── admin-settings-updates.php
│ │ │ │ └── views
│ │ │ │ │ ├── html-options-page.php
│ │ │ │ │ └── html-settings-updates.php
│ │ │ ├── assets
│ │ │ │ ├── css
│ │ │ │ │ ├── acf-pro-field-group.css
│ │ │ │ │ └── acf-pro-input.css
│ │ │ │ └── js
│ │ │ │ │ ├── acf-pro-field-group.js
│ │ │ │ │ ├── acf-pro-field-group.min.js
│ │ │ │ │ ├── acf-pro-input.js
│ │ │ │ │ └── acf-pro-input.min.js
│ │ │ ├── fields
│ │ │ │ ├── class-acf-field-clone.php
│ │ │ │ ├── class-acf-field-flexible-content.php
│ │ │ │ ├── class-acf-field-gallery.php
│ │ │ │ └── class-acf-field-repeater.php
│ │ │ ├── locations
│ │ │ │ └── class-acf-location-options-page.php
│ │ │ ├── options-page.php
│ │ │ └── updates.php
│ │ └── readme.txt
│ ├── classic-editor
│ │ ├── LICENSE.md
│ │ ├── classic-editor.php
│ │ ├── js
│ │ │ └── block-editor-plugin.js
│ │ ├── readme.txt
│ │ ├── screenshot-1.png
│ │ ├── screenshot-2.png
│ │ ├── screenshot-3.png
│ │ ├── screenshot-4.png
│ │ ├── screenshot-5.png
│ │ └── screenshot-6.png
│ └── index.php
│ └── themes
│ ├── index.php
│ └── rest-api
│ ├── functions.php
│ ├── inc
│ ├── cache.php
│ ├── cors.php
│ ├── custom-post-types.php
│ ├── menus.php
│ ├── preview.php
│ ├── routes.php
│ ├── theme-setup.php
│ └── utilities.php
│ ├── index.php
│ ├── page-home.php
│ └── style.css
└── client
├── .env.example
├── middleware
├── clear-redux-store.js
└── renderer.js
├── package-lock.json
├── package.json
├── public
├── favicon.ico
└── index.html
├── server.js
├── src
├── App.js
├── api.js
├── components
│ ├── layout
│ │ ├── Footer
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ └── index.scss
│ │ └── Header
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ └── index.scss
│ ├── templates
│ │ ├── Default
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ └── index.scss
│ │ ├── Home
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ └── index.scss
│ │ ├── LoadTemplate
│ │ │ └── index.js
│ │ ├── NotFound
│ │ │ └── index.js
│ │ └── Post
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ └── index.scss
│ └── utilities
│ │ ├── AsyncLoader
│ │ └── index.js
│ │ └── ContentBlock
│ │ └── index.js
├── index.js
├── middleware.js
├── post-types
│ └── index.js
├── reducers
│ └── api.js
├── store.js
└── utilities
│ ├── canUseDom.js
│ └── convertData.js
└── ssr-init.js
/.gitignore:
--------------------------------------------------------------------------------
1 | # Mac garbage files
2 | .DS_Store
3 |
4 | # Logs
5 | logs
6 | *.log
7 | npm-debug.log*
8 | yarn-debug.log*
9 | yarn-error.log*
10 |
11 | # Runtime data
12 | pids
13 | *.pid
14 | *.seed
15 | *.pid.lock
16 |
17 | # Directory for instrumented libs generated by jscoverage/JSCover
18 | lib-cov
19 |
20 | # Coverage directory used by tools like istanbul
21 | coverage
22 |
23 | # nyc test coverage
24 | .nyc_output
25 |
26 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
27 | .grunt
28 |
29 | # Bower dependency directory (https://bower.io/)
30 | bower_components
31 |
32 | # node-waf configuration
33 | .lock-wscript
34 |
35 | # Compiled binary addons (http://nodejs.org/api/addons.html)
36 | build/Release
37 |
38 | # Dependency directories
39 | client/node_modules/
40 | node_modules/
41 | jspm_packages/
42 |
43 | # Typescript v1 declaration files
44 | typings/
45 |
46 | # Optional npm cache directory
47 | .npm
48 |
49 | # Optional eslint cache
50 | .eslintcache
51 |
52 | # Optional REPL history
53 | .node_repl_history
54 |
55 | # Output of 'npm pack'
56 | *.tgz
57 |
58 | # Yarn Integrity file
59 | .yarn-integrity
60 |
61 | # dotenv environment variables file
62 | .env
63 |
64 | # docker-compose
65 | api/docker-compose.yml
66 |
67 | # wp-config
68 | api/wp-config.php
69 |
70 | #
71 | client/build
72 |
73 |
74 | # ignore WP
75 | api/wp-admin
76 | api/wp-content/index.php
77 | api/wp-content/debug.log
78 | api/wp-content/themes/twentyfifteen
79 | api/wp-content/themes/twentysixteen
80 | api/wp-content/themes/twentyseventeen
81 | api/wp-content/themes/twentyeighteen
82 | api/wp-content/themes/twentynineteen
83 | api/wp-content/plugins/akismet/
84 | api/wp-content/plugins/hello.php
85 | api/wp-includes
86 | api/index.php
87 | api/license.txt
88 | api/readme.html
89 | api/wp-activate.php
90 | api/wp-blog-header.php
91 | api/wp-comments-post.php
92 | api/wp-config-sample.php
93 | api/wp-config.php
94 | api/wp-cron.php
95 | api/wp-links-opml.php
96 | api/wp-load.php
97 | api/wp-login.php
98 | api/wp-mail.php
99 | api/wp-settings.php
100 | api/wp-signup.php
101 | api/wp-trackback.php
102 | api/xmlrpc.php
103 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 James Mikrut
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/api/.htaccess:
--------------------------------------------------------------------------------
1 | # BEGIN WordPress
2 |
3 | RewriteEngine On
4 | RewriteBase /
5 | RewriteRule ^index\.php$ - [L]
6 | RewriteCond %{REQUEST_FILENAME} !-f
7 | RewriteCond %{REQUEST_FILENAME} !-d
8 | RewriteRule . /index.php [L]
9 |
10 |
11 | # END WordPress
12 |
--------------------------------------------------------------------------------
/api/acf/acf-meta-data.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "key": "group_5ab9619c9fc1f",
4 | "title": "Meta",
5 | "fields": [
6 | {
7 | "key": "field_5ab9619f270b5",
8 | "label": "Title",
9 | "name": "metaTitle",
10 | "type": "text",
11 | "instructions": "",
12 | "required": 0,
13 | "conditional_logic": 0,
14 | "wrapper": {
15 | "width": "",
16 | "class": "",
17 | "id": ""
18 | },
19 | "default_value": "",
20 | "placeholder": "",
21 | "prepend": "",
22 | "append": "",
23 | "maxlength": ""
24 | },
25 | {
26 | "key": "field_5ab961a9270b6",
27 | "label": "Keywords",
28 | "name": "metaKeywords",
29 | "type": "text",
30 | "instructions": "",
31 | "required": 0,
32 | "conditional_logic": 0,
33 | "wrapper": {
34 | "width": "",
35 | "class": "",
36 | "id": ""
37 | },
38 | "default_value": "",
39 | "placeholder": "",
40 | "prepend": "",
41 | "append": "",
42 | "maxlength": ""
43 | },
44 | {
45 | "key": "field_5ab961b2270b7",
46 | "label": "Description",
47 | "name": "metaDescription",
48 | "type": "textarea",
49 | "instructions": "",
50 | "required": 0,
51 | "conditional_logic": 0,
52 | "wrapper": {
53 | "width": "",
54 | "class": "",
55 | "id": ""
56 | },
57 | "default_value": "",
58 | "placeholder": "",
59 | "maxlength": "",
60 | "rows": 3,
61 | "new_lines": ""
62 | }
63 | ],
64 | "location": [
65 | [
66 | {
67 | "param": "post_type",
68 | "operator": "==",
69 | "value": "page"
70 | }
71 | ]
72 | ],
73 | "menu_order": 0,
74 | "position": "normal",
75 | "style": "default",
76 | "label_placement": "top",
77 | "instruction_placement": "label",
78 | "hide_on_screen": "",
79 | "active": 1,
80 | "description": ""
81 | }
82 | ]
--------------------------------------------------------------------------------
/api/docker-compose.yml.example:
--------------------------------------------------------------------------------
1 | ex_wp:
2 | image: wordpress
3 | links:
4 | - ex_wp_db:mysql
5 | ports:
6 | - 8080:80
7 | volumes:
8 | - ~/www/react-wp-rest/api:/var/www/html
9 | ex_wp_db:
10 | image: mariadb
11 | environment:
12 | MYSQL_ROOT_PASSWORD: examplepass
13 | phpmyadmin:
14 | image: phpmyadmin/phpmyadmin
15 | links:
16 | - ex_wp_db:mysql
17 | ports:
18 | - 8181:80
19 | environment:
20 | MYSQL_USERNAME: root
21 | MYSQL_ROOT_PASSWORD: examplepass
22 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "airesvsg/acf-to-rest-api",
3 | "description": "Exposes Advanced Custom Fields Endpoints in the WordPress REST API",
4 | "type": "wordpress-plugin",
5 | "version": "3.1.0",
6 | "keywords": ["wordpress", "wp", "rest-api", "acf", "wp-api", "json", "wordpres-plugin", "fields"],
7 | "homepage": "https://github.com/airesvsg/acf-to-rest-api",
8 | "license": "GPLv2.0+",
9 | "authors": [
10 | {
11 | "name": "Aires Gonçalves",
12 | "email": "airesvsg@gmail.com",
13 | "homepage": "http://airesgoncalves.com",
14 | "role": "Developer"
15 | }
16 | ],
17 | "support": {
18 | "email": "airesvsg@gmail.com",
19 | "issues": "https://github.com/airesvsg/acf-to-rest-api/issues"
20 | },
21 | "require": {
22 | "php": ">=5.3.2",
23 | "composer/installers": "~1.0"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/languages/pt_BR.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trouble/react-wp-rest/0ff7294e834a1aa80e02c6e16e1a69c49f9b1349/api/wp-content/plugins/acf-to-rest-api/languages/pt_BR.mo
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/legacy/v2/class-acf-to-rest-api-v2.php:
--------------------------------------------------------------------------------
1 | true ) );
21 | if ( $types && isset( $types['attachment'] ) ) {
22 | unset( $types['attachment'] );
23 | $default[] = 'media';
24 | }
25 | $types = apply_filters( 'acf/rest_api/types', array_merge( $types, array_combine( $default, $default ) ) );
26 | if ( is_array( $types ) && count( $types ) > 0 ) {
27 | foreach ( $types as $type ) {
28 | if ( 'term' == $type ) {
29 | $controller = new ACF_To_REST_API_Term_Controller( $type );
30 | } elseif ( 'media' == $type ) {
31 | $controller = new ACF_To_REST_API_Attachment_Controller( $type );
32 | } elseif ( 'option' == $type ) {
33 | $controller = new ACF_To_REST_API_Option_Controller( $type );
34 | } else {
35 | $controller = new ACF_To_REST_API_Controller( $type );
36 | }
37 | $controller->register_routes();
38 | $controller->register_hooks();
39 | }
40 | }
41 | }
42 |
43 | public static function missing_notice() {
44 | if ( ! ACF_To_REST_API::is_plugin_active( 'rest-api' ) ) {
45 | include dirname( __FILE__ ) . '/../../shared/includes/admin/views/html-notice-missing-rest-api.php';
46 | }
47 | if ( ! ACF_To_REST_API::is_plugin_active( 'acf' ) ) {
48 | include dirname( __FILE__ ) . '/../../shared/includes/admin/views/html-notice-missing-acf.php';
49 | }
50 | }
51 |
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/legacy/v2/lib/endpoints/class-acf-to-rest-api-attachment-controller.php:
--------------------------------------------------------------------------------
1 | type = 'attachment';
11 | parent::register_hooks();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/legacy/v2/lib/endpoints/class-acf-to-rest-api-option-controller.php:
--------------------------------------------------------------------------------
1 | rest_base = 'options';
12 | }
13 |
14 | public function register_routes() {
15 | register_rest_route( $this->namespace, '/' . $this->rest_base . '/?(?P[\w\-\_]+)?', array(
16 | array(
17 | 'methods' => WP_REST_Server::READABLE,
18 | 'callback' => array( $this, 'get_item' ),
19 | 'permission_callback' => array( $this, 'get_item_permissions_check' ),
20 | ),
21 | array(
22 | 'methods' => WP_REST_Server::EDITABLE,
23 | 'callback' => array( $this, 'update_item' ),
24 | 'permission_callback' => array( $this, 'update_item_permissions_check' ),
25 | ),
26 | ) );
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/legacy/v2/lib/endpoints/class-acf-to-rest-api-term-controller.php:
--------------------------------------------------------------------------------
1 | namespace, '/' . $this->type . '/(?P[\w\-\_]+)/(?P[\d]+)/?(?P[\w\-\_]+)?', array(
11 | array(
12 | 'methods' => WP_REST_Server::READABLE,
13 | 'callback' => array( $this, 'get_item' ),
14 | 'permission_callback' => array( $this, 'get_item_permissions_check' ),
15 | ),
16 | array(
17 | 'methods' => WP_REST_Server::EDITABLE,
18 | 'callback' => array( $this, 'update_item' ),
19 | 'permission_callback' => array( $this, 'update_item_permissions_check' ),
20 | ),
21 | ) );
22 | }
23 |
24 | public function get_item( $request ) {
25 | if ( $this->show( $request ) ) {
26 | return parent::get_item( $request );
27 | }
28 |
29 | return new WP_Error( 'rest_no_route', __( 'No route was found matching the URL and request method', 'acf-to-rest-api' ), array( 'status' => 404 ) );
30 | }
31 |
32 | protected function get_rest_base( $request ) {
33 | global $wp_taxonomies;
34 |
35 | $taxonomy = false;
36 | if ( $request instanceof WP_REST_Request ) {
37 | $taxonomy = $request->get_param( 'taxonomy' );
38 | }
39 |
40 | if ( $taxonomy && ! array_key_exists( $taxonomy, $wp_taxonomies ) ) {
41 | foreach ( $wp_taxonomies as $tax_key => $tax_value ) {
42 | if ( isset( $tax_value->rest_base ) && $taxonomy == $tax_value->rest_base ) {
43 | $request->set_param( 'taxonomy', $tax_key );
44 | return $tax_key;
45 | }
46 | }
47 | }
48 |
49 | return $taxonomy;
50 | }
51 |
52 | protected function show( $object ) {
53 | global $wp_taxonomies;
54 | $taxonomy = $this->get_rest_base( $object );
55 | return $taxonomy && isset( $wp_taxonomies[ $taxonomy ]->show_in_rest ) && $wp_taxonomies[ $taxonomy ]->show_in_rest;
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/readme.txt:
--------------------------------------------------------------------------------
1 | === ACF to REST API ===
2 | Contributors: airesvsg
3 | Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=airesvsg%40gmail%2ecom&lc=BR&item_name=Aires%20Goncalves&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
4 | Tags: acf, api, rest, wp-api, wp-rest-api, json, wp, wordpress, wp-rest-api, wordpress-rest-api
5 | Requires at least: 4.6
6 | Tested up to: 4.9.1
7 | Stable tag: 3.1.0
8 | License: GPLv2 or later
9 | License URI: http://www.gnu.org/licenses/gpl-2.0.html
10 |
11 | Exposes Advanced Custom Fields Endpoints in the WordPress REST API
12 |
13 | == Description ==
14 | Exposes [Advanced Custom Fields](https://wordpress.org/plugins/advanced-custom-fields/) Endpoints in the [WordPress REST API](https://developer.wordpress.org/rest-api/)
15 |
16 | **See details on GitHub:** http://github.com/airesvsg/acf-to-rest-api
17 |
18 | == Installation ==
19 | 1. Copy the `acf-to-rest-api` folder into your `wp-content/plugins` folder
20 | 2. Activate the `ACF to REST API` plugin via the plugin admin page
21 |
22 | == Changelog ==
23 |
24 | = 3.1.0 =
25 | fix indentation
26 | removing unnecessary code
27 | removing anonymous function
28 |
29 | = 3.0.2 =
30 | stable version
31 |
32 | = 3.0.2-beta =
33 | adding fallback to get_fields
34 | changing default value to acf field setting
35 |
36 | = 3.0.1-beta =
37 | fix default params bug
38 |
39 | = 3.0.0-beta =
40 | more readable endpoints ( https://github.com/airesvsg/acf-to-rest-api/issues/46 ) - Thanks to Imaginet
41 | change return when acf filed key is empty ( https://github.com/airesvsg/acf-to-rest-api/issues/48 ) - Thanks to Joris Verbogt
42 | multiple custom options pages ( https://github.com/airesvsg/acf-to-rest-api/issues/85 ) - Thanks to Alex Patton
43 | bugfix ACF key in taxonomy ( https://github.com/airesvsg/acf-to-rest-api/issues/43 ) - Thanks to Cesar Denis
44 | depreacted filter acf/rest_api/type
45 | depreacted filter acf/rest_api/types
46 | depreacted filter acf/rest_api/default_rest_base
47 |
48 | = 2.2.1 =
49 | bugfix options page id
50 |
51 | = 2.2.0 =
52 | get specific field via endpoints
53 |
54 | = 2.1.1 =
55 | bugfix term endpoint
56 |
57 | = 2.1.0 =
58 | adding rest base support
59 |
60 | adding new filter acf/rest_api/default_rest_base
61 |
62 | = 2.0.7 =
63 | bugfix when create a new item
64 |
65 | = 2.0.6 =
66 | removing unnecessary code
67 |
68 | = 2.0.5 =
69 | changing how to check dependencies
70 |
71 | = 2.0.4 =
72 | fixed error when you register new fields ( via php ) and try save them
73 |
74 | = 2.0.3 =
75 | error fixed when register a new post with acf fields
76 |
77 | = 2.0.2 =
78 | adding support for options page ( add-on )
79 |
80 | = 2.0.1 =
81 | Bugfix strict standards
82 |
83 | = 2.0.0 =
84 | New version of the plugin ACF to WP REST API
85 |
86 | Changing name ACF to WP REST API > ACF to REST API
87 |
88 | == Upgrade Notice ==
89 |
90 | = 2.0.0 =
91 | This version enables editing of the ACF fields with WordPress REST API.
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/shared/includes/admin/views/html-notice-missing-acf.php:
--------------------------------------------------------------------------------
1 |
24 |
25 |
29 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/shared/includes/admin/views/html-notice-missing-rest-api.php:
--------------------------------------------------------------------------------
1 |
24 |
25 |
29 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/shared/includes/admin/views/html-settings-field.php:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 | >v2
13 | >v3
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/shared/includes/admin/views/html-settings-section.php:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/shared/lib/class-acf-to-rest-api-settings.php:
--------------------------------------------------------------------------------
1 | sprintf( '%s ', admin_url( 'options-permalink.php#acf-to-rest-api-settings' ), esc_html__( 'Settings', 'acf-to-rest-api' ) ),
44 | );
45 |
46 | $new_actions += $actions;
47 |
48 | return $new_actions;
49 | }
50 |
51 | return $actions;
52 | }
53 |
54 | public static function plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data ) {
55 | if ( isset( $plugin_data['slug'] ) && 'acf-to-rest-api' == $plugin_data['slug'] ) {
56 | $plugin_meta['acf-to-rest-api-github'] = sprintf( '%s ', self::$github_url, esc_html__( 'Fork me on GitHub' ) );
57 | $plugin_meta['acf_to_rest_api_donation'] = sprintf( '%s ', self::$donation_url, esc_html__( 'Make a donation', 'acf-to-rest-api' ) );
58 | }
59 |
60 | return $plugin_meta;
61 | }
62 |
63 | public static function acf_admin_setting() {
64 | add_settings_section(
65 | 'acf_to_rest_api_settings_section',
66 | __( 'ACF to REST API', 'acf-to-rest-api' ),
67 | array( __CLASS__, 'add_settings_section' ),
68 | 'permalink'
69 | );
70 |
71 | add_settings_field(
72 | 'acf_to_rest_api_request_version',
73 | __( 'Request Version', 'acf-to-rest-api' ),
74 | array( __CLASS__, 'add_settings_field' ),
75 | 'permalink',
76 | 'acf_to_rest_api_settings_section'
77 | );
78 | }
79 |
80 | private static function save() {
81 | if ( ! is_admin() ) {
82 | return;
83 | }
84 |
85 | if ( isset( $_POST['acf_to_rest_api_settings'] ) ) {
86 | $settings = $_POST['acf_to_rest_api_settings'];
87 | if ( array_key_exists( 'request_version', $settings ) ) {
88 | update_option( 'acf_to_rest_api_request_version', absint( $settings['request_version'] ) );
89 | }
90 | }
91 | }
92 |
93 | }
94 |
95 | ACF_To_REST_API_Settings::init();
96 |
97 | }
98 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/v3/class-acf-to-rest-api-v3.php:
--------------------------------------------------------------------------------
1 | true ), 'objects' ) as $post_type ) {
23 | if ( 'attachment' == $post_type->name ) {
24 | $controller = new ACF_To_REST_API_Attachments_Controller( $post_type );
25 | } else {
26 | $controller = new ACF_To_REST_API_Posts_Controller( $post_type );
27 | }
28 | $controller->register();
29 | }
30 |
31 | foreach ( get_taxonomies( array( 'show_in_rest' => true ), 'objects' ) as $taxonomy ) {
32 | $controller = new ACF_To_REST_API_Terms_Controller( $taxonomy );
33 | $controller->register();
34 | }
35 |
36 | $controller = new ACF_To_REST_API_Comments_Controller;
37 | $controller->register();
38 |
39 | $controller = new ACF_To_REST_API_Options_Controller;
40 | $controller->register();
41 |
42 | $controller = new ACF_To_REST_API_Users_Controller;
43 | $controller->register();
44 | }
45 |
46 | public static function missing_notice() {
47 | if ( ! ACF_To_REST_API::is_plugin_active( 'rest-api' ) ) {
48 | include dirname( __FILE__ ) . '/../shared/includes/admin/views/html-notice-missing-rest-api.php';
49 | }
50 |
51 | if ( ! ACF_To_REST_API::is_plugin_active( 'acf' ) ) {
52 | include dirname( __FILE__ ) . '/../shared/includes/admin/views/html-notice-missing-acf.php';
53 | }
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/v3/lib/class-acf-to-rest-api-acf-field-settings.php:
--------------------------------------------------------------------------------
1 | __( 'Edit in REST API?', 'acf-to-rest-api' ),
33 | 'instructions' => '',
34 | 'type' => 'true_false',
35 | 'name' => 'edit_in_rest',
36 | 'ui' => 1,
37 | 'class' => 'field-edit_in_rest',
38 | 'default_value' => 0,
39 | ), true );
40 | } else { ?>
41 |
42 |
43 |
44 |
45 |
46 | 'radio',
52 | 'name' => 'fields[' . $field['name'] . '][edit_in_rest]',
53 | 'value' => $field['edit_in_rest'],
54 | 'layout' => 'horizontal',
55 | 'choices' => array(
56 | 1 => __( 'Yes', 'acf-to-rest-api' ),
57 | 0 => __( 'No', 'acf-to-rest-api' ),
58 | ),
59 | ) ); ?>
60 |
61 |
62 | __( 'Show in REST API?', 'acf-to-rest-api' ),
70 | 'instructions' => '',
71 | 'type' => 'true_false',
72 | 'name' => 'show_in_rest',
73 | 'ui' => 1,
74 | 'class' => 'field-show_in_rest',
75 | 'default_value' => 0,
76 | ), true );
77 | } else { ?>
78 |
79 |
80 |
81 |
82 |
83 | 'radio',
89 | 'name' => 'fields[' . $field['name'] . '][show_in_rest]',
90 | 'value' => $field['show_in_rest'],
91 | 'layout' => 'horizontal',
92 | 'choices' => array(
93 | 1 => __( 'Yes', 'acf-to-rest-api' ),
94 | 0 => __( 'No', 'acf-to-rest-api' ),
95 | ),
96 | ) ); ?>
97 |
98 |
99 | type = $type->name;
11 | $this->rest_base = ! empty( $type->rest_base ) ? $type->rest_base : $type->name;
12 | parent::__construct( $type );
13 | }
14 |
15 | public function get_items( $request ) {
16 | $this->controller = new WP_REST_Attachments_Controller( $this->type );
17 | return parent::get_items( $request );
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/v3/lib/endpoints/class-acf-to-rest-api-comments-controller.php:
--------------------------------------------------------------------------------
1 | type = 'comment';
11 | $this->rest_base = 'comments';
12 | parent::__construct();
13 | }
14 |
15 | public function get_items( $request ) {
16 | $this->controller = new WP_REST_Comments_Controller;
17 | return parent::get_items( $request );
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/v3/lib/endpoints/class-acf-to-rest-api-options-controller.php:
--------------------------------------------------------------------------------
1 | type = 'option';
11 | $this->rest_base = 'options';
12 | parent::__construct();
13 | }
14 |
15 | public function register_routes() {
16 | register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P[\w\-\_]+)/?(?P[\w\-\_]+)?', array(
17 | array(
18 | 'methods' => WP_REST_Server::READABLE,
19 | 'callback' => array( $this, 'get_item' ),
20 | 'permission_callback' => array( $this, 'get_item_permissions_check' ),
21 | ),
22 | array(
23 | 'methods' => WP_REST_Server::EDITABLE,
24 | 'callback' => array( $this, 'update_item' ),
25 | 'permission_callback' => array( $this, 'update_item_permissions_check' ),
26 | ),
27 | ) );
28 | }
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/v3/lib/endpoints/class-acf-to-rest-api-posts-controller.php:
--------------------------------------------------------------------------------
1 | type = $type->name;
11 | $this->rest_base = ! empty( $type->rest_base ) ? $type->rest_base : $type->name;
12 | parent::__construct( $type );
13 | }
14 |
15 | public function get_items( $request ) {
16 | $this->controller = new WP_REST_Posts_Controller( $this->type );
17 | return parent::get_items( $request );
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/v3/lib/endpoints/class-acf-to-rest-api-terms-controller.php:
--------------------------------------------------------------------------------
1 | type = $type->name;
11 | $this->rest_base = ! empty( $type->rest_base ) ? $type->rest_base : $type->name;
12 | parent::__construct( $type );
13 | }
14 |
15 | public function get_items( $request ) {
16 | $this->controller = new WP_REST_Terms_Controller( $this->type );
17 | return parent::get_items( $request );
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/acf-to-rest-api/v3/lib/endpoints/class-acf-to-rest-api-users-controller.php:
--------------------------------------------------------------------------------
1 | type = 'user';
11 | $this->rest_base = 'users';
12 | parent::__construct();
13 | }
14 |
15 | public function get_items( $request ) {
16 | $this->controller = new WP_REST_Users_Controller;
17 | return parent::get_items( $request );
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/assets/font/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Font license info
2 |
3 |
4 | ## Entypo
5 |
6 | Copyright (C) 2012 by Daniel Bruce
7 |
8 | Author: Daniel Bruce
9 | License: SIL (http://scripts.sil.org/OFL)
10 | Homepage: http://www.entypo.com
11 |
12 |
13 | ## Typicons
14 |
15 | (c) Stephen Hutchings 2012
16 |
17 | Author: Stephen Hutchings
18 | License: SIL (http://scripts.sil.org/OFL)
19 | Homepage: http://typicons.com/
20 |
21 |
22 | ## Font Awesome
23 |
24 | Copyright (C) 2016 by Dave Gandy
25 |
26 | Author: Dave Gandy
27 | License: SIL ()
28 | Homepage: http://fortawesome.github.com/Font-Awesome/
29 |
30 |
31 | ## Elusive
32 |
33 | Copyright (C) 2013 by Aristeides Stathopoulos
34 |
35 | Author: Aristeides Stathopoulos
36 | License: SIL (http://scripts.sil.org/OFL)
37 | Homepage: http://aristeides.com/
38 |
39 |
40 | ## Modern Pictograms
41 |
42 | Copyright (c) 2012 by John Caserta. All rights reserved.
43 |
44 | Author: John Caserta
45 | License: SIL (http://scripts.sil.org/OFL)
46 | Homepage: http://thedesignoffice.org/project/modern-pictograms/
47 |
48 |
49 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/assets/font/README.txt:
--------------------------------------------------------------------------------
1 | This webfont is generated by http://fontello.com open source project.
2 |
3 |
4 | ================================================================================
5 | Please, note, that you should obey original font licenses, used to make this
6 | webfont pack. Details available in LICENSE.txt file.
7 |
8 | - Usually, it's enough to publish content of LICENSE.txt file somewhere on your
9 | site in "About" section.
10 |
11 | - If your project is open-source, usually, it will be ok to make LICENSE.txt
12 | file publicly available in your repository.
13 |
14 | - Fonts, used in Fontello, don't require a clickable link on your site.
15 | But any kind of additional authors crediting is welcome.
16 | ================================================================================
17 |
18 |
19 | Comments on archive content
20 | ---------------------------
21 |
22 | - /font/* - fonts in different formats
23 |
24 | - /css/* - different kinds of css, for all situations. Should be ok with
25 | twitter bootstrap. Also, you can skip style and assign icon classes
26 | directly to text elements, if you don't mind about IE7.
27 |
28 | - demo.html - demo file, to show your webfont content
29 |
30 | - LICENSE.txt - license info about source fonts, used to build your one.
31 |
32 | - config.json - keeps your settings. You can import it back into fontello
33 | anytime, to continue your work
34 |
35 |
36 | Why so many CSS files ?
37 | -----------------------
38 |
39 | Because we like to fit all your needs :)
40 |
41 | - basic file, .css - is usually enough, it contains @font-face
42 | and character code definitions
43 |
44 | - *-ie7.css - if you need IE7 support, but still don't wish to put char codes
45 | directly into html
46 |
47 | - *-codes.css and *-ie7-codes.css - if you like to use your own @font-face
48 | rules, but still wish to benefit from css generation. That can be very
49 | convenient for automated asset build systems. When you need to update font -
50 | no need to manually edit files, just override old version with archive
51 | content. See fontello source code for examples.
52 |
53 | - *-embedded.css - basic css file, but with embedded WOFF font, to avoid
54 | CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain.
55 | We strongly recommend to resolve this issue by `Access-Control-Allow-Origin`
56 | server headers. But if you ok with dirty hack - this file is for you. Note,
57 | that data url moved to separate @font-face to avoid problems with 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; }
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/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}
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/admin/settings-addons.php:
--------------------------------------------------------------------------------
1 | view = array(
77 | 'json' => array(),
78 | );
79 |
80 |
81 | // load json
82 | $request = wp_remote_post( 'https://assets.advancedcustomfields.com/add-ons/add-ons.json' );
83 |
84 | // validate
85 | if( is_wp_error($request) || wp_remote_retrieve_response_code($request) != 200)
86 | {
87 | acf_add_admin_notice(__('Error . Could not load add-ons list', 'acf'), 'error');
88 | }
89 | else
90 | {
91 | $this->view['json'] = json_decode( $request['body'], true );
92 | }
93 |
94 | }
95 |
96 |
97 | /*
98 | * html
99 | *
100 | * description
101 | *
102 | * @type function
103 | * @date 7/01/2014
104 | * @since 5.0.0
105 | *
106 | * @param $post_id (int)
107 | * @return $post_id (int)
108 | */
109 |
110 | function html() {
111 |
112 | // load view
113 | acf_get_view('settings-addons', $this->view);
114 |
115 | }
116 |
117 | }
118 |
119 |
120 | // initialize
121 | new acf_settings_addons();
122 |
123 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/admin/settings-info.php:
--------------------------------------------------------------------------------
1 | acf_get_setting('version'),
73 | 'have_pro' => acf_get_setting('pro'),
74 | 'tabs' => array(
75 | 'new' => __("What's New", 'acf'),
76 | 'changelog' => __("Changelog", 'acf')
77 | ),
78 | 'active' => 'new'
79 | );
80 |
81 |
82 | // set active tab
83 | $tab = acf_maybe_get_GET('tab');
84 | if( $tab && isset($view['tabs'][ $tab ]) ) {
85 |
86 | $view['active'] = $tab;
87 |
88 | }
89 |
90 |
91 | // load view
92 | acf_get_view('settings-info', $view);
93 |
94 | }
95 |
96 | }
97 |
98 |
99 | // initialize
100 | new acf_settings_info();
101 |
102 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/admin/tools/class-acf-admin-tool.php:
--------------------------------------------------------------------------------
1 | name;
40 | }
41 |
42 |
43 | /**
44 | * get_title
45 | *
46 | * This function will return the Tool's title
47 | *
48 | * @date 19/10/17
49 | * @since 5.6.3
50 | *
51 | * @param n/a
52 | * @return n/a
53 | */
54 |
55 | function get_title() {
56 | return $this->title;
57 | }
58 |
59 |
60 | /**
61 | * get_url
62 | *
63 | * This function will return the Tool's title
64 | *
65 | * @date 19/10/17
66 | * @since 5.6.3
67 | *
68 | * @param n/a
69 | * @return n/a
70 | */
71 |
72 | function get_url() {
73 | return acf_get_admin_tool_url( $this->name );
74 | }
75 |
76 |
77 | /**
78 | * is_active
79 | *
80 | * This function will return true if the tool is active
81 | *
82 | * @date 19/10/17
83 | * @since 5.6.3
84 | *
85 | * @param n/a
86 | * @return bool
87 | */
88 |
89 | function is_active() {
90 | return acf_maybe_get_GET('tool') === $this->name;
91 | }
92 |
93 |
94 | /*
95 | * __construct
96 | *
97 | * This function will setup the class functionality
98 | *
99 | * @type function
100 | * @date 27/6/17
101 | * @since 5.6.0
102 | *
103 | * @param n/a
104 | * @return n/a
105 | */
106 |
107 | function __construct() {
108 |
109 | // initialize
110 | $this->initialize();
111 |
112 | }
113 |
114 |
115 | /**
116 | * initialize
117 | *
118 | * This function will initialize the admin tool
119 | *
120 | * @date 10/10/17
121 | * @since 5.6.3
122 | *
123 | * @param n/a
124 | * @return n/a
125 | */
126 |
127 | function initialize() {
128 |
129 | /* do nothing */
130 |
131 | }
132 |
133 |
134 |
135 | /**
136 | * load
137 | *
138 | * This function is called during the admin page load
139 | *
140 | * @date 10/10/17
141 | * @since 5.6.3
142 | *
143 | * @param n/a
144 | * @return n/a
145 | */
146 |
147 | function load() {
148 |
149 | /* do nothing */
150 |
151 | }
152 |
153 |
154 | /**
155 | * html
156 | *
157 | * This function will output the metabox HTML
158 | *
159 | * @date 10/10/17
160 | * @since 5.6.3
161 | *
162 | * @param n/a
163 | * @return n/a
164 | */
165 |
166 | function html() {
167 |
168 |
169 |
170 | }
171 |
172 |
173 | /**
174 | * submit
175 | *
176 | * This function will run when the tool's form has been submit
177 | *
178 | * @date 10/10/17
179 | * @since 5.6.3
180 | *
181 | * @param n/a
182 | * @return n/a
183 | */
184 |
185 | function submit() {
186 |
187 |
188 | }
189 |
190 |
191 | }
192 |
193 | endif; // class_exists check
194 |
195 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/field-group-fields.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
>
14 | + Add Field button to create your first field.",'acf'); ?>
15 |
16 |
17 | $field ):
20 |
21 | acf_get_view('field-group-field', array( 'field' => $field, 'i' => $i ));
22 |
23 | endforeach;
24 |
25 | endif; ?>
26 |
27 |
28 |
29 |
34 |
35 | 'acfcloneindex',
40 | 'key' => 'acfcloneindex',
41 | 'label' => __('New Field','acf'),
42 | 'name' => 'new_field',
43 | 'type' => 'text'
44 | ));
45 |
46 | ?>
47 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/field-group-locations.php:
--------------------------------------------------------------------------------
1 |
7 |
36 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/html-admin-tools.php:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/html-location-group.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | $rule ):
8 |
9 | // append id
10 | $rule['id'] = "rule_{$i}";
11 | $rule['group'] = $group_id;
12 |
13 |
14 | // valid rule
15 | $rule = acf_get_valid_location_rule($rule);
16 |
17 |
18 | // view
19 | acf_get_view('html-location-rule', array(
20 | 'rule' => $rule
21 | ));
22 |
23 | endforeach; ?>
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/html-location-rule.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | 'select',
14 | 'name' => 'param',
15 | 'prefix' => $rule['prefix'],
16 | 'value' => $rule['param'],
17 | 'choices' => $choices,
18 | 'class' => 'refresh-location-rule'
19 | ));
20 |
21 | }
22 |
23 | ?>
24 |
25 |
26 | 'select',
37 | 'name' => 'operator',
38 | 'prefix' => $rule['prefix'],
39 | 'value' => $rule['operator'],
40 | 'choices' => $choices
41 | ));
42 |
43 | // custom
44 | } else {
45 |
46 | echo $choices;
47 |
48 | }
49 |
50 | ?>
51 |
52 |
53 | 'select',
64 | 'name' => 'value',
65 | 'prefix' => $rule['prefix'],
66 | 'value' => $rule['value'],
67 | 'choices' => $choices
68 | ));
69 |
70 | // custom
71 | } else {
72 |
73 | echo $choices;
74 |
75 | }
76 |
77 | ?>
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/install-notice.php:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/install.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
See what\'s new', 'acf' ), admin_url('edit.php?post_type=acf-field-group&page=acf-settings-info') ); ?>
12 |
13 |
22 |
23 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/settings-addons.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | "",
13 | "slug" => "",
14 | "description" => "",
15 | "thumbnail" => "",
16 | "url" => "",
17 | "btn" => __("Download & Install",'acf'),
18 | "btn_color" => ""
19 | ));
20 |
21 | ?>
22 |
23 |
24 |
25 |
30 |
34 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/ajax.php:
--------------------------------------------------------------------------------
1 | '',
58 | 'value' => '',
59 | 'nonce' => '',
60 | ));
61 |
62 |
63 | // validate
64 | if( ! wp_verify_nonce($options['nonce'], 'acf_nonce') || empty($options['name']) ) {
65 |
66 | die('0');
67 |
68 | }
69 |
70 |
71 | // upadte setting
72 | acf_update_user_setting( $options['name'], $options['value'] );
73 |
74 |
75 | // return
76 | die('1');
77 |
78 | }
79 |
80 | }
81 |
82 | new acf_ajax();
83 |
84 | endif;
85 |
86 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-color_picker.php:
--------------------------------------------------------------------------------
1 | name = 'color_picker';
25 | $this->label = __("Color Picker",'acf');
26 | $this->category = 'jquery';
27 | $this->defaults = array(
28 | 'default_value' => '',
29 | );
30 |
31 | }
32 |
33 |
34 | /*
35 | * input_admin_enqueue_scripts
36 | *
37 | * description
38 | *
39 | * @type function
40 | * @date 16/12/2015
41 | * @since 5.3.2
42 | *
43 | * @param $post_id (int)
44 | * @return $post_id (int)
45 | */
46 |
47 | function input_admin_enqueue_scripts() {
48 |
49 | // globals
50 | global $wp_scripts;
51 |
52 |
53 | // register if not already (on front end)
54 | // http://wordpress.stackexchange.com/questions/82718/how-do-i-implement-the-wordpress-iris-picker-into-my-plugin-on-the-front-end
55 | if( !isset($wp_scripts->registered['iris']) ) {
56 |
57 | // styles
58 | wp_register_style('wp-color-picker', admin_url('css/color-picker.css'), array(), '', true);
59 |
60 |
61 | // scripts
62 | wp_register_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), '1.0.7', true);
63 | wp_register_script('wp-color-picker', admin_url('js/color-picker.min.js'), array('iris'), '', true);
64 |
65 |
66 | // localize
67 | wp_localize_script('wp-color-picker', 'wpColorPickerL10n', array(
68 | 'clear' => __('Clear', 'acf' ),
69 | 'defaultString' => __('Default', 'acf' ),
70 | 'pick' => __('Select Color', 'acf' ),
71 | 'current' => __('Current Color', 'acf' )
72 | ));
73 |
74 | }
75 |
76 |
77 | // enqueue
78 | wp_enqueue_style('wp-color-picker');
79 | wp_enqueue_script('wp-color-picker');
80 |
81 |
82 | }
83 |
84 |
85 | /*
86 | * render_field()
87 | *
88 | * Create the HTML interface for your field
89 | *
90 | * @param $field - an array holding all the field's data
91 | *
92 | * @type action
93 | * @since 3.6
94 | * @date 23/01/13
95 | */
96 |
97 | function render_field( $field ) {
98 |
99 | // vars
100 | $text_input = acf_get_sub_array( $field, array('id', 'class', 'name', 'value') );
101 | $hidden_input = acf_get_sub_array( $field, array('name', 'value') );
102 |
103 |
104 | // html
105 | ?>
106 |
107 |
108 |
109 |
110 | __('Default Value','acf'),
132 | 'instructions' => '',
133 | 'type' => 'text',
134 | 'name' => 'default_value',
135 | 'placeholder' => '#FFFFFF'
136 | ));
137 |
138 | }
139 |
140 | }
141 |
142 |
143 | // initialize
144 | acf_register_field_type( 'acf_field_color_picker' );
145 |
146 | endif; // class_exists check
147 |
148 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-email.php:
--------------------------------------------------------------------------------
1 | name = 'email';
25 | $this->label = __("Email",'acf');
26 | $this->defaults = array(
27 | 'default_value' => '',
28 | 'placeholder' => '',
29 | 'prepend' => '',
30 | 'append' => ''
31 | );
32 |
33 | }
34 |
35 |
36 | /*
37 | * render_field()
38 | *
39 | * Create the HTML interface for your field
40 | *
41 | * @param $field - an array holding all the field's data
42 | *
43 | * @type action
44 | * @since 3.6
45 | * @date 23/01/13
46 | */
47 |
48 | function render_field( $field ) {
49 |
50 | // vars
51 | $atts = array();
52 | $keys = array( 'type', 'id', 'class', 'name', 'value', 'placeholder', 'pattern' );
53 | $keys2 = array( 'readonly', 'disabled', 'required' );
54 | $html = '';
55 |
56 |
57 | // prepend
58 | if( $field['prepend'] !== '' ) {
59 |
60 | $field['class'] .= ' acf-is-prepended';
61 | $html .= '' . acf_esc_html($field['prepend']) . '
';
62 |
63 | }
64 |
65 |
66 | // append
67 | if( $field['append'] !== '' ) {
68 |
69 | $field['class'] .= ' acf-is-appended';
70 | $html .= '' . acf_esc_html($field['append']) . '
';
71 |
72 | }
73 |
74 |
75 | // atts (value="123")
76 | foreach( $keys as $k ) {
77 | if( isset($field[ $k ]) ) $atts[ $k ] = $field[ $k ];
78 | }
79 |
80 |
81 | // atts2 (disabled="disabled")
82 | foreach( $keys2 as $k ) {
83 | if( !empty($field[ $k ]) ) $atts[ $k ] = $k;
84 | }
85 |
86 |
87 | // remove empty atts
88 | $atts = acf_clean_atts( $atts );
89 |
90 |
91 | // render
92 | $html .= '' . acf_get_text_input( $atts ) . '
';
93 |
94 |
95 | // return
96 | echo $html;
97 |
98 | }
99 |
100 |
101 | /*
102 | * render_field_settings()
103 | *
104 | * Create extra options for your field. This is rendered when editing a field.
105 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field
106 | *
107 | * @type action
108 | * @since 3.6
109 | * @date 23/01/13
110 | *
111 | * @param $field - an array holding all the field's data
112 | */
113 |
114 | function render_field_settings( $field ) {
115 |
116 | // default_value
117 | acf_render_field_setting( $field, array(
118 | 'label' => __('Default Value','acf'),
119 | 'instructions' => __('Appears when creating a new post','acf'),
120 | 'type' => 'text',
121 | 'name' => 'default_value',
122 | ));
123 |
124 |
125 | // placeholder
126 | acf_render_field_setting( $field, array(
127 | 'label' => __('Placeholder Text','acf'),
128 | 'instructions' => __('Appears within the input','acf'),
129 | 'type' => 'text',
130 | 'name' => 'placeholder',
131 | ));
132 |
133 |
134 | // prepend
135 | acf_render_field_setting( $field, array(
136 | 'label' => __('Prepend','acf'),
137 | 'instructions' => __('Appears before the input','acf'),
138 | 'type' => 'text',
139 | 'name' => 'prepend',
140 | ));
141 |
142 |
143 | // append
144 | acf_render_field_setting( $field, array(
145 | 'label' => __('Append','acf'),
146 | 'instructions' => __('Appears after the input','acf'),
147 | 'type' => 'text',
148 | 'name' => 'append',
149 | ));
150 |
151 | }
152 |
153 | }
154 |
155 |
156 | // initialize
157 | acf_register_field_type( 'acf_field_email' );
158 |
159 | endif; // class_exists check
160 |
161 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-output.php:
--------------------------------------------------------------------------------
1 | name = 'output';
25 | $this->label = 'output';
26 | $this->public = false;
27 | $this->defaults = array(
28 | 'html' => false
29 | );
30 |
31 | }
32 |
33 |
34 | /*
35 | * render_field()
36 | *
37 | * Create the HTML interface for your field
38 | *
39 | * @param $field (array) the $field being rendered
40 | *
41 | * @type action
42 | * @since 3.6
43 | * @date 23/01/13
44 | *
45 | * @param $field (array) the $field being edited
46 | * @return n/a
47 | */
48 |
49 | function render_field( $field ) {
50 |
51 | // bail early if no html
52 | if( !$field['html'] ) return;
53 |
54 |
55 | // html
56 | if( is_string($field['html']) && !function_exists($field['html']) ) {
57 |
58 | echo $field['html'];
59 |
60 | // function
61 | } else {
62 |
63 | call_user_func_array($field['html'], array($field));
64 |
65 | }
66 |
67 | }
68 |
69 | }
70 |
71 |
72 | // initialize
73 | acf_register_field_type( 'acf_field_output' );
74 |
75 | endif; // class_exists check
76 |
77 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-password.php:
--------------------------------------------------------------------------------
1 | name = 'password';
25 | $this->label = __("Password",'acf');
26 | $this->defaults = array(
27 | 'placeholder' => '',
28 | 'prepend' => '',
29 | 'append' => '',
30 | );
31 |
32 | }
33 |
34 |
35 | /*
36 | * render_field()
37 | *
38 | * Create the HTML interface for your field
39 | *
40 | * @param $field - an array holding all the field's data
41 | *
42 | * @type action
43 | * @since 3.6
44 | * @date 23/01/13
45 | */
46 |
47 | function render_field( $field ) {
48 |
49 | acf_get_field_type('text')->render_field( $field );
50 |
51 | }
52 |
53 |
54 | /*
55 | * render_field_settings()
56 | *
57 | * Create extra options for your field. This is rendered when editing a field.
58 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field
59 | *
60 | * @type action
61 | * @since 3.6
62 | * @date 23/01/13
63 | *
64 | * @param $field - an array holding all the field's data
65 | */
66 |
67 | function render_field_settings( $field ) {
68 |
69 | // placeholder
70 | acf_render_field_setting( $field, array(
71 | 'label' => __('Placeholder Text','acf'),
72 | 'instructions' => __('Appears within the input','acf'),
73 | 'type' => 'text',
74 | 'name' => 'placeholder',
75 | ));
76 |
77 |
78 | // prepend
79 | acf_render_field_setting( $field, array(
80 | 'label' => __('Prepend','acf'),
81 | 'instructions' => __('Appears before the input','acf'),
82 | 'type' => 'text',
83 | 'name' => 'prepend',
84 | ));
85 |
86 |
87 | // append
88 | acf_render_field_setting( $field, array(
89 | 'label' => __('Append','acf'),
90 | 'instructions' => __('Appears after the input','acf'),
91 | 'type' => 'text',
92 | 'name' => 'append',
93 | ));
94 | }
95 |
96 | }
97 |
98 |
99 | // initialize
100 | acf_register_field_type( 'acf_field_password' );
101 |
102 | endif; // class_exists check
103 |
104 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-separator.php:
--------------------------------------------------------------------------------
1 | name = 'separator';
25 | $this->label = __("Separator",'acf');
26 | $this->category = 'layout';
27 |
28 | }
29 |
30 |
31 | /*
32 | * render_field()
33 | *
34 | * Create the HTML interface for your field
35 | *
36 | * @param $field - an array holding all the field's data
37 | *
38 | * @type action
39 | * @since 3.6
40 | * @date 23/01/13
41 | */
42 |
43 | function render_field( $field ) {
44 |
45 | /* do nothing */
46 |
47 | }
48 |
49 |
50 | /*
51 | * load_field()
52 | *
53 | * This filter is appied to the $field after it is loaded from the database
54 | *
55 | * @type filter
56 | * @since 3.6
57 | * @date 23/01/13
58 | *
59 | * @param $field - the field array holding all the field options
60 | *
61 | * @return $field - the field array holding all the field options
62 | */
63 |
64 | function load_field( $field ) {
65 |
66 | // remove name to avoid caching issue
67 | $field['name'] = '';
68 |
69 |
70 | // remove required to avoid JS issues
71 | $field['required'] = 0;
72 |
73 |
74 | // set value other than 'null' to avoid ACF loading / caching issue
75 | $field['value'] = false;
76 |
77 |
78 | // return
79 | return $field;
80 |
81 | }
82 |
83 | }
84 |
85 |
86 | // initialize
87 | acf_register_field_type( 'acf_field_separator' );
88 |
89 | endif; // class_exists check
90 |
91 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-tab.php:
--------------------------------------------------------------------------------
1 | name = 'tab';
25 | $this->label = __("Tab",'acf');
26 | $this->category = 'layout';
27 | $this->defaults = array(
28 | 'placement' => 'top',
29 | 'endpoint' => 0 // added in 5.2.8
30 | );
31 |
32 | }
33 |
34 |
35 | /*
36 | * render_field()
37 | *
38 | * Create the HTML interface for your field
39 | *
40 | * @param $field - an array holding all the field's data
41 | *
42 | * @type action
43 | * @since 3.6
44 | * @date 23/01/13
45 | */
46 |
47 | function render_field( $field ) {
48 |
49 | // vars
50 | $atts = array(
51 | 'href' => '',
52 | 'class' => 'acf-tab-button',
53 | 'data-placement' => $field['placement'],
54 | 'data-endpoint' => $field['endpoint'],
55 | 'data-key' => $field['key']
56 | );
57 |
58 | ?>
59 | >
60 | ' . __( 'Use "Tab Fields" to better organize your edit screen by grouping fields together.', 'acf') . '
';
86 | $message .= '' . __( 'All fields following this "tab field" (or until another "tab field" is defined) will be grouped together using this field\'s label as the tab heading.','acf') . '
';
87 |
88 |
89 | // default_value
90 | acf_render_field_setting( $field, array(
91 | 'label' => __('Instructions','acf'),
92 | 'instructions' => '',
93 | 'name' => 'notes',
94 | 'type' => 'message',
95 | 'message' => $message,
96 | ));
97 | */
98 |
99 |
100 | // preview_size
101 | acf_render_field_setting( $field, array(
102 | 'label' => __('Placement','acf'),
103 | 'type' => 'select',
104 | 'name' => 'placement',
105 | 'choices' => array(
106 | 'top' => __("Top aligned", 'acf'),
107 | 'left' => __("Left aligned", 'acf'),
108 | )
109 | ));
110 |
111 |
112 | // endpoint
113 | acf_render_field_setting( $field, array(
114 | 'label' => __('Endpoint','acf'),
115 | 'instructions' => __('Define an endpoint for the previous tabs to stop. This will start a new group of tabs.', 'acf'),
116 | 'name' => 'endpoint',
117 | 'type' => 'true_false',
118 | 'ui' => 1,
119 | ));
120 |
121 | }
122 |
123 |
124 | /*
125 | * load_field()
126 | *
127 | * This filter is appied to the $field after it is loaded from the database
128 | *
129 | * @type filter
130 | * @since 3.6
131 | * @date 23/01/13
132 | *
133 | * @param $field - the field array holding all the field options
134 | *
135 | * @return $field - the field array holding all the field options
136 | */
137 |
138 | function load_field( $field ) {
139 |
140 | // remove name to avoid caching issue
141 | $field['name'] = '';
142 |
143 | // remove required to avoid JS issues
144 | $field['required'] = 0;
145 |
146 | // set value other than 'null' to avoid ACF loading / caching issue
147 | $field['value'] = false;
148 |
149 | // return
150 | return $field;
151 |
152 | }
153 |
154 | }
155 |
156 |
157 | // initialize
158 | acf_register_field_type( 'acf_field_tab' );
159 |
160 | endif; // class_exists check
161 |
162 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-url.php:
--------------------------------------------------------------------------------
1 | name = 'url';
25 | $this->label = __("Url",'acf');
26 | $this->defaults = array(
27 | 'default_value' => '',
28 | 'placeholder' => '',
29 | );
30 |
31 | }
32 |
33 |
34 | /*
35 | * render_field()
36 | *
37 | * Create the HTML interface for your field
38 | *
39 | * @param $field - an array holding all the field's data
40 | *
41 | * @type action
42 | * @since 3.6
43 | * @date 23/01/13
44 | */
45 |
46 | function render_field( $field ) {
47 |
48 | // vars
49 | $atts = array();
50 | $keys = array( 'type', 'id', 'class', 'name', 'value', 'placeholder', 'pattern' );
51 | $keys2 = array( 'readonly', 'disabled', 'required' );
52 | $html = '';
53 |
54 |
55 | // atts (value="123")
56 | foreach( $keys as $k ) {
57 | if( isset($field[ $k ]) ) $atts[ $k ] = $field[ $k ];
58 | }
59 |
60 |
61 | // atts2 (disabled="disabled")
62 | foreach( $keys2 as $k ) {
63 | if( !empty($field[ $k ]) ) $atts[ $k ] = $k;
64 | }
65 |
66 |
67 | // remove empty atts
68 | $atts = acf_clean_atts( $atts );
69 |
70 |
71 | // render
72 | $html .= '';
73 | $html .= ' ' . acf_get_text_input( $atts ) ;
74 | $html .= '
';
75 |
76 |
77 | // return
78 | echo $html;
79 |
80 | }
81 |
82 |
83 | /*
84 | * render_field_settings()
85 | *
86 | * Create extra options for your field. This is rendered when editing a field.
87 | * The value of $field['name'] can be used (like bellow) to save extra data to the $field
88 | *
89 | * @type action
90 | * @since 3.6
91 | * @date 23/01/13
92 | *
93 | * @param $field - an array holding all the field's data
94 | */
95 |
96 | function render_field_settings( $field ) {
97 |
98 | // default_value
99 | acf_render_field_setting( $field, array(
100 | 'label' => __('Default Value','acf'),
101 | 'instructions' => __('Appears when creating a new post','acf'),
102 | 'type' => 'text',
103 | 'name' => 'default_value',
104 | ));
105 |
106 |
107 | // placeholder
108 | acf_render_field_setting( $field, array(
109 | 'label' => __('Placeholder Text','acf'),
110 | 'instructions' => __('Appears within the input','acf'),
111 | 'type' => 'text',
112 | 'name' => 'placeholder',
113 | ));
114 |
115 | }
116 |
117 |
118 | /*
119 | * validate_value
120 | *
121 | * description
122 | *
123 | * @type function
124 | * @date 11/02/2014
125 | * @since 5.0.0
126 | *
127 | * @param $post_id (int)
128 | * @return $post_id (int)
129 | */
130 |
131 | function validate_value( $valid, $value, $field, $input ){
132 |
133 | // bail early if empty
134 | if( empty($value) ) {
135 |
136 | return $valid;
137 |
138 | }
139 |
140 |
141 | if( strpos($value, '://') !== false ) {
142 |
143 | // url
144 |
145 | } elseif( strpos($value, '//') === 0 ) {
146 |
147 | // protocol relative url
148 |
149 | } else {
150 |
151 | $valid = __('Value must be a valid URL', 'acf');
152 |
153 | }
154 |
155 |
156 | // return
157 | return $valid;
158 |
159 | }
160 |
161 | }
162 |
163 |
164 | // initialize
165 | acf_register_field_type( 'acf_field_url' );
166 |
167 | endif; // class_exists check
168 |
169 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-gutenberg.php:
--------------------------------------------------------------------------------
1 |
70 |
71 | edit_form_after_title(); ?>
72 |
73 |
78 |
81 |
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-attachment.php:
--------------------------------------------------------------------------------
1 | name = 'attachment';
27 | $this->label = __("Attachment",'acf');
28 | $this->category = 'forms';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $attachment = acf_maybe_get( $screen, 'attachment' );
51 |
52 |
53 | // validate
54 | if( !$attachment ) return false;
55 |
56 |
57 | // get attachment mime type
58 | $mime_type = get_post_mime_type( $attachment );
59 |
60 |
61 | // no specific mime
62 | if( !strpos($rule['value'], '/') ) {
63 |
64 | // explode into [0] => type, [1] => mime
65 | $bits = explode('/', $mime_type);
66 |
67 |
68 | // if type matches, fake the $mime_type to match
69 | if( $rule['value'] === $bits[0] ) {
70 |
71 | $mime_type = $rule['value'];
72 |
73 | }
74 | }
75 |
76 |
77 | // match
78 | return $this->compare( $mime_type, $rule );
79 |
80 | }
81 |
82 |
83 | /*
84 | * rule_operators
85 | *
86 | * This function returns the available values for this rule type
87 | *
88 | * @type function
89 | * @date 30/5/17
90 | * @since 5.6.0
91 | *
92 | * @param n/a
93 | * @return (array)
94 | */
95 |
96 | function rule_values( $choices, $rule ) {
97 |
98 | // vars
99 | $mimes = get_allowed_mime_types();
100 | $choices = array(
101 | 'all' => __('All', 'acf')
102 | );
103 |
104 |
105 | // loop
106 | foreach( $mimes as $type => $mime ) {
107 |
108 | $group = current( explode('/', $mime) );
109 | $choices[ $group ][ $group ] = sprintf( __('All %s formats', 'acf'), $group);
110 | $choices[ $group ][ $mime ] = "$type ($mime)";
111 |
112 | }
113 |
114 |
115 | // return
116 | return $choices;
117 |
118 | }
119 |
120 | }
121 |
122 | // initialize
123 | acf_register_location_rule( 'acf_location_attachment' );
124 |
125 | endif; // class_exists check
126 |
127 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-comment.php:
--------------------------------------------------------------------------------
1 | name = 'comment';
27 | $this->label = __("Comment",'acf');
28 | $this->category = 'forms';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $comment = acf_maybe_get( $screen, 'comment' );
51 |
52 |
53 | // bail early if not comment
54 | if( !$comment ) return false;
55 |
56 |
57 | // return
58 | return $this->compare( $comment, $rule );
59 |
60 | }
61 |
62 |
63 | /*
64 | * rule_operators
65 | *
66 | * This function returns the available values for this rule type
67 | *
68 | * @type function
69 | * @date 30/5/17
70 | * @since 5.6.0
71 | *
72 | * @param n/a
73 | * @return (array)
74 | */
75 |
76 | function rule_values( $choices, $rule ) {
77 |
78 | // vars
79 | $choices = array( 'all' => __('All', 'acf') );
80 | $choices = array_merge( $choices, acf_get_pretty_post_types() );
81 | // change this to post types that support comments
82 |
83 | // return
84 | return $choices;
85 |
86 | }
87 |
88 | }
89 |
90 | // initialize
91 | acf_register_location_rule( 'acf_location_comment' );
92 |
93 | endif; // class_exists check
94 |
95 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-current-user-role.php:
--------------------------------------------------------------------------------
1 | name = 'current_user_role';
27 | $this->label = __("Current User Role",'acf');
28 | $this->category = 'user';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // bail early if not logged in
50 | if( !is_user_logged_in() ) return false;
51 |
52 |
53 | // vars
54 | $user = wp_get_current_user();
55 |
56 |
57 | // super_admin
58 | if( $rule['value'] == 'super_admin' ) {
59 |
60 | $result = is_super_admin( $user->ID );
61 |
62 | // role
63 | } else {
64 |
65 | $result = in_array( $rule['value'], $user->roles );
66 |
67 | }
68 |
69 |
70 | // reverse if 'not equal to'
71 | if( $rule['operator'] == '!=' ) {
72 |
73 | $result = !$result;
74 |
75 | }
76 |
77 |
78 | // return
79 | return $result;
80 |
81 | }
82 |
83 |
84 | /*
85 | * rule_operators
86 | *
87 | * This function returns the available values for this rule type
88 | *
89 | * @type function
90 | * @date 30/5/17
91 | * @since 5.6.0
92 | *
93 | * @param n/a
94 | * @return (array)
95 | */
96 |
97 | function rule_values( $choices, $rule ) {
98 |
99 | // global
100 | global $wp_roles;
101 |
102 |
103 | // specific roles
104 | $choices = $wp_roles->get_names();
105 |
106 |
107 | // multi-site
108 | if( is_multisite() ) {
109 |
110 | $prepend = array( 'super_admin' => __('Super Admin', 'acf') );
111 | $choices = array_merge( $prepend, $choices );
112 |
113 | }
114 |
115 |
116 | // return
117 | return $choices;
118 |
119 | }
120 |
121 | }
122 |
123 | // initialize
124 | acf_register_location_rule( 'acf_location_current_user_role' );
125 |
126 | endif; // class_exists check
127 |
128 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-current-user.php:
--------------------------------------------------------------------------------
1 | name = 'current_user';
27 | $this->label = __("Current User",'acf');
28 | $this->category = 'user';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // logged in
50 | if( $rule['value'] == 'logged_in' ) {
51 |
52 | $result = is_user_logged_in();
53 |
54 | // viewing_front
55 | } elseif( $rule['value'] == 'viewing_front' ) {
56 |
57 | $result = !is_admin();
58 |
59 | // viewing_back
60 | } elseif( $rule['value'] == 'viewing_back' ) {
61 |
62 | $result = is_admin();
63 |
64 | }
65 |
66 |
67 | // reverse if 'not equal to'
68 | if( $rule['operator'] == '!=' ) {
69 |
70 | $result = !$result;
71 |
72 | }
73 |
74 |
75 | // return
76 | return $result;
77 |
78 | }
79 |
80 |
81 | /*
82 | * rule_operators
83 | *
84 | * This function returns the available values for this rule type
85 | *
86 | * @type function
87 | * @date 30/5/17
88 | * @since 5.6.0
89 | *
90 | * @param n/a
91 | * @return (array)
92 | */
93 |
94 | function rule_values( $choices, $rule ) {
95 |
96 | return array(
97 | 'logged_in' => __('Logged in', 'acf'),
98 | 'viewing_front' => __('Viewing front end', 'acf'),
99 | 'viewing_back' => __('Viewing back end', 'acf')
100 | );
101 |
102 | }
103 |
104 | }
105 |
106 | // initialize
107 | acf_register_location_rule( 'acf_location_current_user' );
108 |
109 | endif; // class_exists check
110 |
111 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-nav-menu-item.php:
--------------------------------------------------------------------------------
1 | name = 'nav_menu_item';
27 | $this->label = __("Menu Item",'acf');
28 | $this->category = 'forms';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $nav_menu_item = acf_maybe_get( $screen, 'nav_menu_item' );
51 |
52 |
53 | // bail early if not nav_menu_item
54 | if( !$nav_menu_item ) return false;
55 |
56 |
57 | // append nav_menu data
58 | if( !isset($screen['nav_menu']) ) {
59 | $screen['nav_menu'] = acf_get_data('nav_menu_id');
60 | }
61 |
62 |
63 | // return
64 | return acf_get_location_rule('nav_menu')->rule_match( $result, $rule, $screen );
65 |
66 | }
67 |
68 |
69 | /*
70 | * rule_operators
71 | *
72 | * This function returns the available values for this rule type
73 | *
74 | * @type function
75 | * @date 30/5/17
76 | * @since 5.6.0
77 | *
78 | * @param n/a
79 | * @return (array)
80 | */
81 |
82 | function rule_values( $choices, $rule ) {
83 |
84 | // get menu choices
85 | $choices = acf_get_location_rule('nav_menu')->rule_values( $choices, $rule );
86 |
87 |
88 | // append item types?
89 | // dificult to get these details
90 |
91 |
92 | // return
93 | return $choices;
94 |
95 | }
96 |
97 | }
98 |
99 | // initialize
100 | acf_register_location_rule( 'acf_location_nav_menu_item' );
101 |
102 | endif; // class_exists check
103 |
104 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-nav-menu.php:
--------------------------------------------------------------------------------
1 | name = 'nav_menu';
27 | $this->label = __("Menu",'acf');
28 | $this->category = 'forms';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $nav_menu = acf_maybe_get( $screen, 'nav_menu' );
51 |
52 |
53 | // bail early if not nav_menu
54 | if( !$nav_menu ) return false;
55 |
56 |
57 | // location
58 | if( substr($rule['value'], 0, 9) === 'location/' ) {
59 |
60 | // vars
61 | $location = substr($rule['value'], 9);
62 | $menu_locations = get_nav_menu_locations();
63 |
64 |
65 | // bail ealry if no location
66 | if( !isset($menu_locations[$location]) ) return false;
67 |
68 |
69 | // if location matches, update value
70 | if( $menu_locations[$location] == $nav_menu ) {
71 |
72 | $nav_menu = $rule['value'];
73 |
74 | }
75 |
76 | }
77 |
78 |
79 | // return
80 | return $this->compare( $nav_menu, $rule );
81 |
82 | }
83 |
84 |
85 | /*
86 | * rule_operators
87 | *
88 | * This function returns the available values for this rule type
89 | *
90 | * @type function
91 | * @date 30/5/17
92 | * @since 5.6.0
93 | *
94 | * @param n/a
95 | * @return (array)
96 | */
97 |
98 | function rule_values( $choices, $rule ) {
99 |
100 | // all
101 | $choices = array(
102 | 'all' => __('All', 'acf'),
103 | );
104 |
105 |
106 | // locations
107 | $nav_locations = get_registered_nav_menus();
108 | if( !empty($nav_locations) ) {
109 | $cat = __('Menu Locations', 'acf');
110 | foreach( $nav_locations as $slug => $title ) {
111 | $choices[ $cat ][ 'location/'.$slug ] = $title;
112 | }
113 | }
114 |
115 |
116 | // specific menus
117 | $nav_menus = wp_get_nav_menus();
118 | if( !empty($nav_menus) ) {
119 | $cat = __('Menus', 'acf');
120 | foreach( $nav_menus as $nav_menu ) {
121 | $choices[ $cat ][ $nav_menu->term_id ] = $nav_menu->name;
122 | }
123 | }
124 |
125 |
126 | // return
127 | return $choices;
128 |
129 | }
130 |
131 | }
132 |
133 | // initialize
134 | acf_register_location_rule( 'acf_location_nav_menu' );
135 |
136 | endif; // class_exists check
137 |
138 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-page-parent.php:
--------------------------------------------------------------------------------
1 | name = 'page_parent';
27 | $this->label = __("Page Parent",'acf');
28 | $this->category = 'page';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $post_id = acf_maybe_get( $screen, 'post_id' );
51 | $page_parent = acf_maybe_get( $screen, 'page_parent' );
52 |
53 |
54 | // no page parent
55 | if( $page_parent === null ) {
56 |
57 | // bail early if no post id
58 | if( !$post_id ) return false;
59 |
60 |
61 | // get post parent
62 | $post = get_post( $post_id );
63 | $page_parent = $post->post_parent;
64 |
65 | }
66 |
67 |
68 | // compare
69 | return $this->compare( $page_parent, $rule );
70 |
71 | }
72 |
73 |
74 | /*
75 | * rule_operators
76 | *
77 | * This function returns the available values for this rule type
78 | *
79 | * @type function
80 | * @date 30/5/17
81 | * @since 5.6.0
82 | *
83 | * @param n/a
84 | * @return (array)
85 | */
86 |
87 | function rule_values( $choices, $rule ) {
88 |
89 | return acf_get_location_rule('page')->rule_values( $choices, $rule );
90 |
91 | }
92 |
93 | }
94 |
95 | // initialize
96 | acf_register_location_rule( 'acf_location_page_parent' );
97 |
98 | endif; // class_exists check
99 |
100 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-page-template.php:
--------------------------------------------------------------------------------
1 | name = 'page_template';
27 | $this->label = __("Page Template",'acf');
28 | $this->category = 'page';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $post_type = acf_maybe_get( $screen, 'post_type' );
51 |
52 |
53 | // lookup post_type
54 | if( !$post_type ) {
55 |
56 | $post_id = acf_maybe_get( $screen, 'post_id' );
57 |
58 | if( !$post_id ) return false;
59 |
60 | $post_type = get_post_type( $post_id );
61 |
62 | }
63 |
64 |
65 | // page template 'default' rule is only for 'page' post type
66 | // prevents 'Default Template' field groups appearing on all post types that allow for post templates (WP 4.7)
67 | if( $rule['value'] === 'default' ) {
68 |
69 | // bail ealry if not page
70 | if( $post_type !== 'page' ) return false;
71 |
72 | }
73 |
74 |
75 | // return
76 | return acf_get_location_rule('post_template')->rule_match( $result, $rule, $screen );
77 |
78 | }
79 |
80 |
81 | /*
82 | * rule_operators
83 | *
84 | * This function returns the available values for this rule type
85 | *
86 | * @type function
87 | * @date 30/5/17
88 | * @since 5.6.0
89 | *
90 | * @param n/a
91 | * @return (array)
92 | */
93 |
94 | function rule_values( $choices, $rule ) {
95 |
96 | // vars
97 | $choices = array(
98 | 'default' => apply_filters( 'default_page_template_title', __('Default Template', 'acf') )
99 | );
100 |
101 |
102 | // get templates and merge them in
103 | $templates = wp_get_theme()->get_page_templates();
104 | $choices = array_merge($choices, $templates);
105 |
106 |
107 | // return choices
108 | return $choices;
109 |
110 | }
111 |
112 | }
113 |
114 | // initialize
115 | acf_register_location_rule( 'acf_location_page_template' );
116 |
117 | endif; // class_exists check
118 |
119 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-page-type.php:
--------------------------------------------------------------------------------
1 | name = 'page_type';
27 | $this->label = __("Page Type",'acf');
28 | $this->category = 'page';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $post_id = acf_maybe_get( $screen, 'post_id' );
51 |
52 | // bail early if no post id
53 | if( !$post_id ) return false;
54 |
55 | // get post
56 | $post = get_post( $post_id );
57 |
58 | // bail early if no post
59 | if( !$post ) return false;
60 |
61 |
62 | // compare
63 | if( $rule['value'] == 'front_page') {
64 |
65 | // vars
66 | $front_page = (int) get_option('page_on_front');
67 |
68 |
69 | // compare
70 | $result = ( $front_page === $post->ID );
71 |
72 | } elseif( $rule['value'] == 'posts_page') {
73 |
74 | // vars
75 | $posts_page = (int) get_option('page_for_posts');
76 |
77 |
78 | // compare
79 | $result = ( $posts_page === $post->ID );
80 |
81 | } elseif( $rule['value'] == 'top_level') {
82 |
83 | // vars
84 | $page_parent = acf_maybe_get( $screen, 'page_parent', $post->post_parent );
85 |
86 |
87 | // compare
88 | $result = ( $page_parent == 0 );
89 |
90 | } elseif( $rule['value'] == 'parent' ) {
91 |
92 | // get children
93 | $children = get_posts(array(
94 | 'post_type' => $post->post_type,
95 | 'post_parent' => $post->ID,
96 | 'posts_per_page' => 1,
97 | 'fields' => 'ids',
98 | ));
99 |
100 |
101 | // compare
102 | $result = !empty( $children );
103 |
104 | } elseif( $rule['value'] == 'child') {
105 |
106 | // vars
107 | $page_parent = acf_maybe_get( $screen, 'page_parent', $post->post_parent );
108 |
109 |
110 | // compare
111 | $result = ( $page_parent > 0 );
112 |
113 | }
114 |
115 |
116 | // reverse if 'not equal to'
117 | if( $rule['operator'] == '!=' ) {
118 |
119 | $result = !$result;
120 |
121 | }
122 |
123 |
124 | // return
125 | return $result;
126 |
127 | }
128 |
129 |
130 | /*
131 | * rule_operators
132 | *
133 | * This function returns the available values for this rule type
134 | *
135 | * @type function
136 | * @date 30/5/17
137 | * @since 5.6.0
138 | *
139 | * @param n/a
140 | * @return (array)
141 | */
142 |
143 | function rule_values( $choices, $rule ) {
144 |
145 | return array(
146 | 'front_page' => __("Front Page",'acf'),
147 | 'posts_page' => __("Posts Page",'acf'),
148 | 'top_level' => __("Top Level Page (no parent)",'acf'),
149 | 'parent' => __("Parent Page (has children)",'acf'),
150 | 'child' => __("Child Page (has parent)",'acf'),
151 | );
152 |
153 | }
154 |
155 | }
156 |
157 | // initialize
158 | acf_register_location_rule( 'acf_location_page_type' );
159 |
160 | endif; // class_exists check
161 |
162 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-page.php:
--------------------------------------------------------------------------------
1 | name = 'page';
27 | $this->label = __("Page",'acf');
28 | $this->category = 'page';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | return acf_get_location_rule('post')->rule_match( $result, $rule, $screen );
50 |
51 | }
52 |
53 |
54 | /*
55 | * rule_operators
56 | *
57 | * This function returns the available values for this rule type
58 | *
59 | * @type function
60 | * @date 30/5/17
61 | * @since 5.6.0
62 | *
63 | * @param n/a
64 | * @return (array)
65 | */
66 |
67 | function rule_values( $choices, $rule ) {
68 |
69 | // get posts grouped by post type
70 | $groups = acf_get_grouped_posts(array(
71 | 'post_type' => 'page'
72 | ));
73 |
74 |
75 | // pop
76 | $choices = array_pop( $groups );
77 |
78 |
79 | // convert posts to titles
80 | foreach( $choices as &$item ) {
81 |
82 | $item = acf_get_post_title( $item );
83 |
84 | }
85 |
86 |
87 | // return
88 | return $choices;
89 |
90 | }
91 |
92 | }
93 |
94 | // initialize
95 | acf_register_location_rule( 'acf_location_page' );
96 |
97 | endif; // class_exists check
98 |
99 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-post-category.php:
--------------------------------------------------------------------------------
1 | name = 'post_category';
27 | $this->label = __("Post Category",'acf');
28 | $this->category = 'post';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | return acf_get_location_rule('post_taxonomy')->rule_match( $result, $rule, $screen );
50 |
51 | }
52 |
53 |
54 | /*
55 | * rule_operators
56 | *
57 | * This function returns the available values for this rule type
58 | *
59 | * @type function
60 | * @date 30/5/17
61 | * @since 5.6.0
62 | *
63 | * @param n/a
64 | * @return (array)
65 | */
66 |
67 | function rule_values( $choices, $rule ) {
68 |
69 | $terms = acf_get_taxonomy_terms( 'category' );
70 |
71 | if( !empty($terms) ) {
72 |
73 | $choices = array_pop($terms);
74 |
75 | }
76 |
77 | return $choices;
78 |
79 | }
80 |
81 | }
82 |
83 | // initialize
84 | acf_register_location_rule( 'acf_location_post_category' );
85 |
86 | endif; // class_exists check
87 |
88 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-post-format.php:
--------------------------------------------------------------------------------
1 | name = 'post_format';
27 | $this->label = __("Post Format",'acf');
28 | $this->category = 'post';
29 |
30 | }
31 |
32 |
33 | /*
34 | * get_post_type
35 | *
36 | * This function will return the current post_type
37 | *
38 | * @type function
39 | * @date 25/11/16
40 | * @since 5.5.0
41 | *
42 | * @param $options (int)
43 | * @return (mixed)
44 | */
45 |
46 | function get_post_type( $screen ) {
47 |
48 | // vars
49 | $post_id = acf_maybe_get( $screen, 'post_id' );
50 | $post_type = acf_maybe_get( $screen, 'post_type' );
51 |
52 |
53 | // post_type
54 | if( $post_type ) return $post_type;
55 |
56 |
57 | // $post_id
58 | if( $post_id ) return get_post_type( $post_id );
59 |
60 |
61 | // return
62 | return false;
63 |
64 | }
65 |
66 |
67 | /*
68 | * rule_match
69 | *
70 | * This function is used to match this location $rule to the current $screen
71 | *
72 | * @type function
73 | * @date 3/01/13
74 | * @since 3.5.7
75 | *
76 | * @param $match (boolean)
77 | * @param $rule (array)
78 | * @return $options (array)
79 | */
80 |
81 | function rule_match( $result, $rule, $screen ) {
82 |
83 | // vars
84 | $post_format = acf_maybe_get( $screen, 'post_format' );
85 |
86 |
87 | // find post format
88 | if( !$post_format ) {
89 |
90 | // get post id
91 | $post_id = acf_maybe_get( $screen, 'post_id' );
92 | $post_type = $this->get_post_type( $screen );
93 |
94 |
95 | // bail early if not a post
96 | if( !$post_id || !$post_type ) return false;
97 |
98 |
99 | // does post_type support 'post-format'
100 | if( post_type_supports($post_type, 'post-formats') ) {
101 |
102 | // update
103 | $post_format = get_post_format($post_id);
104 | $post_format = $post_format ? $post_format : 'standard';
105 |
106 | }
107 |
108 | }
109 |
110 |
111 | // compare
112 | return $this->compare( $post_format, $rule );
113 |
114 | }
115 |
116 |
117 | /*
118 | * rule_operators
119 | *
120 | * This function returns the available values for this rule type
121 | *
122 | * @type function
123 | * @date 30/5/17
124 | * @since 5.6.0
125 | *
126 | * @param n/a
127 | * @return (array)
128 | */
129 |
130 | function rule_values( $choices, $rule ) {
131 |
132 | return get_post_format_strings();
133 |
134 | }
135 |
136 | }
137 |
138 | // initialize
139 | acf_register_location_rule( 'acf_location_post_format' );
140 |
141 | endif; // class_exists check
142 |
143 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-post-status.php:
--------------------------------------------------------------------------------
1 | name = 'post_status';
27 | $this->label = __("Post Status",'acf');
28 | $this->category = 'post';
29 |
30 | }
31 |
32 |
33 | /*
34 | * get_post_type
35 | *
36 | * This function will return the current post_type
37 | *
38 | * @type function
39 | * @date 25/11/16
40 | * @since 5.5.0
41 | *
42 | * @param $options (int)
43 | * @return (mixed)
44 | */
45 |
46 | function get_post_type( $screen ) {
47 |
48 | // vars
49 | $post_id = acf_maybe_get( $screen, 'post_id' );
50 | $post_type = acf_maybe_get( $screen, 'post_type' );
51 |
52 |
53 | // post_type
54 | if( $post_type ) return $post_type;
55 |
56 |
57 | // $post_id
58 | if( $post_id ) return get_post_type( $post_id );
59 |
60 |
61 | // return
62 | return false;
63 |
64 | }
65 |
66 |
67 | /*
68 | * rule_match
69 | *
70 | * This function is used to match this location $rule to the current $screen
71 | *
72 | * @type function
73 | * @date 3/01/13
74 | * @since 3.5.7
75 | *
76 | * @param $match (boolean)
77 | * @param $rule (array)
78 | * @return $options (array)
79 | */
80 |
81 | function rule_match( $result, $rule, $screen ) {
82 |
83 | // vars
84 | $post_status = acf_maybe_get( $screen, 'post_status' );
85 |
86 |
87 | // find post format
88 | if( !$post_status ) {
89 |
90 | // get post id
91 | $post_id = acf_maybe_get( $screen, 'post_id' );
92 |
93 |
94 | // bail early if not a post
95 | if( !$post_id ) return false;
96 |
97 |
98 | // update
99 | $post_status = get_post_status( $post_id );
100 |
101 | }
102 |
103 |
104 | // auto-draft = draft
105 | if( $post_status == 'auto-draft' ) {
106 |
107 | $post_status = 'draft';
108 |
109 | }
110 |
111 |
112 | // match
113 | return $this->compare( $post_status, $rule );
114 |
115 | }
116 |
117 |
118 | /*
119 | * rule_operators
120 | *
121 | * This function returns the available values for this rule type
122 | *
123 | * @type function
124 | * @date 30/5/17
125 | * @since 5.6.0
126 | *
127 | * @param n/a
128 | * @return (array)
129 | */
130 |
131 | function rule_values( $choices, $rule ) {
132 |
133 | // globals
134 | global $wp_post_statuses;
135 |
136 |
137 | // append
138 | if( !empty($wp_post_statuses) ) {
139 |
140 | foreach( $wp_post_statuses as $status ) {
141 |
142 | $choices[ $status->name ] = $status->label;
143 |
144 | }
145 |
146 | }
147 |
148 |
149 | // return choices
150 | return $choices;
151 |
152 | }
153 |
154 | }
155 |
156 | // initialize
157 | acf_register_location_rule( 'acf_location_post_status' );
158 |
159 | endif; // class_exists check
160 |
161 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-post-taxonomy.php:
--------------------------------------------------------------------------------
1 | name = 'post_taxonomy';
27 | $this->label = __("Post Taxonomy",'acf');
28 | $this->category = 'post';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $post_id = acf_maybe_get( $screen, 'post_id' );
51 | $terms = acf_maybe_get( $screen, 'post_taxonomy' );
52 |
53 |
54 | // bail early if not a post
55 | if( !$post_id ) return false;
56 |
57 |
58 | // get term data
59 | $data = acf_decode_taxonomy_term( $rule['value'] );
60 | $term = get_term_by( 'slug', $data['term'], $data['taxonomy'] );
61 |
62 |
63 | // attempt get term via ID (ACF4 uses ID)
64 | if( !$term && is_numeric($data['term']) ) {
65 |
66 | $term = get_term_by( 'id', $data['term'], $data['taxonomy'] );
67 |
68 | }
69 |
70 |
71 | // bail early if no term
72 | if( !$term ) return false;
73 |
74 |
75 | // not ajax, load real post's terms
76 | if( $terms === null ) {
77 |
78 | $terms = wp_get_post_terms( $post_id, $term->taxonomy, array('fields' => 'ids') );
79 |
80 | }
81 |
82 |
83 | // If no terms, this is a new post and should be treated as if it has the "Uncategorized" (1) category ticked
84 | if( empty($terms) ) {
85 |
86 | // get post type
87 | $post_type = get_post_type( $post_id );
88 |
89 |
90 | // if is category
91 | if( is_object_in_taxonomy($post_type, 'category') ) {
92 |
93 | $terms = array( 1 );
94 |
95 | }
96 |
97 | }
98 |
99 |
100 | // match
101 | if( !empty($terms) ) {
102 |
103 | $result = in_array( $term->term_id, $terms );
104 |
105 | }
106 |
107 |
108 | // reverse if 'not equal to'
109 | if( $rule['operator'] === '!=' ) {
110 |
111 | $result = !$result;
112 |
113 | }
114 |
115 |
116 | // return
117 | return $result;
118 |
119 | }
120 |
121 |
122 | /*
123 | * rule_operators
124 | *
125 | * This function returns the available values for this rule type
126 | *
127 | * @type function
128 | * @date 30/5/17
129 | * @since 5.6.0
130 | *
131 | * @param n/a
132 | * @return (array)
133 | */
134 |
135 | function rule_values( $choices, $rule ) {
136 |
137 | // get
138 | $choices = acf_get_taxonomy_terms();
139 |
140 |
141 | // unset post_format
142 | if( isset($choices['post_format']) ) {
143 |
144 | unset( $choices['post_format']) ;
145 |
146 | }
147 |
148 |
149 | // return
150 | return $choices;
151 |
152 | }
153 |
154 | }
155 |
156 | // initialize
157 | acf_register_location_rule( 'acf_location_post_taxonomy' );
158 |
159 | endif; // class_exists check
160 |
161 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-post-template.php:
--------------------------------------------------------------------------------
1 | name = 'post_template';
27 | $this->label = __("Post Template",'acf');
28 | $this->category = 'post';
29 | $this->public = acf_version_compare('wp', '>=', '4.7');
30 |
31 | }
32 |
33 |
34 | /*
35 | * get_post_type
36 | *
37 | * This function will return the current post_type
38 | *
39 | * @type function
40 | * @date 25/11/16
41 | * @since 5.5.0
42 | *
43 | * @param $options (int)
44 | * @return (mixed)
45 | */
46 |
47 | function get_post_type( $screen ) {
48 |
49 | // vars
50 | $post_id = acf_maybe_get( $screen, 'post_id' );
51 | $post_type = acf_maybe_get( $screen, 'post_type' );
52 |
53 |
54 | // post_type
55 | if( $post_type ) return $post_type;
56 |
57 |
58 | // $post_id
59 | if( $post_id ) return get_post_type( $post_id );
60 |
61 |
62 | // return
63 | return false;
64 |
65 | }
66 |
67 |
68 | /*
69 | * rule_match
70 | *
71 | * This function is used to match this location $rule to the current $screen
72 | *
73 | * @type function
74 | * @date 3/01/13
75 | * @since 3.5.7
76 | *
77 | * @param $match (boolean)
78 | * @param $rule (array)
79 | * @return $options (array)
80 | */
81 |
82 | function rule_match( $result, $rule, $screen ) {
83 |
84 | // vars
85 | $templates = array();
86 | $post_id = acf_maybe_get( $screen, 'post_id' );
87 | $page_template = acf_maybe_get( $screen, 'page_template' );
88 | $post_type = $this->get_post_type( $screen );
89 |
90 |
91 | // bail early if no post_type found (not a post)
92 | if( !$post_type ) return false;
93 |
94 |
95 | // get templates (WP 4.7)
96 | if( acf_version_compare('wp', '>=', '4.7') ) {
97 |
98 | $templates = acf_get_post_templates();
99 |
100 | }
101 |
102 |
103 | // 'page' is always a valid pt even if no templates exist in the theme
104 | // allows scenario where page_template = 'default' and no templates exist
105 | if( !isset($templates['page']) ) {
106 |
107 | $templates['page'] = array();
108 |
109 | }
110 |
111 |
112 | // bail early if this post type does not allow for templates
113 | if( !isset($templates[ $post_type ]) ) return false;
114 |
115 |
116 | // get page template
117 | if( !$page_template ) {
118 |
119 | $page_template = get_post_meta( $post_id, '_wp_page_template', true );
120 |
121 | }
122 |
123 |
124 | // new post - no page template
125 | if( !$page_template ) $page_template = "default";
126 |
127 |
128 | // match
129 | return $this->compare( $page_template, $rule );
130 |
131 | }
132 |
133 |
134 | /*
135 | * rule_operators
136 | *
137 | * This function returns the available values for this rule type
138 | *
139 | * @type function
140 | * @date 30/5/17
141 | * @since 5.6.0
142 | *
143 | * @param n/a
144 | * @return (array)
145 | */
146 |
147 | function rule_values( $choices, $rule ) {
148 |
149 | // vars
150 | $choices = array(
151 | 'default' => apply_filters( 'default_page_template_title', __('Default Template', 'acf') )
152 | );
153 |
154 |
155 | // get templates (WP 4.7)
156 | if( acf_version_compare('wp', '>=', '4.7') ) {
157 |
158 | $templates = acf_get_post_templates();
159 | $choices = array_merge($choices, $templates);
160 |
161 | }
162 |
163 |
164 | // return choices
165 | return $choices;
166 |
167 | }
168 |
169 | }
170 |
171 | // initialize
172 | acf_register_location_rule( 'acf_location_post_template' );
173 |
174 | endif; // class_exists check
175 |
176 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-post-type.php:
--------------------------------------------------------------------------------
1 | name = 'post_type';
27 | $this->label = __("Post Type",'acf');
28 | $this->category = 'post';
29 |
30 | }
31 |
32 |
33 | /*
34 | * get_post_type
35 | *
36 | * This function will return the current post_type
37 | *
38 | * @type function
39 | * @date 25/11/16
40 | * @since 5.5.0
41 | *
42 | * @param $options (int)
43 | * @return (mixed)
44 | */
45 |
46 | function get_post_type( $screen ) {
47 |
48 | // vars
49 | $post_id = acf_maybe_get( $screen, 'post_id' );
50 | $post_type = acf_maybe_get( $screen, 'post_type' );
51 |
52 |
53 | // post_type
54 | if( $post_type ) return $post_type;
55 |
56 |
57 | // $post_id
58 | if( $post_id ) return get_post_type( $post_id );
59 |
60 |
61 | // return
62 | return false;
63 |
64 | }
65 |
66 |
67 | /*
68 | * rule_match
69 | *
70 | * This function is used to match this location $rule to the current $screen
71 | *
72 | * @type function
73 | * @date 3/01/13
74 | * @since 3.5.7
75 | *
76 | * @param $match (boolean)
77 | * @param $rule (array)
78 | * @return $options (array)
79 | */
80 |
81 | function rule_match( $result, $rule, $screen ) {
82 |
83 | // vars
84 | $post_type = $this->get_post_type( $screen );
85 |
86 |
87 | // bail early if no post_type found (not a post)
88 | if( !$post_type ) return false;
89 |
90 |
91 | // match
92 | return $this->compare( $post_type, $rule );
93 |
94 | }
95 |
96 |
97 | /*
98 | * rule_operators
99 | *
100 | * This function returns the available values for this rule type
101 | *
102 | * @type function
103 | * @date 30/5/17
104 | * @since 5.6.0
105 | *
106 | * @param n/a
107 | * @return (array)
108 | */
109 |
110 | function rule_values( $choices, $rule ) {
111 |
112 | // get post types
113 | // - removed show_ui to allow 3rd party code to register a post type using a custom admin edit page
114 | $post_types = acf_get_post_types(array(
115 | 'show_ui' => 1,
116 | 'exclude' => array('attachment')
117 | ));
118 |
119 |
120 | // return choices
121 | return acf_get_pretty_post_types( $post_types );
122 |
123 | }
124 |
125 | }
126 |
127 | // initialize
128 | acf_register_location_rule( 'acf_location_post_type' );
129 |
130 | endif; // class_exists check
131 |
132 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-post.php:
--------------------------------------------------------------------------------
1 | name = 'post';
27 | $this->label = __("Post",'acf');
28 | $this->category = 'post';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $post_id = acf_maybe_get( $screen, 'post_id' );
51 |
52 |
53 | // bail early if not post
54 | if( !$post_id ) return false;
55 |
56 |
57 | // compare
58 | return $this->compare( $post_id, $rule );
59 |
60 | }
61 |
62 |
63 | /*
64 | * rule_operators
65 | *
66 | * This function returns the available values for this rule type
67 | *
68 | * @type function
69 | * @date 30/5/17
70 | * @since 5.6.0
71 | *
72 | * @param n/a
73 | * @return (array)
74 | */
75 |
76 | function rule_values( $choices, $rule ) {
77 |
78 | // get post types
79 | $post_types = acf_get_post_types(array(
80 | 'show_ui' => 1,
81 | 'exclude' => array('page', 'attachment')
82 | ));
83 |
84 |
85 | // get posts grouped by post type
86 | $groups = acf_get_grouped_posts(array(
87 | 'post_type' => $post_types
88 | ));
89 |
90 |
91 | if( !empty($groups) ) {
92 |
93 | foreach( array_keys($groups) as $group_title ) {
94 |
95 | // vars
96 | $posts = acf_extract_var( $groups, $group_title );
97 |
98 |
99 | // override post data
100 | foreach( array_keys($posts) as $post_id ) {
101 |
102 | // update
103 | $posts[ $post_id ] = acf_get_post_title( $posts[ $post_id ] );
104 |
105 | };
106 |
107 |
108 | // append to $choices
109 | $choices[ $group_title ] = $posts;
110 |
111 | }
112 |
113 | }
114 |
115 |
116 | // return
117 | return $choices;
118 |
119 | }
120 |
121 | }
122 |
123 | // initialize
124 | acf_register_location_rule( 'acf_location_post' );
125 |
126 | endif; // class_exists check
127 |
128 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-taxonomy.php:
--------------------------------------------------------------------------------
1 | name = 'taxonomy';
27 | $this->label = __("Taxonomy",'acf');
28 | $this->category = 'forms';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $taxonomy = acf_maybe_get( $screen, 'taxonomy' );
51 |
52 |
53 | // bail early if not taxonomy
54 | if( !$taxonomy ) return false;
55 |
56 |
57 | // return
58 | return $this->compare( $taxonomy, $rule );
59 |
60 | }
61 |
62 |
63 | /*
64 | * rule_operators
65 | *
66 | * This function returns the available values for this rule type
67 | *
68 | * @type function
69 | * @date 30/5/17
70 | * @since 5.6.0
71 | *
72 | * @param n/a
73 | * @return (array)
74 | */
75 |
76 | function rule_values( $choices, $rule ) {
77 |
78 | // vars
79 | $choices = array( 'all' => __('All', 'acf') );
80 | $choices = array_merge( $choices, acf_get_taxonomies() );
81 |
82 |
83 | // return
84 | return $choices;
85 |
86 | }
87 |
88 | }
89 |
90 | // initialize
91 | acf_register_location_rule( 'acf_location_taxonomy' );
92 |
93 | endif; // class_exists check
94 |
95 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-user-form.php:
--------------------------------------------------------------------------------
1 | name = 'user_form';
27 | $this->label = __("User Form",'acf');
28 | $this->category = 'user';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $user_form = acf_maybe_get( $screen, 'user_form' );
51 |
52 |
53 | // bail early if no user form
54 | if( !$user_form ) return false;
55 |
56 |
57 | // add is treated the same as edit
58 | if( $user_form === 'add' ) {
59 |
60 | $user_form = 'edit';
61 |
62 | }
63 |
64 |
65 | // match
66 | return $this->compare( $user_form, $rule );
67 |
68 | }
69 |
70 |
71 | /*
72 | * rule_operators
73 | *
74 | * This function returns the available values for this rule type
75 | *
76 | * @type function
77 | * @date 30/5/17
78 | * @since 5.6.0
79 | *
80 | * @param n/a
81 | * @return (array)
82 | */
83 |
84 | function rule_values( $choices, $rule ) {
85 |
86 | return array(
87 | 'all' => __('All', 'acf'),
88 | 'edit' => __('Add / Edit', 'acf'),
89 | 'register' => __('Register', 'acf')
90 | );
91 |
92 | /*
93 |
94 | // global
95 | global $wp_roles;
96 |
97 |
98 | // vars
99 | $choices = array( 'all' => __('All', 'acf') );
100 | $choices = array_merge( $choices, $wp_roles->get_names() );
101 |
102 |
103 | // return
104 | return $choices;
105 | */
106 |
107 | }
108 |
109 | }
110 |
111 | // initialize
112 | acf_register_location_rule( 'acf_location_user_form' );
113 |
114 | endif; // class_exists check
115 |
116 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-user-role.php:
--------------------------------------------------------------------------------
1 | name = 'user_role';
27 | $this->label = __("User Role",'acf');
28 | $this->category = 'user';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $user_id = acf_maybe_get( $screen, 'user_id' );
51 | $user_role = acf_maybe_get( $screen, 'user_role' );
52 |
53 |
54 | // if user_role is supplied (3rd party compatibility)
55 | if( $user_role ) {
56 |
57 | // do nothing
58 |
59 | // user_id (expected)
60 | } elseif( $user_id ) {
61 |
62 | // new user
63 | if( $user_id == 'new' ) {
64 |
65 | // set to default role
66 | $user_role = get_option('default_role');
67 |
68 | // existing user
69 | } elseif( user_can($user_id, $rule['value']) ) {
70 |
71 | // set to value and allow match
72 | $user_role = $rule['value'];
73 |
74 | }
75 |
76 | // else
77 | } else {
78 |
79 | // not a user
80 | return false;
81 |
82 | }
83 |
84 |
85 | // match
86 | return $this->compare( $user_role, $rule );
87 |
88 | }
89 |
90 |
91 | /*
92 | * rule_operators
93 | *
94 | * This function returns the available values for this rule type
95 | *
96 | * @type function
97 | * @date 30/5/17
98 | * @since 5.6.0
99 | *
100 | * @param n/a
101 | * @return (array)
102 | */
103 |
104 | function rule_values( $choices, $rule ) {
105 |
106 | // global
107 | global $wp_roles;
108 |
109 |
110 | // vars
111 | $choices = array( 'all' => __('All', 'acf') );
112 | $choices = array_merge( $choices, $wp_roles->get_names() );
113 |
114 |
115 | // return
116 | return $choices;
117 |
118 | }
119 |
120 | }
121 |
122 | // initialize
123 | acf_register_location_rule( 'acf_location_user_role' );
124 |
125 | endif; // class_exists check
126 |
127 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/locations/class-acf-location-widget.php:
--------------------------------------------------------------------------------
1 | name = 'widget';
27 | $this->label = __("Widget",'acf');
28 | $this->category = 'forms';
29 |
30 | }
31 |
32 |
33 | /*
34 | * rule_match
35 | *
36 | * This function is used to match this location $rule to the current $screen
37 | *
38 | * @type function
39 | * @date 3/01/13
40 | * @since 3.5.7
41 | *
42 | * @param $match (boolean)
43 | * @param $rule (array)
44 | * @return $options (array)
45 | */
46 |
47 | function rule_match( $result, $rule, $screen ) {
48 |
49 | // vars
50 | $widget = acf_maybe_get( $screen, 'widget' );
51 |
52 |
53 | // bail early if not widget
54 | if( !$widget ) return false;
55 |
56 |
57 | // return
58 | return $this->compare( $widget, $rule );
59 |
60 | }
61 |
62 |
63 | /*
64 | * rule_operators
65 | *
66 | * This function returns the available values for this rule type
67 | *
68 | * @type function
69 | * @date 30/5/17
70 | * @since 5.6.0
71 | *
72 | * @param n/a
73 | * @return (array)
74 | */
75 |
76 | function rule_values( $choices, $rule ) {
77 |
78 | // global
79 | global $wp_widget_factory;
80 |
81 |
82 | // vars
83 | $choices = array( 'all' => __('All', 'acf') );
84 |
85 |
86 | // loop
87 | if( !empty( $wp_widget_factory->widgets ) ) {
88 |
89 | foreach( $wp_widget_factory->widgets as $widget ) {
90 |
91 | $choices[ $widget->id_base ] = $widget->name;
92 |
93 | }
94 |
95 | }
96 |
97 |
98 | // return
99 | return $choices;
100 |
101 | }
102 |
103 | }
104 |
105 | // initialize
106 | acf_register_location_rule( 'acf_location_widget' );
107 |
108 | endif; // class_exists check
109 |
110 | ?>
--------------------------------------------------------------------------------
/api/wp-content/plugins/advanced-custom-fields-pro/includes/walkers/class-acf-walker-nav-menu-edit.php:
--------------------------------------------------------------------------------
1 |
52 | $search = '
24 |
25 | You need to enable JavaScript to run this app.
26 |
27 |
28 |
31 | ',
119 | extraChunks.join('') + ''
120 | )
121 | .replace(
122 | '"__SERVER_PAGE_STATE__"',
123 | filterDataStore(store.getState(), req.baseUrl)
124 | ).replace(
125 | '',
126 | `${helmet.title.toString()}${helmet.meta.toString()}`
127 | )
128 | );
129 | });
130 | }
131 |
--------------------------------------------------------------------------------
/client/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-wp-rest-client",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "babel-preset-es2015": "^6.24.1",
7 | "babel-preset-react-app": "^3.1.2",
8 | "dotenv": "^5.0.1",
9 | "express": "^4.16.4",
10 | "ignore-styles": "^5.0.1",
11 | "node-sass-chokidar": "^1.3.4",
12 | "npm-run-all": "^4.1.5",
13 | "qs": "^6.6.0",
14 | "react": "^16.6.3",
15 | "react-dom": "^16.6.3",
16 | "react-helmet": "^5.2.0",
17 | "react-loadable": "^5.5.0",
18 | "react-redux": "^5.1.1",
19 | "react-router-dom": "^4.3.1",
20 | "react-scripts": "1.1.1",
21 | "react-transition-group": "^2.5.1",
22 | "redux": "^3.7.2",
23 | "superagent": "^3.8.3",
24 | "superagent-promise": "^1.1.0"
25 | },
26 | "scripts": {
27 | "build-css": "node-sass-chokidar src/ -o src/",
28 | "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive",
29 | "start": "npm-run-all -p serve watch-css start-js",
30 | "build": "npm-run-all build-css build-js",
31 | "start-js": "react-scripts start",
32 | "serve": "node ssr-init",
33 | "build-js": "react-scripts build",
34 | "test": "react-scripts test --env=jsdom",
35 | "eject": "react-scripts eject"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/client/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trouble/react-wp-rest/0ff7294e834a1aa80e02c6e16e1a69c49f9b1349/client/public/favicon.ico
--------------------------------------------------------------------------------
/client/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |