├── .editorconfig ├── .gitattributes ├── .github ├── CONTRIBUTING.md └── SUPPORT.md ├── .gitignore ├── .nvmrc ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── assets ├── banner-1544x500.png ├── banner-772x250.png ├── blueprints │ └── blueprint.json ├── icon-128x128.png ├── icon-256x256.png ├── screenshot-1.png ├── screenshot-2.png ├── screenshot-3.png ├── screenshot-4.png └── screenshot-5.png ├── build ├── cptui-styles.css ├── cptui-styles.css.map ├── cptui-styles.min.css ├── cptui.asset.php ├── cptui.js ├── cptui.js.map ├── cptui.min.js ├── cptui.min.js.map ├── dashiconsPicker.asset.php ├── dashiconsPicker.js ├── dashiconsPicker.js.map ├── dashiconsPicker.min.js └── dashiconsPicker.min.js.map ├── classes ├── class.cptui_admin_ui.php └── class.cptui_debug_info.php ├── composer.json ├── custom-post-type-ui.php ├── external └── wpgraphql.php ├── images ├── cptui-icon-173x173.png └── wds_ads │ ├── buddypages.png │ ├── cptui-extended.png │ ├── instago.png │ └── wp-search-with-algolia-pro.png ├── inc ├── about.php ├── listings.php ├── post-types.php ├── support.php ├── taxonomies.php ├── tools-sections │ ├── tools-debug.php │ ├── tools-get-code.php │ ├── tools-post-types.php │ └── tools-taxonomies.php ├── tools.php ├── utility.php └── wp-cli.php ├── phpunit.xml ├── readme.txt ├── src ├── index.js ├── js │ ├── cptui.js │ ├── dashiconsPicker.js │ └── partials │ │ ├── autopopulate.js │ │ ├── autoswitch.js │ │ ├── back-to-top.js │ │ ├── confirm-delete.js │ │ ├── hide-submit.js │ │ ├── menu-icon.js │ │ ├── namefield.js │ │ ├── support-toggles.js │ │ ├── tax-required-post-type.js │ │ ├── toggle-hierarchical.js │ │ ├── toggle-panels.js │ │ └── utils.js └── scss │ └── cptui-styles.scss ├── webpack.config.js └── wpml-config.xml /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | # WordPress Coding Standards 5 | # http://make.wordpress.org/core/handbook/coding-standards/ 6 | 7 | root = true 8 | 9 | [*] 10 | charset = utf-8 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | indent_style = tab 15 | indent_size = 4 16 | 17 | [{.*rc,*.json,*.yml}] 18 | indent_style = space 19 | indent_size = 2 20 | 21 | [*.md] 22 | trim_trailing_whitespace = false 23 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # 2 | # Exclude these files from release archives. 3 | # This will also make them unavailable when using Composer with `--prefer-dist`. 4 | # If you develop for WPCS using Composer, use `--prefer-source`. 5 | # https://blog.madewithlove.be/post/gitattributes/ 6 | # 7 | /.travis.yml export-ignore 8 | /phpunit.xml.dist export-ignore 9 | /phpcs.xml.dist export-ignore 10 | /package.json export-ignore 11 | /package-lock.json export-ignore 12 | /tests export-ignore 13 | /apigen.neon export-ignore 14 | /apigen export-ignore 15 | /node_modules export-ignore 16 | 17 | # 18 | # Auto detect text files and perform LF normalization 19 | # http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ 20 | # 21 | * text=auto 22 | 23 | # 24 | # The above will handle all files NOT found below 25 | # 26 | *.md text 27 | *.php text 28 | *.inc text 29 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | WebDevStudios loves third-party contributions. Whether it is fixing a typo, or translating the entire plugin into a new language, no contribution is too small or insignificant. We want to keep it as easy as possible to contribute changes to our plugin. There are a few guidelines that we need contributors to follow so that we have a chance of keeping on top of things. 4 | 5 | ## Getting Started 6 | 7 | * Make sure you have a [GitHub account](https://github.com/signup/free). 8 | * Submit a ticket for your issue, assuming one does not already exist. 9 | * Clearly describe the issue including steps to reproduce when it is a bug. 10 | * Make sure you fill in the earliest version that you know has the issue. 11 | * Fork the repository on GitHub. 12 | 13 | ## Making Changes 14 | 15 | * Create a topic branch from where you want to base your work. 16 | * This is usually the branch for the next major release. 17 | * To quickly create a topic branch based on the next major version: `git checkout -b 18 | fix/master/my_contribution master`. Please avoid working directly on the 19 | `master` branch. 20 | * Make commits of logical units. 21 | * Check for unnecessary whitespace with `git diff --check` before committing. 22 | * Make sure your commit messages are informative of what was fixed and why it was needed. 23 | 24 | ## Submitting Changes 25 | 26 | * Push your changes to a topic branch in your fork of the repository. 27 | * Submit a pull request to the repository from WebDevStudios. 28 | * WebDevStudios will review the changes and post any questions or concerns we have. If no issues are present, we will accept and merge in the pull request. 29 | * If feedback has been given, we appreciate response to the feedback as soon as possible. Delay in response will lead to delay in acceptance of changes. 30 | 31 | # Additional Resources 32 | * [General GitHub documentation](https://help.github.com/) 33 | * [GitHub pull request documentation](https://help.github.com/send-pull-requests/) 34 | 35 | ## WordPress.org support forums 36 | * [Custom Post Type UI](https://www.wordpress.org/support/plugin/custom-post-type-ui/) 37 | 38 | ## Twitter 39 | * [Michael's Twitter](https://www.twitter.com/tw2113/) 40 | * [WebDevStudios' Twitter](https://www.twitter.com/webdevstudios/) 41 | * [Brad's Twitter](https://www.twitter.com/williamsba/) 42 | -------------------------------------------------------------------------------- /.github/SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support for Custom Post Type UI 2 | 3 | The best place to get support for this plugin is on the [WordPress.org support forums](http://wordpress.org/support/plugin/custom-post-type-ui). 4 | 5 | We actively keep an eye on the forums and do our best to respond in a timely manner. 6 | 7 | If you think you have found a bug, the forum is the best place to start so that WebDevStudios can confirm the nature of the issue. If you are wanting to present a new enhancement idea or feature, then please feel free to create the issue and lay out what you are thinking for the enhancement. 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /cptui-docs 3 | /node_modules 4 | /vendor 5 | /composer.lock 6 | /release-build/custom-post-type-ui 7 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | stable 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at support@pluginize.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at [http://contributor-covenant.org/version/1/4][version] 72 | 73 | [homepage]: http://contributor-covenant.org 74 | [version]: http://contributor-covenant.org/version/1/4/ 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Custom Post Type UI 2 | 3 | [![WebDevStudios. Your Success is Our Mission.](https://webdevstudios.com/wp-content/uploads/2024/02/wds-banner.png)](https://webdevstudios.com/contact/) 4 | 5 | Admin UI for creating custom post types and custom taxonomies for WordPress 6 | 7 | Core Developers: 8 | 9 | * [Michael Beckwith](http://github.com/tw2113/) 10 | * [John Hawkins](https://github.com/vegasgeek) 11 | * [Brad Williams](https://github.com/williamsba) 12 | * [WebDevStudios](https://github.com/webdevstudios) 13 | 14 | 15 | ## Description 16 | 17 | Custom Post Type UI (CPTUI) provides an easy to use interface to create and administer custom post types and taxonomies for WordPress. 18 | 19 | CPTUI does NOT handle display of registered post types or taxonomies in your current theme. Its goal is to simply register them use. 20 | 21 | ## Installation 22 | 23 | ### Manual 24 | 25 | 1. Upload the Custom Post Type UI folder to the plugins directory in your WordPress installation 26 | 2. Activate the plugin. 27 | 3. Navigate to the "CPTUI" Menu. 28 | 29 | ### Admin Installer 30 | 31 | 1. Visit the Add New plugin screen and search for "custom post type ui" 32 | 2. Click the "Install Now" button. 33 | 3. Activate the plugin. 34 | 4. Navigate to the "CPTUI" Menu. 35 | 36 | That's it! Now you can easily start creating custom post types and taxonomies in WordPress 37 | 38 | ## Frequently Asked Questions 39 | 40 | Please see the Help/Support section for FAQs and start a new thread on the support forums for Custom Post Type UI if none of those answer your question. 41 | 42 | ## Other Notes 43 | 44 | Import/Export functionality amended from original contribution by [Ben Allfree](http://wordpress.org/support/profile/benallfree). 45 | 46 | ### Outside contributors that we wish to thank 47 | [brandondove](https://github.com/brandondove) 48 | 49 | ## Change Log 50 | 51 | See [CHANGELOG.md](CHANGELOG.md) for the full list of changes. 52 | 53 | ## Licensing 54 | The code in this project is licensed under [GPL v2 or later](LICENSE). 55 | -------------------------------------------------------------------------------- /assets/banner-1544x500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/assets/banner-1544x500.png -------------------------------------------------------------------------------- /assets/banner-772x250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/assets/banner-772x250.png -------------------------------------------------------------------------------- /assets/blueprints/blueprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "landingPage": "\/wp-admin\/admin.php?page=cptui_main_menu", 3 | "preferredVersions": { 4 | "php": "7.4", 5 | "wp": "6.5" 6 | }, 7 | "phpExtensionBundles": [ 8 | "kitchen-sink" 9 | ], 10 | "steps": [ 11 | { 12 | "step": "login", 13 | "username": "admin", 14 | "password": "password" 15 | }, 16 | { 17 | "step": "installPlugin", 18 | "pluginZipFile": { 19 | "resource": "wordpress.org/plugins", 20 | "slug": "custom-post-type-ui" 21 | }, 22 | "options": { 23 | "activate": true 24 | } 25 | } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /assets/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/assets/icon-128x128.png -------------------------------------------------------------------------------- /assets/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/assets/icon-256x256.png -------------------------------------------------------------------------------- /assets/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/assets/screenshot-1.png -------------------------------------------------------------------------------- /assets/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/assets/screenshot-2.png -------------------------------------------------------------------------------- /assets/screenshot-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/assets/screenshot-3.png -------------------------------------------------------------------------------- /assets/screenshot-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/assets/screenshot-4.png -------------------------------------------------------------------------------- /assets/screenshot-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/assets/screenshot-5.png -------------------------------------------------------------------------------- /build/cptui-styles.css: -------------------------------------------------------------------------------- 1 | .posttypesui, .taxonomiesui { 2 | width: calc(100% - 300px); } 3 | .posttypesui .cptui-section:first-child, .taxonomiesui .cptui-section:first-child { 4 | margin-top: 30px; } 5 | .posttypesui .postbox-container, .taxonomiesui .postbox-container { 6 | width: 100%; } 7 | .posttypesui .postbox .toggle-indicator:before, .taxonomiesui .postbox .toggle-indicator:before { 8 | content: "\f142"; 9 | display: inline-block; 10 | font: normal 20px/1 dashicons; 11 | speak: none; 12 | -webkit-font-smoothing: antialiased; 13 | -moz-osx-font-smoothing: grayscale; 14 | text-decoration: none !important; } 15 | .posttypesui .postbox.closed .handlediv .toggle-indicator::before, .taxonomiesui .postbox.closed .handlediv .toggle-indicator::before { 16 | content: "\f140"; } 17 | .posttypesui .postbox .hndle, .taxonomiesui .postbox .hndle { 18 | cursor: pointer; } 19 | .posttypesui .required, .taxonomiesui .required { 20 | color: red; } 21 | 22 | .cptui-table td.outer { 23 | vertical-align: top; 24 | width: 50%; } 25 | 26 | .cptui-table input[type="text"] { 27 | width: 75%; } 28 | 29 | .cptui-table .question:hover { 30 | cursor: pointer; } 31 | 32 | .cptui-table th p { 33 | font-weight: 400; 34 | font-size: 12px; } 35 | 36 | .cptui-table .cptui-slug-details { 37 | margin-top: 15px; } 38 | 39 | .cptui-table #slugchanged, .cptui-table #slugexists { 40 | color: red; 41 | font-weight: bold; } 42 | .cptui-table #slugchanged.hidemessage, .cptui-table #slugexists.hidemessage { 43 | display: none; } 44 | 45 | .cptui-support #support .question { 46 | font-size: 18px; 47 | font-weight: bold; } 48 | .cptui-support #support .question:before { 49 | content: "\f139"; 50 | display: inline-block; 51 | font: normal 25px/1 'dashicons'; 52 | margin-left: -25px; 53 | position: absolute; 54 | -webkit-font-smoothing: antialiased; } 55 | :dir(rtl) .cptui-support #support .question:before { 56 | content: "\f141"; 57 | margin-left: 0; 58 | margin-right: -25px; } 59 | .cptui-support #support .question.active:before { 60 | content: "\f140"; } 61 | 62 | .cptui-support #support .answer { 63 | margin: 10px 0 0 20px; } 64 | 65 | .cptui-support #support ol li { 66 | list-style: none; } 67 | 68 | .cptui-support #support li { 69 | position: relative; } 70 | 71 | .cptui-field-description { 72 | font-style: italic; } 73 | 74 | #cptui_select_post_type, 75 | #cptui_select_taxonomy { 76 | margin-top: 15px; } 77 | 78 | .cptui_post_import, 79 | .cptui_tax_import { 80 | height: 200px; 81 | margin-bottom: 10px; 82 | resize: vertical; 83 | width: 100%; } 84 | :dir(rtl) .cptui_post_import, :dir(rtl) 85 | .cptui_tax_import { 86 | direction: ltr; } 87 | 88 | .cptui_post_type_get_code, 89 | .cptui_tax_get_code { 90 | height: 300px; 91 | resize: vertical; } 92 | :dir(rtl) .cptui_post_type_get_code, :dir(rtl) 93 | .cptui_tax_get_code { 94 | direction: ltr; } 95 | 96 | .about-wrap .cptui-feature { 97 | overflow: visible !important; 98 | *zoom: 1; } 99 | .about-wrap .cptui-feature:before, .about-wrap .cptui-feature:after { 100 | content: " "; 101 | display: table; } 102 | .about-wrap .cptui-feature:after { 103 | clear: both; } 104 | 105 | .about-wrap h3 + .cptui-feature { 106 | margin-top: 0; } 107 | 108 | .about-wrap .changelog h2 { 109 | text-align: center; } 110 | 111 | .about-wrap .feature-rest div { 112 | width: 50% !important; 113 | padding-right: 100px; 114 | -moz-box-sizing: border-box; 115 | box-sizing: border-box; 116 | margin: 0 !important; } 117 | .about-wrap .feature-rest div.last-feature { 118 | padding-left: 100px; 119 | padding-right: 0; } 120 | .about-wrap .feature-rest div.icon { 121 | width: 0 !important; 122 | padding: 0; 123 | margin: 0; } 124 | .about-wrap .feature-rest div.icon:before { 125 | font-weight: normal; 126 | width: 100%; 127 | font-size: 170px; 128 | line-height: 125px; 129 | color: #9c5d90; 130 | display: inline-block; 131 | position: relative; 132 | text-align: center; 133 | speak: none; 134 | margin: 0 0 0 -100px; 135 | content: "\e01d"; 136 | -webkit-font-smoothing: antialiased; 137 | -moz-osx-font-smoothing: grayscale; } 138 | 139 | .about-wrap .about-integrations { 140 | background: #fff; 141 | margin: 20px 0; 142 | padding: 1px 20px 10px; } 143 | 144 | .about-wrap .changelog h4 { 145 | line-height: 1.4; } 146 | 147 | .about-wrap .cptui-about-text { 148 | margin-bottom: 1em !important; 149 | margin-right: 0; 150 | max-width: calc(100% - 173px); } 151 | 152 | .email-octopus-form-row input::placeholder { 153 | color: #cccccc; } 154 | 155 | .email-octopus-form-row-hp { 156 | visibility: hidden; } 157 | 158 | .cptui-intro-devblock { 159 | display: flex; 160 | flex-direction: row; } 161 | 162 | .cptui-help { 163 | color: #424242; 164 | margin-left: 4px; 165 | opacity: 0.5; 166 | text-decoration: none; 167 | width: 16px; } 168 | fieldset .cptui-help { 169 | position: relative; 170 | top: 4px; } 171 | .cptui-help:hover { 172 | color: #0074a2; 173 | opacity: 1; } 174 | .cptui-help:focus { 175 | box-shadow: none; } 176 | 177 | #menu_icon_preview { 178 | float: right; 179 | padding-left: 8px; } 180 | #menu_icon_preview img { 181 | display: block; 182 | height: 20px; 183 | width: 20px; } 184 | 185 | .visuallyhidden { 186 | position: absolute; 187 | left: -10000px; 188 | top: auto; 189 | width: 1px; 190 | height: 1px; 191 | overflow: hidden; } 192 | 193 | .cptui-spacer { 194 | display: block; 195 | margin-top: 25px; } 196 | 197 | .email-octopus-form-wrapper { 198 | background: #fff; 199 | margin-bottom: 10px; 200 | padding: 20px; } 201 | .email-octopus-form-wrapper label { 202 | margin-bottom: 10px; } 203 | 204 | .wdsoctosignup h2 { 205 | text-align: left; } 206 | 207 | .wdspromos { 208 | float: right; 209 | margin-left: 20px; 210 | margin-top: 10px; 211 | width: 275px; } 212 | :dir(rtl) .wdspromos { 213 | float: left; 214 | margin-left: 0; 215 | margin-right: 20px; } 216 | 217 | .wdspromos-about { 218 | display: -ms-flexbox; 219 | display: -webkit-flex; 220 | display: flex; 221 | -webkit-flex-direction: row; 222 | -ms-flex-direction: row; 223 | flex-direction: row; 224 | -webkit-flex-wrap: nowrap; 225 | -ms-flex-wrap: nowrap; 226 | flex-wrap: nowrap; 227 | -webkit-justify-content: space-between; 228 | -ms-flex-pack: justify; 229 | justify-content: space-between; 230 | -webkit-align-content: stretch; 231 | align-content: stretch; 232 | -webkit-align-items: flex-start; 233 | -ms-flex-align: start; 234 | align-items: flex-start; 235 | margin: 20px 0; } 236 | .wdspromos-about a:nth-child(1) { 237 | -ms-flex-order: 0; 238 | order: 0; 239 | -webkit-flex: 0 1 auto; 240 | -ms-flex: 0 1 auto; 241 | flex: 0 1 auto; 242 | -webkit-align-self: auto; 243 | align-self: auto; } 244 | .wdspromos-about a:nth-child(2) { 245 | -ms-flex-order: 0; 246 | order: 0; 247 | -webkit-flex: 0 1 auto; 248 | -ms-flex: 0 1 auto; 249 | flex: 0 1 auto; 250 | -webkit-align-self: auto; 251 | align-self: auto; } 252 | .wdspromos-about a:nth-child(3) { 253 | -ms-flex-order: 0; 254 | order: 0; 255 | -webkit-flex: 0 1 auto; 256 | -ms-flex: 0 1 auto; 257 | flex: 0 1 auto; 258 | -webkit-align-self: auto; 259 | align-self: auto; } 260 | .wdspromos-about p { 261 | padding: 0 5px; } 262 | .wdspromos-about p:nth-child(1) { 263 | padding-left: 0; } 264 | .wdspromos-about p:nth-child(4) { 265 | padding-right: 0; } 266 | 267 | .no-js #cptui_choose_icon { 268 | display: none; } 269 | 270 | .cptui-listings th { 271 | font-weight: bold; } 272 | 273 | .cptui-listings .post-type-listing th { 274 | width: 16.66667%; } 275 | 276 | .cptui-listings .taxonomy-listing th { 277 | width: 20%; } 278 | 279 | #poststuff { 280 | min-width: 463px; } 281 | 282 | .dashicon-picker-container { 283 | position: absolute; 284 | width: 220px; 285 | height: 252px; 286 | font-size: 14px; 287 | background-color: #fff; 288 | box-shadow: -1px 2px 5px 3px rgba(0, 0, 0, 0.41); 289 | overflow: hidden; 290 | padding: 5px; 291 | box-sizing: border-box; } 292 | .dashicon-picker-container ul { 293 | margin: 0 0 10px; 294 | padding: 0; } 295 | .dashicon-picker-container ul .dashicons { 296 | width: 20px; 297 | height: 20px; 298 | font-size: 20px; } 299 | .dashicon-picker-container ul li { 300 | display: inline-block; 301 | margin: 5px; 302 | float: left; } 303 | .dashicon-picker-container ul li a { 304 | display: block; 305 | text-decoration: none; 306 | color: #373737; 307 | padding: 5px 5px; 308 | border: 1px solid #dfdfdf; } 309 | .dashicon-picker-container ul li a:hover { 310 | border-color: #999; 311 | background: #efefef; } 312 | 313 | .dashicon-picker-control { 314 | height: 32px; } 315 | .dashicon-picker-control a { 316 | padding: 5px; 317 | text-decoration: none; 318 | line-height: 32px; 319 | width: 25px; } 320 | .dashicon-picker-control a span { 321 | display: inline; 322 | vertical-align: middle; } 323 | .dashicon-picker-control input { 324 | font-size: 12px; 325 | width: 140px; } 326 | 327 | .cptui-back-to-top { 328 | position: fixed; 329 | bottom: 30px; 330 | right: 20px; 331 | z-index: 10; 332 | transition: 0.25s all ease-in-out; 333 | opacity: 0; 334 | visibility: hidden; } 335 | .cptui-back-to-top.show { 336 | opacity: 1; 337 | visibility: visible; } 338 | 339 | @media screen and (min-width: 769px) { 340 | .cptui-badge { 341 | margin-top: -42px; 342 | height: 173px; 343 | width: 173px; 344 | color: #fafafa; 345 | font-weight: bold; 346 | font-size: 14px; 347 | text-align: center; 348 | margin-bottom: 10px; 349 | background: url(../images/cptui-icon-173x173.png) no-repeat; 350 | background-size: contain; } } 351 | 352 | @media screen and (max-width: 768px) { 353 | .cptui-table #description { 354 | width: 100%; } 355 | .wdspromos-about { 356 | flex-wrap: wrap; } 357 | .wdspromos-about p { 358 | margin: 5px auto; } 359 | .wdspromos-about p:nth-child(1) { 360 | padding-left: 5px; } 361 | .wdspromos-about p:nth-child(4) { 362 | padding-right: 5px; } 363 | .cptui-table td.outer { 364 | width: 100%; } 365 | #cptui_debug_info_email { 366 | width: 100%; } } 367 | 368 | /*# sourceMappingURL=cptui-styles.css.map */ -------------------------------------------------------------------------------- /build/cptui-styles.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "file": "cptui-styles.css", 4 | "sources": [ 5 | "../src/scss/cptui-styles.scss" 6 | ], 7 | "names": [], 8 | "mappings": "AAGA,AAAA,YAAY,EAAE,aAAa,CAAC;EAI3B,KAAK,EAAE,kBAAkB,GAsBzB;EA1BD,AACC,YADW,CACX,cAAc,AAAA,YAAY,EADb,aAAa,CAC1B,cAAc,AAAA,YAAY,CAAC;IAC1B,UAAU,EAAE,IAAI,GAChB;EAHF,AAKC,YALW,CAKX,kBAAkB,EALL,aAAa,CAK1B,kBAAkB,CAAC;IACjB,KAAK,EAAE,IAAI,GACZ;EAPF,AAQC,YARW,CAQX,QAAQ,CAAC,iBAAiB,AAAA,OAAO,EARpB,aAAa,CAQ1B,QAAQ,CAAC,iBAAiB,AAAA,OAAO,CAAC;IACjC,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,uBAAuB;IAC7B,KAAK,EAAE,IAAI;IACX,sBAAsB,EAAE,WAAW;IACnC,uBAAuB,EAAE,SA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UAAW,CAAA,CAAC,EAAE;QAChB,YAAY,EAAE,GAAG,GACf;MANF,AAOC,gBAPe,CAEjB,CAAC,AAKE,UAAW,CAAA,CAAC,EAAE;QAChB,aAAa,EAAE,GAAG,GAChB;EAGF,AACD,YADa,CACb,EAAE,AAAA,MAAM,CAAC;IACP,KAAK,EAAE,IAAI,GACZ;EAGA,AAAA,uBAAuB,CAAC;IACzB,KAAK,EAAE,IAAI,GACT" 9 | } -------------------------------------------------------------------------------- /build/cptui-styles.min.css: -------------------------------------------------------------------------------- 1 | .posttypesui,.taxonomiesui{width:calc(100% - 300px)}.posttypesui .cptui-section:first-child,.taxonomiesui .cptui-section:first-child{margin-top:30px}.posttypesui .postbox-container,.taxonomiesui .postbox-container{width:100%}.posttypesui .postbox .toggle-indicator:before,.taxonomiesui .postbox .toggle-indicator:before{content:"\f142";display:inline-block;font:normal 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none !important}.posttypesui .postbox.closed .handlediv .toggle-indicator::before,.taxonomiesui .postbox.closed .handlediv .toggle-indicator::before{content:"\f140"}.posttypesui .postbox .hndle,.taxonomiesui .postbox .hndle{cursor:pointer}.posttypesui .required,.taxonomiesui .required{color:red}.cptui-table td.outer{vertical-align:top;width:50%}.cptui-table input[type="text"]{width:75%}.cptui-table .question:hover{cursor:pointer}.cptui-table th p{font-weight:400;font-size:12px}.cptui-table .cptui-slug-details{margin-top:15px}.cptui-table #slugchanged,.cptui-table #slugexists{color:red;font-weight:bold}.cptui-table #slugchanged.hidemessage,.cptui-table #slugexists.hidemessage{display:none}.cptui-support #support .question{font-size:18px;font-weight:bold}.cptui-support #support .question:before{content:"\f139";display:inline-block;font:normal 25px/1 'dashicons';margin-left:-25px;position:absolute;-webkit-font-smoothing:antialiased}:dir(rtl) .cptui-support #support .question:before{content:"\f141";margin-left:0;margin-right:-25px}.cptui-support #support .question.active:before{content:"\f140"}.cptui-support #support .answer{margin:10px 0 0 20px}.cptui-support #support ol li{list-style:none}.cptui-support #support li{position:relative}.cptui-field-description{font-style:italic}#cptui_select_post_type,#cptui_select_taxonomy{margin-top:15px}.cptui_post_import,.cptui_tax_import{height:200px;margin-bottom:10px;resize:vertical;width:100%}:dir(rtl) .cptui_post_import,:dir(rtl) .cptui_tax_import{direction:ltr}.cptui_post_type_get_code,.cptui_tax_get_code{height:300px;resize:vertical}:dir(rtl) .cptui_post_type_get_code,:dir(rtl) .cptui_tax_get_code{direction:ltr}.about-wrap .cptui-feature{overflow:visible !important;*zoom:1}.about-wrap .cptui-feature:before,.about-wrap .cptui-feature:after{content:" ";display:table}.about-wrap .cptui-feature:after{clear:both}.about-wrap h3+.cptui-feature{margin-top:0}.about-wrap .changelog h2{text-align:center}.about-wrap .feature-rest div{width:50% !important;padding-right:100px;-moz-box-sizing:border-box;box-sizing:border-box;margin:0 !important}.about-wrap .feature-rest div.last-feature{padding-left:100px;padding-right:0}.about-wrap .feature-rest div.icon{width:0 !important;padding:0;margin:0}.about-wrap .feature-rest div.icon:before{font-weight:normal;width:100%;font-size:170px;line-height:125px;color:#9c5d90;display:inline-block;position:relative;text-align:center;speak:none;margin:0 0 0 -100px;content:"\e01d";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.about-wrap .about-integrations{background:#fff;margin:20px 0;padding:1px 20px 10px}.about-wrap .changelog h4{line-height:1.4}.about-wrap .cptui-about-text{margin-bottom:1em !important;margin-right:0;max-width:calc(100% - 173px)}.email-octopus-form-row input::placeholder{color:#cccccc}.email-octopus-form-row-hp{visibility:hidden}.cptui-intro-devblock{display:flex;flex-direction:row}.cptui-help{color:#424242;margin-left:4px;opacity:0.5;text-decoration:none;width:16px}fieldset .cptui-help{position:relative;top:4px}.cptui-help:hover{color:#0074a2;opacity:1}.cptui-help:focus{box-shadow:none}#menu_icon_preview{float:right;padding-left:8px}#menu_icon_preview img{display:block;height:20px;width:20px}.visuallyhidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.cptui-spacer{display:block;margin-top:25px}.email-octopus-form-wrapper{background:#fff;margin-bottom:10px;padding:20px}.email-octopus-form-wrapper label{margin-bottom:10px}.wdsoctosignup h2{text-align:left}.wdspromos{float:right;margin-left:20px;margin-top:10px;width:275px}:dir(rtl) .wdspromos{float:left;margin-left:0;margin-right:20px}.wdspromos-about{display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-content:stretch;align-content:stretch;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;margin:20px 0}.wdspromos-about a:nth-child(1){-ms-flex-order:0;order:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-align-self:auto;align-self:auto}.wdspromos-about a:nth-child(2){-ms-flex-order:0;order:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-align-self:auto;align-self:auto}.wdspromos-about a:nth-child(3){-ms-flex-order:0;order:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-align-self:auto;align-self:auto}.wdspromos-about p{padding:0 5px}.wdspromos-about p:nth-child(1){padding-left:0}.wdspromos-about p:nth-child(4){padding-right:0}.no-js #cptui_choose_icon{display:none}.cptui-listings th{font-weight:bold}.cptui-listings .post-type-listing th{width:16.66667%}.cptui-listings .taxonomy-listing th{width:20%}#poststuff{min-width:463px}.dashicon-picker-container{position:absolute;width:220px;height:252px;font-size:14px;background-color:#fff;box-shadow:-1px 2px 5px 3px rgba(0,0,0,0.41);overflow:hidden;padding:5px;box-sizing:border-box}.dashicon-picker-container ul{margin:0 0 10px;padding:0}.dashicon-picker-container ul .dashicons{width:20px;height:20px;font-size:20px}.dashicon-picker-container ul li{display:inline-block;margin:5px;float:left}.dashicon-picker-container ul li a{display:block;text-decoration:none;color:#373737;padding:5px 5px;border:1px solid #dfdfdf}.dashicon-picker-container ul li a:hover{border-color:#999;background:#efefef}.dashicon-picker-control{height:32px}.dashicon-picker-control a{padding:5px;text-decoration:none;line-height:32px;width:25px}.dashicon-picker-control a span{display:inline;vertical-align:middle}.dashicon-picker-control input{font-size:12px;width:140px}.cptui-back-to-top{position:fixed;bottom:30px;right:20px;z-index:10;transition:0.25s all ease-in-out;opacity:0;visibility:hidden}.cptui-back-to-top.show{opacity:1;visibility:visible}@media screen and (min-width: 769px){.cptui-badge{margin-top:-42px;height:173px;width:173px;color:#fafafa;font-weight:bold;font-size:14px;text-align:center;margin-bottom:10px;background:url(../images/cptui-icon-173x173.png) no-repeat;background-size:contain}}@media screen and (max-width: 768px){.cptui-table #description{width:100%}.wdspromos-about{flex-wrap:wrap}.wdspromos-about p{margin:5px auto}.wdspromos-about p:nth-child(1){padding-left:5px}.wdspromos-about p:nth-child(4){padding-right:5px}.cptui-table td.outer{width:100%}#cptui_debug_info_email{width:100%}} 2 | -------------------------------------------------------------------------------- /build/cptui.asset.php: -------------------------------------------------------------------------------- 1 | array(), 'version' => '27e37540e2c6cb034823'); 2 | -------------------------------------------------------------------------------- /build/cptui.min.js: -------------------------------------------------------------------------------- 1 | (()=>{"use strict";var a={573:()=>{{let a=document.querySelector("#name"),o=document.querySelector("#auto-populate");var e=document.querySelector("#autolabels");e&&(e.style.display="table-row"),o&&["click","tap"].forEach((e,t)=>{o.addEventListener(e,e=>{e.preventDefault();e=a.value;let o=document.querySelector("#label").value,c=document.querySelector("#singular_label").value;var t=document.querySelectorAll('.cptui-labels input[type="text"]');""!==e&&(""===o&&(o=e),""===c&&(c=e),Array.from(t).forEach(e=>{let t=e.getAttribute("data-label");var a=e.getAttribute("data-plurality");void 0!==t&&(t="plural"===a?t.replace(/item/gi,o):t.replace(/item/gi,c),""===e.value)&&(e.value=t)}))})});let c=document.querySelector("#auto-clear");c&&["click","tap"].forEach((e,t)=>{c.addEventListener(e,e=>{e.preventDefault();e=document.querySelectorAll('.cptui-labels input[type="text"]');Array.from(e).forEach(e=>{e.value=""})})})}},355:()=>{var e,t;e=document.querySelector("#post_type"),t=document.querySelector("#taxonomy"),e&&e.addEventListener("change",()=>{var e=document.querySelector("#cptui_select_post_type");e&&e.submit()}),t&&t.addEventListener("change",()=>{var e=document.querySelector("#cptui_select_taxonomy");e&&e.submit()})},735:()=>{{const e=document.querySelector(".cptui-back-to-top");function a(){300{var e,t;e=a,t=500,clearTimeout(e._tId),e._tId=setTimeout(function(){e()},t)}),e.addEventListener("click",e=>{e.preventDefault(),window.scrollTo({top:0,behavior:"smooth"})}))}},737:()=>{var a;(a=jQuery)(".cptui-delete-top, .cptui-delete-bottom").on("click",function(e){e.preventDefault();let t="";"undefined"!=typeof cptui_type_data?t=cptui_type_data.confirm:"undefined"!=typeof cptui_tax_data&&(t=cptui_tax_data.confirm);a('
'+t+"
").appendTo("#poststuff").dialog({dialogClass:"wp-dialog",modal:!0,autoOpen:!0,buttons:{OK:function(){a(this).dialog("close"),a(e.target).off("click").click()},Cancel:function(){a(this).dialog("close")}}})})},170:()=>{var e;(e=document.querySelector("#cptui_select_post_type_submit"))&&(e.style.display="none"),(e=document.querySelector("#cptui_select_taxonomy_submit"))&&(e.style.display="none")},339:()=>{var e;e=document.querySelectorAll("#support .question"),Array.from(e).forEach(function(t,e){let a=!1,o=function(e,t){e=e.nextElementSibling;return!t||e&&e.matches(t)?e:null}(t,"div");o.style.display="none",["click","keydown"].forEach(e=>{t.addEventListener(e,e=>{"keydown"===e.type&&!["Space","Enter"].includes(e.code)||(e.preventDefault(),a=!a,o.style.display=a?"block":"none",e.currentTarget.classList.toggle("active"),e.currentTarget.setAttribute("aria-expanded",a.toString()),e.currentTarget.focus())})})})},201:()=>{{var e=document.querySelectorAll(".cptui-taxonomy-submit");const a=document.querySelector("#cptui-select-post-type-confirm");Array.from(e).forEach((e,t)=>{e.addEventListener("click",e=>{0===document.querySelectorAll('#cptui_panel_tax_basic_settings input[type="checkbox"]:checked').length&&(e.preventDefault(),a.showModal())})}),(e=document.querySelector("#cptui-select-post-type-confirm-close"))&&e.addEventListener("click",e=>{e.preventDefault(),a.close()})}},306:()=>{var e;(e=document.querySelector("#hierarchical"))&&e.addEventListener("change",e=>{var t=document.querySelector("#page-attributes");e.currentTarget&&"1"===e.currentTarget.value?t.checked=!0:t.checked=!1})},172:()=>{postboxes.add_postbox_toggles(pagenow),["#cptui_panel_pt_basic_settings","#cptui_panel_pt_additional_labels","#cptui_panel_pt_advanced_settings","#cptui_panel_tax_basic_settings","#cptui_panel_tax_additional_labels","#cptui_panel_tax_advanced_settings"].forEach((e,t)=>{e=document.querySelector(e);if(e){const o=e.getAttribute("id");var a=document.querySelector("#"+o),a=(localStorage.getItem(o)&&null!==localStorage.getItem(o)?a.classList.add("closed"):a.classList.remove("closed"),e.querySelectorAll(".postbox-header"));Array.from(a).forEach((e,t)=>{e.addEventListener("click",e=>{localStorage.getItem(o)?localStorage.removeItem(o):localStorage.setItem(o,"1")})})}})}},o={};function c(e){var t=o[e];return void 0!==t||(t=o[e]={exports:{}},a[e](t,t.exports,c)),t.exports}{function t(e){var t,a=/(http|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/.test(e);return e?0===e.indexOf("dashicons-")?((t=document.createElement("div")).classList.add("dashicons-before"),t.innerHTML="
",t.classList.add(String(e).replace(/[^-\w. ]/gi,function(e){return"&#"+e.charCodeAt(0)+";"})),t):a?(t=encodeURI(e),(a=document.createElement("IMG")).src=t,a):void 0:""}const i={"Ё":"YO","Й":"I","Ц":"TS","У":"U","К":"K","Е":"E","Н":"N","Г":"G","Ш":"SH","Щ":"SCH","З":"Z","Х":"H","Ъ":"'","ё":"yo","й":"i","ц":"ts","у":"u","к":"k","е":"e","н":"n","г":"g","ш":"sh","щ":"sch","з":"z","х":"h","ъ":"'","Ф":"F","Ы":"I","В":"V","А":"a","П":"P","Р":"R","О":"O","Л":"L","Д":"D","Ж":"ZH","Э":"E","ф":"f","ы":"i","в":"v","а":"a","п":"p","р":"r","о":"o","л":"l","д":"d","ж":"zh","э":"e","Я":"Ya","Ч":"CH","С":"S","М":"M","И":"I","Т":"T","Ь":"'","Б":"B","Ю":"YU","я":"ya","ч":"ch","с":"s","м":"m","и":"i","т":"t","ь":"'","б":"b","ю":"yu"};c(170),c(306),c(355),c(737),c(339);{var e,r,n=document.querySelector("#name");let c;"edit"===(e="action",r=r||window.location.href,e=e.replace(/[\[\]]/g,"\\$&"),(e=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(r))?e[2]?decodeURIComponent(e[2].replace(/\+/g," ")):"":null)&&n&&(c=n.value),n&&n.addEventListener("keyup",e=>{let t,a;t=a=e.currentTarget.value;["Tab","ArrowLeft","ArrowUp","ArrowRight","ArrowDown"].includes(e.code)||(t=(t=function(t){var a=[/[\300-\306]/g,/[\340-\346]/g,/[\310-\313]/g,/[\350-\353]/g,/[\314-\317]/g,/[\354-\357]/g,/[\322-\330]/g,/[\362-\370]/g,/[\331-\334]/g,/[\371-\374]/g,/[\321]/g,/[\361]/g,/[\307]/g,/[\347]/g],o=["A","a","E","e","I","i","O","o","U","u","N","n","C","c"];for(let e=0;e array(), 'version' => 'd1ec7d83b0e2b6beb30b'); 2 | -------------------------------------------------------------------------------- /build/dashiconsPicker.js: -------------------------------------------------------------------------------- 1 | /******/ (() => { // webpackBootstrap 2 | var __webpack_exports__ = {}; 3 | /** 4 | * Dashicons Picker 5 | * 6 | * Based on: https://github.com/bradvin/dashicons-picker/ 7 | */ 8 | 9 | (function ($) { 10 | 'use strict'; 11 | 12 | /** 13 | * 14 | * @returns {void} 15 | */ 16 | $.fn.dashiconsPicker = function () { 17 | /** 18 | * Dashicons, in CSS order 19 | * 20 | * @type Array 21 | */ 22 | var icons = ['menu', 'admin-site', 'dashboard', 'admin-media', 'admin-page', 'admin-comments', 'admin-appearance', 'admin-plugins', 'admin-users', 'admin-tools', 'admin-settings', 'admin-network', 'admin-generic', 'admin-home', 'admin-collapse', 'filter', 'admin-customizer', 'admin-multisite', 'admin-links', 'format-links', 'admin-post', 'format-standard', 'format-image', 'format-gallery', 'format-audio', 'format-video', 'format-chat', 'format-status', 'format-aside', 'format-quote', 'welcome-write-blog', 'welcome-edit-page', 'welcome-add-page', 'welcome-view-site', 'welcome-widgets-menus', 'welcome-comments', 'welcome-learn-more', 'image-crop', 'image-rotate', 'image-rotate-left', 'image-rotate-right', 'image-flip-vertical', 'image-flip-horizontal', 'image-filter', 'undo', 'redo', 'editor-bold', 'editor-italic', 'editor-ul', 'editor-ol', 'editor-quote', 'editor-alignleft', 'editor-aligncenter', 'editor-alignright', 'editor-insertmore', 'editor-spellcheck', 'editor-distractionfree', 'editor-expand', 'editor-contract', 'editor-kitchensink', 'editor-underline', 'editor-justify', 'editor-textcolor', 'editor-paste-word', 'editor-paste-text', 'editor-removeformatting', 'editor-video', 'editor-customchar', 'editor-outdent', 'editor-indent', 'editor-help', 'editor-strikethrough', 'editor-unlink', 'editor-rtl', 'editor-break', 'editor-code', 'editor-paragraph', 'editor-table', 'align-left', 'align-right', 'align-center', 'align-none', 'lock', 'unlock', 'calendar', 'calendar-alt', 'visibility', 'hidden', 'post-status', 'edit', 'post-trash', 'trash', 'sticky', 'external', 'arrow-up', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-up-alt', 'arrow-down-alt', 'arrow-left-alt', 'arrow-right-alt', 'arrow-up-alt2', 'arrow-down-alt2', 'arrow-left-alt2', 'arrow-right-alt2', 'leftright', 'sort', 'randomize', 'list-view', 'excerpt-view', 'grid-view', 'hammer', 'art', 'migrate', 'performance', 'universal-access', 'universal-access-alt', 'tickets', 'nametag', 'clipboard', 'heart', 'megaphone', 'schedule', 'wordpress', 'wordpress-alt', 'pressthis', 'update', 'screenoptions', 'cart', 'feedback', 'cloud', 'translation', 'tag', 'category', 'archive', 'tagcloud', 'text', 'media-archive', 'media-audio', 'media-code', 'media-default', 'media-document', 'media-interactive', 'media-spreadsheet', 'media-text', 'media-video', 'playlist-audio', 'playlist-video', 'controls-play', 'controls-pause', 'controls-forward', 'controls-skipforward', 'controls-back', 'controls-skipback', 'controls-repeat', 'controls-volumeon', 'controls-volumeoff', 'yes', 'no', 'no-alt', 'plus', 'plus-alt', 'plus-alt2', 'minus', 'dismiss', 'marker', 'star-filled', 'star-half', 'star-empty', 'flag', 'info', 'warning', 'share', 'share1', 'share-alt', 'share-alt2', 'twitter', 'rss', 'email', 'email-alt', 'facebook', 'facebook-alt', 'networking', 'googleplus', 'location', 'location-alt', 'camera', 'images-alt', 'images-alt2', 'video-alt', 'video-alt2', 'video-alt3', 'vault', 'shield', 'shield-alt', 'sos', 'search', 'slides', 'analytics', 'chart-pie', 'chart-bar', 'chart-line', 'chart-area', 'groups', 'businessman', 'id', 'id-alt', 'products', 'awards', 'forms', 'testimonial', 'portfolio', 'book', 'book-alt', 'download', 'upload', 'backup', 'clock', 'lightbulb', 'microphone', 'desktop', 'tablet', 'smartphone', 'phone', 'smiley', 'index-card', 'carrot', 'building', 'store', 'album', 'palmtree', 'tickets-alt', 'money', 'thumbs-up', 'thumbs-down', 'layout', 'align-pull-left', 'align-pull-right', 'block-default', 'cloud-saved', 'cloud-upload', 'columns', 'cover-image', 'embed-audio', 'embed-generic', 'embed-photo', 'embed-post', 'embed-video', 'exit', 'html', 'info-outline', 'insert-after', 'insert-before', 'insert', 'remove', 'shortcode', 'table-col-after', 'table-col-before', 'table-col-delete', 'table-row-after', 'table-row-before', 'table-row-delete', 'saved', 'amazon', 'google', 'linkedin', 'pinterest', 'podio', 'reddit', 'spotify', 'twitch', 'whatsapp', 'xing', 'youtube', 'database-add', 'database-export', 'database-import', 'database-remove', 'database-view', 'database', 'bell', 'airplane', 'car', 'calculator', 'ames', 'printer', 'beer', 'coffee', 'drumstick', 'food', 'bank', 'hourglass', 'money-alt', 'open-folder', 'pdf', 'pets', 'privacy', 'superhero', 'superhero-alt', 'edit-page', 'fullscreen-alt', 'fullscreen-exit-alt']; 23 | return this.each(function () { 24 | var button = $(this), 25 | offsetTop, 26 | offsetLeft; 27 | button.on('click.dashiconsPicker', function (e) { 28 | offsetTop = $(e.currentTarget).offset().top; 29 | offsetLeft = $(e.currentTarget).offset().left; 30 | createPopup(button); 31 | }); 32 | function createPopup(button) { 33 | var target = $('#menu_icon'), 34 | preview = $(button.data('preview')), 35 | popup = $('
' + '
' + '
    ' + '
    ').css({ 36 | 'top': offsetTop, 37 | 'left': offsetLeft 38 | }), 39 | list = popup.find('.dashicon-picker-list'); 40 | for (var i in icons) { 41 | if (icons.hasOwnProperty(i)) { 42 | list.append('
  • '); 43 | } 44 | } 45 | $('a', list).on('click', function (e) { 46 | e.preventDefault(); 47 | var title = $(this).attr('title'); 48 | target.val('dashicons-' + title).change(); 49 | preview.prop('class', 'dashicons').addClass('dashicons-' + title); 50 | removePopup(); 51 | }); 52 | var control = popup.find('.dashicon-picker-control'); 53 | control.html('' + '' + '' + ''); 54 | $('a', control).on('click', function (e) { 55 | e.preventDefault(); 56 | if ($(this).data('direction') === 'back') { 57 | $('li:gt(' + (icons.length - 26) + ')', list).prependTo(list); 58 | } else { 59 | $('li:lt(25)', list).appendTo(list); 60 | } 61 | }); 62 | popup.appendTo('body').show(); 63 | $('input', control).on('keyup', function (e) { 64 | var search = $(this).val(); 65 | if (search === '') { 66 | $('li:lt(25)', list).show(); 67 | } else { 68 | $('li', list).each(function () { 69 | if ($(this).data('icon').toLowerCase().indexOf(search.toLowerCase()) !== -1) { 70 | $(this).show(); 71 | } else { 72 | $(this).hide(); 73 | } 74 | }); 75 | } 76 | }); 77 | $(document).on('mouseup.dashicons-picker', function (e) { 78 | if (!popup.is(e.target) && popup.has(e.target).length === 0) { 79 | removePopup(); 80 | } 81 | }); 82 | } 83 | function removePopup() { 84 | $('.dashicon-picker-container').remove(); 85 | $(document).off('.dashicons-picker'); 86 | } 87 | }); 88 | }; 89 | $(function () { 90 | $('.dashicons-picker').dashiconsPicker(); 91 | }); 92 | })(jQuery); 93 | /******/ })() 94 | ; 95 | //# sourceMappingURL=dashiconsPicker.js.map -------------------------------------------------------------------------------- /build/dashiconsPicker.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"dashiconsPicker.js","mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAEG,WAAWA,CAAC,EAAG;EACjB,YAAY;;EACZ;AACD;AACA;AACA;EACCA,CAAC,CAACC,EAAE,CAACC,eAAe,GAAG,YAAY;IAElC;AACF;AACA;AACA;AACA;IACE,IAAIC,KAAK,GAAG,CACX,MAAM,EACN,YAAY,EACZ,WAAW,EACX,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,EACd,MAAM,EACN,MAAM,EACN,aAAa,EACb,eAAe,EACf,WAAW,EACX,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,cAAc,EACd,mBAAmB,EACnB,gBAAgB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AC,CAAE2C,QAAS,CAAC,CAACI,GAAG,CAAE,mBAAoB,CAAC;MACzC;IACD,CAAE,CAAC;EACJ,CAAC;EAED/C,CAAC,CAAE,YAAY;IACdA,CAAC,CAAE,mBAAoB,CAAC,CAACE,eAAe,CAAC,CAAC;EAC3C,CAAE,CAAC;AAEJ,CAAC,EAAE8C,MAAO,CAAC,C","sources":["webpack://custom-post-type-ui/./src/js/dashiconsPicker.js"],"sourcesContent":["/**\n * Dashicons Picker\n *\n * Based on: https://github.com/bradvin/dashicons-picker/\n */\n\n ( function ( $ ) {\n\t'use strict';\n\t/**\n\t *\n\t * @returns {void}\n\t */\n\t$.fn.dashiconsPicker = function () {\n\n\t\t/**\n\t\t * Dashicons, in CSS order\n\t\t *\n\t\t * @type Array\n\t\t */\n\t\tvar icons = [\n\t\t\t'menu',\n\t\t\t'admin-site',\n\t\t\t'dashboard',\n\t\t\t'admin-media',\n\t\t\t'admin-page',\n\t\t\t'admin-comments',\n\t\t\t'admin-appearance',\n\t\t\t'admin-plugins',\n\t\t\t'admin-users',\n\t\t\t'admin-tools',\n\t\t\t'admin-settings',\n\t\t\t'admin-network',\n\t\t\t'admin-generic',\n\t\t\t'admin-home',\n\t\t\t'admin-collapse',\n\t\t\t'filter',\n\t\t\t'admin-customizer',\n\t\t\t'admin-multisite',\n\t\t\t'admin-links',\n\t\t\t'format-links',\n\t\t\t'admin-post',\n\t\t\t'format-standard',\n\t\t\t'format-image',\n\t\t\t'format-gallery',\n\t\t\t'format-audio',\n\t\t\t'format-video',\n\t\t\t'format-chat',\n\t\t\t'format-status',\n\t\t\t'format-aside',\n\t\t\t'format-quote',\n\t\t\t'welcome-write-blog',\n\t\t\t'welcome-edit-page',\n\t\t\t'welcome-add-page',\n\t\t\t'welcome-view-site',\n\t\t\t'welcome-widgets-menus',\n\t\t\t'welcome-comments',\n\t\t\t'welcome-learn-more',\n\t\t\t'image-crop',\n\t\t\t'image-rotate',\n\t\t\t'image-rotate-left',\n\t\t\t'image-rotate-right',\n\t\t\t'image-flip-vertical',\n\t\t\t'image-flip-horizontal',\n\t\t\t'image-filter',\n\t\t\t'undo',\n\t\t\t'redo',\n\t\t\t'editor-bold',\n\t\t\t'editor-italic',\n\t\t\t'editor-ul',\n\t\t\t'editor-ol',\n\t\t\t'editor-quote',\n\t\t\t'editor-alignleft',\n\t\t\t'editor-aligncenter',\n\t\t\t'editor-alignright',\n\t\t\t'editor-insertmore',\n\t\t\t'editor-spellcheck',\n\t\t\t'editor-distractionfree',\n\t\t\t'editor-expand',\n\t\t\t'editor-contract',\n\t\t\t'editor-kitchensink',\n\t\t\t'editor-underline',\n\t\t\t'editor-justify',\n\t\t\t'editor-textcolor',\n\t\t\t'editor-paste-word',\n\t\t\t'editor-paste-text',\n\t\t\t'editor-removeformatting',\n\t\t\t'editor-video',\n\t\t\t'editor-customchar',\n\t\t\t'editor-outdent',\n\t\t\t'editor-indent',\n\t\t\t'editor-help',\n\t\t\t'editor-strikethrough',\n\t\t\t'editor-unlink',\n\t\t\t'editor-rtl',\n\t\t\t'editor-break',\n\t\t\t'editor-code',\n\t\t\t'editor-paragraph',\n\t\t\t'editor-table',\n\t\t\t'align-left',\n\t\t\t'align-right',\n\t\t\t'align-center',\n\t\t\t'align-none',\n\t\t\t'lock',\n\t\t\t'unlock',\n\t\t\t'calendar',\n\t\t\t'calendar-alt',\n\t\t\t'visibility',\n\t\t\t'hidden',\n\t\t\t'post-status',\n\t\t\t'edit',\n\t\t\t'post-trash',\n\t\t\t'trash',\n\t\t\t'sticky',\n\t\t\t'external',\n\t\t\t'arrow-up',\n\t\t\t'arrow-down',\n\t\t\t'arrow-left',\n\t\t\t'arrow-right',\n\t\t\t'arrow-up-alt',\n\t\t\t'arrow-down-alt',\n\t\t\t'arrow-left-alt',\n\t\t\t'arrow-right-alt',\n\t\t\t'arrow-up-alt2',\n\t\t\t'arrow-down-alt2',\n\t\t\t'arrow-left-alt2',\n\t\t\t'arrow-right-alt2',\n\t\t\t'leftright',\n\t\t\t'sort',\n\t\t\t'randomize',\n\t\t\t'list-view',\n\t\t\t'excerpt-view',\n\t\t\t'grid-view',\n\t\t\t'hammer',\n\t\t\t'art',\n\t\t\t'migrate',\n\t\t\t'performance',\n\t\t\t'universal-access',\n\t\t\t'universal-access-alt',\n\t\t\t'tickets',\n\t\t\t'nametag',\n\t\t\t'clipboard',\n\t\t\t'heart',\n\t\t\t'megaphone',\n\t\t\t'schedule',\n\t\t\t'wordpress',\n\t\t\t'wordpress-alt',\n\t\t\t'pressthis',\n\t\t\t'update',\n\t\t\t'screenoptions',\n\t\t\t'cart',\n\t\t\t'feedback',\n\t\t\t'cloud',\n\t\t\t'translation',\n\t\t\t'tag',\n\t\t\t'category',\n\t\t\t'archive',\n\t\t\t'tagcloud',\n\t\t\t'text',\n\t\t\t'media-archive',\n\t\t\t'media-audio',\n\t\t\t'media-code',\n\t\t\t'media-default',\n\t\t\t'media-document',\n\t\t\t'media-interactive',\n\t\t\t'media-spreadsheet',\n\t\t\t'media-text',\n\t\t\t'media-video',\n\t\t\t'playlist-audio',\n\t\t\t'playlist-video',\n\t\t\t'controls-play',\n\t\t\t'controls-pause',\n\t\t\t'controls-forward',\n\t\t\t'controls-skipforward',\n\t\t\t'controls-back',\n\t\t\t'controls-skipback',\n\t\t\t'controls-repeat',\n\t\t\t'controls-volumeon',\n\t\t\t'controls-volumeoff',\n\t\t\t'yes',\n\t\t\t'no',\n\t\t\t'no-alt',\n\t\t\t'plus',\n\t\t\t'plus-alt',\n\t\t\t'plus-alt2',\n\t\t\t'minus',\n\t\t\t'dismiss',\n\t\t\t'marker',\n\t\t\t'star-filled',\n\t\t\t'star-half',\n\t\t\t'star-empty',\n\t\t\t'flag',\n\t\t\t'info',\n\t\t\t'warning',\n\t\t\t'share',\n\t\t\t'share1',\n\t\t\t'share-alt',\n\t\t\t'share-alt2',\n\t\t\t'twitter',\n\t\t\t'rss',\n\t\t\t'email',\n\t\t\t'email-alt',\n\t\t\t'facebook',\n\t\t\t'facebook-alt',\n\t\t\t'networking',\n\t\t\t'googleplus',\n\t\t\t'location',\n\t\t\t'location-alt',\n\t\t\t'camera',\n\t\t\t'images-alt',\n\t\t\t'images-alt2',\n\t\t\t'video-alt',\n\t\t\t'video-alt2',\n\t\t\t'video-alt3',\n\t\t\t'vault',\n\t\t\t'shield',\n\t\t\t'shield-alt',\n\t\t\t'sos',\n\t\t\t'search',\n\t\t\t'slides',\n\t\t\t'analytics',\n\t\t\t'chart-pie',\n\t\t\t'chart-bar',\n\t\t\t'chart-line',\n\t\t\t'chart-area',\n\t\t\t'groups',\n\t\t\t'businessman',\n\t\t\t'id',\n\t\t\t'id-alt',\n\t\t\t'products',\n\t\t\t'awards',\n\t\t\t'forms',\n\t\t\t'testimonial',\n\t\t\t'portfolio',\n\t\t\t'book',\n\t\t\t'book-alt',\n\t\t\t'download',\n\t\t\t'upload',\n\t\t\t'backup',\n\t\t\t'clock',\n\t\t\t'lightbulb',\n\t\t\t'microphone',\n\t\t\t'desktop',\n\t\t\t'tablet',\n\t\t\t'smartphone',\n\t\t\t'phone',\n\t\t\t'smiley',\n\t\t\t'index-card',\n\t\t\t'carrot',\n\t\t\t'building',\n\t\t\t'store',\n\t\t\t'album',\n\t\t\t'palmtree',\n\t\t\t'tickets-alt',\n\t\t\t'money',\n\t\t\t'thumbs-up',\n\t\t\t'thumbs-down',\n\t\t\t'layout',\n\t\t\t'align-pull-left',\n\t\t\t'align-pull-right',\n\t\t\t'block-default',\n\t\t\t'cloud-saved',\n\t\t\t'cloud-upload',\n\t\t\t'columns',\n\t\t\t'cover-image',\n\t\t\t'embed-audio',\n\t\t\t'embed-generic',\n\t\t\t'embed-photo',\n\t\t\t'embed-post',\n\t\t\t'embed-video',\n\t\t\t'exit',\n\t\t\t'html',\n\t\t\t'info-outline',\n\t\t\t'insert-after',\n\t\t\t'insert-before',\n\t\t\t'insert',\n\t\t\t'remove',\n\t\t\t'shortcode',\n\t\t\t'table-col-after',\n\t\t\t'table-col-before',\n\t\t\t'table-col-delete',\n\t\t\t'table-row-after',\n\t\t\t'table-row-before',\n\t\t\t'table-row-delete',\n\t\t\t'saved',\n\t\t\t'amazon',\n\t\t\t'google',\n\t\t\t'linkedin',\n\t\t\t'pinterest',\n\t\t\t'podio',\n\t\t\t'reddit',\n\t\t\t'spotify',\n\t\t\t'twitch',\n\t\t\t'whatsapp',\n\t\t\t'xing',\n\t\t\t'youtube',\n\t\t\t'database-add',\n\t\t\t'database-export',\n\t\t\t'database-import',\n\t\t\t'database-remove',\n\t\t\t'database-view',\n\t\t\t'database',\n\t\t\t'bell',\n\t\t\t'airplane',\n\t\t\t'car',\n\t\t\t'calculator',\n\t\t\t'ames',\n\t\t\t'printer',\n\t\t\t'beer',\n\t\t\t'coffee',\n\t\t\t'drumstick',\n\t\t\t'food',\n\t\t\t'bank',\n\t\t\t'hourglass',\n\t\t\t'money-alt',\n\t\t\t'open-folder',\n\t\t\t'pdf',\n\t\t\t'pets',\n\t\t\t'privacy',\n\t\t\t'superhero',\n\t\t\t'superhero-alt',\n\t\t\t'edit-page',\n\t\t\t'fullscreen-alt',\n\t\t\t'fullscreen-exit-alt'\n\t\t];\n\n\t\treturn this.each( function () {\n\n\t\t\tvar button = $( this ),\n\t\t\t\toffsetTop,\n\t\t\t\toffsetLeft;\n\n\t\t\tbutton.on( 'click.dashiconsPicker', function ( e ) {\n\t\t\t\toffsetTop = $( e.currentTarget ).offset().top;\n\t\t\t\toffsetLeft = $( e.currentTarget ).offset().left;\n\t\t\t\tcreatePopup( button );\n\t\t\t} );\n\n\t\t\tfunction createPopup( button ) {\n\n\t\t\t\tvar target = $( '#menu_icon' ),\n\t\t\t\t\tpreview = $( button.data( 'preview' ) ),\n\t\t\t\t\tpopup = $( '
    ' +\n\t\t\t\t\t\t'
    ' +\n\t\t\t\t\t\t'
      ' +\n\t\t\t\t\t'
      ' ).css( {\n\t\t\t\t\t\t'top': offsetTop,\n\t\t\t\t\t\t'left': offsetLeft\n\t\t\t\t\t} ),\n\t\t\t\t\tlist = popup.find( '.dashicon-picker-list' );\n\n\t\t\t\tfor ( var i in icons ) {\n\t\t\t\t\tif ( icons.hasOwnProperty(i) ) {\n\t\t\t\t\t\tlist.append('
    • ');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$( 'a', list ).on( 'click', function ( e ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tvar title = $( this ).attr( 'title' );\n\t\t\t\t\ttarget.val( 'dashicons-' + title ).change();\n\t\t\t\t\tpreview\n\t\t\t\t\t\t.prop('class', 'dashicons')\n\t\t\t\t\t\t.addClass( 'dashicons-' + title );\n\t\t\t\t\tremovePopup();\n\t\t\t\t} );\n\n\t\t\t\tvar control = popup.find( '.dashicon-picker-control' );\n\n\t\t\t\tcontrol.html( '' +\n\t\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t\t''\n\t\t\t\t);\n\n\t\t\t\t$( 'a', control ).on( 'click', function ( e ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tif ( $( this ).data( 'direction' ) === 'back' ) {\n\t\t\t\t\t\t$( 'li:gt(' + ( icons.length - 26 ) + ')', list ).prependTo( list );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$( 'li:lt(25)', list ).appendTo( list );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tpopup.appendTo( 'body' ).show();\n\n\t\t\t\t$( 'input', control ).on( 'keyup', function ( e ) {\n\t\t\t\t\tvar search = $( this ).val();\n\t\t\t\t\tif ( search === '' ) {\n\t\t\t\t\t\t$( 'li:lt(25)', list ).show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$( 'li', list ).each( function () {\n\t\t\t\t\t\t\tif ( $( this ).data( 'icon' ).toLowerCase().indexOf( search.toLowerCase() ) !== -1 ) {\n\t\t\t\t\t\t\t\t$( this ).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$( this ).hide();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\t$( document ).on( 'mouseup.dashicons-picker', function ( e ) {\n\t\t\t\t\tif ( ! popup.is( e.target ) && popup.has( e.target ).length === 0 ) {\n\t\t\t\t\t\tremovePopup();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tfunction removePopup() {\n\t\t\t\t$( '.dashicon-picker-container' ).remove();\n\t\t\t\t$( document ).off( '.dashicons-picker' );\n\t\t\t}\n\t\t} );\n\t};\n\n\t$( function () {\n\t\t$( '.dashicons-picker' ).dashiconsPicker();\n\t} );\n\n}( jQuery ) );\n"],"names":["$","fn","dashiconsPicker","icons","each","button","offsetTop","offsetLeft","on","e","currentTarget","offset","top","left","createPopup","target","preview","data","popup","css","list","find","i","hasOwnProperty","append","preventDefault","title","attr","val","change","prop","addClass","removePopup","control","html","length","prependTo","appendTo","show","search","toLowerCase","indexOf","hide","document","is","has","remove","off","jQuery"],"sourceRoot":""} -------------------------------------------------------------------------------- /build/dashiconsPicker.min.js: -------------------------------------------------------------------------------- 1 | !function(m){"use strict";m.fn.dashiconsPicker=function(){var c=["menu","admin-site","dashboard","admin-media","admin-page","admin-comments","admin-appearance","admin-plugins","admin-users","admin-tools","admin-settings","admin-network","admin-generic","admin-home","admin-collapse","filter","admin-customizer","admin-multisite","admin-links","format-links","admin-post","format-standard","format-image","format-gallery","format-audio","format-video","format-chat","format-status","format-aside","format-quote","welcome-write-blog","welcome-edit-page","welcome-add-page","welcome-view-site","welcome-widgets-menus","welcome-comments","welcome-learn-more","image-crop","image-rotate","image-rotate-left","image-rotate-right","image-flip-vertical","image-flip-horizontal","image-filter","undo","redo","editor-bold","editor-italic","editor-ul","editor-ol","editor-quote","editor-alignleft","editor-aligncenter","editor-alignright","editor-insertmore","editor-spellcheck","editor-distractionfree","editor-expand","editor-contract","editor-kitchensink","editor-underline","editor-justify","editor-textcolor","editor-paste-word","editor-paste-text","editor-removeformatting","editor-video","editor-customchar","editor-outdent","editor-indent","editor-help","editor-strikethrough","editor-unlink","editor-rtl","editor-break","editor-code","editor-paragraph","editor-table","align-left","align-right","align-center","align-none","lock","unlock","calendar","calendar-alt","visibility","hidden","post-status","edit","post-trash","trash","sticky","external","arrow-up","arrow-down","arrow-left","arrow-right","arrow-up-alt","arrow-down-alt","arrow-left-alt","arrow-right-alt","arrow-up-alt2","arrow-down-alt2","arrow-left-alt2","arrow-right-alt2","leftright","sort","randomize","list-view","excerpt-view","grid-view","hammer","art","migrate","performance","universal-access","universal-access-alt","tickets","nametag","clipboard","heart","megaphone","schedule","wordpress","wordpress-alt","pressthis","update","screenoptions","cart","feedback","cloud","translation","tag","category","archive","tagcloud","text","media-archive","media-audio","media-code","media-default","media-document","media-interactive","media-spreadsheet","media-text","media-video","playlist-audio","playlist-video","controls-play","controls-pause","controls-forward","controls-skipforward","controls-back","controls-skipback","controls-repeat","controls-volumeon","controls-volumeoff","yes","no","no-alt","plus","plus-alt","plus-alt2","minus","dismiss","marker","star-filled","star-half","star-empty","flag","info","warning","share","share1","share-alt","share-alt2","twitter","rss","email","email-alt","facebook","facebook-alt","networking","googleplus","location","location-alt","camera","images-alt","images-alt2","video-alt","video-alt2","video-alt3","vault","shield","shield-alt","sos","search","slides","analytics","chart-pie","chart-bar","chart-line","chart-area","groups","businessman","id","id-alt","products","awards","forms","testimonial","portfolio","book","book-alt","download","upload","backup","clock","lightbulb","microphone","desktop","tablet","smartphone","phone","smiley","index-card","carrot","building","store","album","palmtree","tickets-alt","money","thumbs-up","thumbs-down","layout","align-pull-left","align-pull-right","block-default","cloud-saved","cloud-upload","columns","cover-image","embed-audio","embed-generic","embed-photo","embed-post","embed-video","exit","html","info-outline","insert-after","insert-before","insert","remove","shortcode","table-col-after","table-col-before","table-col-delete","table-row-after","table-row-before","table-row-delete","saved","amazon","google","linkedin","pinterest","podio","reddit","spotify","twitch","whatsapp","xing","youtube","database-add","database-export","database-import","database-remove","database-view","database","bell","airplane","car","calculator","ames","printer","beer","coffee","drumstick","food","bank","hourglass","money-alt","open-folder","pdf","pets","privacy","superhero","superhero-alt","edit-page","fullscreen-alt","fullscreen-exit-alt"];return this.each(function(){var s,l,n=m(this);function d(){m(".dashicon-picker-container").remove(),m(document).off(".dashicons-picker")}n.on("click.dashiconsPicker",function(e){s=m(e.currentTarget).offset().top,l=m(e.currentTarget).offset().left;var a,e=n,t=m("#menu_icon"),o=m(e.data("preview")),i=m('
        ').css({top:s,left:l}),r=i.find(".dashicon-picker-list");for(a in c)c.hasOwnProperty(a)&&r.append('
      • ');m("a",r).on("click",function(e){e.preventDefault();e=m(this).attr("title");t.val("dashicons-"+e).change(),o.prop("class","dashicons").addClass("dashicons-"+e),d()}),(e=i.find(".dashicon-picker-control")).html(''),m("a",e).on("click",function(e){e.preventDefault(),"back"===m(this).data("direction")?m("li:gt("+(c.length-26)+")",r).prependTo(r):m("li:lt(25)",r).appendTo(r)}),i.appendTo("body").show(),m("input",e).on("keyup",function(e){var a=m(this).val();""===a?m("li:lt(25)",r).show():m("li",r).each(function(){-1!==m(this).data("icon").toLowerCase().indexOf(a.toLowerCase())?m(this).show():m(this).hide()})}),m(document).on("mouseup.dashicons-picker",function(e){i.is(e.target)||0!==i.has(e.target).length||d()})})})},m(function(){m(".dashicons-picker").dashiconsPicker()})}(jQuery); -------------------------------------------------------------------------------- /build/dashiconsPicker.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["build/dashiconsPicker.js"],"names":["$","fn","dashiconsPicker","icons","this","each","offsetTop","offsetLeft","button","removePopup","remove","document","off","on","e","currentTarget","offset","top","left","createPopup","i","target","preview","data","popup","css","list","find","hasOwnProperty","append","preventDefault","title","attr","val","change","prop","addClass","control","html","length","prependTo","appendTo","show","search","toLowerCase","indexOf","hide","is","has","jQuery"],"mappings":"AAQA,CAAA,SAAWA,GACT,aAMAA,EAAEC,GAAGC,gBAAkB,WAMrB,IAAIC,EAAQ,CAAC,OAAQ,aAAc,YAAa,cAAe,aAAc,iBAAkB,mBA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sC,KAAK,EAEb1C,EAAEI,IAAI,EAAE0C,KAAK,CAEjB,CAAC,CAEL,CAAC,EACD9C,EAAEW,QAAQ,EAAEE,GAAG,2BAA4B,SAAUC,GAC9CU,EAAMuB,GAAGjC,EAAEO,MAAM,GAAoC,IAA/BG,EAAMwB,IAAIlC,EAAEO,MAAM,EAAEkB,QAC7C9B,EAAY,CAEhB,CAAC,CAlDH,CAAC,CAwDH,CAAC,CACH,EACAT,EAAE,WACAA,EAAE,mBAAmB,EAAEE,gBAAgB,CACzC,CAAC,CACF,EAAE+C,MAAM"} -------------------------------------------------------------------------------- /classes/class.cptui_debug_info.php: -------------------------------------------------------------------------------- 1 | 24 |

        25 | 29 | Name . ' ' . $theme_data->Version; // phpcs:ignore. 48 | 49 | ob_start(); 50 | ?> 51 | 52 | ### Begin Custom Post Type UI Debug Info ### 53 | 54 | Multisite: 55 | 56 | SITE_URL: 57 | HOME_URL: 58 | 59 | WordPress Version: 60 | Permalink Structure: 61 | Active Theme: 62 | 63 | Registered Post Types: 64 | 65 | PHP Version: 66 | MySQL Version: db_version() . "\n"; // phpcs:ignore. ?> 67 | Web Server Info: 68 | 69 | Show On Front: 70 | Page On Front: 72 | Page For Posts: 74 | 75 | WordPress Memory Limit: num_convt( WP_MEMORY_LIMIT ) / ( 1024 ) ) . 'MB'; ?> 76 | 77 | $mu_plugin ) { 88 | 89 | echo "\t\t" . esc_html( $mu_plugin['Name'] ) . ': ' . esc_html( $mu_plugin['Version'] ) . "\n"; 90 | } 91 | endif; 92 | // Standard plugins - active. 93 | echo "\n"; 94 | 95 | $active = get_option( 'active_plugins', [] ); 96 | $ac_count = count( $active ); 97 | $ic_count = $pg_count - $ac_count; 98 | 99 | echo "\t\t" . 'ACTIVE PLUGINS: (' . $ac_count . ')' . "\n\n"; // phpcs:ignore. 100 | 101 | foreach ( $plugins as $plugin_path => $plugin ) { 102 | // If the plugin isn't active, don't show it. 103 | if ( ! in_array( $plugin_path, $active, true ) ) { 104 | continue; 105 | } 106 | 107 | echo "\t\t" . esc_html( $plugin['Name'] ) . ': ' . esc_html( $plugin['Version'] ) . "\n"; 108 | } 109 | // Standard plugins - inactive. 110 | echo "\n"; 111 | echo "\t\t" , 'INACTIVE PLUGINS: (' . $ic_count . ')' . "\n\n"; // phpcs:ignore. 112 | 113 | foreach ( $plugins as $plugin_path => $plugin ) { 114 | // If the plugin isn't active, show it here. 115 | if ( in_array( $plugin_path, $active, true ) ) { 116 | continue; 117 | } 118 | 119 | echo "\t\t" . esc_html( $plugin['Name'] ) . ': ' . esc_html( $plugin['Version'] ) . "\n"; 120 | } 121 | 122 | // If multisite, grab network as well. 123 | if ( is_multisite() ) : 124 | 125 | $net_plugins = wp_get_active_network_plugins(); 126 | $net_active = get_site_option( 'active_sitewide_plugins', [] ); 127 | 128 | echo "\n"; 129 | echo 'NETWORK ACTIVE PLUGINS: (' . count( $net_plugins ) . ')' . "\n\n"; 130 | 131 | foreach ( $net_plugins as $plugin_path ) { 132 | $plugin_base = plugin_basename( $plugin_path ); 133 | 134 | // If the plugin isn't active, don't show it. 135 | if ( ! array_key_exists( $plugin_base, $net_active ) ) { 136 | continue; 137 | } 138 | 139 | $plugin = get_plugin_data( $plugin_path ); 140 | 141 | echo esc_html( $plugin['Name'] ) . ' :' . esc_html( $plugin['Version'] ) . "\n"; 142 | } 143 | 144 | endif; 145 | 146 | echo "\n"; 147 | $cptui_post_types = cptui_get_post_type_data(); 148 | echo "\t\t" . 'Post Types: ' . "\n"; 149 | echo "\t\t" . wp_json_encode( $cptui_post_types ) . "\n"; 150 | 151 | echo "\n\n"; 152 | 153 | $cptui_taxonomies = cptui_get_taxonomy_data(); 154 | echo "\t\t" . 'Taxonomies: ' . "\n"; 155 | echo "\t\t" . wp_json_encode( $cptui_taxonomies ) . "\n"; 156 | echo "\n"; 157 | 158 | if ( has_action( 'cptui_custom_debug_info' ) ) { 159 | echo "\t\t" . 'EXTRA DEBUG INFO'; 160 | } 161 | 162 | /** 163 | * Fires at the end of the debug info output. 164 | * 165 | * @since 1.3.0 166 | */ 167 | do_action( 'cptui_custom_debug_info' ); 168 | 169 | echo "\n"; 170 | ?> 171 | ### End Debug Info ### 172 | system_status(); 224 | 225 | /** 226 | * Filters the debug email subject. 227 | * 228 | * @since 1.3.0 229 | * 230 | * @param string $value Intended email subject. 231 | */ 232 | $subject = apply_filters( 233 | 'cptui_debug_email_subject', 234 | sprintf( 235 | // translators: Placeholder will hold site home_url. 236 | esc_html__( 'Custom Post Type UI debug information for %s', 'custom-post-type-ui' ), 237 | esc_url( home_url( '/' ) ) 238 | ) 239 | ); 240 | 241 | $result = wp_mail( $args['email'], $subject, $message ); 242 | 243 | /** 244 | * Fires after the debug email has been sent. 245 | * 246 | * @since 1.3.0 247 | */ 248 | do_action( 'cptui_after_debug_email_sent' ); 249 | 250 | return $result; 251 | } 252 | } 253 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webdevstudios/custom-post-type-ui", 3 | "description": "Custom Post Type UI Plugin for Wordpress found at https://wordpress.org/plugins/custom-post-type-ui/ ", 4 | "homepage": "https://github.com/WebDevStudios/custom-post-type-ui", 5 | "type": "wordpress-plugin", 6 | "keywords": ["custom post types", "taxonomies", "CPT", "CMS", "post type", "custom-post-type", "taxonomy", "tax"], 7 | "license": "GPL-2.0+", 8 | "authors": [ 9 | { 10 | "name": "WebDevStudios", 11 | "email": "contact@webdevstudios.com", 12 | "homepage": "https://github.com/WebDevStudios/custom-post-type-ui" 13 | } 14 | ], 15 | "support": { 16 | "issues": "https://github.com/WebDevStudios/custom-post-type-ui", 17 | "forum": "https://wordpress.org/support/plugin/custom-post-type-ui", 18 | "docs": "http://docs.pluginize.com/" 19 | }, 20 | "config": { 21 | "sort-order": true, 22 | "platform": { 23 | "php": "7.4" 24 | } 25 | }, 26 | "minimum-stability": "dev", 27 | "prefer-stable": true, 28 | "require": { 29 | "composer/installers": "^1.11.0" 30 | }, 31 | "require-dev": { 32 | "brain/monkey": "^2.0", 33 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", 34 | "phpcompatibility/phpcompatibility-wp": "^2.1.1", 35 | "wp-cli/wp-cli-bundle": "^2.5.0", 36 | "wp-coding-standards/wpcs": "^2.3.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /external/wpgraphql.php: -------------------------------------------------------------------------------- 1 | show_in_graphql = isset( $data['cpt_custom_post_type']['show_in_graphql'] ) ? $data['cpt_custom_post_type']['show_in_graphql'] : false; 105 | $this->graphql_single_name = isset( $data['cpt_custom_post_type']['graphql_single_name'] ) ? \WPGraphQL\Utils\Utils::format_type_name( $data['cpt_custom_post_type']['graphql_single_name'] ) : ''; 106 | $this->graphql_plural_name = isset( $data['cpt_custom_post_type']['graphql_plural_name'] ) ? \WPGraphQL\Utils\Utils::format_type_name( $data['cpt_custom_post_type']['graphql_plural_name'] ) : ''; 107 | } 108 | 109 | /** 110 | * Capture taxonomy settings from form submission for saving 111 | * 112 | * @param array $data 113 | */ 114 | public function before_update_taxonomy( $data ) { 115 | $this->show_in_graphql = isset( $data['cpt_custom_tax']['show_in_graphql'] ) ? $data['cpt_custom_tax']['show_in_graphql'] : false; 116 | $this->graphql_single_name = isset( $data['cpt_custom_tax']['graphql_single_name'] ) ? \WPGraphQL\Utils\Utils::format_type_name( $data['cpt_custom_tax']['graphql_single_name'] ) : ''; 117 | $this->graphql_plural_name = isset( $data['cpt_custom_tax']['graphql_plural_name'] ) ? \WPGraphQL\Utils\Utils::format_type_name( $data['cpt_custom_tax']['graphql_plural_name'] ) : ''; 118 | } 119 | 120 | /** 121 | * Save values from form submission 122 | * 123 | * @param array $type 124 | * @param string $name 125 | * 126 | * @return array 127 | */ 128 | public function save_graphql_settings( $type, $name ) { 129 | $type[ $name ]['show_in_graphql'] = $this->show_in_graphql; 130 | $type[ $name ]['graphql_single_name'] = \WPGraphQL\Utils\Utils::format_type_name( $this->graphql_single_name ); 131 | $type[ $name ]['graphql_plural_name'] = \WPGraphQL\Utils\Utils::format_type_name( $this->graphql_plural_name ); 132 | 133 | return $type; 134 | } 135 | 136 | /** 137 | * Add settings fields to Custom Post Type UI form 138 | * 139 | * @param cptui_admin_ui $ui Admin UI instance. 140 | */ 141 | public function add_graphql_post_type_settings( $ui ) { 142 | $tab = ( ! empty( $_GET ) && ! empty( $_GET['action'] ) && 'edit' === $_GET['action'] ) ? 'edit' : 'new'; // phpcs:ignore WordPress.Security.NonceVerification 143 | $current = []; 144 | $name_array = 'cpt_custom_post_type'; 145 | if ( 'edit' === $tab ) { 146 | $post_types = cptui_get_post_type_data(); 147 | $selected_post_type = cptui_get_current_post_type( false ); 148 | if ( $selected_post_type ) { 149 | if ( array_key_exists( $selected_post_type, $post_types ) ) { 150 | $current = $post_types[ $selected_post_type ]; 151 | } 152 | } 153 | } 154 | echo $this->get_setting_fields( $ui, $current, $name_array ); // phpcs:ignore. 155 | } 156 | 157 | /** 158 | * Add settings fields to Custom Post Type UI form 159 | * 160 | * @param cptui_admin_ui $ui Admin UI instance. 161 | */ 162 | public function add_taxonomy_graphql_settings( $ui ) { 163 | $tab = ( ! empty( $_GET ) && ! empty( $_GET['action'] ) && 'edit' === $_GET['action'] ) ? 'edit' : 'new'; // phpcs:ignore WordPress.Security.NonceVerification 164 | $name_array = 'cpt_custom_tax'; 165 | $current = []; 166 | if ( 'edit' === $tab ) { 167 | $taxonomies = cptui_get_taxonomy_data(); 168 | $selected_taxonomy = cptui_get_current_taxonomy( false ); 169 | if ( $selected_taxonomy ) { 170 | if ( array_key_exists( $selected_taxonomy, $taxonomies ) ) { 171 | $current = $taxonomies[ $selected_taxonomy ]; 172 | } 173 | } 174 | } 175 | echo $this->get_setting_fields( $ui, $current, $name_array ); // phpcs:ignore. 176 | } 177 | 178 | /** 179 | * Get the settings fields to render for the form 180 | * 181 | * @param cptui_admin_ui $ui Admin UI instance. 182 | * @param array $current 183 | * @param string $name_array 184 | */ 185 | public function get_setting_fields( $ui, $current, $name_array ) { 186 | ?> 187 |
        188 |
        189 | 190 |

        191 | 192 |

        193 |
        194 | 198 |
        199 |
        200 |
        201 |
        202 | 203 | [ 207 | [ 208 | 'attr' => '0', 209 | 'text' => esc_attr__( 'False', 'wp-graphql-custom-post-type-ui' ), 210 | ], 211 | [ 212 | 'attr' => '1', 213 | 'text' => esc_attr__( 'True', 'wp-graphql-custom-post-type-ui' ), 214 | ], 215 | ], 216 | ]; 217 | 218 | $selected = ( isset( $current ) && ! empty( $current['show_in_graphql'] ) ) ? disp_boolean( $current['show_in_graphql'] ) : ''; 219 | $selections['selected'] = ( ! empty( $selected ) && ! empty( $current['show_in_graphql'] ) ) ? $current['show_in_graphql'] : '0'; 220 | 221 | echo $ui->get_select_input( // phpcs:ignore. 222 | [ 223 | 'namearray' => $name_array, 224 | 'name' => 'show_in_graphql', 225 | 'labeltext' => esc_html__( 'Show in GraphQL', 'wp-graphql-custom-post-type-ui' ), 226 | 'aftertext' => esc_html__( 'Whether or not to show data of this type in the WPGraphQL. Default: false', 'wp-graphql-custom-post-type-ui' ), 227 | 'selections' => $selections, // phpcs:ignore. 228 | 'default' => false, 229 | 'required' => true, 230 | ] 231 | ); 232 | 233 | echo $ui->get_text_input( // phpcs:ignore. 234 | [ 235 | 'namearray' => $name_array, 236 | 'name' => 'graphql_single_name', 237 | 'labeltext' => esc_html__( 'GraphQL Single Name', 'wp-graphql-custom-post-type-ui' ), 238 | 'aftertext' => esc_attr__( 'Singular name for reference in the GraphQL API.', 'wp-graphql-custom-post-type-ui' ), 239 | 'textvalue' => ( isset( $current['graphql_single_name'] ) ) ? esc_attr( $current['graphql_single_name'] ) : '', // phpcs:ignore. 240 | 'required' => true, 241 | ] 242 | ); 243 | 244 | echo $ui->get_text_input( // phpcs:ignore. 245 | [ 246 | 'namearray' => $name_array, 247 | 'name' => 'graphql_plural_name', 248 | 'labeltext' => esc_html__( 'GraphQL Plural Name', 'wp-graphql-custom-post-type-ui' ), 249 | 'aftertext' => esc_attr__( 'Plural name for reference in the GraphQL API.', 'wp-graphql-custom-post-type-ui' ), 250 | 'textvalue' => ( isset( $current['graphql_plural_name'] ) ) ? esc_attr( $current['graphql_plural_name'] ) : '', // phpcs:ignore. 251 | 'required' => true, 252 | ] 253 | ); 254 | ?> 255 |
        256 |
        257 |
        258 |
        259 | graphql_field_helpers(); 261 | } 262 | 263 | /** 264 | * JavaScript helpers to add conditional logic and support for the GraphQL setting fields 265 | */ 266 | public function graphql_field_helpers() { 267 | // This script provides helpers for the GraphQL fields in the CPT UI screen. 268 | // If the Post Type or Taxonomy is not set to show_in_graphql the single/plural names 269 | // should not be required. 270 | ?> 271 | 319 | 335 |
        336 |

        337 | de-active the "WPGraphQL for Custom Post Type UI" extension to proceed.', 'custom-post-type-ui' ), 341 | $link // phpcs:ignore. 342 | ); 343 | ?> 344 |

        345 |
        346 | init(); 355 | } 356 | -------------------------------------------------------------------------------- /images/cptui-icon-173x173.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/images/cptui-icon-173x173.png -------------------------------------------------------------------------------- /images/wds_ads/buddypages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/images/wds_ads/buddypages.png -------------------------------------------------------------------------------- /images/wds_ads/cptui-extended.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/images/wds_ads/cptui-extended.png -------------------------------------------------------------------------------- /images/wds_ads/instago.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/images/wds_ads/instago.png -------------------------------------------------------------------------------- /images/wds_ads/wp-search-with-algolia-pro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebDevStudios/custom-post-type-ui/cb1e9e3d822c8a9ba07455c2006a0ab49cda380b/images/wds_ads/wp-search-with-algolia-pro.png -------------------------------------------------------------------------------- /inc/about.php: -------------------------------------------------------------------------------- 1 | base ) { 28 | return; 29 | } 30 | 31 | if ( wp_doing_ajax() ) { 32 | return; 33 | } 34 | 35 | wp_enqueue_style( 'cptui-css' ); 36 | } 37 | add_action( 'admin_enqueue_scripts', 'cptui_about_assets' ); 38 | 39 | /** 40 | * Display our primary menu page. 41 | * 42 | * @since 0.3.0 43 | * 44 | * @internal 45 | */ 46 | function cptui_settings() { 47 | ?> 48 |
        49 | 64 |

        65 | 66 | ` heading tag. 70 | * 71 | * @since 1.3.0 72 | */ 73 | do_action( 'cptui_main_page_after_header' ); 74 | ?> 75 |
        76 |

        77 | 78 |

        79 |
        80 |
        81 | 89 | 90 |

        91 | 98 |

        99 |
        100 |
        101 |
        102 |

        103 |

        104 |

        105 |

        106 |
        107 |
        108 |
        109 | 110 |
        111 | 120 |
        121 |
        122 | ' . sprintf( esc_html__( 'More from %s', 'custom-post-type-ui' ), 'WebDevStudios' ) . ''; 133 | echo '
        '; 134 | $ads = cptui_get_ads(); 135 | if ( ! empty( $ads ) ) { 136 | 137 | foreach ( $ads as $ad ) { 138 | 139 | $the_ad = sprintf( 140 | '%s', 141 | esc_attr( $ad['image'] ), 142 | esc_attr( $ad['text'] ) 143 | ); 144 | 145 | // Escaping $the_ad breaks the html. 146 | printf( 147 | '

        %s

        ', 148 | esc_url( $ad['url'] ), 149 | $the_ad // phpcs:ignore 150 | ); 151 | } 152 | } 153 | echo '
        '; 154 | } 155 | add_action( 'cptui_main_page_extra_notes', 'cptui_pluginize_content', 9 ); 156 | 157 | /** 158 | * Render our newsletter form for the about page. 159 | * 160 | * @since 1.4.0 161 | */ 162 | function cptui_about_page_newsletter() { 163 | 164 | if ( cptui_is_new_install() ) { 165 | return ''; 166 | } 167 | 168 | ?> 169 |
        170 | 173 |
        174 | 175 | base ) { 28 | return; 29 | } 30 | 31 | if ( wp_doing_ajax() ) { 32 | return; 33 | } 34 | 35 | wp_enqueue_style( 'cptui-css' ); 36 | } 37 | add_action( 'admin_enqueue_scripts', 'cptui_listings_assets' ); 38 | 39 | /** 40 | * Output the content for the "Registered Types/Taxes" page. 41 | * 42 | * @since 1.1.0 43 | * 44 | * @internal 45 | */ 46 | function cptui_listings() { 47 | ?> 48 |
        49 | 64 | 65 |

        66 | 67 | 68 | ' . esc_html__( 'Post Types', 'custom-post-type-ui' ) . ''; 71 | if ( ! empty( $post_types ) ) { 72 | ?> 73 |

        74 | 81 |

        82 | 83 | 101 | 102 | 103 | 104 | ' . esc_html( $head ) . ''; 107 | } 108 | ?> 109 | 110 | 111 | 112 | $post_type_settings ) { 115 | 116 | $rowclass = ( 0 === $counter % 2 ) ? '' : 'alternate'; 117 | 118 | $strings = []; 119 | $supports = []; 120 | $taxonomies = []; 121 | $archive = ''; 122 | foreach ( $post_type_settings as $settings_key => $settings_value ) { 123 | if ( 'labels' === $settings_key ) { 124 | continue; 125 | } 126 | 127 | if ( is_string( $settings_value ) ) { 128 | $strings[ $settings_key ] = $settings_value; 129 | } else { 130 | if ( 'supports' === $settings_key ) { 131 | $supports[ $settings_key ] = $settings_value; 132 | } 133 | 134 | if ( 'taxonomies' === $settings_key ) { 135 | $taxonomies[ $settings_key ] = $settings_value; 136 | 137 | // In case they are not associated from the post type settings. 138 | if ( empty( $taxonomies['taxonomies'] ) ) { 139 | $taxonomies['taxonomies'] = get_object_taxonomies( $post_type ); 140 | } 141 | } 142 | } 143 | $archive = get_post_type_archive_link( $post_type ); 144 | } 145 | ?> 146 | 147 | 151 | 172 | 185 | 192 | 206 | 228 | 256 | 257 | 258 | 262 | 263 | 264 | 265 | ' . esc_html( $head ) . ''; 268 | } 269 | ?> 270 | 271 | 272 |
        152 | %s
        155 | %s
        ', 156 | esc_attr( $post_type_link_url ), 157 | sprintf( 158 | /* translators: %s: Post type slug */ 159 | esc_html__( 'Edit %1$s (%2$s)', 'custom-post-type-ui' ), 160 | esc_html( $post_type_settings['label'] ), 161 | esc_html( $post_type ) 162 | ), 163 | esc_attr( admin_url( 'admin.php?page=cptui_tools&action=get_code#' . $post_type ) ), 164 | esc_html__( 'Get code', 'custom-post-type-ui' ) 165 | ); 166 | 167 | if ( $archive ) { 168 | ?> 169 | 170 | 171 |
        173 | $value ) { 175 | printf( '%s: ', esc_html( $key ) ); 176 | if ( in_array( $value, [ '1', '0' ], true ) ) { 177 | echo esc_html( disp_boolean( $value ) ); 178 | } else { 179 | echo ! empty( $value ) ? esc_html( $value ) : '""'; 180 | } 181 | echo '
        '; 182 | } 183 | ?> 184 |
        186 | '; 189 | } 190 | ?> 191 | 193 | '; 197 | } 198 | } else { 199 | printf( 200 | '%s', 201 | esc_html__( 'No associated taxonomies', 'custom-post-type-ui' ) 202 | ); 203 | } 204 | ?> 205 | 207 | $value ) { 211 | if ( 'parent' === $key && array_key_exists( 'parent_item_colon', $post_type_settings['labels'] ) ) { 212 | continue; 213 | } 214 | printf( 215 | '%s: %s
        ', 216 | esc_html( $key ), 217 | esc_html( $value ) 218 | ); 219 | } 220 | } else { 221 | printf( 222 | '%s', 223 | esc_html__( 'No custom labels to display', 'custom-post-type-ui' ) 224 | ); 225 | } 226 | ?> 227 |
        229 |


        230 | archive-.php
        231 | archive.php
        232 | index.php 233 |

        234 | 235 |


        236 | single--post_slug.php *
        237 | single-.php
        238 | single.php
        239 | singular.php
        240 | index.php 241 |

        242 | 243 |

        244 | 245 |

        246 | 247 |

        248 | %s', 251 | esc_html__( 'Template hierarchy Theme Handbook', 'custom-post-type-ui' ) 252 | ); 253 | ?> 254 |

        255 |
        273 | ' . esc_html__( 'Taxonomies', 'custom-post-type-ui' ) . ''; 292 | if ( ! empty( $taxonomies ) ) { 293 | ?> 294 |

        295 | 302 |

        303 | 304 | 321 | 322 | 323 | 324 | ' . esc_html( $head ) . ''; 327 | } 328 | ?> 329 | 330 | 331 | 332 | $taxonomy_settings ) { 335 | 336 | $rowclass = ( 0 === $counter % 2 ) ? '' : 'alternate'; 337 | 338 | $strings = []; 339 | $object_types = []; 340 | foreach ( $taxonomy_settings as $settings_key => $settings_value ) { 341 | if ( 'labels' === $settings_key ) { 342 | continue; 343 | } 344 | 345 | if ( is_string( $settings_value ) ) { 346 | $strings[ $settings_key ] = $settings_value; 347 | } else { 348 | if ( 'object_types' === $settings_key ) { 349 | $object_types[ $settings_key ] = $settings_value; 350 | 351 | // In case they are not associated from the post type settings. 352 | if ( empty( $object_types['object_types'] ) ) { 353 | $types = get_taxonomy( $taxonomy ); 354 | $object_types['object_types'] = $types->object_type; 355 | } 356 | } 357 | } 358 | } 359 | ?> 360 | 361 | 365 | 382 | 395 | 404 | 423 | 444 | 445 | 446 | 450 | 451 | 452 | 453 | ' . esc_html( $head ) . ''; 456 | } 457 | ?> 458 | 459 | 460 |
        366 | %s
        369 | %s', 370 | esc_attr( $taxonomy_link_url ), 371 | sprintf( 372 | /* translators: %s: Taxonomy slug */ 373 | esc_html__( 'Edit %1$s (%2$s)', 'custom-post-type-ui' ), 374 | esc_html( $taxonomy_settings['label'] ), 375 | esc_html( $taxonomy ) 376 | ), 377 | esc_attr( admin_url( 'admin.php?page=cptui_tools&action=get_code#' . $taxonomy ) ), 378 | esc_html__( 'Get code', 'custom-post-type-ui' ) 379 | ); 380 | ?> 381 |
        383 | $value ) { 385 | printf( '%s: ', esc_html( $key ) ); 386 | if ( in_array( $value, [ '1', '0' ], true ) ) { 387 | echo esc_html( disp_boolean( $value ) ); 388 | } else { 389 | echo ! empty( $value ) ? esc_html( $value ) : '""'; 390 | } 391 | echo '
        '; 392 | } 393 | ?> 394 |
        396 | '; 400 | } 401 | } 402 | ?> 403 | 405 | $value ) { 409 | printf( 410 | '%s: %s
        ', 411 | esc_html( $key ), 412 | esc_html( $value ) 413 | ); 414 | } 415 | } else { 416 | printf( 417 | '%s', 418 | esc_html__( 'No custom labels to display', 'custom-post-type-ui' ) 419 | ); 420 | } 421 | ?> 422 |
        424 |


        425 | taxonomy--term_slug.php *
        426 | taxonomy-.php
        427 | taxonomy.php
        428 | archive.php
        429 | index.php 430 |

        431 | 432 |

        433 | 434 |

        435 |

        436 | %s', 439 | esc_html__( 'Template hierarchy Theme Handbook', 'custom-post-type-ui' ) 440 | ); 441 | ?> 442 |

        443 |
        461 | 479 | 480 |
        481 | ' . sprintf( 495 | /* translators: 1st %s: Link to manage post types section 2nd %s Link text */ 496 | esc_html__( 'No post types registered for display. Visit %s to get started.', 'custom-post-type-ui' ), 497 | sprintf( 498 | '%s', 499 | esc_attr( admin_url( 'admin.php?page=cptui_manage_post_types' ) ), 500 | esc_html__( 'Add/Edit Post Types', 'custom-post-type-ui' ) 501 | ) 502 | ) . '

        '; 503 | } 504 | add_action( 'cptui_no_post_types_listing', 'cptui_no_post_types_to_list' ); 505 | 506 | /** 507 | * Displays a message for when no taxonomies are registered. 508 | * 509 | * Uses the `cptui_no_taxonomies_listing` hook. 510 | * 511 | * @since 1.3.0 512 | * 513 | * @internal 514 | */ 515 | function cptui_no_taxonomies_to_list() { 516 | echo '

        ' . sprintf( 517 | /* translators: %s: Link to manage taxonomies section */ 518 | esc_html__( 'No taxonomies registered for display. Visit %s to get started.', 'custom-post-type-ui' ), 519 | sprintf( 520 | '%s', 521 | esc_attr( admin_url( 'admin.php?page=cptui_manage_taxonomies' ) ), 522 | esc_html__( 'Add/Edit Taxonomies', 'custom-post-type-ui' ) 523 | ) 524 | ) . '

        '; 525 | } 526 | add_action( 'cptui_no_taxonomies_listing', 'cptui_no_taxonomies_to_list' ); 527 | -------------------------------------------------------------------------------- /inc/tools-sections/tools-debug.php: -------------------------------------------------------------------------------- 1 | '; 18 | $debuginfo->tab_site_info(); 19 | 20 | wp_nonce_field( 'cptui_debuginfo_nonce_action', 'cptui_debuginfo_nonce_field' ); 21 | 22 | if ( ! empty( $_POST ) && isset( $_POST['cptui_debug_info_email'] ) && isset( $_POST['cptui_debuginfo_nonce_field'] ) ) { 23 | if ( wp_verify_nonce( 'cptui_debuginfo_nonce_field', 'cptui_debuginfo_nonce_action' ) ) { 24 | $email_args = []; 25 | $email_args['email'] = sanitize_text_field( $_POST['cptui_debug_info_email'] ); 26 | $debuginfo->send_email( $email_args ); 27 | } 28 | } 29 | 30 | echo '

        '; 31 | 32 | /** 33 | * Filters the text value to use on the button when sending debug information. 34 | * 35 | * @param string $value Text to use for the button. 36 | * 37 | * @since 1.2.0 38 | */ 39 | echo '

        '; 40 | echo ''; 41 | 42 | /** 43 | * Fires after the display of the site information. 44 | * @since 1.3.0 45 | */ 46 | do_action( 'cptui_after_site_info' ); 47 | } 48 | -------------------------------------------------------------------------------- /inc/tools-sections/tools-get-code.php: -------------------------------------------------------------------------------- 1 | 15 |

        16 | 17 |

        18 | 19 |

        20 | 21 | 22 |

        23 | 24 |

        25 | 26 | 27 | 31 |

        32 |

        35 |

        36 | 37 |

        38 | 39 | 43 | 44 |

        45 | 46 | 47 |

        48 | 49 |

        50 | 51 | 52 | 56 |

        57 | 61 |

        62 |

        63 | 64 |

        65 | 66 | 70 | 36 | 37 | function () { 38 | 44 | } 45 | 46 | add_action( 'init', '' ); 47 | "' . $post_type['name'] . '",'; 93 | if ( ! empty( $post_type['rewrite_slug'] ) ) { 94 | $rewrite_slug = ' "slug" => "' . $post_type['rewrite_slug'] . '",'; 95 | } 96 | 97 | $withfront = disp_boolean( $post_type['rewrite_withfront'] ); 98 | if ( ! empty( $withfront ) ) { 99 | $rewrite_withfront = ' "with_front" => ' . $withfront . ' '; 100 | } 101 | 102 | if ( ! empty( $post_type['rewrite_slug'] ) || ! empty( $post_type['rewrite_withfront'] ) ) { 103 | $rewrite_start = '['; 104 | $rewrite_end = ']'; 105 | 106 | $rewrite = $rewrite_start . $rewrite_slug . $rewrite_withfront . $rewrite_end; 107 | } 108 | } else { 109 | $rewrite = disp_boolean( $post_type['rewrite'] ); 110 | } 111 | $has_archive = get_disp_boolean( $post_type['has_archive'] ); 112 | if ( false !== $has_archive ) { 113 | $has_archive = disp_boolean( $post_type['has_archive'] ); 114 | if ( ! empty( $post_type['has_archive_string'] ) ) { 115 | $has_archive = '"' . $post_type['has_archive_string'] . '"'; 116 | } 117 | } else { 118 | $has_archive = disp_boolean( $post_type['has_archive'] ); 119 | } 120 | 121 | $supports = ''; 122 | // Do a little bit of php work to get these into strings. 123 | if ( ! empty( $post_type['supports'] ) && is_array( $post_type['supports'] ) ) { 124 | $supports = '[ "' . implode( '", "', $post_type['supports'] ) . '" ]'; 125 | } 126 | 127 | if ( in_array( 'none', $post_type['supports'], true ) ) { 128 | $supports = 'false'; 129 | } 130 | 131 | $taxonomies = ''; 132 | if ( ! empty( $post_type['taxonomies'] ) && is_array( $post_type['taxonomies'] ) ) { 133 | $taxonomies = '[ "' . implode( '", "', $post_type['taxonomies'] ) . '" ]'; 134 | } 135 | 136 | if ( in_array( $post_type['query_var'], [ 'true', 'false', '0', '1' ], true ) ) { 137 | $post_type['query_var'] = disp_boolean( $post_type['query_var'] ); 138 | } 139 | if ( ! empty( $post_type['query_var_slug'] ) ) { 140 | $post_type['query_var'] = '"' . $post_type['query_var_slug'] . '"'; 141 | } 142 | 143 | if ( empty( $post_type['show_in_rest'] ) ) { 144 | $post_type['show_in_rest'] = 'false'; 145 | } 146 | $rest_controller_class = ! empty( $post_type['rest_controller_class'] ) ? $post_type['rest_controller_class'] : 'WP_REST_Posts_Controller'; 147 | $rest_namespace = ! empty( $post_type['rest_namespace'] ) ? $post_type['rest_namespace'] : 'wp/v2'; 148 | 149 | $show_in_menu = get_disp_boolean( $post_type['show_in_menu'] ); 150 | if ( false !== $show_in_menu ) { 151 | $show_in_menu = disp_boolean( $post_type['show_in_menu'] ); 152 | if ( ! empty( $post_type['show_in_menu_string'] ) ) { 153 | $show_in_menu = '"' . $post_type['show_in_menu_string'] . '"'; 154 | } 155 | } else { 156 | $show_in_menu = disp_boolean( $post_type['show_in_menu'] ); 157 | } 158 | 159 | $delete_with_user = 'false'; 160 | if ( isset( $post_type['delete_with_user'] ) ) { 161 | $delete_with_user = disp_boolean( $post_type['delete_with_user'] ); 162 | } 163 | 164 | $can_export = 'true'; 165 | if ( isset( $post_type['can_export'] ) ) { 166 | $can_export = disp_boolean( $post_type['can_export'] ); 167 | } 168 | 169 | $public = isset( $post_type['public'] ) ? disp_boolean( $post_type['public'] ) : 'true'; 170 | $show_in_nav_menus = ( ! empty( $post_type['show_in_nav_menus'] ) && false !== get_disp_boolean( $post_type['show_in_nav_menus'] ) ) ? 'true' : 'false'; 171 | if ( empty( $post_type['show_in_nav_menus'] ) ) { 172 | $show_in_nav_menus = $public; 173 | } 174 | 175 | $capability_type = '"post"'; 176 | if ( ! empty( $post_type['capability_type'] ) ) { 177 | $capability_type = '"' . $post_type['capability_type'] . '"'; 178 | if ( false !== strpos( $post_type['capability_type'], ',' ) ) { 179 | $caps = array_map( 'trim', explode( ',', $post_type['capability_type'] ) ); 180 | if ( count( $caps ) > 2 ) { 181 | $caps = array_slice( $caps, 0, 2 ); 182 | } 183 | $capability_type = '[ "' . $caps[0] . '", "' . $caps[1] . '" ]'; 184 | } 185 | } 186 | 187 | $post_type['description'] = addslashes( $post_type['description'] ); 188 | 189 | $my_theme = wp_get_theme(); 190 | $textdomain = $my_theme->get( 'TextDomain' ); 191 | if ( empty( $textdomain ) ) { 192 | $textdomain = 'custom-post-type-ui'; 193 | } 194 | ?> 195 | 196 | /** 197 | * Post Type: . 198 | */ 199 | 200 | $labels = [ 201 | "name" => esc_html__( "", "" ), 202 | "singular_name" => esc_html__( "", "" ), 203 | $label ) { 205 | if ( ! empty( $label ) ) { 206 | if ( 'parent' === $key && ! array_key_exists( 'parent_item_colon', $post_type['labels'] ) ) { 207 | // Fix for incorrect label key. See #439. 208 | echo "\t\t" . '"' . 'parent_item_colon' . '" => esc_html__( "' . $label . '", "' . $textdomain . '" ),' . "\n"; 209 | } else { 210 | echo "\t\t" . '"' . $key . '" => esc_html__( "' . $label . '", "' . $textdomain . '" ),' . "\n"; 211 | } 212 | } 213 | } 214 | ?> 215 | ]; 216 | 217 | $args = [ 218 | "label" => esc_html__( "", "" ), 219 | "labels" => $labels, 220 | "description" => "", 221 | "public" => , 222 | "publicly_queryable" => , 223 | "show_ui" => , 224 | "show_in_rest" => , 225 | "rest_base" => "", 226 | "rest_controller_class" => "", 227 | "rest_namespace" => "", 228 | "has_archive" => , 229 | "show_in_menu" => , 230 | "show_in_nav_menus" => , 231 | "delete_with_user" => , 232 | "exclude_from_search" => , 233 | "capability_type" => , 234 | "map_meta_cap" => , 235 | "hierarchical" => , 236 | "can_export" => , 237 | "rewrite" => , 238 | "query_var" => , 239 | 240 | "menu_position" => , 241 | 242 | 243 | "menu_icon" => "", 244 | 245 | 246 | "register_meta_box_cb" => "", 247 | 248 | 249 | "supports" => , 250 | 251 | 252 | "taxonomies" => , 253 | 254 | 255 | "yarpp_support" => , 256 | 257 | 258 | "show_in_graphql" => , 259 | "graphql_single_name" => "", 260 | "graphql_plural_name" => "", 261 | 262 | "show_in_graphql" => , 263 | 264 | ]; 265 | 266 | register_post_type( "", $args ); 267 | 37 | function () { 38 | 43 | } 44 | add_action( 'init', '' ); 45 | \'' . $taxonomy['name'] . '\','; 70 | if ( ! empty( $taxonomy['rewrite_slug'] ) ) { 71 | $rewrite_slug = ' \'slug\' => \'' . $taxonomy['rewrite_slug'] . '\','; 72 | } 73 | 74 | $rewrite_withfront = ''; 75 | $withfront = disp_boolean( $taxonomy['rewrite_withfront'] ); 76 | if ( ! empty( $withfront ) ) { 77 | $rewrite_withfront = ' \'with_front\' => ' . $withfront . ', '; 78 | } 79 | 80 | $hierarchical = ! empty( $taxonomy['rewrite_hierarchical'] ) ? disp_boolean( $taxonomy['rewrite_hierarchical'] ) : ''; 81 | $rewrite_hierarchcial = ''; 82 | if ( ! empty( $hierarchical ) ) { 83 | $rewrite_hierarchcial = ' \'hierarchical\' => ' . $hierarchical . ', '; 84 | } 85 | 86 | if ( ! empty( $taxonomy['rewrite_slug'] ) || false !== disp_boolean( $taxonomy['rewrite_withfront'] ) ) { 87 | $rewrite_start = '['; 88 | $rewrite_end = ']'; 89 | 90 | $rewrite = $rewrite_start . $rewrite_slug . $rewrite_withfront . $rewrite_hierarchcial . $rewrite_end; 91 | } 92 | } else { 93 | $rewrite = disp_boolean( $taxonomy['rewrite'] ); 94 | } 95 | $public = isset( $taxonomy['public'] ) ? disp_boolean( $taxonomy['public'] ) : 'true'; 96 | $publicly_queryable = isset( $taxonomy['publicly_queryable'] ) ? disp_boolean( $taxonomy['publicly_queryable'] ) : disp_boolean( $taxonomy['public'] ); 97 | $show_in_quick_edit = isset( $taxonomy['show_in_quick_edit'] ) ? disp_boolean( $taxonomy['show_in_quick_edit'] ) : disp_boolean( $taxonomy['show_ui'] ); 98 | $show_tagcloud = isset( $taxonomy['show_tagcloud'] ) ? disp_boolean( $taxonomy['show_tagcloud'] ) : disp_boolean( $taxonomy['show_ui'] ); 99 | 100 | $show_in_menu = ( ! empty( $taxonomy['show_in_menu'] ) && false !== get_disp_boolean( $taxonomy['show_in_menu'] ) ) ? 'true' : 'false'; 101 | if ( empty( $taxonomy['show_in_menu'] ) ) { 102 | $show_in_menu = disp_boolean( $taxonomy['show_ui'] ); 103 | } 104 | 105 | $show_in_nav_menus = ( ! empty( $taxonomy['show_in_nav_menus'] ) && false !== get_disp_boolean( $taxonomy['show_in_nav_menus'] ) ) ? 'true' : 'false'; 106 | if ( empty( $taxonomy['show_in_nav_menus'] ) ) { 107 | $show_in_nav_menus = $public; 108 | } 109 | 110 | $show_in_rest = ( ! empty( $taxonomy['show_in_rest'] ) && false !== get_disp_boolean( $taxonomy['show_in_rest'] ) ) ? 'true' : 'false'; 111 | $rest_base = ! empty( $taxonomy['rest_base'] ) ? $taxonomy['rest_base'] : $taxonomy['name']; 112 | $rest_controller_class = ! empty( $taxonomy['rest_controller_class'] ) ? $taxonomy['rest_controller_class'] : 'WP_REST_Terms_Controller'; 113 | $rest_namespace = ! empty( $taxonomy['rest_namespace'] ) ? $taxonomy['rest_namespace'] : 'wp/v2'; 114 | $sort = ( ! empty( $taxonomy['sort'] ) && false !== get_disp_boolean( $taxonomy['sort'] ) ) ? 'true' : 'false'; 115 | 116 | if ( ! empty( $taxonomy['meta_box_cb'] ) ) { 117 | $meta_box_cb = ( false !== get_disp_boolean( $taxonomy['meta_box_cb'] ) ) ? '"' . $taxonomy['meta_box_cb'] . '"' : 'false'; 118 | } 119 | 120 | $default_term = ''; 121 | if ( ! empty( $taxonomy['default_term'] ) ) { 122 | $term_parts = explode( ',', $taxonomy['default_term'] ); 123 | $default_term_start = '['; 124 | $default_term_end = ']'; 125 | if ( ! empty( $term_parts[0] ) ) { 126 | $default_term .= "'name' => '" . trim( $term_parts[0] ) . "'"; 127 | } 128 | if ( ! empty( $term_parts[1] ) ) { 129 | $default_term .= ", 'slug' => '" . trim( $term_parts[1] ) . "'"; 130 | } 131 | if ( ! empty( $term_parts[2] ) ) { 132 | $default_term .= ", 'description' => '" . trim( $term_parts[2] ) . "'"; 133 | } 134 | 135 | $default_term = $default_term_start . $default_term . $default_term_end; 136 | } 137 | 138 | $my_theme = wp_get_theme(); 139 | $textdomain = $my_theme->get( 'TextDomain' ); 140 | if ( empty( $textdomain ) ) { 141 | $textdomain = 'custom-post-type-ui'; 142 | } 143 | ?> 144 | 145 | /** 146 | * Taxonomy: . 147 | */ 148 | 149 | $labels = [ 150 | "name" => esc_html__( "", "" ), 151 | "singular_name" => esc_html__( "", "" ), 152 | $label ) { 154 | if ( ! empty( $label ) ) { 155 | echo "\t\t" . '"' . esc_html( $key ) . '" => esc_html__( "' . esc_html( $label ) . '", "' . esc_html( $textdomain ) . '" ),' . "\n"; 156 | } 157 | } 158 | ?> 159 | ]; 160 | 161 | 164 | 165 | $args = [ 166 | "label" => esc_html__( "", "" ), 167 | "labels" => $labels, 168 | "public" => , 169 | "publicly_queryable" => , 170 | "hierarchical" => , 171 | "show_ui" => , 172 | "show_in_menu" => , 173 | "show_in_nav_menus" => , 174 | "query_var" => , 175 | "rewrite" => , 176 | "show_admin_column" => , 177 | "show_in_rest" => , 178 | "show_tagcloud" => , 179 | "rest_base" => "", 180 | "rest_controller_class" => "", 181 | "rest_namespace" => "", 182 | "show_in_quick_edit" => , 183 | "sort" => , 184 | 185 | "show_in_graphql" => , 186 | "graphql_single_name" => "", 187 | "graphql_plural_name" => "", 188 | 189 | "show_in_graphql" => , 190 | 191 | 192 | "meta_box_cb" => , 193 | 194 | 195 | "default_term" => , 196 | 197 | ]; 198 | register_taxonomy( "", , $args ); 199 | ] 33 | * : What type of import this is. Available options are `post_type` and `taxonomy`. 34 | * 35 | * [--data-path=] 36 | * : The server path to the file holding JSON data to import. Relative to PWD. 37 | */ 38 | public function import( $args, $assoc_args ) { 39 | $this->args = $args; 40 | $this->assoc_args = $assoc_args; 41 | 42 | if ( ! isset( $this->assoc_args['type'] ) ) { 43 | WP_CLI::error( esc_html__( 'Please provide whether you are importing post types or taxonomies', 'custom-post-type-ui' ) ); 44 | } 45 | 46 | if ( ! isset( $this->assoc_args['data-path'] ) ) { 47 | WP_CLI::error( esc_html__( 'Please provide a path to the file holding your CPTUI JSON data.', 'custom-post-type-ui' ) ); 48 | } 49 | 50 | $this->type = $assoc_args['type']; 51 | 52 | $json = file_get_contents( $this->assoc_args['data-path'] ); 53 | 54 | if ( empty( $json ) ) { 55 | WP_CLI::error( esc_html__( 'No JSON data found', 'custom-post-type-ui' ) ); 56 | } 57 | 58 | if ( 'post_type' === $this->type ) { 59 | $this->data['cptui_post_import'] = json_decode( stripslashes_deep( trim( $json ) ), true ); 60 | } 61 | 62 | if ( 'taxonomy' === $this->type ) { 63 | $this->data['cptui_tax_import'] = json_decode( stripslashes_deep( trim( $json ) ), true ); 64 | } 65 | 66 | $result = cptui_import_types_taxes_settings( $this->data ); 67 | 68 | if ( false === $result || 'import_fail' === $result ) { 69 | WP_CLI::error( sprintf( esc_html__( 'An error on import occurred', 'custom-post-type-ui' ) ) ); 70 | } else { 71 | WP_CLI::success( 72 | sprintf( 73 | /* translators: Placeholders are just for HTML markup that doesn't need translated */ 74 | esc_html__( 'Imported %s successfully', 'custom-post-type-ui' ), 75 | $this->type 76 | ) 77 | ); 78 | } 79 | } 80 | 81 | /** 82 | * Export CPTUI settings to file. 83 | * 84 | * ## Options 85 | * 86 | * [--type=] 87 | * : Which settings to export. Available options are `post_type` and `taxonomy`. 88 | * 89 | * [--dest-path=] 90 | * : The path and file to export to. Relative to PWD. 91 | */ 92 | public function export( $args, $assoc_args ) { 93 | $this->args = $args; 94 | $this->assoc_args = $assoc_args; 95 | 96 | if ( ! isset( $this->assoc_args['type'] ) ) { 97 | WP_CLI::error( esc_html__( 'Please provide whether you are exporting your post types or taxonomies', 'custom-post-type-ui' ) ); 98 | } 99 | 100 | if ( ! isset( $this->assoc_args['dest-path'] ) ) { 101 | WP_CLI::error( esc_html__( 'Please provide a path to export your data to.', 'custom-post-type-ui' ) ); 102 | } 103 | 104 | $this->type = $assoc_args['type']; 105 | 106 | if ( 'post_type' === $this->type ) { 107 | $content = cptui_get_post_type_data(); 108 | } 109 | 110 | if ( 'taxonomy' === $this->type ) { 111 | $content = cptui_get_taxonomy_data(); 112 | } 113 | 114 | $content = wp_json_encode( $content ); 115 | $result = file_put_contents( $this->assoc_args['dest-path'], $content ); 116 | 117 | if ( false === $result ) { 118 | WP_CLI::error( esc_html__( 'Error saving data.', 'custom-post-type-ui' ) ); 119 | } 120 | 121 | WP_CLI::success( esc_html__( 'Successfully saved data to file.', 'custom-post-type-ui' ) ); 122 | } 123 | } 124 | WP_CLI::add_command( 'cptui', 'CPTUI_Import_JSON' ); 125 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | ./tests/ 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | === Custom Post Type UI === 2 | Contributors: webdevstudios, pluginize, tw2113, williamsba1 3 | Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3084056 4 | Tags: custom post types, post type, taxonomy, content types, types 5 | Requires at least: 6.5 6 | Tested up to: 6.8 7 | Stable tag: 1.17.3 8 | License: GPL-2.0+ 9 | Requires PHP: 7.4 10 | 11 | Admin UI for creating custom content types like post types and taxonomies 12 | 13 | == Description == 14 | 15 | Custom Post Type UI provides an easy-to-use interface for registering and managing custom post types and taxonomies for your website. 16 | 17 | = Custom Post Type UI Extended = 18 | 19 | CPTUI helps create custom content types, but displaying that content can be a whole new challenge. [Custom Post Type UI Extended](https://pluginize.com/plugins/custom-post-type-ui-extended/?utm_source=cptui-desription&utm_medium=text&utm_campaign=wporg) was created to help with displaying your crafted content. [View our Layouts page](https://pluginize.com/cpt-ui-extended-features/?utm_source=cptui-description-examples&utm_medium=text&utm_campaign=wporg) to see available layout examples with Custom Post Type UI Extended. 20 | 21 | = Plugin development = 22 | 23 | Custom Post Type UI development is managed on GitHub, with official releases published on WordPress.org. The GitHub repo can be found at [https://github.com/WebDevStudios/custom-post-type-ui](https://github.com/WebDevStudios/custom-post-type-ui). Please use the WordPress.org support tab for potential bugs, issues, or enhancement ideas. 24 | 25 | == Screenshots == 26 | 27 | 1. Add new post type screen and tab. 28 | 2. Add new taxonomy screen and tab. 29 | 3. Registered post types and taxonomies from CPTUI 30 | 4. Tools screen. 31 | 5. Help/support screen. 32 | 33 | == Changelog == 34 | 35 | = 1.17.3 - 2025-04-21 = 36 | * Fixed: PHP notices around foreach loops in cptui_post_thumbnail_theme_support(). 37 | * Fixed: PHP notices around empty variable values with get code section. 38 | * Fixed: PHP notices around false values with taxonomy listings with post type registration. 39 | * Updated: Confirmed compatibility with WordPress 6.8 40 | 41 | = 1.17.2 - 2024-11-19 = 42 | * Fixed: PHP warnings around empty description variables from tools page. 43 | * Updated: Confirmed compatibility with WordPress 6.7 44 | 45 | = 1.17.1 - 2024-06-27 = 46 | * Fixed: Missed re-showing of autolabel fill links for js enabled browsers. 47 | 48 | = 1.17.0 - 2024-06-17 = 49 | * Added: "sidebars" as a reserved slug for post types. 50 | * Added: Blueprint for trying Custom Post Type UI on wordpress.org before installation. 51 | * Updated: Reworked javascript files to be more modular with the build process. 52 | 53 | = 1.16.0 - 2024-04-08 = 54 | * Added: Added a wpml-config.xml file. 55 | * Updated: Added "search_terms" to disallowed taxonomy list. 56 | * Updated: Began converting our javascript away from jQuery dependency. 57 | * Updated: tested up to WP 6.5 58 | 59 | = 1.15.1 - 2023-11-08 = 60 | * Fixed: Fixed up some Right-to-Left language styling issues. 61 | * Fixed: Fixing forgot to update about page and some PHP constants for CPTUI version. 62 | 63 | = 1.15.0 - 2023-11-06 = 64 | * Added: Checkbox to indicate you intend to migrate a post type into CPTUI in event of matching slugs. Props @ramsesdelr 65 | * Added: "item_trashed" post type label support from WordPress 6.3 66 | * Updated: confirmed compatibility with WordPress 6.4. 67 | * Updated: PHP8 compatibility. 68 | * Updated: Minimum WordPress version to version 6.3, minimum PHP version to 7.4. 69 | 70 | = 1.14.0 - 2023-08-07 = 71 | * Added: "Scroll to top" links in CPTUI pages. Props @aslamatwebdevstudios 72 | * Added: Remembers toggled states for CPTUI settings panels. Props @aslamatwebdevstudios and @ramsesdelr 73 | * Updated: Notes about slugs for both post types and taxonomies. 74 | * Updated: Support/FAQ section with more accurate links. 75 | 76 | == Upgrade Notice == 77 | 78 | = 1.17.3 - 2025-04-21 = 79 | * Fixed: PHP notices around foreach loops in cptui_post_thumbnail_theme_support(). 80 | * Fixed: PHP notices around empty variable values with get code section. 81 | * Fixed: PHP notices around false values with taxonomy listings with post type registration. 82 | * Updated: Confirmed compatibility with WordPress 6.8 83 | 84 | = 1.17.2 - 2024-11-19 = 85 | * Fixed: PHP warnings around empty description variables from tools page. 86 | * Updated: Confirmed compatibility with WordPress 6.7 87 | 88 | = 1.17.1 - 2024-06-27 = 89 | * Fixed: Missed re-showing of autolabel fill links for js enabled browsers. 90 | 91 | = 1.17.0 - 2024-06-17 = 92 | * Added: "sidebars" as a reserved slug for post types. 93 | * Added: Blueprint for trying Custom Post Type UI on wordpress.org before installation. 94 | * Updated: Reworked javascript files to be more modular with the build process. 95 | 96 | = 1.16.0 - 2024-04-08 = 97 | * Added: Added a wpml-config.xml file. 98 | * Updated: Added "search_terms" to disallowed taxonomy list. 99 | * Updated: Began converting our javascript away from jQuery dependency. 100 | * Updated: tested up to WP 6.5 101 | 102 | = 1.15.1 - 2023-11-08 = 103 | * Fixed: Fixed up some Right-to-Left language styling issues. 104 | * Fixed: Fixing forgot to update about page and some PHP constants for CPTUI version. 105 | 106 | = 1.15.0 - 2023-11-06 = 107 | * Added: Checkbox to indicate you intend to migrate a post type into CPTUI in event of matching slugs. Props @ramsesdelr 108 | * Added: "item_trashed" post type label support from WordPress 6.3 109 | * Updated: confirmed compatibility with WordPress 6.4. 110 | * Updated: PHP8 compatibility. 111 | * Updated: Minimum WordPress version to version 6.3, minimum PHP version to 7.4. 112 | 113 | = 1.14.0 - 2023-08-07 = 114 | * Added: "Scroll to top" links in CPTUI pages. Props @aslamatwebdevstudios 115 | * Added: Remembers toggled states for CPTUI settings panels. Props @aslamatwebdevstudios and @ramsesdelr 116 | * Updated: Notes about slugs for both post types and taxonomies. 117 | * Updated: Support/FAQ section with more accurate links. 118 | 119 | == Installation == 120 | 121 | = Admin Installer via search = 122 | 1. Visit the Add New plugin screen and search for "custom post type ui". 123 | 2. Click the "Install Now" button. 124 | 3. Activate the plugin. 125 | 4. Navigate to the "CPTUI" Menu. 126 | 127 | = Admin Installer via zip = 128 | 1. Visit the Add New plugin screen and click the "Upload Plugin" button. 129 | 2. Click the "Browse..." button and select zip file from your computer. 130 | 3. Click "Install Now" button. 131 | 4. Once done uploading, activate Custom Post Type UI. 132 | 133 | = Manual = 134 | 1. Upload the Custom Post Type UI folder to the plugins directory in your WordPress installation. 135 | 2. Activate the plugin. 136 | 3. Navigate to the "CPTUI" Menu. 137 | 138 | That's it! Now you can easily start creating custom post types and taxonomies in WordPress. 139 | 140 | == Frequently Asked Questions == 141 | 142 | #### User documentation 143 | Please see https://docs.pluginize.com/tutorials/custom-post-type-ui/ 144 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import './js/cptui'; 2 | -------------------------------------------------------------------------------- /src/js/cptui.js: -------------------------------------------------------------------------------- 1 | import './partials/utils'; 2 | import './partials/hide-submit'; 3 | import './partials/toggle-hierarchical'; 4 | import './partials/autoswitch'; 5 | import './partials/confirm-delete'; 6 | import './partials/support-toggles'; 7 | import './partials/namefield'; 8 | import './partials/menu-icon'; 9 | import './partials/tax-required-post-type'; 10 | import './partials/autopopulate'; 11 | import './partials/back-to-top'; 12 | import './partials/toggle-panels'; 13 | 14 | //import './dashicons-picker'; 15 | -------------------------------------------------------------------------------- /src/js/dashiconsPicker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Dashicons Picker 3 | * 4 | * Based on: https://github.com/bradvin/dashicons-picker/ 5 | */ 6 | 7 | ( function ( $ ) { 8 | 'use strict'; 9 | /** 10 | * 11 | * @returns {void} 12 | */ 13 | $.fn.dashiconsPicker = function () { 14 | 15 | /** 16 | * Dashicons, in CSS order 17 | * 18 | * @type Array 19 | */ 20 | var icons = [ 21 | 'menu', 22 | 'admin-site', 23 | 'dashboard', 24 | 'admin-media', 25 | 'admin-page', 26 | 'admin-comments', 27 | 'admin-appearance', 28 | 'admin-plugins', 29 | 'admin-users', 30 | 'admin-tools', 31 | 'admin-settings', 32 | 'admin-network', 33 | 'admin-generic', 34 | 'admin-home', 35 | 'admin-collapse', 36 | 'filter', 37 | 'admin-customizer', 38 | 'admin-multisite', 39 | 'admin-links', 40 | 'format-links', 41 | 'admin-post', 42 | 'format-standard', 43 | 'format-image', 44 | 'format-gallery', 45 | 'format-audio', 46 | 'format-video', 47 | 'format-chat', 48 | 'format-status', 49 | 'format-aside', 50 | 'format-quote', 51 | 'welcome-write-blog', 52 | 'welcome-edit-page', 53 | 'welcome-add-page', 54 | 'welcome-view-site', 55 | 'welcome-widgets-menus', 56 | 'welcome-comments', 57 | 'welcome-learn-more', 58 | 'image-crop', 59 | 'image-rotate', 60 | 'image-rotate-left', 61 | 'image-rotate-right', 62 | 'image-flip-vertical', 63 | 'image-flip-horizontal', 64 | 'image-filter', 65 | 'undo', 66 | 'redo', 67 | 'editor-bold', 68 | 'editor-italic', 69 | 'editor-ul', 70 | 'editor-ol', 71 | 'editor-quote', 72 | 'editor-alignleft', 73 | 'editor-aligncenter', 74 | 'editor-alignright', 75 | 'editor-insertmore', 76 | 'editor-spellcheck', 77 | 'editor-distractionfree', 78 | 'editor-expand', 79 | 'editor-contract', 80 | 'editor-kitchensink', 81 | 'editor-underline', 82 | 'editor-justify', 83 | 'editor-textcolor', 84 | 'editor-paste-word', 85 | 'editor-paste-text', 86 | 'editor-removeformatting', 87 | 'editor-video', 88 | 'editor-customchar', 89 | 'editor-outdent', 90 | 'editor-indent', 91 | 'editor-help', 92 | 'editor-strikethrough', 93 | 'editor-unlink', 94 | 'editor-rtl', 95 | 'editor-break', 96 | 'editor-code', 97 | 'editor-paragraph', 98 | 'editor-table', 99 | 'align-left', 100 | 'align-right', 101 | 'align-center', 102 | 'align-none', 103 | 'lock', 104 | 'unlock', 105 | 'calendar', 106 | 'calendar-alt', 107 | 'visibility', 108 | 'hidden', 109 | 'post-status', 110 | 'edit', 111 | 'post-trash', 112 | 'trash', 113 | 'sticky', 114 | 'external', 115 | 'arrow-up', 116 | 'arrow-down', 117 | 'arrow-left', 118 | 'arrow-right', 119 | 'arrow-up-alt', 120 | 'arrow-down-alt', 121 | 'arrow-left-alt', 122 | 'arrow-right-alt', 123 | 'arrow-up-alt2', 124 | 'arrow-down-alt2', 125 | 'arrow-left-alt2', 126 | 'arrow-right-alt2', 127 | 'leftright', 128 | 'sort', 129 | 'randomize', 130 | 'list-view', 131 | 'excerpt-view', 132 | 'grid-view', 133 | 'hammer', 134 | 'art', 135 | 'migrate', 136 | 'performance', 137 | 'universal-access', 138 | 'universal-access-alt', 139 | 'tickets', 140 | 'nametag', 141 | 'clipboard', 142 | 'heart', 143 | 'megaphone', 144 | 'schedule', 145 | 'wordpress', 146 | 'wordpress-alt', 147 | 'pressthis', 148 | 'update', 149 | 'screenoptions', 150 | 'cart', 151 | 'feedback', 152 | 'cloud', 153 | 'translation', 154 | 'tag', 155 | 'category', 156 | 'archive', 157 | 'tagcloud', 158 | 'text', 159 | 'media-archive', 160 | 'media-audio', 161 | 'media-code', 162 | 'media-default', 163 | 'media-document', 164 | 'media-interactive', 165 | 'media-spreadsheet', 166 | 'media-text', 167 | 'media-video', 168 | 'playlist-audio', 169 | 'playlist-video', 170 | 'controls-play', 171 | 'controls-pause', 172 | 'controls-forward', 173 | 'controls-skipforward', 174 | 'controls-back', 175 | 'controls-skipback', 176 | 'controls-repeat', 177 | 'controls-volumeon', 178 | 'controls-volumeoff', 179 | 'yes', 180 | 'no', 181 | 'no-alt', 182 | 'plus', 183 | 'plus-alt', 184 | 'plus-alt2', 185 | 'minus', 186 | 'dismiss', 187 | 'marker', 188 | 'star-filled', 189 | 'star-half', 190 | 'star-empty', 191 | 'flag', 192 | 'info', 193 | 'warning', 194 | 'share', 195 | 'share1', 196 | 'share-alt', 197 | 'share-alt2', 198 | 'twitter', 199 | 'rss', 200 | 'email', 201 | 'email-alt', 202 | 'facebook', 203 | 'facebook-alt', 204 | 'networking', 205 | 'googleplus', 206 | 'location', 207 | 'location-alt', 208 | 'camera', 209 | 'images-alt', 210 | 'images-alt2', 211 | 'video-alt', 212 | 'video-alt2', 213 | 'video-alt3', 214 | 'vault', 215 | 'shield', 216 | 'shield-alt', 217 | 'sos', 218 | 'search', 219 | 'slides', 220 | 'analytics', 221 | 'chart-pie', 222 | 'chart-bar', 223 | 'chart-line', 224 | 'chart-area', 225 | 'groups', 226 | 'businessman', 227 | 'id', 228 | 'id-alt', 229 | 'products', 230 | 'awards', 231 | 'forms', 232 | 'testimonial', 233 | 'portfolio', 234 | 'book', 235 | 'book-alt', 236 | 'download', 237 | 'upload', 238 | 'backup', 239 | 'clock', 240 | 'lightbulb', 241 | 'microphone', 242 | 'desktop', 243 | 'tablet', 244 | 'smartphone', 245 | 'phone', 246 | 'smiley', 247 | 'index-card', 248 | 'carrot', 249 | 'building', 250 | 'store', 251 | 'album', 252 | 'palmtree', 253 | 'tickets-alt', 254 | 'money', 255 | 'thumbs-up', 256 | 'thumbs-down', 257 | 'layout', 258 | 'align-pull-left', 259 | 'align-pull-right', 260 | 'block-default', 261 | 'cloud-saved', 262 | 'cloud-upload', 263 | 'columns', 264 | 'cover-image', 265 | 'embed-audio', 266 | 'embed-generic', 267 | 'embed-photo', 268 | 'embed-post', 269 | 'embed-video', 270 | 'exit', 271 | 'html', 272 | 'info-outline', 273 | 'insert-after', 274 | 'insert-before', 275 | 'insert', 276 | 'remove', 277 | 'shortcode', 278 | 'table-col-after', 279 | 'table-col-before', 280 | 'table-col-delete', 281 | 'table-row-after', 282 | 'table-row-before', 283 | 'table-row-delete', 284 | 'saved', 285 | 'amazon', 286 | 'google', 287 | 'linkedin', 288 | 'pinterest', 289 | 'podio', 290 | 'reddit', 291 | 'spotify', 292 | 'twitch', 293 | 'whatsapp', 294 | 'xing', 295 | 'youtube', 296 | 'database-add', 297 | 'database-export', 298 | 'database-import', 299 | 'database-remove', 300 | 'database-view', 301 | 'database', 302 | 'bell', 303 | 'airplane', 304 | 'car', 305 | 'calculator', 306 | 'ames', 307 | 'printer', 308 | 'beer', 309 | 'coffee', 310 | 'drumstick', 311 | 'food', 312 | 'bank', 313 | 'hourglass', 314 | 'money-alt', 315 | 'open-folder', 316 | 'pdf', 317 | 'pets', 318 | 'privacy', 319 | 'superhero', 320 | 'superhero-alt', 321 | 'edit-page', 322 | 'fullscreen-alt', 323 | 'fullscreen-exit-alt' 324 | ]; 325 | 326 | return this.each( function () { 327 | 328 | var button = $( this ), 329 | offsetTop, 330 | offsetLeft; 331 | 332 | button.on( 'click.dashiconsPicker', function ( e ) { 333 | offsetTop = $( e.currentTarget ).offset().top; 334 | offsetLeft = $( e.currentTarget ).offset().left; 335 | createPopup( button ); 336 | } ); 337 | 338 | function createPopup( button ) { 339 | 340 | var target = $( '#menu_icon' ), 341 | preview = $( button.data( 'preview' ) ), 342 | popup = $( '
        ' + 343 | '
        ' + 344 | '
          ' + 345 | '
          ' ).css( { 346 | 'top': offsetTop, 347 | 'left': offsetLeft 348 | } ), 349 | list = popup.find( '.dashicon-picker-list' ); 350 | 351 | for ( var i in icons ) { 352 | if ( icons.hasOwnProperty(i) ) { 353 | list.append('
        • '); 354 | } 355 | } 356 | 357 | $( 'a', list ).on( 'click', function ( e ) { 358 | e.preventDefault(); 359 | var title = $( this ).attr( 'title' ); 360 | target.val( 'dashicons-' + title ).change(); 361 | preview 362 | .prop('class', 'dashicons') 363 | .addClass( 'dashicons-' + title ); 364 | removePopup(); 365 | } ); 366 | 367 | var control = popup.find( '.dashicon-picker-control' ); 368 | 369 | control.html( '' + 370 | '' + 371 | '' + 372 | '' 373 | ); 374 | 375 | $( 'a', control ).on( 'click', function ( e ) { 376 | e.preventDefault(); 377 | if ( $( this ).data( 'direction' ) === 'back' ) { 378 | $( 'li:gt(' + ( icons.length - 26 ) + ')', list ).prependTo( list ); 379 | } else { 380 | $( 'li:lt(25)', list ).appendTo( list ); 381 | } 382 | } ); 383 | 384 | popup.appendTo( 'body' ).show(); 385 | 386 | $( 'input', control ).on( 'keyup', function ( e ) { 387 | var search = $( this ).val(); 388 | if ( search === '' ) { 389 | $( 'li:lt(25)', list ).show(); 390 | } else { 391 | $( 'li', list ).each( function () { 392 | if ( $( this ).data( 'icon' ).toLowerCase().indexOf( search.toLowerCase() ) !== -1 ) { 393 | $( this ).show(); 394 | } else { 395 | $( this ).hide(); 396 | } 397 | } ); 398 | } 399 | } ); 400 | 401 | $( document ).on( 'mouseup.dashicons-picker', function ( e ) { 402 | if ( ! popup.is( e.target ) && popup.has( e.target ).length === 0 ) { 403 | removePopup(); 404 | } 405 | } ); 406 | } 407 | 408 | function removePopup() { 409 | $( '.dashicon-picker-container' ).remove(); 410 | $( document ).off( '.dashicons-picker' ); 411 | } 412 | } ); 413 | }; 414 | 415 | $( function () { 416 | $( '.dashicons-picker' ).dashiconsPicker(); 417 | } ); 418 | 419 | }( jQuery ) ); 420 | -------------------------------------------------------------------------------- /src/js/partials/autopopulate.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | * This file handles the automatic population as well as the automatic clearing of the label 5 | * fields, based on the provided singular and plural label values. 6 | */ 7 | 8 | (() => { 9 | let nameField = document.querySelector('#name'); 10 | let autoPopulate = document.querySelector('#auto-populate'); 11 | 12 | const autoLabels = document.querySelector('#autolabels'); 13 | if (autoLabels) { 14 | autoLabels.style.display = 'table-row'; 15 | } 16 | 17 | if (autoPopulate) { 18 | ['click', 'tap'].forEach((eventName, index) => { 19 | autoPopulate.addEventListener(eventName, (e) => { 20 | e.preventDefault(); 21 | 22 | let slug = nameField.value; 23 | let plural = document.querySelector('#label').value; 24 | let singular = document.querySelector('#singular_label').value; 25 | let fields = document.querySelectorAll('.cptui-labels input[type="text"]'); 26 | 27 | if ('' === slug) { 28 | return; 29 | } 30 | 31 | if ('' === plural) { 32 | plural = slug; 33 | } 34 | 35 | if ('' === singular) { 36 | singular = slug; 37 | } 38 | 39 | Array.from(fields).forEach(field => { 40 | let newval = field.getAttribute('data-label'); 41 | let plurality = field.getAttribute('data-plurality'); 42 | if (typeof newval !== 'undefined') { 43 | // "slug" is our placeholder from the labels. 44 | if ('plural' === plurality) { 45 | newval = newval.replace(/item/gi, plural); 46 | } else { 47 | // using an else statement because we do not 48 | // want to mutate the original string by default. 49 | newval = newval.replace(/item/gi, singular); 50 | } 51 | if (field.value === '') { 52 | field.value = newval; 53 | } 54 | } 55 | }); 56 | }) 57 | }); 58 | } 59 | 60 | let autoClear = document.querySelector('#auto-clear'); 61 | if (autoClear) { 62 | ['click', 'tap'].forEach((eventName, index) => { 63 | autoClear.addEventListener(eventName, (e) => { 64 | e.preventDefault(); 65 | 66 | const fields = document.querySelectorAll('.cptui-labels input[type="text"]'); 67 | Array.from(fields).forEach(field => { 68 | field.value = ''; 69 | }); 70 | }) 71 | }); 72 | } 73 | })(); 74 | -------------------------------------------------------------------------------- /src/js/partials/autoswitch.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | * This file handles automatically switching to a chosen content type when selecting from the 5 | * dropdown listing. 6 | */ 7 | 8 | (() => { 9 | // Switch to newly selected post type or taxonomy automatically. 10 | const postTypeDropdown = document.querySelector('#post_type'); 11 | const taxonomyDropdown = document.querySelector('#taxonomy'); 12 | 13 | if (postTypeDropdown) { 14 | postTypeDropdown.addEventListener('change', () => { 15 | const postTypeSelectPostType = document.querySelector('#cptui_select_post_type'); 16 | if (postTypeSelectPostType) { 17 | postTypeSelectPostType.submit(); 18 | } 19 | }) 20 | } 21 | if (taxonomyDropdown) { 22 | taxonomyDropdown.addEventListener('change', () => { 23 | const taxonomySelectPostType = document.querySelector('#cptui_select_taxonomy'); 24 | if (taxonomySelectPostType) { 25 | taxonomySelectPostType.submit(); 26 | } 27 | }) 28 | } 29 | })(); 30 | -------------------------------------------------------------------------------- /src/js/partials/back-to-top.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | * This file handles the back to top functionality as the user scrolls, for quick return to top. 5 | * 6 | * This includes some debouncing to prevent excessive scroll event listening. 7 | */ 8 | 9 | (() => { 10 | const back_to_top_btn = document.querySelector('.cptui-back-to-top'); 11 | if (back_to_top_btn) { 12 | document.addEventListener('scroll', () => { 13 | cptuiDebounce(backToTop, 500); 14 | }); 15 | 16 | back_to_top_btn.addEventListener('click', (e) => { 17 | e.preventDefault(); 18 | window.scrollTo({ 19 | top : 0, 20 | behavior: "smooth" 21 | }) 22 | }); 23 | } 24 | 25 | function backToTop() { 26 | if (window.scrollY > 300) { 27 | back_to_top_btn.classList.add('show'); 28 | } else { 29 | back_to_top_btn.classList.remove('show'); 30 | } 31 | } 32 | 33 | function cptuiDebounce(method, delay) { 34 | clearTimeout(method._tId); 35 | method._tId = setTimeout(function () { 36 | method(); 37 | }, delay); 38 | } 39 | })(); 40 | -------------------------------------------------------------------------------- /src/js/partials/confirm-delete.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | * This file handles confirming the deletion of a content type before continuing. 5 | * 6 | * @todo Finish converting away from jQuery. 7 | */ 8 | 9 | (($) => { 10 | // NOT DONE 11 | /*['.cptui-delete-top', '.cptui-delete-bottom'].forEach( (element,index) => { 12 | let theDialog = document.querySelector('#cptui-content-type-delete'); 13 | let theelement = document.querySelector(element); 14 | theelement.addEventListener('click', async (e) => { 15 | e.preventDefault(); 16 | const doPerformAction = await confirm(); 17 | if ( doPerformAction ) { 18 | let thing = document.querySelector('#cpt_submit_delete'); 19 | console.log(thing); 20 | thing.click(); 21 | thing.submit(); 22 | theDialog.close(); 23 | } else { 24 | theDialog.close(); 25 | } 26 | }); 27 | }); 28 | 29 | let closeBtnConfirm = document.querySelector('.cptui-confirm-deny-delete button'); 30 | let closeBtnDeny = document.querySelector('#cptui-content-type-deny-delete'); 31 | function confirm() { 32 | return new Promise((resolve, reject) => { 33 | document.querySelector('#cptui-content-type-delete').showModal(); 34 | closeBtnConfirm.focus(); 35 | 36 | closeBtnConfirm.addEventListener("click", () => { 37 | resolve(true); 38 | document.querySelector('#cptui-content-type-delete').close() 39 | }); 40 | closeBtnDeny.addEventListener("click", () => { 41 | resolve(false); 42 | document.querySelector('#cptui-content-type-delete').close() 43 | }); 44 | }); 45 | }*/ 46 | 47 | // Confirm our deletions 48 | $('.cptui-delete-top, .cptui-delete-bottom').on('click', function (e) { 49 | e.preventDefault(); 50 | let msg = ''; 51 | if (typeof cptui_type_data !== 'undefined') { 52 | msg = cptui_type_data.confirm; 53 | } else if (typeof cptui_tax_data !== 'undefined') { 54 | msg = cptui_tax_data.confirm; 55 | } 56 | let submit_delete_warning = $('
          ' + msg + '
          ').appendTo('#poststuff').dialog({ 57 | 'dialogClass': 'wp-dialog', 58 | 'modal' : true, 59 | 'autoOpen' : true, 60 | 'buttons' : { 61 | "OK" : function () { 62 | $(this).dialog('close'); 63 | $(e.target).off('click').click(); 64 | }, 65 | "Cancel": function () { 66 | $(this).dialog('close'); 67 | } 68 | } 69 | }); 70 | }); 71 | })(jQuery); 72 | -------------------------------------------------------------------------------- /src/js/partials/hide-submit.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | * This file visually removes the submit button to change content type being edited. 5 | * 6 | * If by chance javascript is disabled or somehow breaking, the button would show by default, 7 | * preventing issues with switching content types. 8 | */ 9 | 10 | (() => { 11 | const cptSelectSubmit = document.querySelector('#cptui_select_post_type_submit'); 12 | if (cptSelectSubmit) { 13 | cptSelectSubmit.style.display = 'none'; 14 | } 15 | const taxSelectSubmit = document.querySelector('#cptui_select_taxonomy_submit'); 16 | if (taxSelectSubmit) { 17 | taxSelectSubmit.style.display = 'none'; 18 | } 19 | })(); 20 | -------------------------------------------------------------------------------- /src/js/partials/menu-icon.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import {composePreviewContent} from './utils'; 4 | 5 | /* 6 | * This file handles setting the menu icon preview for a given post type. 7 | * 8 | * @todo Finish converting away from jQuery. 9 | */ 10 | 11 | (($) => { 12 | let _custom_media; 13 | let _orig_send_attachment; 14 | 15 | if (undefined !== wp.media) { 16 | _custom_media = true; 17 | _orig_send_attachment = wp.media.editor.send.attachment; 18 | } 19 | 20 | $('#cptui_choose_icon').on('click', function (e) { 21 | e.preventDefault(); 22 | 23 | let button = $(this); 24 | let id = jQuery('#menu_icon').attr('id'); 25 | _custom_media = true; 26 | wp.media.editor.send.attachment = function (props, attachment) { 27 | if (_custom_media) { 28 | $("#" + id).val(attachment.url).change(); 29 | } else { 30 | return _orig_send_attachment.apply(this, [props, attachment]); 31 | } 32 | }; 33 | 34 | wp.media.editor.open(button); 35 | return false; 36 | }); 37 | 38 | // NOT DONE 39 | /*const menuIcon = document.querySelector('#menu_icon'); 40 | if (menuIcon) { 41 | menuIcon.addEventListener('input', (e) => { 42 | let value = e.currentTarget.value.trim(); 43 | console.log(value); 44 | let menuIconPreview = document.querySelector('#menu_icon_preview'); 45 | console.log(menuIconPreview); 46 | if (menuIconPreview) { 47 | console.log(composePreviewContent(value)); 48 | menuIconPreview.innerHTML = composePreviewContent(value); 49 | } 50 | }); 51 | }*/ 52 | $('#menu_icon').on('change', function () { 53 | var value = $(this).val(); 54 | value = value.trim(); 55 | $('#menu_icon_preview').html(composePreviewContent(value)); 56 | }); 57 | })(jQuery); 58 | -------------------------------------------------------------------------------- /src/js/partials/namefield.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | import { getParameterByName, replaceDiacritics, transliterate, replaceSpecialCharacters } from './utils' 3 | 4 | /* 5 | * This file handles all of the normalization of the name/slug field for a post type 6 | * or taxonomy being registered. 7 | * 8 | * That way we are only allowing latin characters and dashes/underscores. 9 | * 10 | * It also shows a hidden alert if the slug has been changed in some way when editing an existing 11 | * content type. 12 | * 13 | * Lastly it will also show a warning if the attempted slug has already been registered elsewhere, 14 | * to help avoid clashes. The only exception is if the checkbox is checked indicating that the user 15 | * is trying to convert TO using CPTUI, and the conflicting slug elsewhere will be removed soon. 16 | */ 17 | 18 | (() => { 19 | let nameField = document.querySelector('#name'); 20 | let original_slug; 21 | 22 | if ('edit' === getParameterByName('action')) { 23 | if (nameField) { 24 | // Store our original slug on page load for edit checking. 25 | original_slug = nameField.value; 26 | } 27 | } 28 | 29 | if (nameField) { 30 | // Switch spaces for underscores on our slug fields. 31 | nameField.addEventListener('keyup', (e) => { 32 | let value, original_value; 33 | 34 | value = original_value = e.currentTarget.value; 35 | let keys = ['Tab', 'ArrowLeft', 'ArrowUp', 'ArrowRight', 'ArrowDown']; 36 | if (!keys.includes(e.code)) { 37 | value = value.replace(/ /g, "_"); 38 | value = value.toLowerCase(); 39 | value = replaceDiacritics(value); 40 | value = transliterate(value); 41 | value = replaceSpecialCharacters(value); 42 | if (value !== original_value) { 43 | e.currentTarget.value = value; 44 | } 45 | } 46 | 47 | //Displays a message if slug changes. 48 | if (typeof original_slug !== 'undefined') { 49 | let slugchanged = document.querySelector('#slugchanged'); 50 | if (value !== original_slug) { 51 | slugchanged.classList.remove('hidemessage'); 52 | } else { 53 | slugchanged.classList.add('hidemessage'); 54 | } 55 | } 56 | 57 | let slugexists = document.querySelector('#slugexists'); 58 | let override = document.querySelector('#override_validation'); 59 | let override_validation = (override) ? override.check : false; 60 | if (typeof cptui_type_data != 'undefined') { 61 | if (cptui_type_data.existing_post_types.hasOwnProperty(value) && value !== original_slug && override_validation === false) { 62 | slugexists.classList.remove('hidemessage'); 63 | } else { 64 | slugexists.classList.add('hidemessage'); 65 | } 66 | } 67 | if (typeof cptui_tax_data != 'undefined') { 68 | if (cptui_tax_data.existing_taxonomies.hasOwnProperty(value) && value !== original_slug) { 69 | slugexists.classList.remove('hidemessage'); 70 | } else { 71 | slugexists.classList.add('hidemessage'); 72 | } 73 | } 74 | }); 75 | } 76 | })(); 77 | -------------------------------------------------------------------------------- /src/js/partials/support-toggles.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | * This file handles accordian behavior on the Supports page with the various question/answer panels. 5 | * 6 | * The functionality includes keyboard and accessibility functionality to help those who need it. 7 | */ 8 | 9 | (() => { 10 | // Toggles help/support accordions. 11 | const supportQuestions = document.querySelectorAll('#support .question'); 12 | Array.from(supportQuestions).forEach(function (question, index) { 13 | let next = function (elem, selector) { 14 | let nextElem = elem.nextElementSibling; 15 | 16 | if (!selector) { 17 | return nextElem; 18 | } 19 | 20 | if (nextElem && nextElem.matches(selector)) { 21 | return nextElem; 22 | } 23 | 24 | return null; 25 | }; 26 | 27 | let state = false; 28 | let answer = next(question, 'div'); 29 | answer.style.display = 'none'; 30 | 31 | ['click', 'keydown'].forEach((theEvent) => { 32 | question.addEventListener(theEvent, (e) => { 33 | // Helps with accessibility and keyboard navigation. 34 | let keys = ['Space', 'Enter']; 35 | if (e.type === 'keydown' && !keys.includes(e.code)) { 36 | return 37 | } 38 | e.preventDefault(); 39 | state = !state; 40 | answer.style.display = state ? 'block' : 'none'; 41 | e.currentTarget.classList.toggle('active') 42 | e.currentTarget.setAttribute('aria-expanded', state.toString()); 43 | e.currentTarget.focus(); 44 | }); 45 | }); 46 | }); 47 | })(); 48 | -------------------------------------------------------------------------------- /src/js/partials/tax-required-post-type.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | * This file provides a dialog box to alert the user that at least one post type must be chosen 5 | * before they can save a taxonomy. 6 | * 7 | * This was added because taxonomies need to have a post type, meanwhile post types do NOT need 8 | * to have a taxonomy. 9 | */ 10 | 11 | (() => { 12 | // Handles checking if a post type has been chosen or not when adding/saving a taxonomy. 13 | // Post type associations are a required attribute. 14 | const taxSubmit = document.querySelectorAll('.cptui-taxonomy-submit'); 15 | const taxSubmitSelectCPTDialog = document.querySelector('#cptui-select-post-type-confirm'); 16 | Array.from(taxSubmit).forEach((element, i) => { 17 | element.addEventListener('click', (e) => { 18 | // putting inside event listener to check every time clicked. Defining outside lost re-checking. 19 | let taxCPTChecked = document.querySelectorAll('#cptui_panel_tax_basic_settings input[type="checkbox"]:checked'); 20 | if (taxCPTChecked.length === 0) { 21 | e.preventDefault(); 22 | taxSubmitSelectCPTDialog.showModal(); 23 | } 24 | }); 25 | }); 26 | let taxSubmitSelectCPTConfirmCloseBtn = document.querySelector('#cptui-select-post-type-confirm-close'); 27 | if (taxSubmitSelectCPTConfirmCloseBtn) { 28 | taxSubmitSelectCPTConfirmCloseBtn.addEventListener('click', (e) => { 29 | e.preventDefault(); 30 | taxSubmitSelectCPTDialog.close(); 31 | }); 32 | } 33 | })(); 34 | -------------------------------------------------------------------------------- /src/js/partials/toggle-hierarchical.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | * This file handles automatically toggling the "Page attributes" option in the "Supports" section 5 | * when a user chooses to have their post type be hierarchical. 6 | * 7 | * The purpose is to help ensure that the "parent" and "template" metabox option shows up by default, 8 | * but we do not force that to remain checked. The user can still toggle it off after the fact. 9 | */ 10 | 11 | (() => { 12 | // Automatically toggle the "page attributes" checkbox if 13 | // setting a hierarchical post type. 14 | const hierarchicalSetting = document.querySelector('#hierarchical'); 15 | if (hierarchicalSetting) { 16 | hierarchicalSetting.addEventListener('change', (e) => { 17 | let pageAttributesCheck = document.querySelector('#page-attributes'); 18 | if (e.currentTarget && e.currentTarget.value === '1') { 19 | pageAttributesCheck.checked = true; 20 | } else { 21 | pageAttributesCheck.checked = false; 22 | } 23 | }); 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /src/js/partials/toggle-panels.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 4 | * This file handles storing the panel state for the post type and taxonomy edit screens. 5 | * 6 | * The open/closed state gets stored into localstorage and is remembered on future page refreshes. 7 | */ 8 | 9 | postboxes.add_postbox_toggles(pagenow); 10 | 11 | (() => { 12 | // Toggle Panels State. 13 | // @todo. Localize the list of panel selectors so that we can filter in the CPTUI-Extended panel without hardcoding here. 14 | const all_panels = ["#cptui_panel_pt_basic_settings", "#cptui_panel_pt_additional_labels", "#cptui_panel_pt_advanced_settings", "#cptui_panel_tax_basic_settings", "#cptui_panel_tax_additional_labels", "#cptui_panel_tax_advanced_settings"]; 15 | all_panels.forEach((element, index) => { 16 | const panel_id_item = document.querySelector(element); 17 | if (panel_id_item) { 18 | const panel_id = panel_id_item.getAttribute('id'); 19 | const panel = document.querySelector('#' + panel_id); 20 | 21 | // check default state on page load 22 | if (!localStorage.getItem(panel_id) || localStorage.getItem(panel_id) === null) { 23 | panel.classList.remove('closed'); 24 | } else { 25 | panel.classList.add('closed'); 26 | } 27 | 28 | const postbox = panel_id_item.querySelectorAll('.postbox-header'); 29 | Array.from(postbox).forEach((el, i) => { 30 | el.addEventListener('click', (e) => { 31 | if (!localStorage.getItem(panel_id)) { 32 | localStorage.setItem(panel_id, '1'); 33 | } else { 34 | localStorage.removeItem(panel_id); 35 | } 36 | }) 37 | }); 38 | } 39 | }); 40 | })(); 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/js/partials/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Retrieve URL parameters by requested parameter name. 4 | export function getParameterByName(name, url) { 5 | if (!url) url = window.location.href; 6 | name = name.replace(/[\[\]]/g, "\\$&"); 7 | const regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), 8 | results = regex.exec(url); 9 | if (!results) return null; 10 | if (!results[2]) return ''; 11 | return decodeURIComponent(results[2].replace(/\+/g, " ")); 12 | } 13 | 14 | // Split, translate cyrillic characters, and then re-join the final result. 15 | export function transliterate(word) { 16 | return word.split('').map(function (char) { 17 | return cyrillic[char] || char; 18 | }).join(""); 19 | } 20 | 21 | //Character encode special characters. 22 | export function htmlEncode(str) { 23 | return String(str).replace(/[^-\w. ]/gi, function (c) { 24 | return '&#' + c.charCodeAt(0) + ';'; 25 | }); 26 | } 27 | 28 | // Constructs miniture versions of uploaded media for admnin menu icon usage, 29 | // or displays the rendered dashicon. 30 | export function composePreviewContent(value) { 31 | const re = /(http|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/; 32 | const isURL = re.test(value); 33 | 34 | if (!value) { 35 | return ''; 36 | } else if (0 === value.indexOf('dashicons-')) { 37 | const dashDiv = document.createElement('div'); 38 | dashDiv.classList.add('dashicons-before'); 39 | dashDiv.innerHTML = '
          '; 40 | dashDiv.classList.add(htmlEncode(value)); 41 | return dashDiv; 42 | } else if (isURL) { 43 | const imgsrc = encodeURI(value); 44 | const theimg = document.createElement('IMG'); 45 | theimg.src = imgsrc; 46 | return theimg; 47 | } 48 | } 49 | 50 | // Replace diacritic characters with latin characters. 51 | export function replaceDiacritics(s) { 52 | const diacritics = [ 53 | /[\300-\306]/g, /[\340-\346]/g, // A, a 54 | /[\310-\313]/g, /[\350-\353]/g, // E, e 55 | /[\314-\317]/g, /[\354-\357]/g, // I, i 56 | /[\322-\330]/g, /[\362-\370]/g, // O, o 57 | /[\331-\334]/g, /[\371-\374]/g, // U, u 58 | /[\321]/g, /[\361]/g, // N, n 59 | /[\307]/g, /[\347]/g // C, c 60 | ]; 61 | 62 | let chars = ['A', 'a', 'E', 'e', 'I', 'i', 'O', 'o', 'U', 'u', 'N', 'n', 'C', 'c']; 63 | 64 | for (let i = 0; i < diacritics.length; i++) { 65 | s = s.replace(diacritics[i], chars[i]); 66 | } 67 | 68 | return s; 69 | } 70 | 71 | // Converts non-alphanumeric or space characters to an underscore. Should ignore dashes, to allow 72 | // using dashes in slugs. 73 | export function replaceSpecialCharacters(s) { 74 | s = s.replace(/[^a-z0-9\s-]/gi, '_'); 75 | return s; 76 | } 77 | 78 | // List of available cyrillic characters and the value to translate to. 79 | export const cyrillic = { 80 | "Ё": "YO", 81 | "Й": "I", 82 | "Ц": "TS", 83 | "У": "U", 84 | "К": "K", 85 | "Е": "E", 86 | "Н": "N", 87 | "Г": "G", 88 | "Ш": "SH", 89 | "Щ": "SCH", 90 | "З": "Z", 91 | "Х": "H", 92 | "Ъ": "'", 93 | "ё": "yo", 94 | "й": "i", 95 | "ц": "ts", 96 | "у": "u", 97 | "к": "k", 98 | "е": "e", 99 | "н": "n", 100 | "г": "g", 101 | "ш": "sh", 102 | "щ": "sch", 103 | "з": "z", 104 | "х": "h", 105 | "ъ": "'", 106 | "Ф": "F", 107 | "Ы": "I", 108 | "В": "V", 109 | "А": "a", 110 | "П": "P", 111 | "Р": "R", 112 | "О": "O", 113 | "Л": "L", 114 | "Д": "D", 115 | "Ж": "ZH", 116 | "Э": "E", 117 | "ф": "f", 118 | "ы": "i", 119 | "в": "v", 120 | "а": "a", 121 | "п": "p", 122 | "р": "r", 123 | "о": "o", 124 | "л": "l", 125 | "д": "d", 126 | "ж": "zh", 127 | "э": "e", 128 | "Я": "Ya", 129 | "Ч": "CH", 130 | "С": "S", 131 | "М": "M", 132 | "И": "I", 133 | "Т": "T", 134 | "Ь": "'", 135 | "Б": "B", 136 | "Ю": "YU", 137 | "я": "ya", 138 | "ч": "ch", 139 | "с": "s", 140 | "м": "m", 141 | "и": "i", 142 | "т": "t", 143 | "ь": "'", 144 | "б": "b", 145 | "ю": "yu" 146 | }; 147 | -------------------------------------------------------------------------------- /src/scss/cptui-styles.scss: -------------------------------------------------------------------------------- 1 | $min-tablet: "screen and (min-width: 769px)"; 2 | $max-tablet: "screen and (max-width: 768px)"; 3 | 4 | .posttypesui, .taxonomiesui { 5 | .cptui-section:first-child { 6 | margin-top: 30px; 7 | } 8 | width: calc(100% - 300px); 9 | .postbox-container { 10 | width: 100%; 11 | } 12 | .postbox .toggle-indicator:before { 13 | content: "\f142"; 14 | display: inline-block; 15 | font: normal 20px/1 dashicons; 16 | speak: none; 17 | -webkit-font-smoothing: antialiased; 18 | -moz-osx-font-smoothing: grayscale; 19 | text-decoration: none !important; 20 | } 21 | .postbox.closed .handlediv .toggle-indicator::before { 22 | content: "\f140"; 23 | } 24 | .postbox .hndle { 25 | cursor: pointer; 26 | } 27 | .required { 28 | color: rgb(255, 0, 0); 29 | } 30 | } 31 | .cptui-table { 32 | td.outer { 33 | vertical-align: top; 34 | width: 50%; 35 | } 36 | input[type="text"] { 37 | width: 75%; 38 | } 39 | .question:hover { 40 | cursor: pointer; 41 | } 42 | th p { 43 | font-weight: 400; 44 | font-size: 12px; 45 | } 46 | .cptui-slug-details { 47 | margin-top: 15px; 48 | } 49 | 50 | #slugchanged, #slugexists { 51 | color: red; 52 | font-weight: bold; 53 | &.hidemessage { 54 | display: none; 55 | } 56 | } 57 | } 58 | 59 | .cptui-support #support { 60 | .question { 61 | font-size: 18px; 62 | font-weight: bold; 63 | &:before { 64 | content: "\f139"; 65 | display: inline-block; 66 | font: normal 25px/1 'dashicons'; 67 | margin-left: -25px; 68 | position: absolute; 69 | -webkit-font-smoothing: antialiased; 70 | } 71 | :dir(rtl) &:before { 72 | content: "\f141"; 73 | margin-left: 0; 74 | margin-right: -25px; 75 | } 76 | &.active:before { 77 | content: "\f140"; 78 | } 79 | } 80 | .answer { 81 | margin: 10px 0 0 20px; 82 | } 83 | ol li { 84 | list-style: none; 85 | } 86 | li { 87 | position: relative; 88 | } 89 | } 90 | .cptui-field-description { 91 | font-style: italic; 92 | } 93 | #cptui_select_post_type, 94 | #cptui_select_taxonomy { 95 | margin-top: 15px; 96 | } 97 | .cptui_post_import, 98 | .cptui_tax_import { 99 | height: 200px; 100 | margin-bottom: 10px; 101 | resize: vertical; 102 | width: 100%; 103 | 104 | :dir(rtl) & { 105 | direction: ltr; 106 | } 107 | } 108 | .cptui_post_type_get_code, 109 | .cptui_tax_get_code { 110 | height: 300px; 111 | resize: vertical; 112 | 113 | :dir(rtl) & { 114 | direction: ltr; 115 | } 116 | } 117 | .about-wrap { 118 | .cptui-feature { 119 | overflow: visible !important; 120 | *zoom:1; 121 | &:before, 122 | &:after { 123 | content: " "; 124 | display: table; 125 | } 126 | &:after { 127 | clear: both; 128 | } 129 | } 130 | h3 + .cptui-feature { 131 | margin-top: 0; 132 | } 133 | .changelog { 134 | h2 { 135 | text-align: center; 136 | } 137 | } 138 | .feature-rest { 139 | div { 140 | width: 50% !important; 141 | padding-right: 100px; 142 | -moz-box-sizing: border-box; 143 | box-sizing: border-box; 144 | margin: 0 !important; 145 | &.last-feature { 146 | padding-left: 100px; 147 | padding-right: 0; 148 | } 149 | &.icon { 150 | width: 0 !important; 151 | padding: 0; 152 | margin: 0; 153 | &:before { 154 | font-weight: normal; 155 | width: 100%; 156 | font-size: 170px; 157 | line-height: 125px; 158 | color: #9c5d90; 159 | display: inline-block; 160 | position: relative; 161 | text-align: center; 162 | speak: none; 163 | margin: 0 0 0 -100px; 164 | content: "\e01d"; 165 | -webkit-font-smoothing: antialiased; 166 | -moz-osx-font-smoothing: grayscale; 167 | } 168 | } 169 | } 170 | } 171 | } 172 | .about-wrap { 173 | .about-integrations { 174 | background: #fff; 175 | margin: 20px 0; 176 | padding: 1px 20px 10px; 177 | } 178 | .changelog { 179 | h4 { 180 | line-height: 1.4; 181 | } 182 | } 183 | .cptui-about-text { 184 | margin-bottom: 1em !important; 185 | margin-right: 0; 186 | max-width: calc(100% - 173px); 187 | } 188 | } 189 | .email-octopus-form-row { 190 | input::placeholder { 191 | color: #cccccc; 192 | } 193 | } 194 | .email-octopus-form-row-hp { 195 | visibility: hidden; 196 | } 197 | .cptui-intro-devblock{ 198 | display: flex; 199 | flex-direction: row; 200 | } 201 | 202 | .cptui-help { 203 | color: #424242; 204 | margin-left: 4px; 205 | opacity: 0.5; 206 | text-decoration: none; 207 | width: 16px; 208 | fieldset & { 209 | position: relative; 210 | top: 4px; 211 | } 212 | &:hover { 213 | color: #0074a2; 214 | opacity: 1; 215 | } 216 | &:focus { 217 | box-shadow: none; 218 | } 219 | } 220 | #menu_icon_preview { 221 | float: right; 222 | padding-left: 8px; 223 | 224 | img { 225 | display: block; 226 | height: 20px; 227 | width: 20px; 228 | } 229 | } 230 | 231 | .visuallyhidden { 232 | position: absolute; 233 | left: -10000px; 234 | top: auto; 235 | width: 1px; 236 | height: 1px; 237 | overflow: hidden; 238 | } 239 | .cptui-spacer { 240 | display: block; 241 | margin-top: 25px; 242 | } 243 | 244 | .email-octopus-form-wrapper { 245 | background: #fff; 246 | margin-bottom: 10px; 247 | padding: 20px; 248 | label { 249 | margin-bottom: 10px; 250 | } 251 | } 252 | 253 | .wdsoctosignup { 254 | h2 { 255 | text-align:left; 256 | } 257 | } 258 | 259 | .wdspromos { 260 | float: right; 261 | margin-left: 20px; 262 | margin-top: 10px; 263 | width: 275px; 264 | 265 | :dir(rtl) & { 266 | float: left; 267 | margin-left: 0; 268 | margin-right: 20px; 269 | } 270 | } 271 | 272 | .wdspromos-about { 273 | display: -ms-flexbox; 274 | display: -webkit-flex; 275 | display: flex; 276 | -webkit-flex-direction: row; 277 | -ms-flex-direction: row; 278 | flex-direction: row; 279 | -webkit-flex-wrap: nowrap; 280 | -ms-flex-wrap: nowrap; 281 | flex-wrap: nowrap; 282 | -webkit-justify-content: space-between; 283 | -ms-flex-pack: justify; 284 | justify-content: space-between; 285 | -webkit-align-content: stretch; 286 | align-content: stretch; 287 | -webkit-align-items: flex-start; 288 | -ms-flex-align: start; 289 | align-items: flex-start; 290 | margin: 20px 0; 291 | 292 | a:nth-child(1) { 293 | -ms-flex-order: 0; 294 | order: 0; 295 | -webkit-flex: 0 1 auto; 296 | -ms-flex: 0 1 auto; 297 | flex: 0 1 auto; 298 | -webkit-align-self: auto; 299 | align-self: auto; 300 | } 301 | 302 | a:nth-child(2) { 303 | -ms-flex-order: 0; 304 | order: 0; 305 | -webkit-flex: 0 1 auto; 306 | -ms-flex: 0 1 auto; 307 | flex: 0 1 auto; 308 | -webkit-align-self: auto; 309 | align-self: auto; 310 | } 311 | 312 | a:nth-child(3) { 313 | -ms-flex-order: 0; 314 | order: 0; 315 | -webkit-flex: 0 1 auto; 316 | -ms-flex: 0 1 auto; 317 | flex: 0 1 auto; 318 | -webkit-align-self: auto; 319 | align-self: auto; 320 | } 321 | p { 322 | padding: 0 5px; 323 | &:nth-child(1) { 324 | padding-left: 0; 325 | } 326 | &:nth-child(4) { 327 | padding-right: 0; 328 | } 329 | } 330 | } 331 | .no-js { 332 | #cptui_choose_icon { 333 | display: none 334 | } 335 | } 336 | .cptui-listings { 337 | th { 338 | font-weight: bold; 339 | } 340 | .post-type-listing { 341 | th { 342 | width: 16.66667%; 343 | } 344 | } 345 | .taxonomy-listing { 346 | th { 347 | width: 20%; 348 | } 349 | } 350 | } 351 | #poststuff { 352 | min-width: 463px; 353 | } 354 | 355 | .dashicon-picker-container { 356 | position: absolute; 357 | width: 220px; 358 | height: 252px; 359 | font-size: 14px; 360 | background-color: #fff; 361 | box-shadow: -1px 2px 5px 3px rgba(0, 0, 0, 0.41); 362 | overflow: hidden; 363 | padding: 5px; 364 | box-sizing: border-box; 365 | 366 | ul { 367 | margin: 0 0 10px; 368 | padding: 0; 369 | 370 | .dashicons { 371 | width: 20px; 372 | height: 20px; 373 | font-size: 20px; 374 | } 375 | 376 | li { 377 | display: inline-block; 378 | margin: 5px; 379 | float: left; 380 | 381 | a { 382 | display: block; 383 | text-decoration: none; 384 | color: #373737; 385 | padding: 5px 5px; 386 | border: 1px solid #dfdfdf; 387 | 388 | &:hover { 389 | border-color: #999; 390 | background: #efefef; 391 | } 392 | } 393 | } 394 | } 395 | } 396 | 397 | .dashicon-picker-control { 398 | height: 32px; 399 | 400 | a { 401 | padding: 5px; 402 | text-decoration: none; 403 | line-height: 32px; 404 | width: 25px; 405 | 406 | span { 407 | display: inline; 408 | vertical-align: middle; 409 | } 410 | } 411 | 412 | input { 413 | font-size: 12px; 414 | width: 140px; 415 | } 416 | } 417 | 418 | .cptui-back-to-top { 419 | position: fixed; 420 | bottom: 30px; 421 | right: 20px; 422 | z-index: 10; 423 | transition: 0.25s all ease-in-out; 424 | opacity: 0; 425 | visibility: hidden; 426 | 427 | &.show{ 428 | opacity: 1; 429 | visibility: visible; 430 | } 431 | } 432 | 433 | @media #{$min-tablet} { 434 | .cptui-badge { 435 | margin-top: -42px; 436 | height: 173px; 437 | width: 173px; 438 | color: #fafafa; 439 | font-weight: bold; 440 | font-size: 14px; 441 | text-align: center; 442 | margin-bottom: 10px; 443 | background: url(../images/cptui-icon-173x173.png) no-repeat; 444 | background-size: contain; 445 | } 446 | } 447 | 448 | @media #{$max-tablet} { 449 | .cptui-table { 450 | #description { 451 | width: 100%; 452 | } 453 | } 454 | .wdspromos-about { 455 | flex-wrap: wrap; 456 | p { 457 | margin: 5px auto; 458 | &:nth-child(1) { 459 | padding-left: 5px; 460 | } 461 | &:nth-child(4) { 462 | padding-right: 5px; 463 | } 464 | } 465 | } 466 | .cptui-table { 467 | td.outer { 468 | width: 100%; 469 | } 470 | } 471 | 472 | #cptui_debug_info_email { 473 | width: 100%; 474 | } 475 | } 476 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const defaultConfig = require('@wordpress/scripts/config/webpack.config'); 2 | 3 | module.exports = { 4 | ...defaultConfig, 5 | entry: { 6 | "cptui": './src/js/cptui.js', 7 | "dashiconsPicker": './src/js/dashiconsPicker' 8 | }, 9 | optimization: { 10 | minimize: false 11 | }, 12 | devtool: 'source-map', 13 | }; 14 | -------------------------------------------------------------------------------- /wpml-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | --------------------------------------------------------------------------------