├── .eslintignore ├── .github └── workflows │ └── vuepress-deploy.yml ├── .gitignore ├── 404.md ├── CNAME ├── LICENSE ├── README.md ├── docs ├── .vuepress │ ├── components │ │ ├── builder.vue │ │ └── builder │ │ │ ├── fields │ │ │ ├── bootstrap-accordion-container.vue │ │ │ ├── fieldCustomObject.vue │ │ │ └── fieldDatalist.vue │ │ │ └── style.css │ ├── config.js │ ├── enhanceApp.js │ ├── helper │ │ ├── CommonFormatters.js │ │ ├── DataFormatter.js │ │ ├── DynamicTypeFormatter.js │ │ ├── KeyValueFormatter.js │ │ ├── MultiArrayFormatter.js │ │ ├── RequiredFormatter.js │ │ ├── StoreWithExpiration.js │ │ └── ValidateFormatter.js │ ├── nav │ │ └── en.js │ ├── public │ │ ├── icons │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-512x512.png │ │ │ ├── apple-touch-icon-120x120.png │ │ │ ├── apple-touch-icon-152x152.png │ │ │ ├── apple-touch-icon-180x180.png │ │ │ ├── apple-touch-icon-60x60.png │ │ │ ├── apple-touch-icon-76x76.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── msapplication-icon-144x144.png │ │ │ ├── mstile-150x150.png │ │ │ └── safari-pinned-tab.svg │ │ ├── logo.png │ │ ├── manifest.json │ │ ├── redux-2x.png │ │ ├── redux.png │ │ ├── top_logo-2x.png │ │ └── top_logo.png │ └── styles │ │ └── palette.styl ├── README.md ├── configuration │ ├── README.md │ ├── api.md │ ├── fields │ │ ├── arguments.md │ │ ├── compiler.md │ │ ├── data.md │ │ ├── hints.md │ │ ├── output-variables.md │ │ ├── output.md │ │ ├── permissions.md │ │ ├── required.md │ │ └── validate.md │ ├── global_arguments.md │ ├── hooks │ │ ├── hooks-action.md │ │ └── hooks-filter.md │ ├── img │ │ ├── data-select-post.png │ │ ├── data-term-button-set.png │ │ ├── help_tab.png │ │ ├── hints.png │ │ ├── hints_alignment.jpg │ │ ├── hints_colors.png │ │ └── hints_style.png │ └── objects │ │ ├── field.md │ │ └── section.md ├── contributing.md ├── core-extensions │ ├── README.md │ ├── accordion.md │ ├── color-schemes.md │ ├── custom-fonts.md │ ├── date-time-picker.md │ ├── google-maps.md │ ├── icon-select.md │ ├── img │ │ ├── accordion.png │ │ ├── color_schemes.png │ │ ├── color_schemes_picker.png │ │ ├── color_schemes_picker_color.png │ │ ├── color_schemes_replacer.png │ │ ├── color_schemes_replacer_color.png │ │ ├── dtp_nosplit.png │ │ ├── dtp_split.png │ │ ├── google_maps.png │ │ ├── icon-select.jpg │ │ ├── io.png │ │ ├── options_object.png │ │ ├── options_object_console.png │ │ └── redux-tabbed.jpg │ ├── import-export.md │ ├── js-button.md │ ├── metaboxes.md │ ├── multi-media.md │ ├── options-object.md │ ├── repeater.md │ ├── shortcodes.md │ ├── social-profiles.md │ ├── tabbed.md │ ├── taxonomy.md │ └── user-metaboxes.md ├── core-fields │ ├── README.md │ ├── ace-editor.json │ ├── ace-editor.md │ ├── background.json │ ├── background.md │ ├── border.json │ ├── border.md │ ├── box-shadow.md │ ├── button-set.json │ ├── button-set.md │ ├── checkbox.json │ ├── checkbox.md │ ├── color-gradient.json │ ├── color-gradient.md │ ├── color-palette.md │ ├── color-rgba.json │ ├── color-rgba.md │ ├── color.json │ ├── color.md │ ├── content.md │ ├── date.json │ ├── date.md │ ├── dimensions.json │ ├── dimensions.md │ ├── divide.json │ ├── divide.md │ ├── editor.json │ ├── editor.md │ ├── gallery.json │ ├── gallery.md │ ├── image-select.json │ ├── image-select.md │ ├── img │ │ ├── ace_editor.png │ │ ├── background.png │ │ ├── border.png │ │ ├── box-shadow.png │ │ ├── button_set.png │ │ ├── checkbox.png │ │ ├── color-palette.png │ │ ├── color.png │ │ ├── color_gradient.png │ │ ├── color_rgba.png │ │ ├── content.jpg │ │ ├── date.png │ │ ├── dimensions.png │ │ ├── divide.png │ │ ├── editor.png │ │ ├── gallery.png │ │ ├── image_select.png │ │ ├── info_critical.png │ │ ├── info_normal.png │ │ ├── info_success.png │ │ ├── info_warning.png │ │ ├── link_color.png │ │ ├── media.png │ │ ├── multi_text.png │ │ ├── palette_color.png │ │ ├── password.png │ │ ├── radio.png │ │ ├── raw_full_width.png │ │ ├── raw_sectioned.png │ │ ├── section.png │ │ ├── select_image.png │ │ ├── slider.png │ │ ├── slides.png │ │ ├── sortable.png │ │ ├── sorter.png │ │ ├── spacing.png │ │ ├── spinner.png │ │ ├── switch.png │ │ ├── text-multidimensional.png │ │ ├── text-simple.png │ │ ├── text-text_hint.png │ │ ├── text.png │ │ ├── textarea.png │ │ └── typography.png │ ├── info.json │ ├── info.md │ ├── link-color.json │ ├── link-color.md │ ├── media.json │ ├── media.md │ ├── multi-text.json │ ├── multi-text.md │ ├── palette-color.json │ ├── palette-color.md │ ├── password.json │ ├── password.md │ ├── radio.json │ ├── radio.md │ ├── raw.json │ ├── raw.md │ ├── section.json │ ├── section.md │ ├── select-image.json │ ├── select-image.md │ ├── select.json │ ├── select.md │ ├── slider.json │ ├── slider.md │ ├── slides.json │ ├── slides.md │ ├── sortable.json │ ├── sortable.md │ ├── sorter.json │ ├── sorter.md │ ├── spacing.json │ ├── spacing.md │ ├── spinner.json │ ├── spinner.md │ ├── switch.json │ ├── switch.md │ ├── text.json │ ├── text.md │ ├── textarea.json │ ├── textarea.md │ ├── typography.json │ └── typography.md ├── core │ └── Readme.md ├── css │ ├── all.css │ └── v4-shims.css ├── faq │ └── README.md ├── fonts │ ├── fa-brands-400.ttf │ ├── fa-brands-400.woff2 │ ├── fa-regular-400.ttf │ ├── fa-regular-400.woff2 │ ├── fa-solid-900.ttf │ ├── fa-solid-900.woff2 │ ├── fa-v4compatibility.ttf │ └── fa-v4compatibility.woff2 └── guides │ ├── README.md │ ├── advanced │ ├── embedding-redux.md │ ├── health-status-report.md │ ├── increasing-the-memory-limit.md │ ├── overriding-default-css.md │ ├── panel-templates.md │ ├── updating-an-option-manually.md │ ├── using-another-icon-web-font.md │ ├── wp-filesystem-proxy.md │ └── wpml-integration.md │ ├── basics │ ├── core-concepts.md │ ├── customizer-integration.md │ ├── getting-started.md │ ├── install.md │ ├── removing-demo-mode-notice.md │ ├── support-defined.md │ ├── using-extensions.md │ └── using-tgm-plugin-activation.md │ ├── img │ ├── active_plugins.png │ └── support_hash.png │ └── other │ ├── ide-snippets-and-templates.md │ ├── migration-guide.md │ ├── redux-converter.md │ ├── theme-check-warnings-and-errors.md │ └── wordpress.org-submissions.md ├── generating-a-support-hash.md ├── package.json └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | packages/@vuepress/shared-utils/lib 3 | -------------------------------------------------------------------------------- /.github/workflows/vuepress-deploy.yml: -------------------------------------------------------------------------------- 1 | name: Build and Deploy 2 | on: 3 | workflow_dispatch: 4 | push: 5 | jobs: 6 | build-and-deploy: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Checkout 10 | uses: actions/checkout@master 11 | 12 | - name: vuepress-deploy 13 | uses: jenkey2011/vuepress-deploy@master 14 | env: 15 | ACCESS_TOKEN: ${{ secrets.GH_TOKEN_SECRET }} 16 | TARGET_REPO: reduxframework/docs 17 | TARGET_BRANCH: gh-pages 18 | BUILD_SCRIPT: yarn add -D vuepress && yarn docs:build 19 | BUILD_DIR: docs/.vuepress/dist/ 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | docs/.temp 2 | old 3 | vuepress2 4 | node_modules 5 | packages 6 | # yarn.lock 7 | docs/examples 8 | docs/.vuepress/dist 9 | yarn.error.log 10 | .ideas 11 | .idea 12 | .DS_Store -------------------------------------------------------------------------------- /404.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /404.html 3 | --- -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | devs.redux.io 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Dovy Paukstys 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Redux Documentation" 3 | --- 4 | 5 | # Redux.io Documentation 6 | [![Build and Deploy](https://github.com/reduxframework/docs/actions/workflows/vuepress-deploy.yml/badge.svg)](https://github.com/reduxframework/docs/actions/workflows/vuepress-deploy.yml) 7 | 8 | Documentation for Redux.io, the world's most powerful and widely used WordPress input framework. 9 | 10 | These docs are based off of [VuePress](https://vuepress.vuejs.org/) and automatically built by GitHub Actions. 11 | 12 | Feel free to send pull requests and improvements. We'd love your help if you found anything we've missed. 13 | 14 | ## Working with VuePress 15 | 16 | ```bash 17 | yarn install 18 | ``` 19 | 20 | ## Test Locally 21 | ```bash 22 | yarn docs:dev 23 | ``` 24 | 25 | ## Build HTML 26 | ```bash 27 | yarn docs:build 28 | ``` 29 | 30 | Works best with a Unix-based OS. 31 | -------------------------------------------------------------------------------- /docs/.vuepress/components/builder/fields/bootstrap-accordion-container.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 72 | 73 | -------------------------------------------------------------------------------- /docs/.vuepress/components/builder/fields/fieldCustomObject.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 94 | 95 | 96 | 98 | -------------------------------------------------------------------------------- /docs/.vuepress/components/builder/fields/fieldDatalist.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/.vuepress/components/builder/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/components/builder/style.css -------------------------------------------------------------------------------- /docs/.vuepress/enhanceApp.js: -------------------------------------------------------------------------------- 1 | import VueFormGenerator from 'vue-form-generator'; 2 | import BootstrapVue from 'bootstrap-vue'; 3 | import Multiselect from 'vue-multiselect'; 4 | import {FieldArray} from 'vfg-field-array'; 5 | import fieldDatalist from './components/builder/fields/fieldDatalist.vue'; 6 | import fieldCustomObject from './components/builder/fields/fieldCustomObject.vue'; 7 | import FieldArrayBootstrapAccordionItem from './components/builder/fields/bootstrap-accordion-container.vue'; 8 | import 'bootstrap/dist/css/bootstrap.css'; 9 | import 'bootstrap-vue/dist/bootstrap-vue.css'; 10 | export default ({ 11 | Vue, // the version of Vue being used in the VuePress app 12 | options, // the options for the root Vue instance 13 | router, // the router instance for the app 14 | siteData // site metadata 15 | }) => { 16 | if (typeof process === 'undefined') { // process is undefined in a browser 17 | Vue.use(BootstrapVue); 18 | Vue.component('VueFormGenerator', VueFormGenerator.component); 19 | Vue.component('Multiselect', Multiselect); 20 | Vue.component('FieldArray', FieldArray); 21 | Vue.component('fieldCustomObject', fieldCustomObject); 22 | Vue.component('field-array-bootstrap-accordion-item', FieldArrayBootstrapAccordionItem); 23 | Vue.component('fieldDatalist', fieldDatalist); 24 | } 25 | 26 | if (typeof window === 'undefined') { 27 | global.window = {}; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /docs/.vuepress/helper/CommonFormatters.js: -------------------------------------------------------------------------------- 1 | import VueFormGenerator from 'vue-form-generator'; 2 | export class BoolFormatter{ 3 | static data() { 4 | return { 5 | "type": "switch", 6 | "multi": true 7 | }; 8 | } 9 | static default(defaultObj) { 10 | return defaultObj === null ? false : defaultObj; 11 | } 12 | }; 13 | 14 | export class TextFormatter{ 15 | static data() { 16 | return { 17 | "type": "input", 18 | "newElementButtonLabelClasses": VueFormGenerator.validators.string 19 | }; 20 | } 21 | static default(defaultObj) { 22 | return defaultObj === null ? "" : defaultObj; 23 | } 24 | }; 25 | 26 | export class SelectFormatter{ 27 | static data() { 28 | return { 29 | "type": "select" 30 | }; 31 | } 32 | static default(defaultObj) { 33 | return defaultObj === null ? "" : defaultObj; 34 | } 35 | }; 36 | 37 | export class DatalistFormatter{ 38 | static data() { 39 | return { 40 | "type": "datalist" 41 | }; 42 | } 43 | static default(defaultObj) { 44 | return defaultObj === null ? "" : defaultObj; 45 | } 46 | }; 47 | 48 | export class MultiSelectFormatter{ 49 | static data() { 50 | return { 51 | "type": "vueMultiSelect" 52 | }; 53 | } 54 | static default(defaultObj) { 55 | return defaultObj === null ? "" : defaultObj; 56 | } 57 | }; 58 | 59 | export class ArrayFormatter{ 60 | static data() { 61 | return { 62 | "type": "array", 63 | "showRemoveButton": true, 64 | "newElementButtonLabelClasses": 'button is-primary' 65 | }; 66 | } 67 | static default(defaultObj) { 68 | return defaultObj; 69 | } 70 | }; 71 | 72 | 73 | export class ObjectFormatter{ 74 | static data() { 75 | return { 76 | "type": "custom-object" 77 | }; 78 | } 79 | static default(defaultObj) { 80 | return defaultObj; 81 | } 82 | }; 83 | 84 | -------------------------------------------------------------------------------- /docs/.vuepress/helper/StoreWithExpiration.js: -------------------------------------------------------------------------------- 1 | export default class StoreWithExpiration{ 2 | static set(field, key, val, exp) { 3 | if (typeof(window) !== undefined && typeof(window.localStorage) !== undefined && window.localStorage !== undefined) { 4 | let obj = {val:val, exp:exp, time:new Date().getTime()}; 5 | window.localStorage.setItem(field + "_" + key, JSON.stringify(obj)); 6 | } 7 | } 8 | static get(field, key) { 9 | if (typeof(window) !== undefined && typeof(window.localStorage) !== undefined && window.localStorage !== undefined) { 10 | let info = JSON.parse(window.localStorage.getItem(field + "_" + key)); 11 | if (!info) { 12 | return null; 13 | } 14 | 15 | if (new Date().getTime() - info.time > info.exp) { 16 | return null; 17 | } 18 | return info.val 19 | } 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /docs/.vuepress/nav/en.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | { 3 | text: 'Guides', 4 | link: '/guides/', 5 | }, 6 | { 7 | text: 'Configuration', 8 | link: '/configuration/', 9 | }, 10 | { 11 | text: 'Fields', 12 | link: '/core-fields/', 13 | }, 14 | { 15 | text: 'Extensions', 16 | link: '/core-extensions/', 17 | }, 18 | { 19 | text: 'Learn More', 20 | items: [ 21 | { 22 | text: 'FAQ', 23 | link: '/faq/', 24 | }, 25 | { 26 | text: 'Migrate to Redux 4.x', 27 | link: '/guides/other/migration-guide.html' 28 | }, 29 | { 30 | text: 'Changelog', 31 | link: 'https://github.com/reduxframework/redux-framework/blob/master/CHANGELOG.md' 32 | }, 33 | ] 34 | } 35 | ] 36 | -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/android-chrome-512x512.png -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/favicon-16x16.png -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/favicon-32x32.png -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/msapplication-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/msapplication-icon-144x144.png -------------------------------------------------------------------------------- /docs/.vuepress/public/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/icons/mstile-150x150.png -------------------------------------------------------------------------------- /docs/.vuepress/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/logo.png -------------------------------------------------------------------------------- /docs/.vuepress/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Redux", 3 | "short_name": "Redux", 4 | "icons": [ 5 | { 6 | "src": "/icons/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/icons/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "start_url": "/index.html", 17 | "display": "standalone", 18 | "background_color": "#fff", 19 | "theme_color": "#3eaf7c" 20 | } 21 | -------------------------------------------------------------------------------- /docs/.vuepress/public/redux-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/redux-2x.png -------------------------------------------------------------------------------- /docs/.vuepress/public/redux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/redux.png -------------------------------------------------------------------------------- /docs/.vuepress/public/top_logo-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/top_logo-2x.png -------------------------------------------------------------------------------- /docs/.vuepress/public/top_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/.vuepress/public/top_logo.png -------------------------------------------------------------------------------- /docs/.vuepress/styles/palette.styl: -------------------------------------------------------------------------------- 1 | $contentWidth = 80% -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | home: true 3 | heroImage: /redux-2x.png 4 | m2ainTitle: "" 5 | actionText: "Get Started →" 6 | actionLink: /guides/ 7 | footer: GPLv2 Licensed | Copyright © 2014-Today by Redux 8 | --- 9 | 10 | 18 | 19 |
20 |
21 | 22 | ## Built for Developers 23 | Redux was built by developers for developers. We save you months if not years in your development time. Everything we 24 | do is to help innovation in the industry. To help you get started, we have a number of docs you should read. 25 | 26 | [See: Guides](./guides/) 27 | 28 |
29 |
30 | 31 | ## Built for Users 32 | We built this framework to help users and fix a problem in the industry. We care deeply about every Redux user. 33 | We will always ensure your site is the most secure. If you find an issue, please report it to us. 34 | 35 | [See: Getting Help/Support](guides/basics/support-defined.md) 36 | 37 |
38 |
39 | 40 | ## Built for Professionals 41 | Redux 4.x is here! We've done all we can to keep it as close to perfect as possible. We've made sure this 42 | new version is backward compatable with the previous, although changes to some method names to be fully ready. 43 | 44 | [See: Migration Guide](guides/other/migration-guide.md) 45 | 46 |
47 |
-------------------------------------------------------------------------------- /docs/configuration/README.md: -------------------------------------------------------------------------------- 1 | # Configuration 2 | 3 | Redux can be overwhelming. There are a multitude of features that reach all areas of WordPress. This section will help you 4 | understand more complex configurations and how to use them. 5 | 6 | ::: tip Good Starting Points 7 | - [The Redux API](api.md) 8 | - [Object: Field](objects/field.md) 9 | - [Object: Section](objects/section.md) 10 | ::: -------------------------------------------------------------------------------- /docs/configuration/fields/arguments.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Global Field Arguments" 3 | sidebarDepth: 2 4 | --- 5 | 6 | # Global Field Arguments 7 | The following are universal arguments used by every field. The default field arguments can be used by any field. The 8 | extra functionality arguments may perform in different ways depending on the field type. 9 | 10 | ## Universal Arguments 11 | These arguments are available for every field. 12 | 13 | |Name|Type|Description| 14 | |--- |--- |--- | 15 | |id|string|Unique ID identifying the field. Must be different from all other field IDs or unexpected replacement will occur.| 16 | |type|string|Type of field to display. Each field must have a unique type.| 17 | |title|string|Display title of the field.| 18 | |subtitle|string|Subtitle display of the field, situated beneath the title.| 19 | |desc|string|Description of the option, appearing beneath the field control.| 20 | |default|string|Default value for the field.| 21 | |[permissions](../fields/permissions.md)|string|String specifying the capability required to view the section.| 22 | |[hint(s)](../fields/hints.md)|array|Array containing the `content` and optional `title` arguments for the hint tooltip.| 23 | 24 | ::: tip Also See 25 | - [Using the `hint(s)` Argument](../fields/hints.md) 26 | - [Using the `permissions` Argument](../fields/permissions.md) 27 | ::: 28 | 29 | ## Extra Arguments 30 | These arguments may not be supported by all fields, and will be denoted on each field page of documentation. 31 | 32 | |Name|Type|Description| 33 | |--- |--- |--- | 34 | |[compiler](../fields/compiler.md)|bool/array|Flag to run the compiler hook or array of CSS selectors to pass dynamic CSS to the compiler hook.| 35 | |[data](../fields/data.md)|string/array|| 36 | |[output](../fields/output.md)|array|Array of CSS selectors to dynamically generate CSS. Only works on supported fields types.| 37 | |[required](../fields/required.md)|array|Provide the parent, comparison operator, and value which will affects the field's visibility.| 38 | |[validate](../fields/validate.md)|string/array|| 39 | 40 | ::: tip Also See 41 | - [Using the `compiler` Argument](../fields/compiler.md) 42 | - [Using the `data` Argument](../fields/data.md) 43 | - [Using the `output` Argument](../fields/output.md) 44 | - [Using the `required` Argument](../fields/required.md) 45 | - [Using the `validate` Argument](../fields/validate.md) 46 | ::: -------------------------------------------------------------------------------- /docs/configuration/fields/compiler.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Compiler" 3 | sidebarDepth: 2 4 | --- 5 | 6 | # Using the `compiler` Argument 7 | 8 | This article deals specifically with integrating a basic compiler hook for any field. For an in depth article on how to 9 | use the compiler hook to dynamically generate a CSS file, please view the 10 | [Updating a CSS File Dynamically](../advanced/advanced-updating-a-css-file-dynamically.md) article. 11 | 12 | ::: warning Table of Contents 13 | [[toc]] 14 | ::: 15 | 16 | ## Using in a Field 17 | Every Redux field offers the `compiler` argument. By setting this argument to `true`, a specified hook will fire 18 | whenever the value of a field marked with `'compiler' => true` is changed. 19 | 20 | Creating this magic is really quite easy. Let’s begin with this basic field: 21 | 22 | ```php 23 | array( 24 | 'id' =>'text', 25 | 'type' => 'text', 26 | 'title' => esc_html__('Test Compiler', 'your-textdomain-here'), 27 | 'subtitle' => esc_html__('This is to test the compiler hook.', 'your-textdomain-here'), 28 | 'desc' => esc_html__('Each time this field is set, a flag is set. On save, that flag initiates a compiler hook!', 'your-textdomain-here'), 29 | 'compiler' => true, 30 | 'default' => 'Test Compiler' 31 | ), 32 | ``` 33 | 34 | Note the `'compiler' => true` argument. This sets the compiler flag. Now we need to hook into the fired hook. Add this snippet to your code: 35 | 36 | ## Setting up the Compiler Function 37 | Next, the compiler function itself needs to be set up. It requires two parts. The add_filter statement, and the actual 38 | function. Ideally, these codes would be placed within your config PHP file; however, it can be used anywhere in your 39 | code provided the `opt_name` portion of the add_filter line is replaced with the value specified in your 40 | [opt_name](../global_arguments.md#opt_name) argument. For this example, we'll be using the example found in the 41 | [sample-config.php](https://github.com/ReduxFramework/redux-framework/blob/master/sample/sample-config.php). 42 | 43 | Make sure the following line is included and/or uncommented: 44 | 45 | ```php 46 | add_filter('redux/options/' . $this->args['opt_name'] . '/compiler', array( $this, 'compiler_action' ), 10, 3); 47 | ``` 48 | 49 | Now, add (or uncomment) the following function to the [sample-config.php](https://github.com/reduxframework/redux-framework/blob/master/sample/sample-config.php) file. This is our test function 50 | that allows you to see when the compiler hook occurs. It will only fire if a field set with `'compiler' => true` is changed. 51 | 52 | Please note that for this example, `$css` will return empty as this is only a basic compiler hook. 53 | 54 | ```php 55 | function compiler_action($options, $css, $changed_values) { 56 | echo '

The compiler hook has run!

'; 57 | 58 | print_r ($options); 59 | print_r ($css); 60 | print_r ($changed_values); 61 | } 62 | ``` 63 | 64 | If all has been set up correctly, you will see the compiler hook message and the passed values on your options panel after the field with the active compiler hook's value has changed and settings saved. 65 | 66 | 67 | ::: tip 68 | If the [`output_tag`](../global_arguments.md#output_tag) argument is set to false, Redux will not auto-echo a tag into the page header. 69 | ::: 70 | -------------------------------------------------------------------------------- /docs/configuration/fields/permissions.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | title: "Permissions" 4 | 5 | --- 6 | 7 | # Using the `permissions` Argument 8 | 9 | The `permissions` argument is useful for restricting access to certain [fields](../objects/field.md) or [sections](../objects/section.md) 10 | that require a specified user role. For example, if the options panel is set via [page_permissions](../global_arguments.md#page-permissions) 11 | to allow users with an editor role or higher to view and set options, but you'd prefer some options or sections be 12 | available only to administrators, the 'permissions' argument makes this possible. 13 | 14 | In the above scenario, the line `'permissions' => 'manage_options'` would be added to either the [sections array](../objects/section.md) 15 | to control an entire section, or the [fields array](../objects/field.md) to control a specific field. The 'permissions' 16 | argument accepts any [capability name](https://wordpress.org/support/article/roles-and-capabilities/). 17 | 18 | ::: warning 19 | The [WordPress documentation](https://core.trac.wordpress.org/ticket/22624) strongly recommends **not** using role names (administrator, editor, etc.) in place of capability names as 20 | they are not guaranteed to work correctly 21 | ::: 22 | 23 | ::: danger 24 | The `permissions` argument cannot be used with the following core fields, as they do not accept or save data: 25 | [section](../../core-fields/section.md), [info](../../core-fields/info.md), [divide](../../core-fields/divide.md), and 26 | [raw](../../core-fields/raw.md). 27 | ::: 28 | -------------------------------------------------------------------------------- /docs/configuration/fields/required.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Required" 3 | --- 4 | 5 | # Using the `required` Argument 6 | 7 | Fields may be linked/required/folded according to a/multiple parent value(s). This is achieved by appending a 8 | `required` argument to the [field](../objects/field.md). Required can be very powerful, but due to the complexity requires 9 | some careful considerations. 10 | 11 | ::: warning Table of Contents 12 | [[toc]] 13 | ::: 14 | 15 | ## Example Config 16 | 17 | To link a field's visibility to the value of another: 18 | 19 | ```php 20 | array( 21 | 'required' => array( 'LINKED_FIELD_ID', 'OPERATION', 'VALUE' ) 22 | ) 23 | ``` 24 | |Key|Description| 25 | |--- |--- | 26 | |`LINKED_FIELD_ID`|Field ID that will affect the visibility of this field| 27 | |`OPERATION`|Comparison operation to perform| 28 | |`VALUE`|Value is the value to compare against for visibility| 29 | 30 | You can also link a field with multiple "parent" required values. If all of these conditions are not met, this 31 | [field](../objects/field.md) will not be visible and the [field](../objects/field.md#output) CSS will not be used. 32 | An example is as follows: 33 | 34 | 35 | ```php 36 | array( 37 | 'required' => array( 38 | array( 'LINKED_FIELD_ID_1', 'OPERATION_1', 'VALUE_1' ), 39 | array( 'LINKED_FIELD_ID_2', 'OPERATION_2', 'VALUE_2' ) 40 | ) 41 | ) 42 | ``` 43 | If you are checking the same key againt a different value then you have to do it as follows: 44 | 45 | 46 | ```php 47 | array( 48 | 'required' => array( 49 | array( 'LINKED_FIELD_ID_1', 'OPERATION_1', array( 'VALUE_1', 'VALUE_2' ) ) 50 | ) 51 | ) 52 | ``` 53 | 54 | ## Operations Available 55 | 56 | To attempt to support the various possibilities, a number of options have been coded. These operations have been found to 57 | support the majority of needs. 58 | 59 | |Operation|Test Equivalent| 60 | |--- |--- | 61 | |=|`$a = $b`| 62 | |equals|`$a = $b`| 63 | |!=|`$a != $b`| 64 | |not|`$a != $b`| 65 | |>|`$a > $b`| 66 | |greater|`$a > $b`| 67 | |is_larger|`$a > $b`| 68 | |>=|$`a >= $b`| 69 | |greater_equal|`$a >= $b`| 70 | |is_larger_equal|`$a >= $b`| 71 | |<|`$a < $b`| 72 | |less|`$a < $b`| 73 | |is_smaller|`$a < $b`| 74 | |<=|`$a <= $b`| 75 | |less_equal|`$a <= $b`| 76 | |is_smaller_equal|`$a <= $b`| 77 | |contains|`( strpos( $a, $b ) !== false )`| 78 | |doesnt_contain|`( strpos($a, $b) === false )`| 79 | |not_contain|`( strpos($a, $b) === false )`| 80 | |is_empty_or|`if ( empty( $value1 )`| 81 | |not_empty_and|`if ( !empty( $value1 ) && $value1 != $value2 )`| 82 | 83 | 84 | 85 | ## Nesting 86 | If any parent is hidden or doesn't match the value, all children are 87 | hidden and all CSS output from those children is hidden as well. 88 | 89 | ## CSS Output 90 | CSS output to both the head and compiler is removed from each field if the required value(s) is/are not met. You can, 91 | however, override this on a per-field basis by setting `'force_output' => true` for each field you want CSS to still be 92 | output with. This way you can nest a field under another, and still have it output to the dynamic CSS. 93 | 94 | ::: tip 95 | The CSS output will always be visible if items are within a `section` field unless that specific field has the required value set to the required parent as well. 96 | ::: 97 | -------------------------------------------------------------------------------- /docs/configuration/img/data-select-post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/configuration/img/data-select-post.png -------------------------------------------------------------------------------- /docs/configuration/img/data-term-button-set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/configuration/img/data-term-button-set.png -------------------------------------------------------------------------------- /docs/configuration/img/help_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/configuration/img/help_tab.png -------------------------------------------------------------------------------- /docs/configuration/img/hints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/configuration/img/hints.png -------------------------------------------------------------------------------- /docs/configuration/img/hints_alignment.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/configuration/img/hints_alignment.jpg -------------------------------------------------------------------------------- /docs/configuration/img/hints_colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/configuration/img/hints_colors.png -------------------------------------------------------------------------------- /docs/configuration/img/hints_style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/configuration/img/hints_style.png -------------------------------------------------------------------------------- /docs/contributing.md: -------------------------------------------------------------------------------- 1 | # Contribution Guide 2 | 3 | Hello, and welcome to Redux! 4 | 5 | Please read them thoroughly before submitting an issue on our issue tracker. 6 | 7 | ## If You are NOT the Developer 8 | 9 | First, and most importantly, we need to know if you are a developer using Redux in their project, or if you are using a 10 | theme/plugin that uses Redux. **If you are not the primary developer**, please read out [Getting Support/Help](guides/basics/support-defined.md) guide. 11 | 12 | ## If You are the Primary Developer 13 | 14 | There are a number of things you can do to help us serve you better. 15 | 16 | ### 1. Update to the Latest Redux 17 | 18 | **Please** check to see if you are using the latest version of Redux. If you plan to reporting an issue with any version BUT 19 | the latest version, we are going to ask you to upgrade to the latest code base anyway to see if your issue persists. 20 | Please save yourself and us some time by taking this simple step first. Thanks! 21 | 22 | ### 2. Generate a Support Hash 23 | 24 | Before we will even look into your issue, we need a support hash. The reason is we have found around 80% of all our issues 25 | are a configuration issue. By looking at the data sent in the support request, we can quickly identify concerns and save 26 | you and us more time. Please read the [Generate a Support Hash](guides/basics/generating-a-support-hash.md) guide and 27 | have that URL handy. 28 | 29 | ### 3. Post to the Issue Tracker 30 | 31 | We designed our issue tracker to help identify and correct issues within Redux. If you believe you have 32 | discovered an issue, or something is not working as it should, then submitting an issue is appropriate. However, if you 33 | are looking for a custom solution involving Redux, or require assistance with original code unrelated to the Redux core 34 | itself, then this type of support falls under [Premium support](https://redux.io/extensions/premium-support/). We have 35 | far too many people using Redux to provide training on PHP/JavaScript or to debug your code without compensation. 36 | 37 | We handle all support for Redux Framework via our issue tracker. Email support is available only for those who have 38 | purchased Premium Support, or in instances where we have requested contact via e-mail. 39 | 40 | It would also be hugely helpful to us if you are able to indicate any steps taken up until the issue occurred. We may 41 | need to be able to recreate your issue on our end, and having this information would help with that. Simply stating 42 | something 'doesn't work' isn't helpful, and tells us nothing. PLEASE, be as specific as possible. 43 | 44 | Team Redux -------------------------------------------------------------------------------- /docs/core-extensions/README.md: -------------------------------------------------------------------------------- 1 | # Extensions 2 | 3 | There are a number of extentions embedded within the Redux Core. These extensions all come pre-installed. 4 | 5 | ::: tip SEE ALSO 6 | - [Using & Creating Extensions](../guides/basics/using-extensions.md) 7 | ::: 8 | 9 | -------------------------------------------------------------------------------- /docs/core-extensions/custom-fonts.md: -------------------------------------------------------------------------------- 1 | # Custom Fonts 2 | 3 | The Custom Fonts extension is for users to upload a .ttf, .woff, .otf, or .zip containing any of the aforementioned 4 | fonts. It will then generate whatever fonts it may need, and make the font accessible via the typography field within 5 | Redux. A custom font CSS file will be enqueued to the panel as well as the frontend. 6 | 7 | ::: warning Table of Contents 8 | [[toc]] 9 | ::: 10 | 11 | ## Arguments 12 | |Name|Type| Default |Description| 13 | |--- |--- |----------------|--- | 14 | |type|string| `custom_fonts` |Value identifying the field type.| 15 | |id|string| |Unique ID identifying the field. Must be different from all other field IDs.| 16 | |title|string| |Displays title of the field.| 17 | |subtitle|string| |Subtitle display of the field, situated beneath the title.| 18 | |desc|string| |Description of the field, appearing beneath the field control.| 19 | |class|string| |Appends any number of classes to the field's class attribute.| 20 | 21 | ## Example Config 22 | ```php 23 | Redux::set_section( 24 | $opt_name, 25 | array( 26 | 'title' => esc_html__( 'Custom Fonts', 'your-textdomain-here' ), 27 | 'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . 'https://devs.redux.io/core-extensions/custom-fonts.html', 28 | 'subsection' => true, 29 | 'fields' => array( 30 | array( 31 | 'id' => 'custom_fonts', 32 | 'type' => 'custom_fonts', 33 | ), 34 | array( 35 | 'id' => 'custom_fonts_typography', 36 | 'type' => 'typography', 37 | 'title' => esc_html__( 'Custom Fonts Typography', 'your-textdomain-here' ), 38 | 'font-size' => false, 39 | 'line-height' => false, 40 | 'text-align' => false, 41 | ), 42 | ), 43 | ) 44 | ); 45 | ``` 46 | 47 | ## Example Usage 48 | This extension has no return value. -------------------------------------------------------------------------------- /docs/core-extensions/img/accordion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/accordion.png -------------------------------------------------------------------------------- /docs/core-extensions/img/color_schemes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/color_schemes.png -------------------------------------------------------------------------------- /docs/core-extensions/img/color_schemes_picker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/color_schemes_picker.png -------------------------------------------------------------------------------- /docs/core-extensions/img/color_schemes_picker_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/color_schemes_picker_color.png -------------------------------------------------------------------------------- /docs/core-extensions/img/color_schemes_replacer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/color_schemes_replacer.png -------------------------------------------------------------------------------- /docs/core-extensions/img/color_schemes_replacer_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/color_schemes_replacer_color.png -------------------------------------------------------------------------------- /docs/core-extensions/img/dtp_nosplit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/dtp_nosplit.png -------------------------------------------------------------------------------- /docs/core-extensions/img/dtp_split.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/dtp_split.png -------------------------------------------------------------------------------- /docs/core-extensions/img/google_maps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/google_maps.png -------------------------------------------------------------------------------- /docs/core-extensions/img/icon-select.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/icon-select.jpg -------------------------------------------------------------------------------- /docs/core-extensions/img/io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/io.png -------------------------------------------------------------------------------- /docs/core-extensions/img/options_object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/options_object.png -------------------------------------------------------------------------------- /docs/core-extensions/img/options_object_console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/options_object_console.png -------------------------------------------------------------------------------- /docs/core-extensions/img/redux-tabbed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reduxframework/docs/c825c68c21b65839a11d3f6669937c07c00b5eb1/docs/core-extensions/img/redux-tabbed.jpg -------------------------------------------------------------------------------- /docs/core-extensions/import-export.md: -------------------------------------------------------------------------------- 1 | # Import/Export 2 | 3 | The Import/Export extension offers users the ability to back up and restore their Redux options data two ways: raw data or file. 4 | 5 | ![](./img/io.png) 6 | 7 | ## Arguments 8 | |Name|Type|Default|Description| 9 | |--- |--- |--- |--- | 10 | |type|string|`import_export`|Value identifying the field type.| 11 | |id|string|Unique ID identifying the field. Must be different from all other field IDs.| 12 | |title|string|Displays title of the option.| 13 | |subtitle|string|Subtitle display of the option, situated beneath the title.| 14 | |desc|string|Description of the option, appearing beneath the field control.| 15 | |class|string|Appends any number of classes to the field's class attribute.| 16 | |permissions|string|String specifying the capability required to view the section. More info.| 17 | |full_width|bool|Sets whether or not the field is set full width or as a section, similar to the other fields.| 18 | 19 | 20 | 21 | ## Example Config 22 | ```php 23 | array( 24 | 'id' => 'opt-import-export', 25 | 'type' => 'import_export', 26 | 'title' => 'Import Export', 27 | 'subtitle' => 'Save and restore your Redux options', 28 | 'full_width' => false, 29 | ) 30 | ``` 31 | -------------------------------------------------------------------------------- /docs/core-extensions/options-object.md: -------------------------------------------------------------------------------- 1 | # Options Object 2 | 3 | The Options Object field is designed to give developers who use Redux a quick glance at 4 | their option values in a readable JSON string. Ideally, the field/enhancement is for 5 | develop purposes and doesn't need to be shipped in your final product. 6 | 7 | ![](./img/options_object.png) 8 | 9 | ::: warning Table of Contents 10 | [[toc]] 11 | ::: 12 | 13 | ##Usage 14 | This field is not set in the traditional Redux way by adding an option array to your config. 15 | Instead, it is an argument set in the [global arguments](../configuration/global_arguments.md) array. 16 | 17 | The `options_object` is enabled by default and the field will automatically appear on your options screen. 18 | To disable it, simply add the following line inside the global arguments array: 19 | 20 | ```php 21 | 'options_object' => false, 22 | ``` 23 | ## Console Log 24 | For added conveinence, one may also display the current options object via the developer's 25 | console log (CTRL+SHIFT+I) by clicking the "Show OPbject in JavaScript Console Object" button. 26 | 27 | ![](./img/options_object_console.png) 28 | -------------------------------------------------------------------------------- /docs/core-fields/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarDepth: -1 3 | --- 4 | 5 | # Core Fields 6 | 7 | Redux has a large variety of fields to choose from, over **35**, in fact. This section outlines all the fields that 8 | exist in the Core as well as how to configure these fields. 9 | 10 | ::: tip SEE ALSO 11 | - [Using & Creating Extensions](../guides/basics/using-extensions.md) 12 | ::: 13 | 14 | -------------------------------------------------------------------------------- /docs/core-fields/ace-editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "ace_editor", 3 | "name": "Ace Editor", 4 | "description": null, 5 | "icon": null, 6 | "groups": { 7 | "Global": ["id", "type", "title", "desc", "subtitle", "class"], 8 | "Advanced": ["attributes", "data", "compiler", "output", "output_variables", "permissions", "required", "default", "validate"] 9 | }, 10 | "fields": { 11 | "id": { 12 | "name": "id", 13 | "title": "ID", 14 | "type": "input", 15 | "inputType": "text", 16 | "description": "", 17 | "order": 0 18 | }, 19 | "title": { 20 | "name": "title", 21 | "title": "Title", 22 | "type": "input", 23 | "inputType": "text", 24 | "description": "", 25 | "order": 5 26 | }, 27 | "subtitle": { 28 | "name": "subtitle", 29 | "title": "Subtitle", 30 | "type": "input", 31 | "inputType": "text", 32 | "description": "", 33 | "order": 10 34 | }, 35 | "desc": { 36 | "name": "desc", 37 | "title": "Desc", 38 | "type": "input", 39 | "inputType": "text", 40 | "description": "", 41 | "order": 15 42 | }, 43 | "class": { 44 | "name": "class", 45 | "title": "Class", 46 | "type": "input", 47 | "inputType": "text", 48 | "description": "", 49 | "order": 20 50 | }, 51 | "compiler": { 52 | "name": "compiler", 53 | "title": "Compiler", 54 | "type": "bool", 55 | "default": false, 56 | "order": 25 57 | }, 58 | "required": { 59 | "name": "required", 60 | "title": "Required", 61 | "fieldClasses": "full-width", 62 | "type": "array", 63 | "description": "Field visibility requirements.", 64 | "order": 35 65 | }, 66 | "validate": { 67 | "name": "validate", 68 | "title": "Validate", 69 | "type": "custom-object", 70 | "order": 50 71 | }, 72 | "mode": { 73 | "type": "select", 74 | "name": "mode", 75 | "title": "Mode", 76 | "values": ["css", "html", "javascript", "json", "less", "markdown", "mysql", "php", "plain_text", "sass", "scss", "text", "xml"], 77 | "required": true, 78 | "default": "javascript", 79 | "order": 80 80 | }, 81 | "theme": { 82 | "type": "select", 83 | "name": "theme", 84 | "title": "Theme", 85 | "values": ["chrome", "monokai"], 86 | "required": true, 87 | "default": "monokai", 88 | "order": 80 89 | }, 90 | "options": { 91 | "type": "custom-object", 92 | "formatter": "keyvalue", 93 | "title": "Options", 94 | "name": "options", 95 | "newElementButtonLabel": "+ Add Option", 96 | "selectValues": ["minLines", "maxLines"], 97 | "default": { 98 | "minLines": 12, 99 | "maxLines": 30 100 | }, 101 | "order": 40 102 | } 103 | } 104 | } -------------------------------------------------------------------------------- /docs/core-fields/ace-editor.md: -------------------------------------------------------------------------------- 1 | # ACE Editor 2 | 3 | The ACE Editor field offers the ability to edit back end code in an easy to use and easy to read embedded interface. In 4 | addition to matching the features of native code editors such as [Sublime Text](https://www.sublimetext.com/), 5 | [Vim](http://www.vim.org) and [TextMate](http://macromates.com), ACE offers real-time checking for code accuracy. 6 | 7 | ![](./img/ace_editor.png) 8 | 9 | ::: warning Table of Contents 10 | [[toc]] 11 | ::: 12 | 13 | ## Arguments 14 | Array containing the `content` and optional `title` arguments for the [hint](../configuration/fields/hints.md) tooltip. 15 | 16 | |Name|Type|Default|Description| 17 | |--- |--- |--- |--- | 18 | |type|string|`ace_editor`|Value identifying the field type.| 19 | |mode|string|`javascript`|Sets the language mode of the editor. Accepts: `css` `html` `javascript ` `json` `less` `markdown` `mysql` `php` `plain_text` `sass` `scss` `text` `xml`| 20 | |theme|string|`monokai`|Sets the theme of the editor. Accepts: `chrome` or `monokai`| 21 | |options|array|
array(
  'minLines' => 12,
  'maxLines' => 30
)
|Pass any option to the Ace Editor object. For more details visit: http://ace.c9.io/ and the Configuring Ace Wiki.| 22 | 23 | ::: tip Also See 24 | - [Using Global Field Arguments](../configuration/fields/arguments.md) 25 | - [Using the `compiler` Argument](../configuration/fields/compiler.md) 26 | - [Using the `required` Argument](../configuration/fields/required.md) 27 | - [Using the `validate` Argument](../configuration/fields/validate.md) 28 | ::: 29 | 30 | ## Build Config 31 | 42 | 43 | 44 | ## Example Config 45 | 46 | ```php 47 | Redux::set_field( 'OPT_NAME', 'SECTION_ID', array( 48 | 'id' => 'css_editor', 49 | 'type' => 'ace_editor', 50 | 'title' => esc_html__('CSS Code', 'your-project-name'), 51 | 'subtitle' => esc_html__('Paste your CSS code here.', 'your-project-name'), 52 | 'mode' => 'css', 53 | 'theme' => 'monokai', 54 | 'desc' => 'Possible modes can be found at https://ace.c9.io/.', 55 | 'default' => "#header{\nmargin: 0 auto;\n}" 56 | ) ); 57 | ``` 58 | 59 | ## Example Usage 60 | This example is based on the code above. Be sure to change `$redux_demo` to the value you specified 61 | in your [opt_name](../configuration/global_arguments.md#opt_name) argument. 62 | 63 | ```php 64 | global $redux_demo; 65 | 66 | echo 'ACE Editor output: ' . $redux_demo['css-editor']; 67 | ``` 68 | 69 | 70 | -------------------------------------------------------------------------------- /docs/core-fields/box-shadow.md: -------------------------------------------------------------------------------- 1 | # Box Shadow 2 | 3 | The Box Shadow control allows for the addition of a box shadow to be drawn around any specified element. 4 | 5 | ![](./img/box-shadow.png) 6 | 7 | ::: warning Table of Contents 8 | [[toc]] 9 | ::: 10 | 11 | ## Arguments 12 | |Name|Type|Default|Description| 13 | |--- |--- |--- |--- | 14 | |type|string|`box_shadow`|Value identifying the field type.| 15 | |default|string| |See [Default Argument](#default-argument) below.| 16 | |preview_color|string|`#f1f1f1`|Sets the color of the preview object.| 17 | |inset-shadow|bool|`true`|Flag to display the inset-shadow option (checkboox).| 18 | |drop-shadow|bool|`true`|Flag to display the drop-shadow option (checkboox).| 19 | 20 | ::: tip Also See 21 | - [Global Field Arguments](../configuration/fields/arguments.md) 22 | - [Using the `compiler` Argument](../configuration/fields/compiler.md) 23 | - [Using the `output` Argument](../configuration/fields/output.md) 24 | - [Using the `required` Argument](../configuration/fields/required.md) 25 | ::: 26 | 27 | ## Default Arguments 28 | |Name|Type|Default|Description| 29 | |--- |--- |--- |--- | 30 | |inset-shadow|array| |Array of display attributes for the inset shadow. See [Shadow Defaults](#shadow-defaults) below.| 31 | |drop-shadow|array| |Array of display attributes for the drop shadow. See [Shadow Defaults](#shadow-defaults) below.| 32 | 33 | ## Shadow Defaults 34 | |Name|Value|Default|Description| 35 | |--- |--- |--- |--- | 36 | |checked|bool|`false`|Sets the checkbox to enable the specified section.| 37 | |color|string|`false`|Sets the checkbox to enable the specified section.| 38 | |horizontal|int|inset:`0`
drop: `5`|Sets horizontal value of the specified section.| 39 | |vertical|int|inset:`0`
drop: `5`|Sets vertical value of the specified section.| 40 | |blur|int|inset:`10`
drop: `5`|Sets blur value of the specified section.| 41 | |spread|int|inset:`0`
drop: `1`|Sets spread value of the specified section.| 42 | 43 | ::: Outputting the CSS 44 | To automatically output the CSS for the box shadow, include the class name of the element to which the filters should be applied via the `output` argument. 45 | ::: 46 | 47 | ## Example Config 48 | ```php 49 | Redux::set_field( 50 | 'OPT_NAME', 51 | 'SECTION_ID', 52 | array( 53 | 'id' => 'opt-color-box-shadow', 54 | 'type' => 'box_shadow', 55 | 'output' => array( '.site-header' ), 56 | 'title' => esc_html__( 'Box Shadow', 'your-textdomain-here' ), 57 | 'subtitle' => esc_html__( 'Site Header Box Shadow with inset and drop shadows.', 'your-textdomain-here' ), 58 | 'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ), 59 | ) 60 | ); 61 | ``` 62 | -------------------------------------------------------------------------------- /docs/core-fields/button-set.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "button_set", 3 | "name": "Button Set", 4 | "description": null, 5 | "icon": null, 6 | "groups": { 7 | "Global": ["id", "type", "title", "desc", "subtitle", "class"], 8 | "Advanced": ["attributes", "data", "compiler", "output", "output_variables", "permissions", "required", "default", "validate"] 9 | }, 10 | "fields": { 11 | "id": { 12 | "name": "id", 13 | "title": "ID", 14 | "type": "input", 15 | "inputType": "text", 16 | "description": "", 17 | "order": 0 18 | }, 19 | "title": { 20 | "name": "title", 21 | "title": "Title", 22 | "type": "input", 23 | "inputType": "text", 24 | "description": "", 25 | "order": 5 26 | }, 27 | "subtitle": { 28 | "name": "subtitle", 29 | "title": "Subtitle", 30 | "type": "input", 31 | "inputType": "text", 32 | "description": "", 33 | "order": 10 34 | }, 35 | "desc": { 36 | "name": "desc", 37 | "title": "Desc", 38 | "type": "input", 39 | "inputType": "text", 40 | "description": "", 41 | "order": 15 42 | }, 43 | "class": { 44 | "name": "class", 45 | "title": "Class", 46 | "type": "input", 47 | "inputType": "text", 48 | "description": "", 49 | "order": 20 50 | }, 51 | "compiler": { 52 | "name": "compiler", 53 | "title": "Compiler", 54 | "type": "bool", 55 | "default": false, 56 | "order": 25 57 | }, 58 | "output": { 59 | "name": "output", 60 | "title": "Output", 61 | "fieldClasses": "full-width", 62 | "formatter" : "dynamic-type", 63 | "properties": ["background-color", "color"], 64 | "type": "object", 65 | "order": 30 66 | }, 67 | "permissions": { 68 | "type": "input", 69 | "inputType": "text", 70 | "name": "permissions", 71 | "title": "Permissions", 72 | "order": 35 73 | }, 74 | "required": { 75 | "name": "required", 76 | "title": "Required", 77 | "fieldClasses": "full-width", 78 | "type": "array", 79 | "description": "Field visibility requirements.", 80 | "order": 40 81 | }, 82 | "options": { 83 | "type": "custom-object", 84 | "formatter": "keyvalue", 85 | "title": "Options", 86 | "name": "options", 87 | "newElementButtonLabel": "+ Add Option", 88 | "default": {}, 89 | "order": 45 90 | }, 91 | "default": { 92 | "type": "custom-object", 93 | "formatter": "keyvalue", 94 | "title": "Default", 95 | "name": "default", 96 | "order": 50, 97 | "dependent": true, 98 | "dependencyType": "type", 99 | "dependency": { 100 | "parent": "multi", 101 | "status": [ 102 | { 103 | "parentValue": true, 104 | "type": "custom-object", 105 | "formatter": "keyvalue", 106 | "typeof": "object", 107 | "default": {} 108 | }, 109 | { 110 | "parentValue": false, 111 | "type": "input", 112 | "inputType": "text", 113 | "formatter": "", 114 | "typeof": "string", 115 | "default": "" 116 | } 117 | ] 118 | } 119 | }, 120 | "multiple": { 121 | "name": "multi", 122 | "title": "Multi (Multi-Select)", 123 | "type": "bool", 124 | "order": 55 125 | } 126 | } 127 | } -------------------------------------------------------------------------------- /docs/core-fields/checkbox.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "checkbox", 3 | "name": "Checkbox", 4 | "description": null, 5 | "icon": null, 6 | "groups": { 7 | "Global": ["id", "type", "title", "desc", "subtitle", "class"], 8 | "Advanced": ["attributes", "data", "compiler", "output", "output_variables", "permissions", "required", "default", "validate"] 9 | }, 10 | "fields": { 11 | "id": { 12 | "name": "id", 13 | "title": "ID", 14 | "type": "input", 15 | "inputType": "text", 16 | "description": "", 17 | "order": 0 18 | }, 19 | "title": { 20 | "name": "title", 21 | "title": "Title", 22 | "type": "input", 23 | "inputType": "text", 24 | "description": "", 25 | "order": 5 26 | }, 27 | "subtitle": { 28 | "name": "subtitle", 29 | "title": "Subtitle", 30 | "type": "input", 31 | "inputType": "text", 32 | "description": "", 33 | "order": 10 34 | }, 35 | "desc": { 36 | "name": "desc", 37 | "title": "Desc", 38 | "type": "input", 39 | "inputType": "text", 40 | "description": "", 41 | "order": 15 42 | }, 43 | "class": { 44 | "name": "class", 45 | "title": "Class", 46 | "type": "input", 47 | "inputType": "text", 48 | "description": "", 49 | "order": 20 50 | }, 51 | "compiler": { 52 | "name": "compiler", 53 | "title": "Compiler", 54 | "type": "bool", 55 | "default": false, 56 | "order": 25 57 | }, 58 | "output": { 59 | "name": "output", 60 | "title": "Output", 61 | "fieldClasses": "full-width", 62 | "field-type": "object", 63 | "formatter" : "dynamic-type", 64 | "properties": ["background-color", "color"], 65 | "type": "object", 66 | "order": 30 67 | }, 68 | "permissions": { 69 | "type": "input", 70 | "inputType": "text", 71 | "name": "permissions", 72 | "title": "Permissions", 73 | "order": 35 74 | }, 75 | "required": { 76 | "name": "required", 77 | "title": "Required", 78 | "fieldClasses": "full-width", 79 | "type": "array", 80 | "description": "Field visibility requirements.", 81 | "order": 40 82 | }, 83 | "options": { 84 | "type": "custom-object", 85 | "formatter": "keyvalue", 86 | "title": "Options", 87 | "name": "options", 88 | "newElementButtonLabel": "+ Add Option", 89 | "default": {}, 90 | "order": 45 91 | }, 92 | "default": { 93 | "type": "custom-object", 94 | "formatter": "keyvalue", 95 | "title": "Default", 96 | "name": "default", 97 | "newElementButtonLabel": "+ Add Default Item", 98 | "order": 50, 99 | "dependent": true, 100 | "dependencyType": "type", 101 | "dependency": { 102 | "parent": "multi", 103 | "status": [ 104 | { 105 | "parentValue": true, 106 | "type": "custom-object", 107 | "formatter": "keyvalue", 108 | "typeof": "object", 109 | "default": {} 110 | }, 111 | { 112 | "parentValue": false, 113 | "type": "input", 114 | "inputType": "text", 115 | "formatter": "", 116 | "typeof": "string", 117 | "default": "" 118 | } 119 | ] 120 | } 121 | }, 122 | "multiple": { 123 | "name": "multi", 124 | "title": "Multi (Multi-Select)", 125 | "type": "bool", 126 | "order": 55 127 | } 128 | } 129 | } -------------------------------------------------------------------------------- /docs/core-fields/color-gradient.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "color_gradient", 3 | "name": "Color Gradient", 4 | "description": null, 5 | "icon": null, 6 | "groups": { 7 | "Global": ["id", "type", "title", "desc", "subtitle", "class"], 8 | "Advanced": ["attributes", "data", "compiler", "output", "output_variables", "permissions", "required", "default", "validate"] 9 | }, 10 | "fields": { 11 | "id": { 12 | "name": "id", 13 | "title": "ID", 14 | "type": "input", 15 | "inputType": "text", 16 | "description": "", 17 | "order": 0 18 | }, 19 | "title": { 20 | "name": "title", 21 | "title": "Title", 22 | "type": "input", 23 | "inputType": "text", 24 | "description": "", 25 | "order": 5 26 | }, 27 | "subtitle": { 28 | "name": "subtitle", 29 | "title": "Subtitle", 30 | "type": "input", 31 | "inputType": "text", 32 | "description": "", 33 | "order": 10 34 | }, 35 | "desc": { 36 | "name": "desc", 37 | "title": "Desc", 38 | "type": "input", 39 | "inputType": "text", 40 | "description": "", 41 | "order": 15 42 | }, 43 | "class": { 44 | "name": "class", 45 | "title": "Class", 46 | "type": "input", 47 | "inputType": "text", 48 | "description": "", 49 | "order": 20 50 | }, 51 | "compiler": { 52 | "name": "compiler", 53 | "title": "Compiler", 54 | "type": "bool", 55 | "default": false, 56 | "order": 25 57 | }, 58 | "output": { 59 | "name": "output", 60 | "title": "Output", 61 | "formatter" : "dynamic-type", 62 | "fieldClasses": "full-width", 63 | "properties": ["background-color", "color"], 64 | "type": "object", 65 | "order": 30 66 | }, 67 | "output_variables": { 68 | "name": "output_variables", 69 | "title": "Output Variables", 70 | "fieldClasses": "full-width", 71 | "type": "bool", 72 | "default": false, 73 | "order": 31 74 | }, 75 | "required": { 76 | "name": "required", 77 | "title": "Required", 78 | "fieldClasses": "full-width", 79 | "type": "array", 80 | "description": "Field visibility requirements.", 81 | "order": 35 82 | }, 83 | "default": { 84 | "type": "custom-object", 85 | "formatter": "keyvalue", 86 | "title": "Default", 87 | "name": "default", 88 | "selectValues": ["from", "to"], 89 | "listName": "defaultList", 90 | "newElementButtonLabel": "+ Add Default Item", 91 | "default": {}, 92 | "order": 40 93 | }, 94 | "validate": { 95 | "name": "validate", 96 | "title": "Validate", 97 | "type": "custom-object", 98 | "acceptedTypes": ["color"], 99 | "order": 45 100 | }, 101 | "transparent": { 102 | "name": "transparent", 103 | "title": "Transparent", 104 | "type": "bool", 105 | "default": true, 106 | "order": 50 107 | } 108 | } 109 | } -------------------------------------------------------------------------------- /docs/core-fields/color.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "color", 3 | "name": "Color", 4 | "description": null, 5 | "icon": null, 6 | "groups": { 7 | "Global": ["id", "type", "title", "desc", "subtitle", "class"], 8 | "Advanced": ["attributes", "data", "compiler", "output", "output_variables", "permissions", "required", "default", "validate"] 9 | }, 10 | "fields": { 11 | "id": { 12 | "name": "id", 13 | "title": "ID", 14 | "type": "input", 15 | "inputType": "text", 16 | "description": "", 17 | "order": 0 18 | }, 19 | "title": { 20 | "name": "title", 21 | "title": "Title", 22 | "type": "input", 23 | "inputType": "text", 24 | "description": "", 25 | "order": 5 26 | }, 27 | "subtitle": { 28 | "name": "subtitle", 29 | "title": "Subtitle", 30 | "type": "input", 31 | "inputType": "text", 32 | "description": "", 33 | "order": 10 34 | }, 35 | "desc": { 36 | "name": "desc", 37 | "title": "Desc", 38 | "type": "input", 39 | "inputType": "text", 40 | "description": "", 41 | "order": 15 42 | }, 43 | "class": { 44 | "name": "class", 45 | "title": "Class", 46 | "type": "input", 47 | "inputType": "text", 48 | "description": "", 49 | "order": 20 50 | }, 51 | "compiler": { 52 | "name": "compiler", 53 | "title": "Compiler", 54 | "type": "bool", 55 | "default": false, 56 | "order": 25 57 | }, 58 | "output": { 59 | "name": "output", 60 | "title": "Output", 61 | "fieldClasses": "full-width", 62 | "formatter" : "dynamic-type", 63 | "properties": ["background-color", "color"], 64 | "type": "object", 65 | "order": 30 66 | }, 67 | "output_variables": { 68 | "name": "output_variables", 69 | "title": "Output Variables", 70 | "fieldClasses": "full-width", 71 | "type": "bool", 72 | "default": false, 73 | "order": 31 74 | }, 75 | "permissions": { 76 | "type": "input", 77 | "inputType": "text", 78 | "name": "permissions", 79 | "title": "Permissions", 80 | "order": 35 81 | }, 82 | "required": { 83 | "name": "required", 84 | "title": "Required", 85 | "fieldClasses": "full-width", 86 | "type": "array", 87 | "description": "Field visibility requirements.", 88 | "order": 40 89 | }, 90 | "transparent": { 91 | "name": "transparent", 92 | "title": "Transparent", 93 | "type": "bool", 94 | "default": true, 95 | "order": 45 96 | }, 97 | "validate": { 98 | "type": "input", 99 | "inputType": "text", 100 | "name": "validate", 101 | "title": "Validate", 102 | "acceptedTypes": ["color"], 103 | "order": 50 104 | } 105 | } 106 | } -------------------------------------------------------------------------------- /docs/core-fields/color.md: -------------------------------------------------------------------------------- 1 | # Color 2 | 3 | The Color field redefines simplicity. Point and click to choose any color in the spectrum. 4 | 5 | ![](./img/color.png) 6 | 7 | ::: warning Table of Contents 8 | [[toc]] 9 | ::: 10 | 11 | ## Arguments 12 | |Name|Type|Default|Description| 13 | |--- |--- |--- |--- | 14 | |type|string|`color`|Value identifying the field type.| 15 | |transparent|bool|`true`|Flag to set the display of the transparency checkbox.| 16 | |validate|string| |The only accepted validation type is `color`.| 17 | |color_alpha|bool|`false`|Flag to set the color picker to accept an alpha value. 18 | 19 | ::: warning Transparency 20 | To set the transparency checkbox by default, use the string `transparent` in place of a string hex value in the `default` argument. 21 | ::: 22 | 23 | ::: tip Also See 24 | - [Global Field Arguments](../configuration/fields/arguments.md) 25 | - [Using the `compiler` Argument](../configuration/fields/compiler.md) 26 | - [Using the `output` Argument](../configuration/fields/output.md) 27 | - [Using the `output_variables` Argument](../configuration/fields/output-variables.md) 28 | - [Using the `permissions` Argument](../configuration/fields/permissions.md) 29 | - [Using the `required` Argument](../configuration/fields/required.md) 30 | ::: 31 | 32 | 33 | ## Build Config 34 | 45 | 46 | 47 | ## Example Config 48 | 49 | ```php 50 | Redux::set_field( 'OPT_NAME', 'SECTION_ID', array( 51 | 'id' => 'opt-color', 52 | 'type' => 'color', 53 | 'title' => esc_html__('Body Background Color', 'your-textdomain-here'), 54 | 'subtitle' => esc_html__('Pick a background color for the theme (default: #fff).', 'your-textdomain-here'), 55 | 'default' => '#FFFFFF', 56 | 'validate' => 'color', 57 | ) ); 58 | ``` 59 | 60 | ## Example Usage 61 | This example in based on the example usage provided above. Be sure to change `$redux_demo` to the value you specified in your [opt_name](../configuration/global_arguments.md#opt_name) argument. 62 | 63 | ```php 64 | global $redux_demo; 65 | 66 | echo 'Color value: ' . $redux_demo['opt-color']; 67 | ``` 68 | -------------------------------------------------------------------------------- /docs/core-fields/content.md: -------------------------------------------------------------------------------- 1 | # Content 2 | 3 | The Content field comes in several modes to display information as heading, subheading, content, and submessage. 4 | 5 | ![](./img/content.jpg) 6 | 7 | ::: warning Table of Contents 8 | [[toc]] 9 | ::: 10 | 11 | ## Arguments 12 | | Name | Type |
Default
| Description | 13 | |---------|--------|----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------| 14 | | type | string | `content` | Value identifying the field type. | 15 | | mode | string | `content` | Sets the mode of the content box. Accepts: `heading` `subheading` `content` `submessage` | 16 | | content | string | | Text to appear on screen. | 17 | | icon | string | | `heading` mode only. Name of an Elusive Icon font (or name of icon from a manually installed set) to use in the heading field. | 18 | | style | string | `normal` | `submessage` mode only. Accepts: `normal`, `success`, `info`, `warning`, `critical` | 19 | 20 | ::: tip Also See 21 | - [Global Field Arguments](../configuration/fields/arguments.md) 22 | - [Using the `required` Argument](../configuration/fields/required.md) 23 | ::: 24 | 25 | ::: warning Tip 26 | When using the Content field with `required`, the field cannot be hidden by default. It’s best only to use the `required` argument with this 27 | field when the fold is shown by default. 28 | ::: 29 | 30 | ## Example Config 31 | 32 | #### Heading 33 | ```php 34 | Redux::set_field( 35 | 'OPT_NAME', 36 | 'SECTION_ID', 37 | array( 38 | 'id' => 'opt-heading-1', 39 | 'type' => 'content', 40 | 'mode' => 'heading', 41 | 'content' => 'This is a content field using the mode heading', 42 | ) 43 | ); 44 | ``` 45 | 46 | #### Subheading 47 | ```php 48 | Redux::set_field( 49 | 'OPT_NAME', 50 | 'SECTION_ID', 51 | array( 52 | 'id' => 'opt-subheading-1', 53 | 'type' => 'content', 54 | 'mode' => 'subheading', 55 | 'content' => 'This is a content field using the mode subheading', 56 | ) 57 | ); 58 | ``` 59 | 60 | #### Content 61 | ```php 62 | Redux::set_field( 63 | 'OPT_NAME', 64 | 'SECTION_ID', 65 | array( 66 | 'id' => 'opt-content-1', 67 | 'type' => 'content', 68 | 'mode' => 'content', 69 | 'content' => 'This is a content field using the mode content', 70 | ) 71 | ); 72 | ``` 73 | 74 | #### Submessage 75 | ```php 76 | Redux::set_field( 77 | 'OPT_NAME', 78 | 'SECTION_ID', 79 | array( 80 | 'id' => 'opt-submessage-2', 81 | 'type' => 'content', 82 | 'mode' => 'submessage', 83 | 'content' => 'This is a content field using the mode submessage with success style.', 84 | 'style' => 'success', 85 | ) 86 | ); 87 | ``` 88 | -------------------------------------------------------------------------------- /docs/core-fields/date.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "date", 3 | "name": "Date", 4 | "description": null, 5 | "icon": null, 6 | "groups": { 7 | "Global": ["id", "type", "title", "desc", "subtitle", "class"], 8 | "Advanced": ["attributes", "data", "compiler", "output", "output_variables", "permissions", "required", "default", "validate"] 9 | }, 10 | "fields": { 11 | "id": { 12 | "name": "id", 13 | "title": "ID", 14 | "type": "input", 15 | "inputType": "text", 16 | "description": "", 17 | "order": 0 18 | }, 19 | "title": { 20 | "name": "title", 21 | "title": "Title", 22 | "type": "input", 23 | "inputType": "text", 24 | "description": "", 25 | "order": 5 26 | }, 27 | "subtitle": { 28 | "name": "subtitle", 29 | "title": "Subtitle", 30 | "type": "input", 31 | "inputType": "text", 32 | "description": "", 33 | "order": 10 34 | }, 35 | "desc": { 36 | "name": "desc", 37 | "title": "Desc", 38 | "type": "input", 39 | "inputType": "text", 40 | "description": "", 41 | "order": 15 42 | }, 43 | "class": { 44 | "name": "class", 45 | "title": "Class", 46 | "type": "input", 47 | "inputType": "text", 48 | "description": "", 49 | "order": 20 50 | }, 51 | "compiler": { 52 | "name": "compiler", 53 | "title": "Compiler", 54 | "type": "bool", 55 | "default": false, 56 | "order": 25 57 | }, 58 | "permissions": { 59 | "type": "input", 60 | "inputType": "text", 61 | "name": "permissions", 62 | "title": "Permissions", 63 | "order": 30 64 | }, 65 | "required": { 66 | "name": "required", 67 | "title": "Required", 68 | "fieldClasses": "full-width", 69 | "type": "array", 70 | "description": "Field visibility requirements.", 71 | "order": 35 72 | }, 73 | "placeholder": { 74 | "type": "input", 75 | "inputType": "text", 76 | "name": "placeholder", 77 | "title": "Placeholder", 78 | "order": 60 79 | } 80 | } 81 | } -------------------------------------------------------------------------------- /docs/core-fields/date.md: -------------------------------------------------------------------------------- 1 | # Date 2 | 3 | The Date field displays the popup jQuery datebox when clicking on the text input. 4 | 5 | ![](./img/date.png) 6 | 7 | ::: warning Table of Contents 8 | [[toc]] 9 | ::: 10 | 11 | ## Arguments 12 | |Name|Type|Default|Description| 13 | |--- |--- |--- |--- | 14 | |type|string|`date`|Value identifying the field type.| 15 | |placeholder|string||The default text to display in the text input when no value is present.| 16 | 17 | ::: tip Also See 18 | - [Global Field Arguments](../configuration/fields/arguments.md) 19 | - [Using the `compiler` Argument](../configuration/fields/compiler.md) 20 | - [Using the `permissions` Argument](../configuration/fields/permissions.md) 21 | - [Using the `required` Argument](../configuration/fields/required.md) 22 | ::: 23 | 24 | 25 | ## Build Config 26 | 37 | 38 | 39 | ## Example Config 40 | ```php 41 | Redux::set_field( 'OPT_NAME', 'SECTION_ID', array( 42 | 'id' => 'opt-date', 43 | 'type' => 'date', 44 | 'title' => esc_html__('Date Option', 'your-textdomain-here'), 45 | 'subtitle' => esc_html__('No validation can be done on this field type', 'your-textdomain-here'), 46 | 'desc' => esc_html__('This is the description field, again good for additional info.', 'your-textdomain-here'), 47 | 'placeholder' => 'Click to enter a date' 48 | ) ); 49 | ``` 50 | 51 | ## Example Usage 52 | This example is based on the example usage provided above. Be sure to change `$redux_demo` to the value you specified in your [opt_name](../configuration/global_arguments.md#opt_name) argument. 53 | 54 | ```php 55 | global $redux_demo; 56 | 57 | echo '' . $redux_demo['opt-date']; 58 | ``` 59 | 60 | -------------------------------------------------------------------------------- /docs/core-fields/divide.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "divide", 3 | "name": "Divide", 4 | "description": null, 5 | "icon": null, 6 | "fields": { 7 | "id": { 8 | "name": "id", 9 | "title": "ID", 10 | "type": "input", 11 | "inputType": "text", 12 | "description": "", 13 | "order": 0 14 | }, 15 | "class": { 16 | "name": "class", 17 | "title": "Class", 18 | "type": "input", 19 | "inputType": "text", 20 | "description": "", 21 | "order": 20 22 | }, 23 | "required": { 24 | "name": "required", 25 | "title": "Required", 26 | "fieldClasses": "full-width", 27 | "type": "array", 28 | "description": "Field visibility requirements.", 29 | "order": 35 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /docs/core-fields/divide.md: -------------------------------------------------------------------------------- 1 | # Divide 2 | 3 | The Divide field acts as a divider between other fields. 4 | 5 | ![](./img/divide.png) 6 | 7 | ::: warning Table of Contents 8 | [[toc]] 9 | ::: 10 | 11 | ## Arguments 12 | |Name|Type|Default|Description| 13 | |--- |--- |--- |--- | 14 | |type|string|`divide`|Value identifying the field type.| 15 | 16 | ::: tip Also See 17 | - [Global Field Arguments](../configuration/fields/arguments.md) 18 | - [Using the `required` Argument](../configuration/fields/required.md) 19 | ::: 20 | 21 | ::: warning Tip 22 | When using the Divide field with `required`, the divider cannot be hidden by default. It's best only to use the `required` argument with this field when the fold is shown by default. 23 | ::: 24 | 25 | 26 | ## Build Config 27 | 38 | 39 | 40 | 41 | ## Example Config 42 | ```php 43 | Redux::set_field( 'OPT_NAME', 'SECTION_ID', array( 44 | 'id' =>'divider_1', 45 | 'desc' => esc_html__('This is the description field.', 'your-textdomain-here'), 46 | 'type' => 'divide' 47 | ) ); 48 | ``` 49 | 50 | -------------------------------------------------------------------------------- /docs/core-fields/editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "editor", 3 | "name": "Editor", 4 | "description": null, 5 | "icon": null, 6 | "groups": { 7 | "Global": ["id", "type", "title", "desc", "subtitle", "class"], 8 | "Advanced": ["attributes", "data", "compiler", "output", "output_variables", "permissions", "required", "default", "validate"] 9 | }, 10 | "fields": { 11 | "id": { 12 | "name": "id", 13 | "title": "ID", 14 | "type": "input", 15 | "inputType": "text", 16 | "description": "", 17 | "order": 0 18 | }, 19 | "title": { 20 | "name": "title", 21 | "title": "Title", 22 | "type": "input", 23 | "inputType": "text", 24 | "description": "", 25 | "order": 5 26 | }, 27 | "subtitle": { 28 | "name": "subtitle", 29 | "title": "Subtitle", 30 | "type": "input", 31 | "inputType": "text", 32 | "description": "", 33 | "order": 10 34 | }, 35 | "desc": { 36 | "name": "desc", 37 | "title": "Desc", 38 | "type": "input", 39 | "inputType": "text", 40 | "description": "", 41 | "order": 15 42 | }, 43 | "class": { 44 | "name": "class", 45 | "title": "Class", 46 | "type": "input", 47 | "inputType": "text", 48 | "description": "", 49 | "order": 20 50 | }, 51 | "compiler": { 52 | "name": "compiler", 53 | "title": "Compiler", 54 | "type": "bool", 55 | "default": false, 56 | "order": 25 57 | }, 58 | "permissions": { 59 | "type": "input", 60 | "inputType": "text", 61 | "name": "permissions", 62 | "title": "Permissions", 63 | "order": 30 64 | }, 65 | "required": { 66 | "name": "required", 67 | "title": "Required", 68 | "fieldClasses": "full-width", 69 | "type": "array", 70 | "description": "Field visibility requirements.", 71 | "order": 35 72 | }, 73 | "default": { 74 | "type": "input", 75 | "inputType": "text", 76 | "name": "default", 77 | "title": "Default", 78 | "order": 30 79 | }, 80 | "args": { 81 | "type": "custom-object", 82 | "formatter": "keyvalue", 83 | "title": "Args", 84 | "name": "args", 85 | "description": "WP Editor Arguments", 86 | "selectValues": ["wpautop", "media_buttons", "textarea_rows", "tabindex", "editor_css", "teeny", "dfw", "tinymce", "quicktags"], 87 | "booleanFields": ["wpautop", "media_buttons", "teeny", "dfw"], 88 | "arrayFields": ["tinymce", "quicktags"], 89 | "newElementButtonLabel": "+ Add WP Editor Argument", 90 | "order": 55, 91 | "default": { 92 | "wpautop": true, 93 | "media_buttons": true, 94 | "textarea_rows": 10, 95 | "teeny": true, 96 | "dfw": false 97 | } 98 | } 99 | } 100 | } -------------------------------------------------------------------------------- /docs/core-fields/editor.md: -------------------------------------------------------------------------------- 1 | # Editor 2 | 3 | The Editor field offers WYSIWYG editing capability, using the same editing interface as WordPress. 4 | 5 | ![](./img/editor.png) 6 | 7 | ::: warning Table of Contents 8 | [[toc]] 9 | ::: 10 | 11 | ## Arguments 12 | |Name|Type|Default|Description| 13 | |--- |--- |--- |--- | 14 | |type|string|`editor`|Value identifying the field type.| 15 | |default|string||Text to appear inside the editor window by default.| 16 | |args|array||Sets the default WordPress editor arguments. See [WP Editor Options](#wp-editor-options) below.| 17 | 18 | ::: tip Also See 19 | - [Global Field Arguments](../configuration/fields/arguments.md) 20 | - [Using the `compiler` Argument](../configuration/fields/compiler.md) 21 | - [Using the `permissions` Argument](../configuration/fields/permissions.md) 22 | - [Using the `required` Argument](../configuration/fields/required.md) 23 | ::: 24 | 25 | ## WP Editor Options 26 | |Name|Type|Default|Description| 27 | |--- |--- |--- |--- | 28 | |wpautop|bool|`true`|Flags to set `wpautop` for adding paragraphs.| 29 | |media_buttons|bool|`true`|Flag to set the display of media upload/inset buttons.| 30 | |textarea_rows|int|`10`|Number of rows to display or the textarea.| 31 | |tabindex|int||The tabindex value used for the form field.| 32 | |editor_css|string||Additional CSS styling applied for both visual and HTML editor buttons. `