Full Code of wp-papi/papi for AI

master c6621f5acbf2 cached
354 files
1.1 MB
338.5k tokens
2127 symbols
1 requests
Download .txt
Showing preview only (1,173K chars total). Download the full file or copy to clipboard to get everything.
Repository: wp-papi/papi
Branch: master
Commit: c6621f5acbf2
Files: 354
Total size: 1.1 MB

Directory structure:
gitextract_jmguve0w/

├── .babelrc
├── .editorconfig
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── issue_template.md
│   ├── pull_request_template.md
│   └── workflows/
│       └── php.yml
├── .gitignore
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── composer.json
├── docker-compose.yml
├── languages/
│   ├── papi-fr_FR.mo
│   ├── papi-fr_FR.po
│   ├── papi-sv_SE.mo
│   ├── papi-sv_SE.po
│   └── papi.pot
├── package.json
├── papi-loader.php
├── phpcs.xml
├── phpunit.xml.dist
├── src/
│   ├── admin/
│   │   ├── class-papi-admin-ajax.php
│   │   ├── class-papi-admin-assets.php
│   │   ├── class-papi-admin-columns.php
│   │   ├── class-papi-admin-entry-post.php
│   │   ├── class-papi-admin-entry-taxonomy.php
│   │   ├── class-papi-admin-entry.php
│   │   ├── class-papi-admin-menu.php
│   │   ├── class-papi-admin-meta-box-tabs.php
│   │   ├── class-papi-admin-meta-box.php
│   │   ├── class-papi-admin-meta-handler.php
│   │   ├── class-papi-admin-option-handler.php
│   │   ├── class-papi-admin-page-type-switcher.php
│   │   ├── class-papi-admin-view.php
│   │   ├── class-papi-admin.php
│   │   └── views/
│   │       ├── add-new-page.php
│   │       └── partials/
│   │           └── add-new-item.php
│   ├── assets/
│   │   ├── js/
│   │   │   ├── components/
│   │   │   │   ├── pikaday.js
│   │   │   │   └── select2.js
│   │   │   ├── core.js
│   │   │   ├── modals/
│   │   │   │   └── iframe.js
│   │   │   ├── properties/
│   │   │   │   ├── color.js
│   │   │   │   ├── datetime.js
│   │   │   │   ├── dropdown.js
│   │   │   │   ├── editor.js
│   │   │   │   ├── file.js
│   │   │   │   ├── flexible.js
│   │   │   │   ├── link.js
│   │   │   │   ├── module.js
│   │   │   │   ├── post.js
│   │   │   │   ├── reference.js
│   │   │   │   ├── relationship.js
│   │   │   │   ├── repeater.js
│   │   │   │   ├── term.js
│   │   │   │   └── url.js
│   │   │   ├── required.js
│   │   │   ├── rules.js
│   │   │   ├── tabs.js
│   │   │   ├── taxonomy.js
│   │   │   └── utils.js
│   │   └── scss/
│   │       ├── components/
│   │       │   ├── pikaday.scss
│   │       │   └── select2.scss
│   │       ├── modules/
│   │       │   ├── _admin.scss
│   │       │   ├── _attachment.scss
│   │       │   ├── _base.scss
│   │       │   ├── _box.scss
│   │       │   ├── _iframe.scss
│   │       │   ├── _options.scss
│   │       │   ├── _table.scss
│   │       │   ├── _tabs.scss
│   │       │   └── _utils.scss
│   │       ├── properties/
│   │       │   ├── _checkbox.scss
│   │       │   ├── _color.scss
│   │       │   ├── _divider.scss
│   │       │   ├── _dropdown.scss
│   │       │   ├── _file.scss
│   │       │   ├── _flexible.scss
│   │       │   ├── _group.scss
│   │       │   ├── _link.scss
│   │       │   ├── _post.scss
│   │       │   ├── _radio.scss
│   │       │   ├── _reference.scss
│   │       │   ├── _relationship.scss
│   │       │   ├── _repeater.scss
│   │       │   ├── _shared.scss
│   │       │   ├── _table.scss
│   │       │   ├── _term.scss
│   │       │   ├── _text.scss
│   │       │   └── _url.scss
│   │       └── style.scss
│   ├── cli/
│   │   ├── class-papi-cli-command.php
│   │   ├── class-papi-cli-post-command.php
│   │   ├── class-papi-cli-term-command.php
│   │   ├── class-papi-cli-type-command.php
│   │   └── class-papi-cli.php
│   ├── core/
│   │   ├── class-papi-core-autoload.php
│   │   ├── class-papi-core-box.php
│   │   ├── class-papi-core-conditional-rule.php
│   │   ├── class-papi-core-conditional-rules.php
│   │   ├── class-papi-core-conditional.php
│   │   ├── class-papi-core-container.php
│   │   ├── class-papi-core-data-handler.php
│   │   ├── class-papi-core-data.php
│   │   ├── class-papi-core-meta-store.php
│   │   ├── class-papi-core-property.php
│   │   ├── class-papi-core-tab.php
│   │   └── class-papi-core-type.php
│   ├── lib/
│   │   ├── core/
│   │   │   ├── cache.php
│   │   │   ├── conditional.php
│   │   │   ├── data.php
│   │   │   ├── deprecated.php
│   │   │   ├── io.php
│   │   │   ├── meta.php
│   │   │   ├── post.php
│   │   │   ├── property.php
│   │   │   ├── slug.php
│   │   │   ├── tabs.php
│   │   │   ├── taxonomy.php
│   │   │   ├── template.php
│   │   │   ├── url.php
│   │   │   └── utilities.php
│   │   ├── fields/
│   │   │   ├── option.php
│   │   │   ├── page.php
│   │   │   └── taxonomy.php
│   │   ├── hooks/
│   │   │   ├── actions.php
│   │   │   ├── filters-page-type.php
│   │   │   ├── filters-taxonomy-type.php
│   │   │   └── filters.php
│   │   └── types/
│   │       ├── entry.php
│   │       ├── page.php
│   │       └── taxonomy.php
│   ├── papi-loader.php
│   ├── properties/
│   │   ├── class-papi-property-bool.php
│   │   ├── class-papi-property-checkbox.php
│   │   ├── class-papi-property-color.php
│   │   ├── class-papi-property-datetime.php
│   │   ├── class-papi-property-divider.php
│   │   ├── class-papi-property-dropdown.php
│   │   ├── class-papi-property-editor.php
│   │   ├── class-papi-property-email.php
│   │   ├── class-papi-property-file.php
│   │   ├── class-papi-property-flexible.php
│   │   ├── class-papi-property-gallery.php
│   │   ├── class-papi-property-group.php
│   │   ├── class-papi-property-hidden.php
│   │   ├── class-papi-property-html.php
│   │   ├── class-papi-property-image.php
│   │   ├── class-papi-property-link.php
│   │   ├── class-papi-property-module.php
│   │   ├── class-papi-property-number.php
│   │   ├── class-papi-property-post.php
│   │   ├── class-papi-property-radio.php
│   │   ├── class-papi-property-reference.php
│   │   ├── class-papi-property-relationship.php
│   │   ├── class-papi-property-repeater.php
│   │   ├── class-papi-property-sidebar.php
│   │   ├── class-papi-property-string.php
│   │   ├── class-papi-property-table.php
│   │   ├── class-papi-property-term.php
│   │   ├── class-papi-property-text.php
│   │   ├── class-papi-property-url.php
│   │   ├── class-papi-property-user.php
│   │   └── class-papi-property.php
│   ├── query/
│   │   └── class-papi-query.php
│   ├── rest-api/
│   │   ├── class-papi-rest-api-post.php
│   │   ├── class-papi-rest-api-settings.php
│   │   └── class-papi-rest-api.php
│   ├── stores/
│   │   ├── class-papi-option-store.php
│   │   ├── class-papi-post-store.php
│   │   └── class-papi-term-store.php
│   └── types/
│       ├── class-papi-attachment-type.php
│       ├── class-papi-entry-type.php
│       ├── class-papi-front-page-type.php
│       ├── class-papi-module-type.php
│       ├── class-papi-option-type.php
│       ├── class-papi-page-type.php
│       └── class-papi-taxonomy-type.php
├── tests/
│   ├── Dockerfile
│   ├── README.md
│   ├── bin/
│   │   └── install-cp-tests.sh
│   ├── bootstrap.php
│   ├── cases/
│   │   ├── admin/
│   │   │   ├── class-papi-admin-ajax-test.php
│   │   │   ├── class-papi-admin-assets-test.php
│   │   │   ├── class-papi-admin-columns-test.php
│   │   │   ├── class-papi-admin-entry-post-test.php
│   │   │   ├── class-papi-admin-entry-taxonomy-test.php
│   │   │   ├── class-papi-admin-menu-test.php
│   │   │   ├── class-papi-admin-meta-box-tabs-test.php
│   │   │   ├── class-papi-admin-meta-box-test.php
│   │   │   ├── class-papi-admin-meta-handler-test.php
│   │   │   ├── class-papi-admin-option-handler-test.php
│   │   │   ├── class-papi-admin-page-type-switcher.php
│   │   │   ├── class-papi-admin-test.php
│   │   │   └── class-papi-admin-view-test.php
│   │   ├── core/
│   │   │   ├── class-papi-conditional-rules-test.php
│   │   │   ├── class-papi-core-box-test.php
│   │   │   ├── class-papi-core-conditional-rule-test.php
│   │   │   ├── class-papi-core-conditional-test.php
│   │   │   ├── class-papi-core-container-test.php
│   │   │   ├── class-papi-core-data-test.php
│   │   │   ├── class-papi-core-property-test.php
│   │   │   ├── class-papi-core-tab-test.php
│   │   │   └── class-papi-core-type-test.php
│   │   ├── lib/
│   │   │   ├── core/
│   │   │   │   ├── cache-test.php
│   │   │   │   ├── conditional-test.php
│   │   │   │   ├── data-test.php
│   │   │   │   ├── deprecated-test.php
│   │   │   │   ├── io-test.php
│   │   │   │   ├── meta-test.php
│   │   │   │   ├── post-test.php
│   │   │   │   ├── property-test.php
│   │   │   │   ├── slug-test.php
│   │   │   │   ├── tabs-test.php
│   │   │   │   ├── taxonomy-test.php
│   │   │   │   ├── template-test.php
│   │   │   │   ├── url-test.php
│   │   │   │   └── utilities-test.php
│   │   │   ├── fields/
│   │   │   │   ├── option-test.php
│   │   │   │   ├── page-test.php
│   │   │   │   └── taxonomy-test.php
│   │   │   ├── hooks/
│   │   │   │   ├── actions-test.php
│   │   │   │   ├── filters-page-type-test.php
│   │   │   │   ├── filters-taxonomy-type-test.php
│   │   │   │   └── filters-test.php
│   │   │   └── types/
│   │   │       ├── entry-test.php
│   │   │       ├── page-test.php
│   │   │       └── taxonomy-test.php
│   │   ├── papi-loader-test.php
│   │   ├── properties/
│   │   │   ├── class-papi-property-bool-test.php
│   │   │   ├── class-papi-property-checkbox-test.php
│   │   │   ├── class-papi-property-color-test.php
│   │   │   ├── class-papi-property-datetime-test.php
│   │   │   ├── class-papi-property-divider-test.php
│   │   │   ├── class-papi-property-dropdown-test.php
│   │   │   ├── class-papi-property-editor-test.php
│   │   │   ├── class-papi-property-email-test.php
│   │   │   ├── class-papi-property-file-test.php
│   │   │   ├── class-papi-property-flexible-test.php
│   │   │   ├── class-papi-property-gallery-test.php
│   │   │   ├── class-papi-property-group-test.php
│   │   │   ├── class-papi-property-hidden-test.php
│   │   │   ├── class-papi-property-html-test.php
│   │   │   ├── class-papi-property-image-test.php
│   │   │   ├── class-papi-property-link-test.php
│   │   │   ├── class-papi-property-module-test.php
│   │   │   ├── class-papi-property-number-test.php
│   │   │   ├── class-papi-property-post-test.php
│   │   │   ├── class-papi-property-radio-test.php
│   │   │   ├── class-papi-property-reference-test.php
│   │   │   ├── class-papi-property-relationship-test.php
│   │   │   ├── class-papi-property-repeater-test.php
│   │   │   ├── class-papi-property-sidebar-test.php
│   │   │   ├── class-papi-property-string-test.php
│   │   │   ├── class-papi-property-term-test.php
│   │   │   ├── class-papi-property-test.php
│   │   │   ├── class-papi-property-text-test.php
│   │   │   ├── class-papi-property-url-test.php
│   │   │   └── class-papi-property-user-test.php
│   │   ├── query/
│   │   │   └── class-papi-query-test.php
│   │   ├── rest-api/
│   │   │   ├── class-papi-rest-api-post-test.php
│   │   │   ├── class-papi-rest-api-settings-test.php
│   │   │   └── class-papi-rest-api-test.php
│   │   ├── stores/
│   │   │   ├── class-papi-option-store-test.php
│   │   │   ├── class-papi-post-store-test.php
│   │   │   └── class-papi-term-store-test.php
│   │   └── types/
│   │       ├── class-papi-attachment-type-test.php
│   │       ├── class-papi-entry-type-test.php
│   │       ├── class-papi-option-type-test.php
│   │       ├── class-papi-page-type-test.php
│   │       └── class-papi-taxonomy-type-test.php
│   ├── data/
│   │   ├── classes/
│   │   │   └── class-say.php
│   │   ├── container/
│   │   │   └── class-container-test-stub.php
│   │   ├── core-types/
│   │   │   ├── abstract-core-type.php
│   │   │   ├── base-core-type.php
│   │   │   ├── broken-core-type.php
│   │   │   ├── info-core-type.php
│   │   │   └── info2-core-type.php
│   │   ├── entry-types/
│   │   │   ├── abstract-entry-type.php
│   │   │   ├── base-entry-type.php
│   │   │   ├── broken-entry-type.php
│   │   │   ├── info-entry-type.php
│   │   │   └── term-entry-type.php
│   │   ├── entry-types2/
│   │   │   └── term-entry-type.php
│   │   ├── page-types/
│   │   │   ├── big-page-type.php
│   │   │   ├── book-page-type.php
│   │   │   ├── boxes/
│   │   │   │   ├── big.php
│   │   │   │   ├── properties.php
│   │   │   │   └── simple.php
│   │   │   ├── broken-page-type.php
│   │   │   ├── display-not-page-type.php
│   │   │   ├── dot-page-type.php
│   │   │   ├── dot2-page-type.php
│   │   │   ├── duck-page-type.php
│   │   │   ├── editor-page-type.php
│   │   │   ├── empty-page-type.php
│   │   │   ├── extra-page-type.php
│   │   │   ├── faq-extra-page-type.php
│   │   │   ├── faq-extra2-page-type.php
│   │   │   ├── faq-page-type.php
│   │   │   ├── fields-page-type.php
│   │   │   ├── flex-page-type.php
│   │   │   ├── flex2-page-type.php
│   │   │   ├── front-page-type.php
│   │   │   ├── group-page-type.php
│   │   │   ├── hidden-page-type.php
│   │   │   ├── hidden2-page-type.php
│   │   │   ├── identifier-page-type.php
│   │   │   ├── module-page-type.php
│   │   │   ├── modules/
│   │   │   │   ├── image-module-type.php
│   │   │   │   ├── string-module-type.php
│   │   │   │   ├── top-module-type.php
│   │   │   │   └── video-module-type.php
│   │   │   ├── name-page-type.php
│   │   │   ├── namespace-page-type.php
│   │   │   ├── no-page-type.php
│   │   │   ├── options/
│   │   │   │   ├── class-settings-option-type.php
│   │   │   │   ├── header-option-type.php
│   │   │   │   └── properties-option-type.php
│   │   │   ├── others/
│   │   │   │   ├── attachment-type.php
│   │   │   │   └── media-attachment-type.php
│   │   │   ├── post-page-type.php
│   │   │   ├── price-page-type.php
│   │   │   ├── properties/
│   │   │   │   └── name.php
│   │   │   ├── properties-page-type.php
│   │   │   ├── rule-page-type.php
│   │   │   ├── simple-page-type.php
│   │   │   ├── tab-page-type.php
│   │   │   ├── tab2-page-type.php
│   │   │   ├── tabs/
│   │   │   │   ├── content.php
│   │   │   │   └── video.php
│   │   │   ├── test-page-type.php
│   │   │   └── twenty-page-type.php
│   │   ├── page-types2/
│   │   │   ├── any-page-type.php
│   │   │   └── look-page-type.php
│   │   ├── properties/
│   │   │   ├── array.php
│   │   │   ├── class-papi-property-fake.php
│   │   │   ├── class-papi-property-kvack.php
│   │   │   └── simple.php
│   │   └── taxonomy-types/
│   │       ├── broken-taxonomy-type.php
│   │       ├── empty-taxonomy-type.php
│   │       ├── faq-extra-taxonomy-type.php
│   │       ├── faq-extra2-taxonomy-type.php
│   │       ├── faq-taxonomy-type.php
│   │       ├── properties-taxonomy-type.php
│   │       └── simple-taxonomy-type.php
│   └── framework/
│       ├── class-papi-property-test-case.php
│       ├── functions.php
│       └── helpers.php
└── webpack.config.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .babelrc
================================================
{
  "presets": ["@jitesoft/main"]
}


================================================
FILE: .editorconfig
================================================
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.php]
indent_style = tab
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
indent_size = 8

[*.{js,jsx,ts,tsx,vue}]
quote_type = single


================================================
FILE: .gitattributes
================================================
* text=auto

/bin export-ignore
/src/assets export-ignore
/tests export-ignore
.coveralls.yml export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.github export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
CONTRIBUTING.md export-ignore
Makefile export-ignore
package.json export-ignore
phpcs.xml export-ignore
phpunit.xml.dist export-ignore
tmp export-ignore
Vagrantfile export-ignore
vendor export-ignore
behat.yml export-ignore
webpack.config.js export-ignore


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve

---

### What I expected

A clear and concise description of what you expected to happen.

### What happened instead

A clear and concise description of what the bug is.

### Screenshots
If applicable, add screenshots to help explain your problem.

### Steps to reproduce

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### What versions of softwares are you using?

- Browser: [e.g. chrome, safari]
- Papi: [e.g. 3.2.0]
- WordPress: [e.g. 4.9.8]

### Additional context
Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


================================================
FILE: .github/issue_template.md
================================================
<!--
Think you found a bug?
======================
Use the template below to log a new bug.

Have a feature request?
=======================
Remove the template below and add your feature request.
-->

### What I expected

### What happened instead

### Steps to reproduce

### What versions of softwares are you using?

- Browser:
- Papi:
- WordPress:


================================================
FILE: .github/pull_request_template.md
================================================
### Description

Please explain the changes you made here.

### Checklist

- [ ] Bug fix?
- [ ] New feature?
- [ ] Deprecations?
- [ ] Created tests, if possible


================================================
FILE: .github/workflows/php.yml
================================================
name: PHP Unit Tests

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    strategy:
      matrix:
        php-versions: ['7.4']
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Setup PHP with PECL extension
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php-versions }}

    - name: Start MySQL
      run: sudo systemctl start mysql.service

    - name: Validate composer.json and composer.lock
      run: composer validate

    - name: Cache Composer packages
      id: composer-cache
      uses: actions/cache@v2
      with:
        path: vendor
        key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
        restore-keys: |
          ${{ runner.os }}-php-

    - name: Install dependencies
      if: steps.composer-cache.outputs.cache-hit != 'true'
      run: composer install --prefer-dist --no-progress --no-suggest

    - name: Set up test environement
      run: vendor/frozzare/wp-test-suite/bin/install-wp-tests.sh wordpress_test root root localhost latest

    - name: Run tests
      run: vendor/bin/phpunit



================================================
FILE: .gitignore
================================================
.idea
node_modules
test.php
tmp/
build/
coverage/
vendor
composer.lock
components.js
style.css
main.js


================================================
FILE: CHANGELOG.md
================================================
# Papi Changelog

## [3.3.0]

## Added

* Added `papi/pre_template_include` filter to modify which template is loaded before Papi looks for a template.
* Added `papi_get_fields` and `papi_get_term_fields` to receive all slugs and values from a Page/Taxonomy type.

## [3.2.0](https://github.com/wp-papi/papi/releases/tag/v3.2.0) - 2017-09-07

The stable release of Papi 3.2.0, a lot has been added, changed, fixed and some functions has been removed (mostly core stuff). Papi 3.2.0 introduce a new core data api that is used everywhere in the plugin and by advanced properties. Upgrading from Papi 3.1.x will work and the new core data api will not create any problems.

Unfortunately this will likely be the last release I plan to work on as the core maintainer of Papi since my focus has shifted from WordPress to doing more JavaScript and Go projects. I hope you understand my decision to step back from the project, if you have any questions or would be interested in take over some of the maintenance of the project please let me know. I will still be around answering questions and helping any new maintainers. Some bug fixes and/or pull request may be added (but now new versions) since me and my colleagues use Papi internally and will be continuing doing it.

## Added

* Added: `body_classes` will be added to the frontend aswell and not just the admin.
* Added: `register_meta` support for REST API.
* Added: Edit post reference in a iframe instead of leaving the current page.
* Added: `edit_url` setting to post property to display iframe mode.
* Added: Page type switcher.
* Added: `papi/get_boxes` filter so you can add boxes to a entry type that don't exists in the class.
* Added: New ajax action for shortcodes `/papi-ajax/?action=get_shortcode&shortcode=[test]`
* Added:  New method on `Papi_Entry_Type` to fetch all properties `get_properties`, it's useful if you would like to build something custom.
* Added: `Papi_Query`
* Added: Multiple select support for dropdown property.
* Added: `site_id` option added to both box and property.
* Added: `papi/get_property` filter added so you can modify properties when they are fetched inside Papi.
* Added: Labels to flexible property so you can see which row is using which layout.
* Added: `fields => ids` setting on file, image, gallery, post, term and relationship property.
* Added: `meta_key => custom_meta_key` setting on file, image, gallery, post, term and relationship property, so you can match meta value instead of post id.
* Added: Support for `any` post type value for a page type.
* Added: CLI to rename meta keys for posts and terms, see [#208](https://github.com/wp-papi/papi/issues/208).
* Added: `lang` option now supports arrays and not just strings.
* Added: Filter to override conditional rule allowed value `papi/conditional/rule_allowed`
* Added: Filter to modify lang query string value `papi/lang`
* Added: Filter to modify template extension `papi/template_extension`

## Changed

* Changed: PHP 5.6 will be required instead of 5.5.9.
* Changed: WordPress 4.4 will be required instead of 4.0.
* Changed: String numeric and bool values are strings and numeric and bool values are not string values in dropdown anymore.
* Changed: You can now use `papi_is_page_type` to check if current post is a page type with (was only used internal before).
* Changed: `papi()->make( 'Sample_Page_Type' )` is replaced by id `papi()->make( 'simple-page-type' )` to make it more consistent.

## Deprecated

* Deprecated: `papi_get_page`, is deprecated and you should use `papi_get_meta_store( $id )` instead since it support both post, term and option stores and `papi_get_page` returns the value of `papi_get_meta_store` so no need for two functions that does the same thing.

## Fixed

* Fixed: `papi_get_entry_type_css_class` will work with taxonomies.
* Fixed: Better peformance when core loads entry types.
* Fixed: Group properties works with conditional rules now.
* Fixed: Dropdown property can now handle numeric values, see [#225](https://github.com/wp-papi/papi/issues/225).
* Fixed: Respect show standard type filter in list columns, see [#235](https://github.com/wp-papi/papi/issues/235).
* Fixed: Complex properties should now be rendered in REST API, see [#232](https://github.com/wp-papi/papi/issues/232).
* Fixed: Post ID will be respected all the way and it will not guess, see [#227](https://github.com/wp-papi/papi/pull/227).

## Removed

* Removed: HHVM testing is removed, PHP7 is more awesome.
* Removed: `papi_delete_property_meta_value` is replaced with `papi_data_delete`, mostly use by core and advanced properties.
* Removed: `papi_get_property_meta_value` is replaced with `papi_data_get`, mostly use by core and advanced properties.
* Removed: `papi_update_property_meta_value` is replaced with `papi_data_update`, mostly use by core and advanced properties.

## [3.1.19](https://github.com/wp-papi/papi/releases/tag/v3.1.19) - 2017-02-14

* Fixed: Sanitize box id key [#215](https://github.com/wp-papi/papi/issues/215).
* Fixed: Undefined property on file object used in file property [#217](https://github.com/wp-papi/papi/issues/217).
* Fixed: AJAX endpoint for plain permalink structure [#218](https://github.com/wp-papi/papi/issues/218).
* Fixed: `FORCE_SSL_ADMIN` and AJAX endpoint [#213](https://github.com/wp-papi/papi/issues/213).
* Fixed: oEmbed cache is broken if content is empty [#210](https://github.com/wp-papi/papi/issues/210).
* Fixed: Respect user admin language in WordPress 4.7 [#209](https://github.com/wp-papi/papi/issues/209).
* Fixed: Sort order on properties.
* Fixed: Autosave didn't work as it should.
* Fixed: Repeater rows was affected when removing flexible rows when repeater was a child property to the flexible.

## [3.1.18](https://github.com/wp-papi/papi/releases/tag/v3.1.18) - 2016-12-16

* Fixed: Link property target didn't work correct in new WordPress [#207](https://github.com/wp-papi/papi/issues/207).

## [3.1.17](https://github.com/wp-papi/papi/releases/tag/v3.1.17) - 2016-11-01

* Fixed: Link property didn't save values correct.
* Fixed: Relationship custom data can now use string id and not just int ids.

## [3.1.16](https://github.com/wp-papi/papi/releases/tag/v3.1.16) - 2016-10-26

* Fixed: Auto draft didn't save fields.
* Fixed: Issues with color picker property that didn't work [#179](https://github.com/wp-papi/papi/issues/179).
* Fixed: Editor tabs didn't work when flexible and repeater use `vertical` layout [#201](https://github.com/wp-papi/papi/issues/201).
* Fixed: Remove duplicated database queries.
* Fixed: `z-index` issue with flexible `add` button when placed under a editor [#198](https://github.com/wp-papi/papi/pull/198). Props [nlemoine](https://github.com/nlemoine).
* Fixed: `nl2br` issue with text property [#199](https://github.com/wp-papi/papi/issues/199).

## [3.1.15](https://github.com/wp-papi/papi/releases/tag/v3.1.15) - 2016-10-06

* Fixed: Expression issues with TinyMCE in flexibles and repeaters [#196](https://github.com/wp-papi/papi/issues/196).
* Fixed: Dot files should not be loaded if exists in types directories [#193](https://github.com/wp-papi/papi/issues/193).
* Fixed: Cache issue when a repeater is a child property to a flexible.

## [3.1.14](https://github.com/wp-papi/papi/releases/tag/v3.1.14) - 2016-09-23

* Fixed: Browser issue with `selected` attribute.
* Fixed: Drag and drop issue with repeater.

## [3.1.13](https://github.com/wp-papi/papi/releases/tag/v3.1.13) - 2016-09-12

* Fixed: Drag and drop issue with link property in flexible/repeater.
* Fixed: Bug with post add new link when user is on another post type [#190](https://github.com/wp-papi/papi/pull/190).
* Fixed: Optimize `papi_is_empty` check for arrays [#191](https://github.com/wp-papi/papi/pull/191).

## [3.1.12](https://github.com/wp-papi/papi/releases/tag/v3.1.12) - 2016-09-05

* Fixed: Cache issue with improved cache for flexible.

## [3.1.11](https://github.com/wp-papi/papi/releases/tag/v3.1.11) - 2016-09-05

* Fixed: Cache only raw database value instead of formatted value, this solves problems with shortcodes in the editor that shouldn't be cached.
* Fixed: Improve css for flexible and repeater.

## [3.1.10](https://github.com/wp-papi/papi/releases/tag/v3.1.10) - 2016-08-30

* Fixed: Multiple render issue when using `papi_get_field` instead a property array.
* Fixed: Add new page did remove custom query strings that shouldn't be removed.

## [3.1.9](https://github.com/wp-papi/papi/releases/tag/v3.1.9) - 2016-08-16

* Fixed: Small css fixes for repeater in flexible [#187](https://github.com/wp-papi/papi/pull/187).
* Fixed: Remove repeater rows in flexible.
* Fixed: Object cache not updated when adding row in repeater in flexible [#185](https://github.com/wp-papi/papi/pull/185).
* Fixed: CSS bug: Remove is hidden for repeater in flexible [#184](https://github.com/wp-papi/papi/pull/184).

## [3.1.8](https://github.com/wp-papi/papi/releases/tag/v3.1.8) - 2016-08-10

* Fixed: Some properties did try to save the property key.

## [3.1.7](https://github.com/wp-papi/papi/releases/tag/v3.1.7) - 2016-08-10

* Fixed: Save issue with key/value arrays.
* FIxed: Relationship setting `only_once` didn't remove items on page load [#183](https://github.com/wp-papi/papi/pull/183).

## [3.1.6](https://github.com/wp-papi/papi/releases/tag/v3.1.6) - 2016-08-08

* Fixed: Issue with `papi_html_tag` that caused html output issue with some properties.

## [3.1.5](https://github.com/wp-papi/papi/releases/tag/v3.1.5) - 2016-08-08

* Fixed: Slug with `_property` suffix didn't work.
* Fixed: Remove empty values on post save for properties.

## [3.1.4](https://github.com/wp-papi/papi/releases/tag/v3.1.4) - 2016-08-01

* Fixed: PHP type error in group property.
* Fixed: Wrong meta type was send to ajax when option page was in a post type menu.

## [3.1.3](https://github.com/wp-papi/papi/releases/tag/v3.1.3) - 2016-07-27

* Fixed: Cache issue with key that has `papi_` prefix.

## [3.1.2](https://github.com/wp-papi/papi/releases/tag/v3.1.2) - 2016-07-27

* Added: `papi_filter_settings_only_taxonomy_type` that acts the same way as `papi_filter_settings_only_page_type`
* Fixed: UTF-8 Encoding issue with JSON encoded strings [#177](https://github.com/wp-papi/papi/pull/177).
* Fixed: Equal hight class names on add new page view.

## [3.1.1](https://github.com/wp-papi/papi/releases/tag/v3.1.1) - 2016-07-04

* Fixed: Path to files was rewritten with to lowercase [#176](https://github.com/wp-papi/papi/issues/176)

## [3.1.0](https://github.com/wp-papi/papi/releases/tag/v3.1.0) - 2016-06-27

### Added

* Added: `show_screen_options` to all types meta method that can turn off screen options tab.
* Added: `show_help_tabs` to all types meta method that can turn off help tab.
* Added: `help` method to all types which can be used to add help tabs.
* Added: `help_sidebar` method to all types which can be used to add help tabs sidebar content.
* Added: Support for taxonomy types with support for term meta.
* Added: `wp papi term` command like post command.
* Added: `mce_buttons` settings to editor property.
* Added: `media_buttons`, `teeny` and `drag_drop_upload` settings to editor property.
* Added: Vertical boxes support [#148](https://github.com/wp-papi/papi/issues/159).
* Added: Support for saving properties on revision posts and restoring revision data.
* Added: `display` option to box options in order to control if the box should be displayed or not.
* Added: Support for repeaters inside repeaters.
* Added: Support for repeaters inside flexibles.
* Added: Support for render html in `Publish box` with `publish_box` method.
* Added: `papi_get_entry_type_css_class` to get the css class that is added to body for a entry type.
* Added: Support for autosaving fields.
* Added: Support for group inside flexibles.
* Added: Support for group inside repeaters.
* Added: `body_classes` method to all types which can be used to add custom body classes.
* Added: `show_permalink` to page type so permalink div can be hidden on a page type.
* Added: `show_page_template` to hide page template dropdown by default on a page type.
* Added: `show_page_attributes` to show page attributes box by default on a page type.
* Added: `false` value to `slug` key to generate a unique slug that don't should be saved in the database but displayed in the admin.

### Changed

* Updated: Cross icon for file property with new color [#158](https://github.com/wp-papi/papi/pull/158).
* Updated: `$id` param for `papi_get_slugs` is optional.
* Updated: Group property is stored as a repeater but only with one row and not a standalone properties.

### Removed

* Removed: Papi tool page.
* Removed: `papi_translate_keys`

## [3.0.9](https://github.com/wp-papi/papi/releases/tag/v3.0.9) - 2016-05-25

* Fixed: Checkbox property did not save unchecked values.

## [3.0.8](https://github.com/wp-papi/papi/releases/tag/v3.0.8) - 2016-05-17

* Fixed: Cache issue where admin and theme did get the same cached data, will now be saved as two caches.

## [3.0.7](https://github.com/wp-papi/papi/releases/tag/v3.0.7) - 2016-05-09

* Fixed: Locale should be restored after `papi_slugify` is used [#169](https://github.com/wp-papi/papi/issues/169).
* Fixed: Show standard page type filter is used when only one page type exists.

## [3.0.6](https://github.com/wp-papi/papi/releases/tag/v3.0.6) - 2016-04-14

* Fixed: Attachment types used on a page type didn't load right, so the site performance was bad.
* Fixed: Object cache issue with properties that overwrites a existing post field. Cached data was loaded in WordPress admin.

## [3.0.5](https://github.com/wp-papi/papi/releases/tag/v3.0.5) - 2016-04-01

* Fixed: Datetime did not work in repeater [#166](https://github.com/wp-papi/papi/issues/166).

## [3.0.4](https://github.com/wp-papi/papi/releases/tag/v3.0.4) - 2016-03-23

* Fixed: Require for link property [#165](https://github.com/wp-papi/papi/issues/165).
* Fixed: Check so file exists before calling `file_get_contents` when reading page type files.

## [3.0.3](https://github.com/wp-papi/papi/releases/tag/v3.0.3) - 2016-03-19

* Fixed: Box options didn't work when no properties exists in the box.
* Fixed: Some properties that was stored in options table did return null from `papi_get_option`, mostly flexible and repeater.
* Fixed: Object cache issue with options fields that did get post id instead of zero that options should have.
* Fixed: Check for registered directories before they are used.

## [3.0.2](https://github.com/wp-papi/papi/releases/tag/v3.0.2) - 2016-03-08

### Fixed

* Fixed: PHP Notice/Object issue for relationship when using custom relationship data.
* Fixed: Double fields issue for any field when using `papi_get_field` in hooks that fires earlier then `admin_init` [#153](https://github.com/wp-papi/papi/issues/153).

## [3.0.1](https://github.com/wp-papi/papi/releases/tag/v3.0.1) - 2016-02-15

### Fixed

* Fixed: Render issue with tabs that existed in template files [#148](https://github.com/wp-papi/papi/issues/148).
* Fixed: Edit link property did appear in the default editor.
* Fixed: Required did not output the red wildcard [#149](https://github.com/wp-papi/papi/issues/149).
* Fixed: Required did not output the red wildcard [#149](https://github.com/wp-papi/papi/issues/149).

## [3.0.0](https://github.com/wp-papi/papi/releases/tag/v3.0.0) - 2016-02-02

Papi 3.0.0 is a big release since a big piece of the core code has been refactored to improve how page type works. With 3.0.0 release we introduce `Entry Type` which is a base class that both page type and option type use. Both `box` and `tab` logic has been rewritten with new core classes and the admin classes has been divided into several smaller classes. Some internal functions has been removed or rewritten with backward compatibility.

We moved some logic from page type class to entry type class to be able the separate page type and option type class. This will make it easier to add new types to core or create plugin that has custom types.

### Added

* Added: Extended support for `meta`, `box` and `remove` methods [#114](https://github.com/wp-papi/papi/issues/114).
* Added: WP CLI Support [#111](https://github.com/wp-papi/papi/issues/111).
* Added: Group property [#112](https://github.com/wp-papi/papi/issues/112).
* Added: `papi/before_init` action that is fired before Papi loads textdomain, classes, functions and setups the container.
* Added: `papi/init` action that is fired after Papi loads textdomain, classes, functions and setups the container.
* Added: `papi/loaded` action that will be the new `papi/include`. The old action is deprecated but will still work, it's fired before `papi/loaded` and will be removed in a feature version of Papi.
* Added: `placeholder` setting to string property.
* Added: Description to option type meta data.
* Added: `papi/settings/column_hide_{$post_type}` for hiding type column.
* Added: `papi/template_include` to provide support for third party templating engines.
* Added: Layout mode to post property. It can devide into multiple select or a single select with labels (as before).
* Added: Layout mode to term property. It can devide into multiple select or a single select with labels (as before).
* Added: Second bool param to `papi_get_slugs` that will return only slugs if true.
* Added: A way to handle classes with the same name in multiple directories [#107](https://github.com/wp-papi/papi/issues/107)
* Added: When WordPress refresh nonces, Papi nonces should be refreshed too.

### Changed

* Flexible property will only save one layout per row. The layout key is changed from `_layout` to `_flexible_layout` since `_layout` can be a real slug. It has backward compatibility for the old layout key. This may cause problem with existing slugs that are named `layout`. To fix default value issue you need to manually add the layout value for the effected row. The slug will be something like this: `sections_0_flexible_layout`, where `sections` is your flexible slug, `0` is the row and `_flexible_layout` is the new layout key. The value should be a slug of the layout title, the same value as the old `_layout` rows that exists on each property.

### Fixed

* Fixed: Save post issue when using property template file and overwrited the slug [#129](https://github.com/wp-papi/papi/issues/129).
* Fixed: Select2 clear issue [#132](https://github.com/wp-papi/papi/issues/132).
* Fixed: Property type values like  `test-form-1` should match `Papi_Property_Test_Form_1`
* Fixed: When using `overwrite` it should read data from the post instead of post meta [#145](https://github.com/wp-papi/papi/issues/145)
* Fixed: Same prefix on folders should not replace all, only the current one.

### Removed

* Removed: `remove` method is removed.
* Removed: No more array properties, all properties must use `papi_property` or `$this->property` to work. This because the converting of array properties is bad and some keys can't be used for other things.
* Removed deprecated function `current_page`, was deprecated in 2.0.0.
* Removed deprecated function `papi_field`, was deprecated in 2.0.0.
* Removed deprecated function `papi_fields`, was deprecated in 2.0.0.
* Removed deprecated function `papi_get_page_type_meta_value`, was deprecated in 2.0.0.
* Removed deprecated meta methods, `page_type` and `option_type`, `meta` method should be used instead.

### Upgraded

* Upgraded: Moment.js from 2.10.6 to 2.11.0

### Thanks

Thanks to all contributors and all who have tested Papi during the development.

You can find the old changelog for `2.x` [here](https://github.com/wp-papi/papi/blob/2.x/CHANGELOG.md).


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
  address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/


================================================
FILE: CONTRIBUTING.md
================================================
## Contributing to Papi

Everyone is welcome to contribute with patches, bug-fixes and new features.

## Ideas

If you have a idea the easiest way is to create a [issue](https://github.com/wp-papi/papi/issues).

## Bugs

Before you submit a bug issue you should be able to run the tests that the project has. Then you know if the tests works or not.

When you submit a bug issue you should write which browser you are using since Papi contains front-end code and not only back-end code.

If a test fails you should tell which one so it's easier to know what the bug is about.

Try to be as detailed as possible in your bug issue so we can help you better with the issue.

**Please** write how to reproduce the bug.

## Which branch?

The `master` branch is unsafe but it should be used when you adding new features. When it's a bug fix that effects the current version you should do your pull request against the last stable branch. The stable branch will have the format `MAJOR.X`.

## Pull requests

Good pull requests with patches, improvements or new features is always welcome. They should remain focused in scope and avoid containing unrelated commits.

**Please ask first** embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project developers might not want to merge into the project.

**Please follow** the projects code style. The projects PHP code should be following the code style that is based on [WordPress code standard](https://make.wordpress.org/core/handbook/coding-standards/php/) and always use brackets.

* Fork [wp-papi/papi](https://github.com/wp-papi/papi) on Github and add the upstream remote.

```
git clone https://github.com/<your-username>/papi.git
cd papi
git remote add upstream https://github.com/wp-papi/papi.git
```

This is useful if you cloned your repo a while ago and now wants to update it.

```
git checkout master
git pull upstream master
```

* Create a new branch:

```
git checkout -b <topic-branch-name>
```

* Make sure to update, or add to the tests when appropriate.
* Commit your changes to your fork.
* Locally merge (or rebase) the upstream development branch into your topic branch:

```
git pull [--rebase] upstream master
```

* Push to your branch:

```
git push origin <topic-branch-name>
```

* [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description against the `master` branch or against the stable branch if it's a bug fix that effects the current version.

**Note:**
If you are making several changes at once please divide them into multiple pull requests.

## License

By contributing your code, you agree to license your contribution under the [MIT license](https://github.com/wp-papi/papi/blob/master/LICENSE).


================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2013-2019 Fredrik Forsmo

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: Makefile
================================================
all: css js

css:
	npm run css

deps:
	composer install
	npm install -g yarn wp-pot-cli
	yarn

js:
	npm run js

lint:
	make lint:js
	make lint:php

lint\:js:
	npm run lint

lint\:php:
	vendor/bin/phpcs -s --extensions=php --standard=phpcs.xml src/

pot:
	wp-pot --src 'src/**/*.php' --dest-file languages/papi.pot --package papi

watch:
	npm run watch

watch\:css:
	npm run css

watch\:js:
	npm run js


================================================
FILE: README.md
================================================
# Papi

![Papi](https://cloud.githubusercontent.com/assets/14610/9073902/16a6d906-3b05-11e5-9287-5644a96e9a82.png)

[![Latest Version](https://img.shields.io/github/release/wp-papi/papi.svg?style=flat)](https://github.com/wp-papi/papi/releases)
[![License](https://img.shields.io/packagist/l/wp-papi/papi.svg)](https://packagist.org/packages/wp-papi/papi)
[![Gitter](https://badges.gitter.im/wp-papi/papi.svg)](https://gitter.im/wp-papi/papi?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)

> `master` is unsafe. `3.x` is the stable branch.

Papi has a different approach on how to work with fields and page types in WordPress. The idea is coming from how Page Type Builder in EPiServer works and has been loved by the developers.

So we though why don’t use the same approach in WordPress? Papi is today running in production and has been easy to work with when it came to add new fields. Papi don’t have any admin user interface where you should add all fields, we use classes in PHP, where one class represents one page type and in your class you add all fields you need. It’s that easy!

[Visit Papi’s project page](https://wp-papi.github.io/)

## A message from the author

v3.2.0 will likely be the last release I plan to work on as the core maintainer of Papi since my focus has shifted from WordPress to doing more JavaScript and Go projects. I hope you understand my decision to step back from the project, if you have any questions or would be interested in take over some of the maintenance of the project please let me know. I will still be around answering questions and helping any new maintainers. Some bug fixes and/or pull request may be added (but no new versions) since me and my colleagues use Papi internally and will be continuing doing it.

## Installation

If you're using Composer to manage WordPress, add Papi to your project's dependencies. Run:

```sh
composer require wp-papi/papi
```

Or manually add it to your `composer.json`:

```json
"require": {
  "php": "^^7.4",
  "wordpress": "^4.6",
  "wp-papi/papi": "^3.2"
}
```

## Build CSS and JavaScript

Install dependencies:

```
make deps
```

Build CSS:

```
make css
```

Build JavaScript:

```
make js
```

## Testing

Visit the [readme](tests/README.md) file for testing.

## Coding style

You can check if your contribution passes the styleguide by installing [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) and running the following in your Papi directory:

```
make lint:php
```

## Contributing

Visit the [contributing](CONTRIBUTING.md) file.

## Security

If you discover a security vulnerability within this package, please send an e-mail to Fredrik Forsmo at security@frozzare.com. All security vulnerabilities will be promptly addressed.

## License

MIT © [Fredrik Forsmo](https://github.com/frozzare)


================================================
FILE: composer.json
================================================
{
  "name": "wp-papi/papi",
  "type": "wordpress-plugin",
  "license": "MIT",
  "description": "WordPress Page Type API with custom fields",
  "homepage": "https://wp-papi.github.io",
  "authors": [{
    "name": "Fredrik Forsmo",
    "email": "fredrik.forsmo@gmail.com",
    "homepage": "https://github.com/frozzare"
  }],
  "keywords": [
    "wordpress",
    "custom fields",
    "page type",
    "page",
    "taxonomy",
    "options"
  ],
  "require": {
    "php": "^7.4"
  },
  "require-dev": {
    "frozzare/wp-test-suite": "^1.0",
    "wp-coding-standards/wpcs": "^0.13"
  },
  "scripts": {
    "post-install-cmd": "if [ -f vendor/bin/phpcs ]; then \"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs; fi",
    "post-update-cmd": "if [ -f vendor/bin/phpcs ]; then \"vendor/bin/phpcs\" --config-set installed_paths vendor/wp-coding-standards/wpcs; fi"
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "extra": {
    "branch-alias": {
      "dev-master": "3.3.x-dev"
    }
  }
}


================================================
FILE: docker-compose.yml
================================================
version: '3'

services:
  mysql:
    image: mariadb
    environment:
      - MYSQL_ROOT_PASSWORD=root
  phpunit:
    build:
      context: ./tests
    volumes:
      - .:/var/www/html
    depends_on:
      - mysql
    entrypoint: bash -c "composer install && vendor/frozzare/wp-test-suite/bin/install-wp-tests.sh wordpress_test root root mysql latest && vendor/bin/phpunit"


================================================
FILE: languages/papi-fr_FR.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: Papi\n"
"POT-Creation-Date: 2015-10-13 22:23+0100\n"
"PO-Revision-Date: 2015-10-13 22:23+0100\n"
"Last-Translator: Fredrik Forsmo <fredrik.forsmo@gmail.com>\n"
"Language-Team: \n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.7.3\n"
"X-Poedit-Basepath: .\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: ../src\n"

#: ../src/admin/class-papi-admin-menu.php:109
#: ../src/admin/class-papi-admin-menu.php:158
#: ../src/admin/class-papi-admin-menu.php:159
#: ../src/types/class-papi-page-type-meta.php:153
msgid "Add New"
msgstr "Ajouter nouveau"

#: ../src/admin/class-papi-admin.php:45 ../src/admin/class-papi-admin.php:54
#: ../src/papi-loader.php:55 ../src/papi-loader.php:64
msgid "Cheatin&#8217; huh?"
msgstr "Alors, on triche ?"

#: ../src/admin/class-papi-admin.php:114
#: ../src/properties/class-papi-property-flexible.php:721
#: ../src/properties/class-papi-property-flexible.php:744
#: ../src/properties/class-papi-property-repeater.php:703
#: ../src/properties/class-papi-property-repeater.php:725
msgid "Remove"
msgstr "Supprimer"

#: ../src/admin/class-papi-admin.php:115
msgid "This fields are required:"
msgstr "Ces champs sont obligatoires :"

#: ../src/admin/class-papi-admin.php:305
msgid "All types"
msgstr ""

#: ../src/admin/views/add-new-page.php:8
#, php-format
msgid "Add New %s"
msgstr ""

#: ../src/admin/views/management-page-type.php:18
msgid "Tab Title"
msgstr "Title de l’onglet"

#: ../src/admin/views/management-page-type.php:19
#: ../src/admin/views/management-page-type.php:25
msgid "Sort Order"
msgstr "Ordre de tri"

#: ../src/admin/views/management-page-type.php:20
#: ../src/admin/views/management-page-type.php:44
#: ../src/admin/views/management-page-type.php:104
msgid "Properties"
msgstr "Propriétés"

#: ../src/admin/views/management-page-type.php:22
#: ../src/properties/class-papi-property-link.php:139
#: ../src/properties/class-papi-property-link.php:208
msgid "Title"
msgstr "Titre"

#: ../src/admin/views/management-page-type.php:23 ../src/lib/filters.php:136
msgid "Type"
msgstr "Type"

#: ../src/admin/views/management-page-type.php:24
msgid "Slug"
msgstr "Alias"

#: ../src/admin/views/management-page-type.php:80
msgid "Cannot find the page type"
msgstr "Le type de page n’a pas été trouvé"

#: ../src/admin/views/management-page-type.php:87
msgid "Overview of page type"
msgstr "Vue d’ensemble du type de page"

#: ../src/admin/views/management-page-type.php:98
msgid "No meta boxes exists."
msgstr "Aucune metaboxes existante."

#: ../src/admin/views/management-page-type.php:107
msgid "Tabs"
msgstr "Onglets"

#: ../src/admin/views/management-start.php:7
msgid "Page Types"
msgstr "Types de page"

#: ../src/admin/views/management-start.php:12
msgid "Name"
msgstr "Nom"

#: ../src/admin/views/management-start.php:15
msgid "Page Type ID"
msgstr "Type de page ID"

#: ../src/admin/views/management-start.php:18
msgid "Post types"
msgstr ""

#: ../src/admin/views/management-start.php:21
msgid "Template"
msgstr "Gabarit"

#: ../src/admin/views/management-start.php:24
msgid "Page Count"
msgstr "Nombre de pages"

#: ../src/admin/views/management-start.php:55
msgid "Page Type has no template file"
msgstr "Le type de page n’a pas de fichier de gabarit"

#: ../src/admin/views/management-start.php:69
msgid "Template file does not exist"
msgstr "Le fichier de gabarit n’existe pas"

#: ../src/admin/views/partials/add-new-item.php:14
#: ../src/properties/class-papi-property-relationship.php:123
msgid "Select"
msgstr "Sélectionner"

#: ../src/lib/filters.php:181
#, php-format
msgid "%s with WordPress standard fields"
msgstr "%s avec les champs standard WordPress"

#: ../src/lib/filters.php:197
#, php-format
msgid "Standard %s"
msgstr "Standard %s"

#: ../src/lib/property.php:353
msgid "(required field)"
msgstr "(champ obligatoire)"

#: ../src/papi-loader.php:185
msgid ""
"WordPress 4.0 and higher required to run Papi! The plugin has now disabled "
"itself."
msgstr ""
"WordPress 4.0 et supérieur est requis pour exécuter Papi ! Le plugin s’est "
"maintenant désactivé."

#: ../src/properties/class-papi-property-datetime.php:32
msgid "Previous Month"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:33
msgid "Next Month"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:34
msgid "Midnight"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:36
msgid "January"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:37
msgid "February"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:38
msgid "March"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:39
msgid "April"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:40
msgid "May"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:41
msgid "June"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:42
msgid "July"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:43
msgid "August"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:44
msgid "September"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:45
msgid "October"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:46
msgid "November"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:47
msgid "December"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:49
msgid "Noon"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:51
msgid "Sunday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:52
msgid "Monday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:53
msgid "Tuesday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:54
msgid "Wednesday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:55
msgid "Thursday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:56
msgid "Friday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:57
msgid "Saturday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:60
msgid "Sun"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:61
msgid "Mon"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:62
msgid "Tue"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:63
msgid "Wed"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:64
msgid "Thu"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:65
msgid "Fri"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:66
msgid "Sat"
msgstr ""

#: ../src/properties/class-papi-property-file.php:104
msgid "Add file"
msgstr ""

#: ../src/properties/class-papi-property-file.php:105
msgid "No file selected"
msgstr ""

#: ../src/properties/class-papi-property-flexible.php:655
#: ../src/properties/class-papi-property-repeater.php:636
msgid "Add new row"
msgstr "Ajouter une nouvelle ligne"

#: ../src/properties/class-papi-property-image.php:22
msgid "Add image"
msgstr "Ajouter image"

#: ../src/properties/class-papi-property-image.php:23
msgid "No image selected"
msgstr "Aucune image sélectionnée"

#: ../src/properties/class-papi-property-link.php:129
#: ../src/properties/class-papi-property-link.php:198
msgid "URL"
msgstr ""

#: ../src/properties/class-papi-property-link.php:148
#: ../src/properties/class-papi-property-link.php:217
msgid "Target"
msgstr ""

#: ../src/properties/class-papi-property-link.php:151
msgid "New window"
msgstr ""

#: ../src/properties/class-papi-property-link.php:151
msgid "Same window"
msgstr ""

#: ../src/properties/class-papi-property-link.php:161
msgid "No link selected"
msgstr ""

#: ../src/properties/class-papi-property-link.php:162
msgid "Add link"
msgstr ""

#: ../src/properties/class-papi-property-link.php:165
msgid "Edit link"
msgstr ""

#: ../src/properties/class-papi-property-link.php:166
msgid "Remove link"
msgstr ""

#: ../src/properties/class-papi-property-reference.php:91
msgid "No references exists"
msgstr "Aucune référence existe"

#: ../src/properties/class-papi-property-relationship.php:93
msgid "Post"
msgstr ""

#: ../src/properties/class-papi-property-relationship.php:125
msgid "Name (alphabetically)"
msgstr "Nom (alphabétiquement)"

#: ../src/properties/class-papi-property-relationship.php:133
msgid "Post created date (ascending)"
msgstr "Article par date de création (croissant)"

#: ../src/properties/class-papi-property-relationship.php:137
msgid "Post created date (descending)"
msgstr "Article par date de création (décroissant)"

#: ../src/properties/class-papi-property-relationship.php:141
msgid "Post id (ascending)"
msgstr "ID article (croissant)"

#: ../src/properties/class-papi-property-relationship.php:146
msgid "Post id (descending)"
msgstr "ID article (décroissant)"

#: ../src/properties/class-papi-property-relationship.php:151
msgid "Post order value (ascending)"
msgstr "Article par champ ordre (croissant)"

#: ../src/properties/class-papi-property-relationship.php:155
msgid "Post order value (descending)"
msgstr "Article par champ ordre (décroissant)"

#: ../src/properties/class-papi-property-relationship.php:159
msgid "Post modified date (ascending)"
msgstr "Article par date de modification (croissant)"

#: ../src/properties/class-papi-property-relationship.php:164
msgid "Post modified date (descending)"
msgstr "Article par date de modification (décroissant)"

#: ../src/properties/class-papi-property-relationship.php:254
msgid "Search"
msgstr "Recherche"

#: ../src/properties/class-papi-property-relationship.php:259
msgid "Sort by"
msgstr "Trier par"

#: ../src/properties/class-papi-property-term.php:65
msgid "No taxonomy defined for term property"
msgstr ""

#: ../src/properties/class-papi-property-url.php:42
msgid "Select file"
msgstr "Sélectionnez un fichier"

#: ../src/types/class-papi-page-type-meta.php:158
msgid "Edit"
msgstr "Modifier"

#: ../src/types/class-papi-page-type-meta.php:163
msgid "View"
msgstr "Voir"

#~ msgid "Show all page types"
#~ msgstr "Voir tous les types de pages"

#~ msgid "Add new page type"
#~ msgstr "Ajouter une nouvelle page"

#~ msgid "Search page types"
#~ msgstr "Recherche dans les types de page"

#~ msgid "Back to list"
#~ msgstr "Retour à la liste"

#~ msgid "Page Type"
#~ msgstr "Type de page"


================================================
FILE: languages/papi-sv_SE.po
================================================
msgid ""
msgstr ""
"Project-Id-Version: Papi\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2017-03-20 11:51+0100\n"
"Last-Translator: Rasmus Bengtsson <rasmus@isotop.se>\n"
"Language-Team: \n"
"Language: sv_SE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"X-Poedit-Basepath: .\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: ../src\n"

#: ../src/papi-loader.php:75, ../src/papi-loader.php:84,
#: ../src/admin/class-papi-admin.php:38, ../src/admin/class-papi-admin.php:47
msgid "Cheatin&#8217; huh?"
msgstr "Fuskar du?"

#: ../src/papi-loader.php:244
msgid ""
"WordPress 4.4 and higher required to run Papi! The plugin has now disabled "
"itself."
msgstr ""
"WordPress 4.4 eller högre krävs för att köra Papi! Tillägget har nu "
"inaktiverat sig."

#: ../src/admin/class-papi-admin-assets.php:51
msgid "Close"
msgstr "Stäng"

#: ../src/admin/class-papi-admin-assets.php:52,
#: ../src/admin/class-papi-admin-page-type-switcher.php:39,
#: ../src/types/class-papi-page-type.php:204,
#: ../src/types/class-papi-taxonomy-type.php:67
msgid "Edit"
msgstr "Redigera"

#: ../src/admin/class-papi-admin-assets.php:53,
#: ../src/properties/class-papi-property-flexible.php:824,
#: ../src/properties/class-papi-property-flexible.php:847,
#: ../src/properties/class-papi-property-repeater.php:790,
#: ../src/properties/class-papi-property-repeater.php:812
msgid "Remove"
msgstr "Ta bort"

#: ../src/admin/class-papi-admin-assets.php:54
msgid "This fields are required:"
msgstr "Dessa fält är obligatoriska:"

#: ../src/admin/class-papi-admin-columns.php:68
msgid "Type"
msgstr "Typ"

#: ../src/admin/class-papi-admin-columns.php:175
msgid "All types"
msgstr "Alla typer"

#: ../src/admin/class-papi-admin-entry-taxonomy.php:50
msgid "%s type"
msgstr "%styp"

#: ../src/admin/class-papi-admin-menu.php:125,
#: ../src/admin/class-papi-admin-menu.php:172,
#: ../src/admin/class-papi-admin-menu.php:173,
#: ../src/types/class-papi-page-type.php:203,
#: ../src/types/class-papi-taxonomy-type.php:66
msgid "Add New"
msgstr "Skapa ny"

#: ../src/admin/class-papi-admin-page-type-switcher.php:35
msgid "Page Type:"
msgstr "Sidtyp:"

#: ../src/admin/class-papi-admin-page-type-switcher.php:57
msgid "OK"
msgstr "OK"

#: ../src/admin/class-papi-admin-page-type-switcher.php:58
msgid "Cancel"
msgstr "Avbryt"

#: ../src/admin/class-papi-admin.php:185
msgid "View Papi Documentation"
msgstr "Läs Papi dokumentationen"

#: ../src/admin/class-papi-admin.php:185
msgid "Docs"
msgstr "Dokumentation"

#: ../src/properties/class-papi-property-datetime.php:32
msgid "Previous Month"
msgstr "Föregående månad"

#: ../src/properties/class-papi-property-datetime.php:33
msgid "Next Month"
msgstr "Nästa månad"

#: ../src/properties/class-papi-property-datetime.php:34
msgid "Midnight"
msgstr "Midnatt"

#: ../src/properties/class-papi-property-datetime.php:36
msgid "January"
msgstr "Januari"

#: ../src/properties/class-papi-property-datetime.php:37
msgid "February"
msgstr "Februari"

#: ../src/properties/class-papi-property-datetime.php:38
msgid "March"
msgstr "Mars"

#: ../src/properties/class-papi-property-datetime.php:39
msgid "April"
msgstr "April"

#: ../src/properties/class-papi-property-datetime.php:40
msgid "May"
msgstr "Maj"

#: ../src/properties/class-papi-property-datetime.php:41
msgid "June"
msgstr "Juni"

#: ../src/properties/class-papi-property-datetime.php:42
msgid "July"
msgstr "Juli"

#: ../src/properties/class-papi-property-datetime.php:43
msgid "August"
msgstr "Augusti"

#: ../src/properties/class-papi-property-datetime.php:44
msgid "September"
msgstr "September"

#: ../src/properties/class-papi-property-datetime.php:45
msgid "October"
msgstr "Oktober"

#: ../src/properties/class-papi-property-datetime.php:46
msgid "November"
msgstr "November"

#: ../src/properties/class-papi-property-datetime.php:47
msgid "December"
msgstr "December"

#: ../src/properties/class-papi-property-datetime.php:49
msgid "Noon"
msgstr "Eftermiddag"

#: ../src/properties/class-papi-property-datetime.php:51
msgid "Sunday"
msgstr "Söndag"

#: ../src/properties/class-papi-property-datetime.php:52
msgid "Monday"
msgstr "Måndag"

#: ../src/properties/class-papi-property-datetime.php:53
msgid "Tuesday"
msgstr "Tisdag"

#: ../src/properties/class-papi-property-datetime.php:54
msgid "Wednesday"
msgstr "Onsdag"

#: ../src/properties/class-papi-property-datetime.php:55
msgid "Thursday"
msgstr "Torsdag"

#: ../src/properties/class-papi-property-datetime.php:56
msgid "Friday"
msgstr "Fredag"

#: ../src/properties/class-papi-property-datetime.php:57
msgid "Saturday"
msgstr "Lördag"

#: ../src/properties/class-papi-property-datetime.php:60
msgid "Sun"
msgstr "Sön"

#: ../src/properties/class-papi-property-datetime.php:61
msgid "Mon"
msgstr "Mån"

#: ../src/properties/class-papi-property-datetime.php:62
msgid "Tue"
msgstr "Tis"

#: ../src/properties/class-papi-property-datetime.php:63
msgid "Wed"
msgstr "Ons"

#: ../src/properties/class-papi-property-datetime.php:64
msgid "Thu"
msgstr "Tor"

#: ../src/properties/class-papi-property-datetime.php:65
msgid "Fri"
msgstr "Fre"

#: ../src/properties/class-papi-property-datetime.php:66
msgid "Sat"
msgstr "Lör"

#: ../src/properties/class-papi-property-file.php:117
msgid "Add file"
msgstr "Lägg till fil"

#: ../src/properties/class-papi-property-file.php:118
msgid "No file selected"
msgstr "Ingen fil vald"

#: ../src/properties/class-papi-property-image.php:22
msgid "Add image"
msgstr "Lägg till bild"

#: ../src/properties/class-papi-property-image.php:23
msgid "No image selected"
msgstr "Ingen bild vald"

#: ../src/properties/class-papi-property-link.php:127,
#: ../src/properties/class-papi-property-link.php:240
msgid "URL"
msgstr "URL"

#: ../src/properties/class-papi-property-link.php:135,
#: ../src/properties/class-papi-property-link.php:250
msgid "Title"
msgstr "Rubrik"

#: ../src/properties/class-papi-property-link.php:142,
#: ../src/properties/class-papi-property-link.php:259
msgid "Target"
msgstr "Mål"

#: ../src/properties/class-papi-property-link.php:144,
#: ../src/properties/class-papi-property-link.php:263
msgid "New window"
msgstr "Nytt fönster"

#: ../src/properties/class-papi-property-link.php:144,
#: ../src/properties/class-papi-property-link.php:263
msgid "Same window"
msgstr "Samma fönster"

#: ../src/properties/class-papi-property-link.php:154
msgid "No link selected"
msgstr "Ingen länk vald"

#: ../src/properties/class-papi-property-link.php:155
msgid "Add link"
msgstr "Lägg till länk"

#: ../src/properties/class-papi-property-link.php:158
msgid "Edit link"
msgstr "Ändra länk"

#: ../src/properties/class-papi-property-link.php:159
msgid "Remove link"
msgstr "Ta bort länk"

#: ../src/properties/class-papi-property-post.php:70
msgid "Select Post Type"
msgstr "Välj post typ"

#: ../src/properties/class-papi-property-post.php:71
msgid "Select %s"
msgstr "Välj %s"

#: ../src/properties/class-papi-property-reference.php:91
msgid "No references exists"
msgstr "Inga referenser finns"

#: ../src/properties/class-papi-property-relationship.php:145
msgid "Post"
msgstr "Inlägg"

#: ../src/properties/class-papi-property-relationship.php:334
msgid "Search"
msgstr "Sök"

#: ../src/properties/class-papi-property-relationship.php:339
msgid "Sort by"
msgstr "Sortera efter"

#: ../src/properties/class-papi-property-repeater.php:157
msgid "Add new row"
msgstr "Lägg till ny rad"

#: ../src/properties/class-papi-property-term.php:69
msgid "Select Taxonomy"
msgstr "Välj taxonomi"

#: ../src/properties/class-papi-property-term.php:70
msgid "Select %s term"
msgstr "Välj %s term"

#: ../src/properties/class-papi-property-url.php:42
msgid "Select file"
msgstr "Välj fil"

#: ../src/types/class-papi-page-type.php:205,
#: ../src/types/class-papi-taxonomy-type.php:68
msgid "View"
msgstr "Vy"

#: ../src/admin/views/add-new-page.php:8
msgid "Add New %s"
msgstr "Lägg till ny %s"

#: ../src/lib/core/property.php:327
msgid "(required field)"
msgstr "(obligatoriskt fält)"

#: ../src/lib/hooks/filters-page-type.php:58
msgid "%s with WordPress standard fields"
msgstr "%s med Wordpress standardfält"

#: ../src/lib/hooks/filters-page-type.php:80,
#: ../src/lib/hooks/filters-taxonomy-type.php:31
msgid "Standard %s"
msgstr "Standard %s"

#: ../src/admin/views/partials/add-new-item.php:9
msgid "Thumbnail missing"
msgstr "Bild saknas"

#: ../src/admin/views/partials/add-new-item.php:22
msgid "Select"
msgstr "Välj"

#~ msgid ""
#~ "WordPress 4.0 and higher required to run Papi! The plugin has now "
#~ "disabled itself."
#~ msgstr ""
#~ "Wordpress 4.0 och högre krävs för att köra Papi! Tillägget har nu "
#~ "inaktiverat sig själv."

#~ msgid "Name (alphabetically)"
#~ msgstr "Enligt namn (alfabetiskt)"

#~ msgid "Post created date (ascending)"
#~ msgstr "Enligt publiceringsdatum (stigande)"

#~ msgid "Post created date (descending)"
#~ msgstr "Enligt publiceringsdatum (fallande)"

#~ msgid "Post id (ascending)"
#~ msgstr "Enligt sidans id (stigande)"

#~ msgid "Post id (descending)"
#~ msgstr "Enligt sidans id (fallande)"

#~ msgid "Post order value (ascending)"
#~ msgstr "Post ordervärde (stigande)"

#~ msgid "Post order value (descending)"
#~ msgstr "Post ordervärde (fallande)"

#~ msgid "Post modified date (ascending)"
#~ msgstr "Enligt ändringsdatum (stigande)"

#~ msgid "Post modified date (descending)"
#~ msgstr "Enligt ändringsdatum (fallande)"

#~ msgid "Tab Title"
#~ msgstr "Flikens rubrik"

#~ msgid "Sort Order"
#~ msgstr "Sorteringsordning"

#~ msgid "Properties"
#~ msgstr "Egenskaper"

#~ msgid "Slug"
#~ msgstr "Adress"

#~ msgid "Cannot find the page type"
#~ msgstr "Kan inte hitta sidtypen"

#~ msgid "Overview of page type"
#~ msgstr "Översikt över sidtyper"

#~ msgid "No meta boxes exists."
#~ msgstr "Inga meta boxar existerar."

#~ msgid "Tabs"
#~ msgstr "Tabbar"

#~ msgid "Page Types"
#~ msgstr "Sidtyper"

#~ msgid "Name"
#~ msgstr "Namn"

#~ msgid "Page Type ID"
#~ msgstr "Sidtyp ID"

#~ msgid "Post types"
#~ msgstr "Post typer"

#~ msgid "Template"
#~ msgstr "Mall"

#~ msgid "Page Count"
#~ msgstr "Antal sidor"

#~ msgid "Page Type has no template file"
#~ msgstr "Sidtypen har ingen mallfil"

#~ msgid "Template file does not exist"
#~ msgstr "Mallfilen finns inte"


================================================
FILE: languages/papi.pot
================================================
# Copyright (C) 2017 papi
# This file is distributed under the same license as the papi package.
msgid ""
msgstr ""
"Project-Id-Version: papi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"
"X-Poedit-SourceCharset: UTF-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: ../src/papi-loader.php:75, ../src/papi-loader.php:84, ../src/admin/class-papi-admin.php:38, ../src/admin/class-papi-admin.php:47
msgid "Cheatin&#8217; huh?"
msgstr ""

#: ../src/papi-loader.php:244
msgid "WordPress 4.4 and higher required to run Papi! The plugin has now disabled itself."
msgstr ""

#: ../src/admin/class-papi-admin-assets.php:51
msgid "Close"
msgstr ""

#: ../src/admin/class-papi-admin-assets.php:52, ../src/admin/class-papi-admin-page-type-switcher.php:39, ../src/types/class-papi-page-type.php:204, ../src/types/class-papi-taxonomy-type.php:67
msgid "Edit"
msgstr ""

#: ../src/admin/class-papi-admin-assets.php:53, ../src/properties/class-papi-property-flexible.php:824, ../src/properties/class-papi-property-flexible.php:847, ../src/properties/class-papi-property-repeater.php:790, ../src/properties/class-papi-property-repeater.php:812
msgid "Remove"
msgstr ""

#: ../src/admin/class-papi-admin-assets.php:54
msgid "This fields are required:"
msgstr ""

#: ../src/admin/class-papi-admin-columns.php:68
msgid "Type"
msgstr ""

#: ../src/admin/class-papi-admin-columns.php:175
msgid "All types"
msgstr ""

#: ../src/admin/class-papi-admin-entry-taxonomy.php:50
msgid "%s type"
msgstr ""

#: ../src/admin/class-papi-admin-menu.php:125, ../src/admin/class-papi-admin-menu.php:172, ../src/admin/class-papi-admin-menu.php:173, ../src/types/class-papi-page-type.php:203, ../src/types/class-papi-taxonomy-type.php:66
msgid "Add New"
msgstr ""

#: ../src/admin/class-papi-admin-page-type-switcher.php:35
msgid "Page Type:"
msgstr ""

#: ../src/admin/class-papi-admin-page-type-switcher.php:57
msgid "OK"
msgstr ""

#: ../src/admin/class-papi-admin-page-type-switcher.php:58
msgid "Cancel"
msgstr ""

#: ../src/admin/class-papi-admin.php:185
msgid "View Papi Documentation"
msgstr ""

#: ../src/admin/class-papi-admin.php:185
msgid "Docs"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:32
msgid "Previous Month"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:33
msgid "Next Month"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:34
msgid "Midnight"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:36
msgid "January"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:37
msgid "February"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:38
msgid "March"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:39
msgid "April"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:40
msgid "May"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:41
msgid "June"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:42
msgid "July"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:43
msgid "August"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:44
msgid "September"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:45
msgid "October"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:46
msgid "November"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:47
msgid "December"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:49
msgid "Noon"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:51
msgid "Sunday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:52
msgid "Monday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:53
msgid "Tuesday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:54
msgid "Wednesday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:55
msgid "Thursday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:56
msgid "Friday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:57
msgid "Saturday"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:60
msgid "Sun"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:61
msgid "Mon"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:62
msgid "Tue"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:63
msgid "Wed"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:64
msgid "Thu"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:65
msgid "Fri"
msgstr ""

#: ../src/properties/class-papi-property-datetime.php:66
msgid "Sat"
msgstr ""

#: ../src/properties/class-papi-property-file.php:117
msgid "Add file"
msgstr ""

#: ../src/properties/class-papi-property-file.php:118
msgid "No file selected"
msgstr ""

#: ../src/properties/class-papi-property-image.php:22
msgid "Add image"
msgstr ""

#: ../src/properties/class-papi-property-image.php:23
msgid "No image selected"
msgstr ""

#: ../src/properties/class-papi-property-link.php:127, ../src/properties/class-papi-property-link.php:240
msgid "URL"
msgstr ""

#: ../src/properties/class-papi-property-link.php:135, ../src/properties/class-papi-property-link.php:250
msgid "Title"
msgstr ""

#: ../src/properties/class-papi-property-link.php:142, ../src/properties/class-papi-property-link.php:259
msgid "Target"
msgstr ""

#: ../src/properties/class-papi-property-link.php:144, ../src/properties/class-papi-property-link.php:263
msgid "New window"
msgstr ""

#: ../src/properties/class-papi-property-link.php:144, ../src/properties/class-papi-property-link.php:263
msgid "Same window"
msgstr ""

#: ../src/properties/class-papi-property-link.php:154
msgid "No link selected"
msgstr ""

#: ../src/properties/class-papi-property-link.php:155
msgid "Add link"
msgstr ""

#: ../src/properties/class-papi-property-link.php:158
msgid "Edit link"
msgstr ""

#: ../src/properties/class-papi-property-link.php:159
msgid "Remove link"
msgstr ""

#: ../src/properties/class-papi-property-post.php:70
msgid "Select Post Type"
msgstr ""

#: ../src/properties/class-papi-property-post.php:71
msgid "Select %s"
msgstr ""

#: ../src/properties/class-papi-property-reference.php:91
msgid "No references exists"
msgstr ""

#: ../src/properties/class-papi-property-relationship.php:145
msgid "Post"
msgstr ""

#: ../src/properties/class-papi-property-relationship.php:334
msgid "Search"
msgstr ""

#: ../src/properties/class-papi-property-relationship.php:339
msgid "Sort by"
msgstr ""

#: ../src/properties/class-papi-property-repeater.php:157
msgid "Add new row"
msgstr ""

#: ../src/properties/class-papi-property-term.php:69
msgid "Select Taxonomy"
msgstr ""

#: ../src/properties/class-papi-property-term.php:70
msgid "Select %s term"
msgstr ""

#: ../src/properties/class-papi-property-url.php:42
msgid "Select file"
msgstr ""

#: ../src/types/class-papi-page-type.php:205, ../src/types/class-papi-taxonomy-type.php:68
msgid "View"
msgstr ""

#: ../src/admin/views/add-new-page.php:8
msgid "Add New %s"
msgstr ""

#: ../src/lib/core/property.php:327
msgid "(required field)"
msgstr ""

#: ../src/lib/hooks/filters-page-type.php:58
msgid "%s with WordPress standard fields"
msgstr ""

#: ../src/lib/hooks/filters-page-type.php:80, ../src/lib/hooks/filters-taxonomy-type.php:31
msgid "Standard %s"
msgstr ""

#: ../src/admin/views/partials/add-new-item.php:9
msgid "Thumbnail missing"
msgstr ""

#: ../src/admin/views/partials/add-new-item.php:22
msgid "Select"
msgstr ""


================================================
FILE: package.json
================================================
{
  "name": "papi",
  "version": "3.2.0",
  "repository": "wp-papi/papi",
  "description": "WordPress Page Type API with custom fields",
  "author": "Fredrik Forsmo <fredrik.forsmo@gmail.com>",
  "license": "MIT",
  "dependencies": {
    "moment": "^2.29",
    "select2": "^4.0.5"
  },
  "devDependencies": {
    "@babel/core": "^7.8.7",
    "@jitesoft/babel-preset-main": "^2.1.5",
    "autoprefixer-cli": "^1.0",
    "babel": "^6.5",
    "babel-core": "^6.17",
    "babel-eslint": "^10.1.0",
    "babel-loader": "^8.0.6",
    "babel-preset-es2015": "^6.18",
    "concurrently": "^5.1.0",
    "core-js": "^3.6.4",
    "csso-cli": "^3.0.0",
    "sass": "^1.17.2",
    "semistandard": "^14.2.0",
    "watch": "^1.0",
    "webpack": "^4.42.0",
    "webpack-cli": "^3.3.12"
  },
  "scripts": {
    "build": "NODE_ENV=production npm run js",
    "css": "sass src/assets/scss/style.scss dist/css/style.css && autoprefixer-cli -b \"last 2 version\" dist/css/style.css dist/css/style.css && csso dist/css/style.css dist/css/style.min.css && echo \"\n/*# sourceMappingURL=style.min.css.map */\" >> dist/css/style.min.css && mv dist/css/style.css.map dist/css/style.min.css.map && rm dist/css/style.css",
    "js": "webpack",
    "lint": "semistandard --global papi --fix src/assets/js/*.js src/assets/js/properties/*.js",
    "watch": "concurrently \"watch:css\" \"watch:js\"",
    "watch:css": "watch \"npm run css\"",
    "watch:js": "watch \"npm run js\""
  },
  "semistandard": {
    "parser": "babel-eslint"
  }
}


================================================
FILE: papi-loader.php
================================================
<?php

/**
 * Plugin Name: Papi
 * Description: Page Type API with custom fields
 * Author: Fredrik Forsmo
 * Author URI: https://frozzare.com
 * Version: 3.3.0-dev
 * Plugin URI: https://wp-papi.github.io
 * Textdomain: papi
 * Domain Path: /languages/
 */

// Load Papi loader.
require_once __DIR__ . '/src/papi-loader.php';


================================================
FILE: phpcs.xml
================================================
<?xml version="1.0"?>
<ruleset name="Papi">
  <description>Papi rules for PHP_CodeSniffer</description>

  <exclude-pattern>node_modules/*</exclude-pattern>
  <exclude-pattern>vendor/*</exclude-pattern>

  <rule ref="Generic.Arrays.DisallowLongArraySyntax" />

  <rule ref="WordPress-Core">
    <exclude name="PEAR.Functions.FunctionCallSignature.EmptyLine" />
    <exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions" />
    <exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener" />
    <exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser" />
    <exclude name="WordPress.Arrays.ArrayDeclaration" />
    <exclude name="WordPress.PHP.YodaConditions" />
    <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBetweenStructureColon" />
    <exclude name="Squiz.Commenting.LongConditionClosingComment.Missing" />
    <exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
    <exclude name="Generic.PHP.DisallowAlternativePHPTags.MaybeASPShortOpenTagFound" />
    <exclude name="Generic.PHP.DisallowAlternativePHPTags.MaybeASPOpenTagFound" />
    <exclude name="Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure" />
    <exclude name="PSR2" />
    <!-- allow papi-loader.php -->
    <exclude name="WordPress.Files.FileName.InvalidClassFileName" />
    <!-- allow if ( $value = func() ) -->
    <exclude name="Squiz.PHP.DisallowMultipleAssignments.Found" />
    <!-- allow __, esc_html__ and so without translators comment -->
    <exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />
    <!-- allow ['key' => $value] -->
    <exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeKeyFound" />
    <exclude name="WordPress.Arrays.CommaAfterArrayItem.NoComma" />
    <!-- allow opening/closing tag on same line -->
    <exclude name="Squiz.PHP.EmbeddedPhp.ContentAfterOpen" />
    <exclude name="Squiz.PHP.EmbeddedPhp.ContentBeforeEnd" />
  </rule>

  <rule ref="WordPress.XSS.EscapeOutput" />
  <rule ref="WordPress.PHP.StrictComparisons" />
  <rule ref="WordPress.PHP.StrictInArray" />
</ruleset>


================================================
FILE: phpunit.xml.dist
================================================
<phpunit backupGlobals="false"
  backupStaticAttributes="false"
  beStrictAboutTestsThatDoNotTestAnything="true"
  beStrictAboutOutputDuringTests="true"
  bootstrap="tests/bootstrap.php"
  colors="true"
  convertErrorsToExceptions="true"
  convertNoticesToExceptions="true"
  convertWarningsToExceptions="true"
  failOnRisky="true"
  failOnWarning="true"
  processIsolation="false"
  stopOnError="false"
  stopOnFailure="false"
  verbose="true"
>
  <testsuites>
    <testsuite name="Papi Test Suite">
      <directory suffix=".php">./tests/cases</directory>
    </testsuite>
  </testsuites>
  <filter>
    <whitelist addUncoveredFilesFromWhitelist="true">
      <directory suffix=".php">./src</directory>
    </whitelist>
  </filter>
  <logging>
    <log type="coverage-clover" target="./tmp/clover.xml" charset="UTF-8" />
  </logging>
</phpunit>


================================================
FILE: src/admin/class-papi-admin-ajax.php
================================================
<?php

/**
 * Admin class that handle ajax calls.
 */
class Papi_Admin_Ajax {

	/**
	 * The action prefix for Papi ajax actions.
	 *
	 * @var string
	 */
	protected $action_prefix = 'papi/ajax/';

	/**
	 * The permalink structure.
	 *
	 * @var string
	 */
	protected $structure;

	/**
	 * The construct.
	 */
	public function __construct() {
		$this->setup_actions();
		$this->structure = get_option( 'permalink_structure' );
	}

	/**
	 * Add ajax endpoint.
	 */
	public function add_endpoint() {
		if ( empty( $this->structure ) ) {
			return;
		}

		add_rewrite_tag( '%action%', '([^/]*)' );
		add_rewrite_rule( 'papi-ajax/([^/]*)/?', 'index.php?action=$matches[1]', 'top' );
	}

	/**
	 * Add ajax url to Papi JavaScript object.
	 */
	public function ajax_url() {
		if ( empty( $this->structure ) ) {
			$url = esc_url( home_url( 'index.php', is_ssl() ? 'https' : 'http' ) );
		} else {
			$url = esc_url( home_url( '/papi-ajax/', is_ssl() ? 'https' : 'http' ) );
		}
		?>
		<script type="text/javascript">
			var papi = papi || {};
			papi.ajaxUrl = '<?php echo esc_html( $url ); ?>';
		</script>
		<?php
	}

	/**
	 * Handle Papi ajax.
	 */
	public function handle_papi_ajax() {
		if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
			return;
		}

		$ajax_action = '';

		if ( ! empty( $_GET['action'] ) ) {
			$ajax_action = sanitize_text_field( $_GET['action'] );
		}

		if ( is_user_logged_in() && has_action( $this->action_prefix . $ajax_action ) !== false ) {
			if ( ! defined( 'DOING_AJAX' ) ) {
				define( 'DOING_AJAX', true );
			}

			if ( ! defined( 'DOING_PAPI_AJAX' ) ) {
				define( 'DOING_PAPI_AJAX', true );
			}

			status_header( 200 );
			do_action( $this->action_prefix . $ajax_action );
			wp_die();
		}
	}

	/**
	 * Get entry type via GET.
	 *
	 * GET /papi-ajax/?action=get_entry_type
	 */
	public function get_entry_type() {
		$entry_type_id = papi_get_qs( 'entry_type' );
		$entry_type    = papi_get_entry_type_by_id( $entry_type_id );

		if ( empty( $entry_type ) ) {
			$this->render_error( 'No entry type found' );
			return;
		}

		wp_send_json( $entry_type );
	}

	/**
	 * Get posts via GET.
	 *
	 * Posts with empty title will be ignored.
	 *
	 * GET /papi-ajax/?action=get_posts
	 */
	public function get_posts() {
		$args   = papi_get_qs( 'query' ) ?: [];
		$args   = is_array( $args ) ? $args : [];
		$fields = papi_get_qs( 'fields' ) ?: [];
		$fields = is_array( $fields ) ? $fields : [];
		$posts  = ( new WP_Query( array_merge( [
			'posts_per_page'         => -1,
			'post_status'            => 'any',
			'post_type'              => ['post'],
			'no_found_rows'          => true,
			'update_post_meta_cache' => false,
			'update_post_term_cache' => false
		], $args ) ) )->posts;

		$posts = array_filter( $posts, function ( $post ) {
			return ! empty( $post->post_title );
		} );

		usort( $posts, function ( $a, $b ) {
			return strcmp( strtolower( $a->post_title ), strtolower( $b->post_title ) );
		} );

		if ( ! empty( $fields ) ) {
			foreach ( $posts as $index => $post ) {
				$item = [];

				foreach ( $fields as $field ) {
					$item[$field] = $post->$field;
				}

				$posts[$index] = $item;
			}
		}

		wp_send_json( $posts );
	}

	/**
	 * Get property html via GET.
	 *
	 * GET /papi-ajax/?action=get_property
	 */
	public function get_property() {
		$default_options = Papi_Core_Property::factory()->get_options();
		$keys            = array_keys( get_object_vars( $default_options ) );
		$options         = papi_get_qs( $keys, true );

		if ( $property = papi_property( $options ) ) {
			ob_start();

			$property->render_ajax_request();

			$html = ob_get_clean();

			wp_send_json( [
				'html' => utf8_encode( $html )
			] );

			return;
		}

		$this->render_error( 'No property found' );
	}

	/**
	 * Get properties via POST.
	 *
	 * POST /papi-ajax/?action=get_properties
	 */
	public function get_properties() {
		if ( ! papi_get_sanitized_post( 'properties' ) ) {
			$this->render_error( 'No properties found' );

			return;
		}

		$items = json_decode( stripslashes( $_POST['properties'] ), true );

		if ( empty( $items ) || ! is_array( $items ) ) {
			$this->render_error( 'No properties found' );

			return;
		}

		foreach ( $items as $key => $item ) {
			$property = papi_property( (array) $item );

			if ( ! papi_is_property( $property ) ) {
				unset( $items[$key] );
				continue;
			}

			ob_start();

			$property->render_ajax_request();

			$items[$key] = trim( ob_get_clean() );
		}

		$items = array_filter( $items );

		if ( empty( $items ) ) {
			$this->render_error( 'No properties found' );

			return;
		}

		wp_send_json( [
			'html' => $items
		] );
	}

	/**
	 * Get rules result via GET.
	 *
	 * GET /papi-ajax/?action=get_rules_result
	 */
	public function get_rules_result() {
		if ( ! papi_get_sanitized_post( 'data' ) ) {
			$this->render_error( 'No rule found' );

			return;
		}

		$data = json_decode( stripslashes( papi_get_sanitized_post( 'data' ) ), true );

		if ( empty( $data ) || ! is_array( $data ) || ! isset( $data['slug'] ) ) {
			$this->render_error( 'No rule found' );

			return;
		}

		$entry_type = papi_get_entry_type_by_meta_id();

		if ( empty( $entry_type ) ) {
			$entry_type_id = papi_get_qs( 'entry_type' );
			$entry_type    = papi_get_entry_type_by_id( $entry_type_id );
		}

		if ( $entry_type instanceof Papi_Entry_Type === false ) {
			$this->render_error( 'No rule found' );

			return;
		}

		if ( preg_match( '/\[\]$/', $data['slug'] ) ) {
			$data['slug'] = preg_replace( '/\[\]$/', '', $data['slug'] );
		}

		if ( $property = $entry_type->get_property( $data['slug'] ) ) {
			wp_send_json( [
				'render' => $property->render_is_allowed_by_rules( $data['rules'] )
			] );

			return;
		}

		$this->render_error( 'No rule found' );
	}

	/**
	 * Get shortcode via GET.
	 *
	 * GET /papi-ajax/?action=get_shortcode
	 */
	public function get_shortcode() {
		$shortcode = papi_get_qs( 'shortcode' ) ?: '';
		$shortcode = html_entity_decode( $shortcode );
		$shortcode = wp_unslash( $shortcode );

		wp_send_json( [
			'html' => do_shortcode( $shortcode )
		] );
	}

	/**
	 * Get terms via GET.
	 *
	 * GET /papi-ajax/?action=get_terms
	 */
	public function get_terms() {
		$query    = papi_get_qs( 'query' ) ?: [];
		$query    = is_array( $query ) ? $query : [];
		$taxonomy = papi_get_qs( 'taxonomy' ) ?: '';

		$args = array_merge( [
			'fields' => 'id=>name'
		], $query );

		$terms = [];
		if ( taxonomy_exists( $taxonomy ) ) {
			$terms = get_terms( $taxonomy, $args );
		}

		wp_send_json( $terms );
	}

	/**
	 * Render error message.
	 *
	 * @param string $message
	 */
	public function render_error( $message ) {
		wp_send_json( [
			'error' => $message
		] );
	}

	/**
	 * Setup action hooks.
	 */
	protected function setup_actions() {
		add_action( 'init', [$this, 'add_endpoint'] );
		add_action( 'parse_request', [$this, 'handle_papi_ajax'] );
		add_action( 'admin_enqueue_scripts', [$this, 'ajax_url'], 10 );

		// Ajax actions.
		add_action( $this->action_prefix . 'get_entry_type', [$this, 'get_entry_type'] );
		add_action( $this->action_prefix . 'get_property', [$this, 'get_property'] );
		add_action( $this->action_prefix . 'get_properties', [$this, 'get_properties'] );
		add_action( $this->action_prefix . 'get_rules_result', [$this, 'get_rules_result'] );
		add_action( $this->action_prefix . 'get_posts', [$this, 'get_posts'] );
		add_action( $this->action_prefix . 'get_terms', [$this, 'get_terms'] );
		add_action( $this->action_prefix . 'get_shortcode', [$this, 'get_shortcode'] );
	}
}

new Papi_Admin_Ajax;


================================================
FILE: src/admin/class-papi-admin-assets.php
================================================
<?php

/**
 * Admin class that handle assets.
 */
final class Papi_Admin_Assets {

	/**
	 * The constructor.
	 */
	public function __construct() {
		add_action( 'admin_enqueue_scripts', [$this, 'enqueue_css'] );
		add_action( 'admin_enqueue_scripts', [$this, 'enqueue_js'] );
		add_action( 'admin_enqueue_scripts', [$this, 'enqueue_locale'] );
	}

	/**
	 * Enqueue CSS.
	 */
	public function enqueue_css() {
		wp_enqueue_media();
		wp_enqueue_style( 'wp-color-picker' );
		wp_enqueue_style( 'papi-main', dirname( PAPI_PLUGIN_URL ) . '/dist/css/style.min.css', false, null );
	}

	/**
	 * Enqueue JavaScript.
	 */
	public function enqueue_js() {
		// WordPress will override window.papi on plugins page,
		// so don't include Papi JavaScript on plugins page.
		if ( strpos( $_SERVER['REQUEST_URI'], 'plugins.php' ) !== false ) {
			return;
		}

		wp_enqueue_script( 'papi-main', dirname( PAPI_PLUGIN_URL ) . '/dist/js/main.min.js', [
			'json2',
			'jquery',
			'jquery-ui-core',
			'jquery-ui-sortable',
			'jquery-masonry',
			'wp-color-picker'
		], '', true );
	}

	/**
	 * Enqueue locale.
	 */
	public function enqueue_locale() {
		wp_localize_script( 'papi-main', 'papiL10n', [
			'close'         => __( 'Close', 'default' ),
			'edit'          => __( 'Edit', 'default' ),
			'new'           => __( 'New', 'default' ),
			'remove'        => __( 'Remove', 'default' ),
			'requiredError' => __( 'This fields are required:', 'papi' ),
		] );
	}
}

if ( papi_is_admin() ) {
	new Papi_Admin_Assets;
}


================================================
FILE: src/admin/class-papi-admin-columns.php
================================================
<?php

/**
 * Admin class that handle table columns.
 */
final class Papi_Admin_Columns {

	/**
	 * Current post type.
	 *
	 * @var string
	 */
	protected $post_type;

	/**
	 * Current taxonomy.
	 *
	 * @var string
	 */
	protected $taxonomy;

	/**
	 * The constructor.
	 */
	public function __construct() {
		$this->setup_globals();
		$this->setup_actions();
		$this->setup_filters();
	}

	/**
	 * Get meta type value.
	 *
	 * @return string
	 */
	protected function get_meta_type_value() {
		return empty( $this->taxonomy ) ? $this->post_type : $this->taxonomy;
	}

	/**
	 * Add custom table header to page or taxonomy type.
	 *
	 * @param  array $defaults
	 *
	 * @return array
	 */
	public function manage_page_type_posts_columns( array $defaults = [] ) {
		if ( ! in_array( $this->post_type, papi_get_post_types(), true ) && ! in_array( $this->taxonomy, papi_get_taxonomies(), true ) ) {
			return $defaults;
		}

		/**
		 * Hide column for post or taxonomy type. Default is false.
		 *
		 * @param string $post_type
		 */
		if ( apply_filters( 'papi/settings/column_hide_' . $this->get_meta_type_value(), false ) ) {
			return $defaults;
		}

		/**
		 * Change column title for entry type column.
		 *
		 * @param string $post_type
		 */
		$defaults['entry_type'] = apply_filters(
			'papi/settings/column_title_' . $this->get_meta_type_value(),
			esc_html__( 'Type', 'papi' )
		);

		return $defaults;
	}

	/**
	 * Add custom table column to page or taxonomy type.
	 *
	 * @param string $column_name
	 * @param int    $post_id
	 * @param int    $term_id
	 */
	public function manage_page_type_posts_custom_column( $column_name, $post_id, $term_id = null ) {
		if ( ! in_array( $this->post_type, papi_get_post_types(), true ) && ! in_array( $this->taxonomy, papi_get_taxonomies(), true ) ) {
			return;
		}

		/**
		 * Hide column for post type. Default is false.
		 *
		 * @param string $post_type
		 */
		if ( apply_filters( 'papi/settings/column_hide_' . $this->get_meta_type_value(), false ) ) {
			return;
		}

		// Column name most be `entry_type`. On taxomy the column name is `post_id` variable.
		if ( $column_name !== 'entry_type' && $post_id !== 'entry_type' ) {
			return;
		}

		// Get the entry type for the post or term.
		$entry_type = papi_get_entry_type_by_meta_id(
			is_numeric( $post_id ) ? $post_id : $term_id,
			papi_get_meta_type()
		);

		$post = ! empty( $this->post_type ) && empty( $this->taxonomy );
		$type = $post ? 'page' : 'taxonomy';
		$arg  = $post ? papi_get_post_type() : papi_get_taxonomy();
		$show = call_user_func_array( "papi_filter_settings_show_standard_{$type}_type", [$arg] );

		if ( ! is_null( $entry_type ) && ( $show === false || get_metadata( papi_get_meta_type( $type ), ( is_numeric( $post_id ) ? $post_id : $term_id ), papi_get_page_type_key(), true ) === $entry_type->get_id() ) ) {
			echo esc_html( $entry_type->name );
		} else {
			echo esc_html( call_user_func_array( "papi_filter_settings_standard_{$type}_type_name", [$arg] ) );
		}
	}

	/**
	 * Add entry type as a sortable column.
	 *
	 * @param  array $columns
	 *
	 * @return array
	 */
	public function manage_page_type_sortable_columns( $columns ) {
		if ( in_array( $this->post_type, papi_get_post_types(), true ) || in_array( $this->taxonomy, papi_get_taxonomies(), true ) ) {
			$columns['entry_type'] = 'entry_type';
		}

		return $columns;
	}

	/**
	 * Filter posts on load if `page_type` query string is set.
	 *
	 * @param  WP_Query $query
	 *
	 * @return WP_Query
	 */
	public function pre_get_posts( WP_Query $query ) {
		global $pagenow;

		if ( $pagenow === 'edit.php' && ! is_null( papi_get_qs( 'page_type' ) ) ) {
			if ( papi_get_qs( 'page_type' ) === 'papi-standard-page' ) {
				$query->set( 'meta_query', [
					[
						'key'     => papi_get_page_type_key(),
						'compare' => 'NOT EXISTS'
					]
				] );
			} else {
				$query->set( 'meta_key', papi_get_page_type_key() );
				$query->set( 'meta_value', papi_get_qs( 'page_type' ) );
			}
		}

		// Order query result by entry type.
		if ( $query->get( 'orderby' ) === 'entry_type' ) {
			$query->set( 'meta_key', papi_get_page_type_key() );
			$query->set( 'orderby', 'meta_value' );
		}

		return $query;
	}

	/**
	 * Filter page types in post type list.
	 */
	public function restrict_page_types() {
		$post_types = papi_get_post_types();

		if ( in_array( $this->post_type, $post_types, true ) ) {
			$page_types = papi_get_all_page_types( $this->post_type );
			$page_types = array_map( function ( $page_type ) {
				return [
					'name'  => $page_type->name,
					'value' => $page_type->get_id()
				];
			}, $page_types );

			// Add the standard page that isn't a real page type.
			if ( papi_filter_settings_show_standard_page_type_in_filter( $this->post_type ) ) {
				$page_types[] = [
					'name'  => papi_filter_settings_standard_page_type_name( $this->post_type ),
					'value' => 'papi-standard-page'
				];
			}

			usort( $page_types, function ( $a, $b ) {
				return strcmp(
					strtolower( $a['name'] ),
					strtolower( $b['name'] )
				);
			} );
			?>
			<select name="page_type" class="postform">
				<option value="0" selected><?php esc_html_e( 'All types', 'papi' ); ?></option>
				<?php
				foreach ( $page_types as $page_type ) {
					printf(
						'<option value="%s" %s>%s</option>',
						esc_attr( $page_type['value'] ),
						papi_get_qs( 'page_type' ) === $page_type['value'] ? ' selected' : '',
						esc_html( $page_type['name'] )
					);
				}
				?>
			</select>
			<?php
		}
	}

	/**
	 * Setup actions.
	 */
	protected function setup_actions() {
		// Setup post type actions.
		if ( ! empty( $this->post_type ) && empty( $this->taxonomy ) ) {
			add_filter( 'pre_get_posts', [$this, 'pre_get_posts'] );
			add_action( 'restrict_manage_posts', [$this, 'restrict_page_types'] );
			add_action( sprintf( 'manage_%s_posts_custom_column', $this->post_type ), [$this, 'manage_page_type_posts_custom_column'], 10, 2 );
		}

		// Setup taxonomy actions.
		if ( ! empty( $this->taxonomy ) ) {
			add_action( sprintf( 'manage_%s_custom_column', $this->taxonomy ), [$this, 'manage_page_type_posts_custom_column'], 10, 3 );
		}
	}

	/**
	 * Setup filters.
	 */
	protected function setup_filters() {
		// Setup post type actions.
		if ( ! empty( $this->post_type ) && empty( $this->taxonomy ) ) {
			add_filter( sprintf( 'manage_%s_posts_columns', $this->post_type ), [$this, 'manage_page_type_posts_columns'] );
			add_filter( sprintf( 'manage_edit-%s_sortable_columns', $this->post_type ), [$this, 'manage_page_type_sortable_columns'] );
		}

		// Setup taxonomy actions.
		if ( ! empty( $this->taxonomy ) ) {
			add_filter( sprintf( 'manage_edit-%s_columns', $this->taxonomy ), [$this, 'manage_page_type_posts_columns'] );
			add_filter( sprintf( 'manage_edit-%s_sortable_columns', $this->taxonomy ), [$this, 'manage_page_type_sortable_columns'] );
		}
	}

	/**
	 * Setup globals.
	 */
	protected function setup_globals() {
		$this->post_type = papi_get_post_type();
		$this->taxonomy  = papi_get_taxonomy();
	}
}

if ( papi_is_admin() ) {
	new Papi_Admin_Columns;
}


================================================
FILE: src/admin/class-papi-admin-entry-post.php
================================================
<?php

class Papi_Admin_Entry_Post extends Papi_Admin_Entry {

	/**
	 * The post type.
	 *
	 * @var string
	 */
	protected $post_type;

	/**
	 * The construct.
	 */
	public function __construct() {
		$this->post_type = papi_get_post_type();

		$this->setup_actions();
		$this->setup_filters();
	}

	/**
	 * Filters the fields displayed in the post revision diff UI.
	 *
	 * @param  array   $return
	 * @param  WP_Post $compare_from
	 * @param  WP_Post $compare_to
	 *
	 * @return array
	 */
	public function get_revision_ui_diff( $return, $compare_from, $compare_to ) {
		$meta = get_post_meta( $compare_from->ID );
		$meta = is_array( $meta ) ? $meta : [];

		foreach ( $meta as $key => $value ) {
			if ( $key[0] === '_' && $key !== papi_get_page_type_key() ) {
				continue;
			}

			$content_from = papi_data_get( $compare_from->ID, $key );
			$content_to = papi_data_get( $compare_to->ID, $key );

			$diff = wp_text_diff( $content_from, $content_to, [
				'show_split_view' => true
			] );

			if ( $diff ) {
				$return[] = [
					'id'   => $key,
					'name' => $key,
					'diff' => $diff,
				];
			}
		}

		return $return;
	}

	/**
	 * Output hidden meta boxes.
	 */
	public function hidden_meta_boxes() {
		global $_wp_post_type_features;

		if ( isset( $_wp_post_type_features[$this->post_type]['editor'] ) ) {
			return;
		}

		add_meta_box( 'papi-hidden-editor', 'Papi hidden editor', [$this, 'hidden_meta_box_editor'], $this->post_type );
	}

	/**
	 * Output hidden WordPress editor.
	 */
	public function hidden_meta_box_editor() {
		wp_editor( '', 'papiHiddenEditor' );
	}

	/**
	 * Load post new action
	 * Redirect to right url if no page type is set.
	 */
	public function load_post_new() {
		$request_uri = $_SERVER['REQUEST_URI'];
		$post_types  = papi_get_post_types();

		if ( in_array( $this->post_type, $post_types, true ) && strpos( $request_uri, 'page_type=' ) === false ) {
			$parsed_url = parse_url( $request_uri );

			$only_page_type = papi_filter_settings_only_page_type( $this->post_type );
			$page_types     = papi_get_all_page_types( $this->post_type );
			$show_standard  = false;

			if ( count( $page_types ) === 1 && empty( $only_page_type ) ) {
				$show_standard  = $page_types[0]->standard_type;
				$show_standard  = $show_standard ? papi_filter_settings_show_standard_page_type( $this->post_type ) : $show_standard;
				$only_page_type = $show_standard ? '' : $page_types[0]->get_id();
			}

			// Check if we should show one post type or not and
			// create the right url for that.
			if ( ! empty( $only_page_type ) && ! $show_standard ) {
				$url = papi_get_page_new_url( $only_page_type, false );
			} else {
				$page = 'page=papi-add-new-page,' . $this->post_type;

				if ( $this->post_type !== 'post' ) {
					$page = '&' . $page;
				}

				$url = 'edit.php?' . $parsed_url['query'] . $page;
			}

			wp_safe_redirect( $url );
			papi_is_admin() && exit;
		}
	}

	/**
	 * Redirect post location when post is in iframe mode.
	 *
	 * @param  string $location
	 *
	 * @return string
	 */
	public function redirect_post_location( $location ) {
		if ( ! isset( $_SERVER['HTTP_REFERER'] ) ) {
			return $location;
		}

		$referer = $_SERVER['HTTP_REFERER'];
		$referer = strtolower( $referer );

		if ( strpos( $referer, 'papi-iframe-mode' ) === false ) {
			return $location;
		}

		return sprintf( '%s&papi_css[]=papi-iframe-mode', $location );
	}

	/**
	 * Setup admin entry.
	 */
	public function setup() {
		// Preload all page types.
		foreach ( papi_get_post_types() as $post_type ) {
			papi_get_all_entry_types( [
				'args' => $post_type
			] );
		}

		return ! in_array( $this->post_type, ['revision', 'nav_menu_item'], true );
	}

	/**
	 * Setup actions.
	 */
	protected function setup_actions() {
		add_action( 'load-post-new.php', [$this, 'load_post_new'] );
		add_action( 'add_meta_boxes', [$this, 'hidden_meta_boxes'], 10 );
		add_action( 'redirect_post_location', [$this, 'redirect_post_location'] );
	}

	/**
	 * Setup filters.
	 */
	protected function setup_filters() {
		add_filter( 'wp_get_revision_ui_diff', [$this, 'get_revision_ui_diff'], 10, 3 );
	}
}

if ( papi_is_admin() ) {
	Papi_Admin_Entry_Post::instance();
}


================================================
FILE: src/admin/class-papi-admin-entry-taxonomy.php
================================================
<?php

/**
 * Admin class that handles taxonomy modifications.
 */
class Papi_Admin_Entry_Taxonomy extends Papi_Admin_Entry {

	/**
	 * All taxonomy types.
	 *
	 * @var array
	 */
	protected $taxonomy_types = [];

	/**
	 * The construct.
	 */
	public function __construct() {
		$this->setup_actions();
	}

	/**
	 * Add form fields to edit tags page.
	 */
	public function add_form_fields() {
		$html_name       = esc_attr( papi_get_page_type_key() );
		$taxonomy        = papi_get_qs( 'taxonomy' );
		$taxonomy_object = get_taxonomy( $taxonomy );

		// Get only the taxonomy types that has the taxonomy.
		$taxonomy_types = array_filter( $this->taxonomy_types, function ( $taxonomy_type ) use ( $taxonomy ) {
			return in_array( $taxonomy, $taxonomy_type->taxonomy, true ) && $taxonomy_type->display( $taxonomy );
		} );
		$taxonomy_types = array_values( $taxonomy_types );

		// Do not display empty select if no taxonomy types.
		if ( empty( $taxonomy_types ) ) {
			return;
		}

		// Prepare taxonomy types with standard taxonomy type.
		$taxonomy_types = $this->prepare_taxonomy_types( $taxonomy_types );

		// Render a dropdown if more than one taxonomy types
		// exists on the taxonomy.
		if ( count( $taxonomy_types ) > 1 ):
			?>
			<div class="form-field">
				<label for="<?php echo esc_attr( $html_name ); ?>">
					<?php echo esc_html( sprintf( __( '%s type', 'papi' ), $taxonomy_object->labels->singular_name ) ); ?>
				</label>
				<select name="<?php echo esc_attr( $html_name ); ?>" id="<?php echo esc_attr( $html_name ); ?>" data-papi-page-type-key="true">
					<?php
					foreach ( $taxonomy_types as $taxonomy_type ) {
						papi_render_html_tag( 'option', [
							'data-redirect' => $taxonomy_type->redirect_after_create,
							'value'         => esc_attr( $taxonomy_type->get_id() ),
							esc_html( $taxonomy_type->name )
						] );
					}
					?>
				</select>
			</div>
			<?php
		else:
			papi_render_html_tag( 'input', [
				'data-redirect'           => $taxonomy_types[0]->redirect_after_create,
				'data-papi-page-type-key' => true,
				'name'                    => esc_attr( $html_name ),
				'type'                    => 'hidden',
				'value'                   => esc_attr( $taxonomy_types[0]->get_id() )
			] );
		endif;
	}

	/**
	 * Prepare taxonomy types, add standard taxonomy if it should be added.
	 *
	 * @param  array $taxonomy_types
	 *
	 * @return array
	 */
	protected function prepare_taxonomy_types( array $taxonomy_types ) {
		$taxonomy = papi_get_qs( 'taxonomy' );

		if ( papi_filter_settings_show_standard_taxonomy_type( $taxonomy ) ) {
			$id                      = sprintf( 'papi-standard-%s-type', $taxonomy );
			$taxonomy_type           = new Papi_Taxonomy_Type( $id );
			$taxonomy_type->id       = $id;
			$taxonomy_type->name     = papi_filter_settings_standard_taxonomy_type_name( $taxonomy );
			$taxonomy_type->taxonomy = [$taxonomy];
			$taxonomy_types[]        = $taxonomy_type;
		}

		usort( $taxonomy_types, function ( $a, $b ) {
			return strcmp( $a->name, $b->name );
		} );

		return papi_sort_order( array_reverse( $taxonomy_types ) );
	}

	/**
	 * Setup actions.
	 */
	protected function setup_actions() {
		add_action( 'admin_init', [$this, 'setup_taxonomies_hooks'] );
	}

	/**
	 * Setup hooks for all taxonomies.
	 */
	public function setup_taxonomies_hooks() {
		$this->taxonomy_types = papi_get_all_entry_types( [
			'types' => 'taxonomy'
		] );

		$taxonomies = array_reduce( $this->taxonomy_types, function ( $taxonomies, $taxonomy_type ) {
			return array_merge( $taxonomies, $taxonomy_type->taxonomy );
		}, [] );
		$taxonomies = array_unique( $taxonomies );

		foreach ( $taxonomies as $taxonomy ) {
			if ( is_string( $taxonomy ) && taxonomy_exists( $taxonomy ) ) {
				add_action( $taxonomy . '_add_form_fields', [$this, 'add_form_fields'] );
			}
		}
	}
}

if ( papi_is_admin() ) {
	Papi_Admin_Entry_Taxonomy::instance();
}


================================================
FILE: src/admin/class-papi-admin-entry.php
================================================
<?php

abstract class Papi_Admin_Entry {

	/**
	 * The instance.
	 *
	 * @var Papi_Admin_Entry
	 */
	protected static $instance;

	/**
	 * Create or get the instance.
	 *
	 * @return Papi_Admin_Entry
	 */
	public static function instance() {
		if ( ! isset( static::$instance ) ) {
			static::$instance = new static;
		}

		return static::$instance;
	}

	/**
	 * Setup admin entry.
	 *
	 * @return bool
	 */
	public function setup() {
		return true;
	}

	/**
	 * Setup actions.
	 */
	protected function setup_actions() {
	}

	/**
	 * Setup filters.
	 */
	protected function setup_filters() {
	}
}


================================================
FILE: src/admin/class-papi-admin-menu.php
================================================
<?php

/**
 * Admin class that handles admin menus.
 */
final class Papi_Admin_Menu {

	/**
	 * The construct.
	 */
	public function __construct() {
		$this->setup_actions();
	}

	/**
	 * Fill labels on admin bar.
	 */
	public function admin_bar_menu() {
		if ( $entry_type = $this->get_entry_type() ) {
			$this->override_labels( $entry_type );
		}
	}

	/**
	 * Get current type class.
	 *
	 * @return Papi_Entry_Type
	 */
	protected function get_entry_type() {
		if ( $entry_type = papi_get_entry_type_by_id( papi_get_entry_type_id() ) ) {
			return $entry_type;
		}
	}

	/**
	 * Override labels with labels from the entry type.
	 *
	 * @param Papi_Entry_Type $entry_type
	 */
	protected function override_labels( Papi_Entry_Type $entry_type ) {
		global $wp_post_types, $wp_taxonomies;

		if ( $entry_type->get_type() === 'taxonomy' ) {
			$meta_type_value = papi_get_taxonomy();
		} else {
			$meta_type_value = papi_get_post_type();
		}

		if ( empty( $meta_type_value ) || ( ! isset( $wp_post_types[$meta_type_value] ) && ! isset( $wp_taxonomies[$meta_type_value] ) ) ) {
			return;
		}

		foreach ( $entry_type->get_labels() as $key => $value ) {
			if ( empty( $value ) ) {
				continue;
			}

			if ( $entry_type->get_type() === 'taxonomy' && isset( $wp_taxonomies[$meta_type_value]->labels->$key ) ) {
				$wp_taxonomies[$meta_type_value]->labels->$key = $value;
			} else if ( isset( $wp_post_types[$meta_type_value]->labels->$key ) ) {
				$wp_post_types[$meta_type_value]->labels->$key = $value;
			}
		}
	}

	/**
	 * Page items menu.
	 *
	 * This function will register all entry types
	 * that has a fake post type. Like option types.
	 */
	public function page_items_menu() {
		$entry_types = papi_get_all_entry_types( [
			'mode'  => 'exclude',
			'types' => 'page'
		] );

		foreach ( $entry_types as $entry_type ) {
			if ( empty( $entry_type->get_menu() ) || empty( $entry_type->name ) ) {
				continue;
			}

			$slug = sprintf(
				'papi/%s/%s',
				$entry_type->get_type(),
				$entry_type->get_id()
			);

			add_submenu_page(
				$entry_type->get_menu(),
				$entry_type->name,
				$entry_type->name,
				$entry_type->capability,
				$slug,
				[$entry_type, 'render']
			);
		}
	}

	/**
	 * Setup menu items for real post types.
	 */
	public function post_types_menu() {
		global $submenu;

		$post_types = papi_get_post_types();

		foreach ( $post_types as $post_type ) {
			if ( ! post_type_exists( $post_type ) ) {
				continue;
			}

			if ( $post_type === 'post' ) {
				$edit_url = 'edit.php';
			} else {
				$edit_url = 'edit.php?post_type=' . $post_type;
			}

			if ( ! isset( $submenu[$edit_url], $submenu[$edit_url][10], $submenu[$edit_url][10][2] ) ) {
				$post_type_object = get_post_type_object( $post_type );

				if ( $post_type_object->show_in_menu !== true ) {
					$submenu[$edit_url] = [
						10 => [
							__( 'Add New', 'papi' ),
							'edit_posts',
							'post-new.php'
						]
					];
				} else {
					continue;
				}
			}

			$only_page_type = papi_filter_settings_only_page_type( $post_type );
			$page_types     = papi_get_all_page_types( $post_type );
			$show_standard  = false;

			// Don't change menu item when no page types is found.
			if ( empty( $page_types ) ) {
				continue;
			}

			if ( count( $page_types ) === 1 && empty( $only_page_type ) ) {
				$show_standard  = papi_filter_settings_show_standard_page_type( $post_type );
				$only_page_type = $show_standard ? '' : $page_types[0]->get_id();
			}

			if ( ! empty( $only_page_type ) && ! $show_standard ) {
				$submenu[$edit_url][10][2] = papi_get_page_new_url(
					$only_page_type,
					false,
					$post_type,
					[
						'post_parent',
						'lang'
					]
				);
			} else {
				$page  = 'papi-add-new-page,' . $post_type;
				$start = strpos( $edit_url, 'post_type' ) === false ? '?' : '&';

				$submenu[$edit_url][10][2] = sprintf(
					'%s%spage=%s',
					$edit_url,
					$start,
					$page
				);

				// Add menu item.
				add_menu_page(
					__( 'Add New', 'papi' ),
					__( 'Add New', 'papi' ),
					'read',
					$page,
					[$this, 'render_view']
				);

				// Remove the menu item so it's hidden.
				remove_menu_page( $page );
			}
		}
	}

	/**
	 * Menu callback that loads right view depending on what the `page` query string says.
	 */
	public function render_view() {
		if ( strpos( papi_get_qs( 'page' ), 'papi' ) !== false ) {
			$page = str_replace( 'papi-', '', papi_get_qs( 'page' ) );
			$res  = preg_replace( '/\,.*/', '', $page );

			if ( is_string( $res ) ) {
				$page_view = $res;
			}
		}

		if ( ! isset( $page_view ) ) {
			$page_view = null;
		}

		if ( ! is_null( $page_view ) ) {
			$view = new Papi_Admin_View;
			$view->render( $page_view );
		} else {
			echo '<h2>Papi - 404</h2>';
		}
	}

	/**
	 * Setup actions.
	 */
	protected function setup_actions() {
		if ( papi_is_admin() ) {
			add_action( 'admin_init', [$this, 'admin_bar_menu'] );
			add_action( 'admin_menu', [$this, 'page_items_menu'] );
			add_action( 'admin_menu', [$this, 'post_types_menu'] );
		} else {
			add_action( 'admin_bar_menu', [$this, 'admin_bar_menu'] );
		}
	}
}

new Papi_Admin_Menu;


================================================
FILE: src/admin/class-papi-admin-meta-box-tabs.php
================================================
<?php

/**
 * Admin class that handles admin tabs in
 * meta boxes.
 */
final class Papi_Admin_Meta_Box_Tabs {

	/**
	 * The tabs.
	 *
	 * @var array
	 */
	protected $tabs = [];

	/**
	 * The constructor.
	 *
	 * @param array $tabs
	 * @param bool  $render
	 */
	public function __construct( array $tabs = [], $render = true ) {
		if ( empty( $tabs ) ) {
			return;
		}

		$this->tabs = papi_tabs_setup( $tabs );

		if ( $render ) {
			$this->html();
		}
	}

	/**
	 * Get the tabs that are registered.
	 *
	 * @return array
	 */
	public function get_tabs() {
		return $this->tabs;
	}

	/**
	 * Generate html for tabs and properties.
	 */
	protected function html() {
		?>
		<div class="papi-tabs-wrapper">
			<div class="papi-tabs-table-back"></div>
			<div class="papi-tabs-back"></div>
			<ul class="papi-tabs">
				<?php
				foreach ( $this->tabs as $tab ):
					$css_classes = $this->tabs[0] === $tab ? 'active ' : '';

					if ( empty( $tab->background ) ) {
						// Find out if the first property has a sidebar or not. If the first property
						// don't have a sidebar the tab background should be white since it looks better.
						$no_sidebar = empty( $tab->properties ) ? false : $tab->properties[0]->sidebar;
						$css_classes .= ! empty( $tab->properties ) && $no_sidebar ? '' : 'white-tab';
					} else {
						$css_classes .= $tab->background === 'white' ? 'white-tab' : '';
					}
					?>
					<li class="<?php echo esc_attr( $css_classes ); ?>">
						<a href="#" data-papi-tab="<?php echo esc_attr( $tab->id ); ?>">
							<?php if ( ! empty( $tab->icon ) ): ?>
								<img src="<?php echo esc_attr( $tab->icon ); ?>" alt="<?php echo esc_attr( $tab->title ); ?>" />
							<?php endif;
							echo esc_html( $tab->title ); ?>
						</a>
					</li>
				<?php endforeach; ?>
			</ul>
			<div class="papi-tabs-content">
				<?php
				foreach ( $this->tabs as $tab ):
					?>
					<div class="<?php echo $this->tabs[0] === $tab ? 'active' : ''; ?>" data-papi-tab="<?php echo esc_attr( $tab->id ); ?>">
						<?php papi_render_properties( $tab->properties ); ?>
					</div>
					<?php
				endforeach;
				?>
			</div>
		</div>
		<div class="papi-clear"></div>
		<?php
	}
}


================================================
FILE: src/admin/class-papi-admin-meta-box.php
================================================
<?php

/**
 * Admin class that handles admin meta boxes.
 */
final class Papi_Admin_Meta_Box {

	/**
	 * The core box.
	 *
	 * @var Papi_Core_Box
	 */
	protected $box;

	/**
	 * The constructor.
	 *
	 * @param Papi_Core_Box $box
	 */
	public function __construct( Papi_Core_Box $box ) {
		// Check if the current user is allowed to view this box.
		if ( ! papi_current_user_is_allowed( $box->capabilities ) ) {
			return;
		}

		if ( $box->display ) {
			$this->box = $box;
			$this->setup_actions();
		}
	}

	/**
	 * Add custom css for hiding boxes with no frame in screen options.
	 *
	 * @return string
	 */
	public function admin_head() {
		if ( ! $this->box->frame ) {
			echo sprintf(
				'<style type="text/css">label[for="%s-hide"],#%s>h2,#%s>button{display:none !important}</style>',
				esc_attr( $this->box->id ),
				esc_attr( $this->box->id ),
				esc_attr( $this->box->id )
			);
		}
	}

	/**
	 * Add css classes to meta box.
	 *
	 * @param  array $classes
	 *
	 * @return string[]
	 */
	public function meta_box_css_classes( array $classes ) {
		return array_merge( $classes, [
			'papi-box'
		] );
	}

	/**
	 * Move meta boxes after title.
	 */
	public function move_meta_box_after_title() {
		global $post, $wp_meta_boxes;
		do_meta_boxes( get_current_screen(), $this->box->context, $post );
		unset( $wp_meta_boxes[get_post_type( $post )][$this->box->context] );
	}

	/**
	 * Get meta post type.
	 *
	 * @return string
	 */
	protected function get_post_type() {
		if ( papi_get_meta_type() === 'post' ) {
			if ( $post_id = papi_get_post_id() ) {
				return get_post_type( $post_id );
			}

			if ( $post_type = papi_get_post_type() ) {
				return $post_type;
			}
		}

		return $this->box->id;
	}

	/**
	 * Get meta box title.
	 *
	 * @return string
	 */
	protected function get_title() {
		$title = $this->box->title;

		if ( $this->box->get_option( 'required' ) ) {
			$title .= papi_property_required_html(
				$this->box->properties[0],
				true
			);
		}

		return $title;
	}

	/**
	 * Render the meta box
	 *
	 * @param array $post
	 * @param array $args
	 */
	public function render_meta_box( $post, array $args ) {
		if ( ! isset( $args['args'] ) ) {
			return;
		}

		// Do a last check before all properties is rendered.
		$args['args'] = array_filter( $args['args'], 'papi_is_property' );

		// Inherit options from the box.
		foreach ( $args['args'] as $index => $property ) {
			if ( $property->layout === 'horizontal' ) {
				$args['args'][$index]->layout = $this->box->layout;
			}
		}

		// Render the properties.
		papi_render_properties( papi_sort_order( array_reverse( $args['args'] ) ) );
	}

	/**
	 * Setup action hooks.
	 */
	protected function setup_actions() {
		if ( post_type_exists( $this->get_post_type() ) && papi_get_meta_type() === 'post' ) {
			add_action( 'add_meta_boxes', [$this, 'setup_meta_box'] );

			if ( $this->box->context === 'after_title' ) {
				add_action( 'edit_form_after_title', [$this, 'move_meta_box_after_title'] );
			}
		} else {
			$this->setup_meta_box();
		}

		// Will be called on when you call do_meta_boxes
		// even without a real post type.
		add_action(
			sprintf(
				'postbox_classes_%s_%s',
				strtolower( $this->get_post_type() ),
				$this->box->id
			),
			[$this, 'meta_box_css_classes']
		);

		add_action( 'admin_head', [$this, 'admin_head'] );
	}

	/**
	 * Setup meta box.
	 */
	public function setup_meta_box() {
		$properties = $this->box->properties;

		// Check all properties and remove them that can't be rendered.
		foreach ( $properties as $index => $property ) {
			if ( $property instanceof Papi_Property && ! $property->can_render() ) {
				unset( $properties[$index] );
			}
		}

		// Bail if properties array is empty,
		// no need to render a empty meta box.
		if ( empty( $properties ) ) {
			return;
		}

		add_meta_box(
			$this->box->id,
			$this->get_title(),
			[$this, 'render_meta_box'],
			$this->get_post_type(),
			$this->box->context,
			$this->box->priority,
			$properties
		);
	}
}


================================================
FILE: src/admin/class-papi-admin-meta-handler.php
================================================
<?php

/**
 * Admin class that handle meta data, like post or term.
 */
final class Papi_Admin_Meta_Handler extends Papi_Core_Data_Handler {

	/**
	 * Get meta type so we know where the data should be saved.
	 *
	 * @return string
	 */
	protected function get_meta_type() {
		if ( $current_filter = current_filter() ) {
			return papi_get_meta_type( explode( '_', $current_filter )[1] );
		}

		return papi_get_meta_type();
	}

	/**
	 * Overwrite post data in `posts` table.
	 *
	 * @param int $post_id
	 */
	protected function overwrite_post_data( $post_id ) {
		global $wpdb;

		if ( empty( $post_id ) || empty( $this->overwrite ) ) {
			return;
		}

		$wpdb->update( $wpdb->posts, $this->overwrite, [
			'ID' => $post_id
		] );

		// Delete cache since it can be cached even if not saved in the database.
		foreach ( array_keys( $this->overwrite ) as $key ) {
			papi_cache_delete( $key, $post_id );
		}

		clean_post_cache( $post_id );
	}

	/**
	 * Pre save page template and page type.
	 *
	 * @param int $id
	 */
	protected function pre_save( $id ) {
		if ( empty( $id ) ) {
			return;
		}

		$data = $this->get_pre_data();

		foreach ( $data as $key => $value ) {
			if ( empty( $value ) ) {
				continue;
			}

			if ( is_array( $value ) ) {
				list( $keys, $value ) = $this->get_pre_deep_keys_value( $value );
				$key = sprintf( '%s_%s', $key, implode( '_', $keys ) );
			}

			update_metadata( $this->get_meta_type(), $id, $key, $value );
		}
	}

	/**
	 * Save meta boxes.
	 *
	 * @param int     $id
	 * @param object  $post
	 */
	public function save_meta_boxes( $id, $post = null ) {
		// Check if there was a multisite switch before.
		if ( is_multisite() && ms_is_switched() ) {
			return;
		}

		// Can't proceed without a id.
		if ( empty( $id ) ) {
			return;
		}

		// Check if our nonce is vailed.
		if ( ! wp_verify_nonce( papi_get_sanitized_post( 'papi_meta_nonce' ), 'papi_save_data' ) ) {
			return;
		}

		$meta_type = $this->get_meta_type();
		$post      = is_array( $post ) ? (object) $post : $post;

		if ( $meta_type === 'post' && $post_type = get_post_type_object( $post->post_type ) ) {
			// Check so the id is a post id and not a autosave post.
			if ( ! $this->valid_post_id( $id ) ) {
				return;
			}

			// Check the `edit_posts` capability before we continue.
			if ( ! current_user_can( $post_type->cap->edit_posts ) ) {
				return;
			}

			// Delete all oEmbed caches.
			if ( class_exists( 'WP_Embed' ) ) {
				global $wp_embed;

				if ( $wp_embed instanceof WP_Embed ) {
					$wp_embed->delete_oembed_caches( $id );
				}
			}
		}

		if ( $meta_type === 'term' && $taxonomy = get_taxonomy( papi_get_taxonomy() ) ) {
			// Check the `edit_terms` capability before we continue.
			if ( $taxonomy && ! current_user_can( $taxonomy->cap->edit_terms ) ) {
				return;
			}
		}

		$this->save_properties( $id );
	}

	/**
	 * Save custom fields for revision post.
	 *
	 * @param int $post_id
	 */
	public function save_revision( $revision_id ) {
		// Check if our nonce is vailed.
		if ( ! wp_verify_nonce( papi_get_sanitized_post( 'papi_meta_nonce' ), 'papi_save_data' ) ) {
			return;
		}

		// Fetch parent id from revision.
		if ( ! $parent_id = wp_is_post_revision( $revision_id ) ) {
			return;
		}

		// Bail if a entry type don't exists on parent post.
		if ( papi_is_empty( papi_get_entry_type_by_meta_id( $parent_id, 'post' ) ) ) {
			return;
		}

		$meta = get_post_meta( $parent_id );

		foreach ( $meta as $key => $value ) {
			if ( $key[0] === '_' && $key !== papi_get_page_type_key() ) {
				continue;
			}

			papi_data_update( $revision_id, $key, array_shift( $value ) );
		}
	}

	/**
	 * Save properties.
	 *
	 * @param int $id
	 */
	public function save_properties( $id ) {
		// Pre save page template, page type and some others dynamic values.
		$this->pre_save( $id );

		// Get properties data.
		$data = $this->get_post_data();

		// Prepare properties data.
		$data = $this->prepare_properties_data( $data, $id );

		// Get meta type.
		$meta_type = $this->get_meta_type();

		// Overwrite post data if any.
		if ( $meta_type === 'post' ) {
			$this->overwrite_post_data( $id );
		}

		// Save all properties value
		foreach ( $data as $key => $value ) {
			papi_data_update( $id, $key, $value, $this->get_meta_type() );
		}

		/**
		 * Fire `save_properties` action when all is done.
		 *
		 * @param int    $id
		 * @param string $meta_type
		 */
		do_action( 'papi/save_properties', $id, $meta_type );
	}

	/**
	 * Restore to post revision.
	 *
	 * @param int $post_id
	 * @param int $revision_id
	 */
	public function restore_post_revision( $post_id, $revision_id ) {
		if ( papi_is_empty( papi_get_entry_type_by_meta_id( $post_id, 'post' ) ) ) {
			return;
		}

		$meta = get_post_meta( $revision_id );

		foreach ( $meta as $key => $value ) {
			if ( $key[0] === '_' && $key !== papi_get_page_type_key() ) {
				continue;
			}

			papi_data_update( $post_id, $key, array_shift( $value ) );
		}
	}

	/**
	 * Setup actions.
	 */
	protected function setup_actions() {
		add_action( '_wp_put_post_revision', [$this, 'save_revision'] );
		add_action( 'save_post', [$this, 'save_meta_boxes'], 1, 2 );
		add_action( 'created_term', [$this, 'save_meta_boxes'], 1 );
		add_action( 'edit_term', [$this, 'save_meta_boxes'], 1 );
		add_action( 'wp_restore_post_revision', [$this, 'restore_post_revision'], 10, 2 );
	}

	/**
	 * Check if post id is valid or not.
	 *
	 * @param  int $post_id
	 *
	 * @return bool
	 */
	protected function valid_post_id( $post_id ) {
		$key = papi_get_sanitized_post( 'action' ) === 'save-attachment-compat' ? 'id' : 'post_ID';
		$val = papi_get_sanitized_post( $key );

		// When autosave is in place the post id is located deeper in the post data array, the ids should not match.
		if ( isset( $_POST['data']['wp_autosave'], $_POST['data']['wp_autosave']['post_id'] ) ) {
			// But if it's a auto draft the ids should match.
			if ( isset( $_POST['data']['wp_autosave']['auto_draft'] ) && ! empty( $_POST['data']['wp_autosave']['auto_draft'] ) ) {
				return sanitize_text_field( $_POST['data']['wp_autosave']['post_id'] ) === strval( $post_id );
			}

			return sanitize_text_field( $_POST['data']['wp_autosave']['post_id'] ) !== strval( $post_id );
		}

		// Should not be the same id when `wp-preview` equals `dopreview`.
		if ( isset( $_POST['wp-preview'] ) && strtolower( $_POST['wp-preview'] ) === 'dopreview' ) {
			return $val !== strval( $post_id );
		}

		return $val === strval( $post_id );
	}
}

if ( papi_is_admin() ) {
	new Papi_Admin_Meta_Handler;
}


================================================
FILE: src/admin/class-papi-admin-option-handler.php
================================================
<?php

/**
 * Admin class that handle option post data.
 */
final class Papi_Admin_Option_Handler extends Papi_Core_Data_Handler {

	/**
	 * Save properties with a post id of zero.
	 */
	public function save_properties() {
		if ( $_SERVER ['REQUEST_METHOD'] !== 'POST' || papi_get_meta_type() !== 'option' ) {
			return;
		}

		// Check if our nonce is vailed.
		if ( ! wp_verify_nonce( papi_get_sanitized_post( 'papi_meta_nonce' ), 'papi_save_data' ) ) {
			return;
		}

		// Get properties data.
		$data = $this->get_post_data();

		// Prepare properties data.
		$data = $this->prepare_properties_data( $data, 0 );

		foreach ( $data as $key => $value ) {
			papi_data_update( 0, $key, $value, 'option' );
		}

		/**
		 * Fire `save_properties` action when all is done.
		 *
		 * @param int    $id
		 * @param string $meta_type
		 */
		do_action( 'papi/save_properties', 0, 'option' );
	}

	/**
	 * Setup actions.
	 */
	protected function setup_actions() {
		add_action( 'admin_init', [$this, 'save_properties'] );
	}
}

if ( papi_is_admin() ) {
	new Papi_Admin_Option_Handler;
}


================================================
FILE: src/admin/class-papi-admin-page-type-switcher.php
================================================
<?php

class Papi_Admin_Page_Type_Switcher {

	/**
	 * The construct.
	 */
	public function __construct() {
		add_action( 'admin_init', [$this, 'admin_init'] );
	}

	/**
	 * Admin init hook callback.
	 */
	public function admin_init() {
		add_action( 'post_submitbox_misc_actions', [$this, 'metabox'] );
		add_action( 'save_post', [$this, 'save_post'], 10, 2 );
	}

	/**
	 * Render metabox.
	 */
	public function metabox() {
		$post_type     = papi_get_post_type();
		$page_type     = papi_get_entry_type_by_id( papi_get_page_type_id() );
		$page_type_key = papi_get_page_type_key( 'switch' );
		$page_types    = papi_get_all_page_types( $post_type );
		$show_standard = papi_filter_settings_show_standard_page_type( $post_type );

		if ( $show_standard ) {
			$standard_page_type = papi_get_standard_page_type( $post_type );
			$page_types[]       = $standard_page_type;

			if ( empty( $page_type ) ) {
				$page_type = $standard_page_type;
			}
		}

		usort( $page_types, function ( $a, $b ) {
			return strcmp( $a->name, $b->name );
		} );

		$page_types = papi_sort_order( array_reverse( $page_types ) );

		// Don't do anything without any page types.
		if ( empty( $page_type ) || empty( $page_types ) ) {
			return;
		} ?>

		<div class="misc-pub-section misc-pub-section-last papi-page-type-switcher">
			<label for="<?php echo esc_attr( $page_type_key ); ?>"><?php esc_html_e( 'Page Type:', 'papi' ); ?></label>
			<span><?php echo esc_html( $page_type->name ); ?></span>

			<?php if ( papi_current_user_is_allowed( $page_type->capabilities ) && $page_type->switcher ): ?>
				<a href="#" id="papi-page-type-switcher-edit" class="hide-if-no-js"><?php esc_html_e( 'Edit', 'papi' ); ?></a>
				<div>
					<select name="<?php echo esc_attr( $page_type_key ); ?>" id="<?php echo esc_attr( $page_type_key ); ?>">
						<?php
						foreach ( $page_types as $pt ) {
							if ( ! papi_current_user_is_allowed( $pt->capabilities ) ) {
								continue;
							}

							papi_render_html_tag( 'option', [
								'selected' => $page_type->match_id( $pt->get_id() ),
								'value'    => esc_attr( $pt->get_id() ),

								esc_html( $pt->name )
							] );
						}
						?>
					</select>
					<a href="#" id="papi-page-type-switcher-save" class="hide-if-no-js button"><?php esc_html_e( 'OK', 'papi' ); ?></a>
					<a href="#" id="papi-page-type-switcher-cancel" class="hide-if-no-js"><?php esc_html_e( 'Cancel', 'papi' ); ?></a>
				</div>
			<?php endif; ?>
		</div>
		<?php
	}

	/**
	 * Switch page type if all checks pass.
	 *
	 * @param  int     $post_id
	 * @param  WP_post $post
	 *
	 * @return bool
	 */
	public function save_post( $post_id, $post ) {
		// Check if post id and post object is empty or not.
		if ( empty( $post_id ) || empty( $post ) ) {
			return false;
		}

		// Check if our nonce is vailed.
		if ( ! wp_verify_nonce( papi_get_sanitized_post( 'papi_meta_nonce' ), 'papi_save_data' ) ) {
			return false;
		}

		// Check if so both page type keys exists.
		if ( empty( $_POST[papi_get_page_type_key()] ) || empty( $_POST[papi_get_page_type_key( 'switch' )] ) ) {
			return false;
		}

		// Page type information.
		$page_type_id        = sanitize_text_field( $_POST[papi_get_page_type_key()] );
		$page_type_switch_id = sanitize_text_field( $_POST[papi_get_page_type_key( 'switch' )] );

		// Don't update if the same ids.
		if ( $page_type_id === $page_type_switch_id ) {
			return false;
		}

		// Fetch right page type if standard page type id.
		if ( papi_get_standard_page_type_id( $post->post_type ) === $page_type_id ) {
			$page_type = papi_get_standard_page_type( $post->post_type );
		} else {
			$page_type = papi_get_entry_type_by_id( $page_type_id );
		}

		// Fetch right page type switch if standard page type id.
		if ( papi_get_standard_page_type_id( $post->post_type ) === $page_type_switch_id ) {
			$page_type_switch    = papi_get_standard_page_type( $post->post_type );
			$page_type_switch_id = '';
		} else {
			$page_type_switch = papi_get_entry_type_by_id( $page_type_switch_id );
		}

		$post_type_object = get_post_type_object( $post->post_type );

		// Check if page type and post type is not empty.
		if ( empty( $page_type_switch ) || empty( $post_type_object ) ) {
			return false;
		}

		// Check if autosave.
		if ( wp_is_post_autosave( $post_id ) ) {
			return false;
		}

		// Check if revision.
		if ( wp_is_post_revision( $post_id ) ) {
			return false;
		}

		// Check if revision post type.
		if ( in_array( $post->post_type, ['revision', 'nav_menu_item'], true ) ) {
			return false;
		}

		// Check so page type has the post type.
		if ( ! $page_type->has_post_type( $post->post_type ) || ! $page_type_switch->has_post_type( $post->post_type ) ) {
			return false;
		}

		// Check page type capabilities.
		if ( ! papi_current_user_is_allowed( $page_type_switch->capabilities ) ) {
			return false;
		}

		// Check so user can edit posts and that the user can publish posts on the post type.
		if ( ! current_user_can( 'edit_post', $post_id ) || ! current_user_can( $post_type_object->cap->publish_posts ) ) {
			return false;
		}

		// Get properties.
		$properties        = $page_type->get_properties();
		$properties_switch = $page_type_switch->get_properties();

		// Delete only properties that don't have the same type and slug.
		foreach ( $properties as $property ) {
			$delete = true;

			// Check if the properties are the same or not.
			foreach ( $properties_switch as $property_switch ) {
				if ( $property_switch->type === $property->type && $property_switch->match_slug( $property->get_slug() ) ) {
					$delete = false;
					break;
				}
			}

			if ( ! $delete ) {
				continue;
			}

			// Delete property values.
			$property->delete_value( $property->get_slug( true ), $post_id, papi_get_meta_type() );
		}

		// Delete page type switch id.
		if ( empty( $page_type_switch_id ) ) {
			return delete_post_meta( $post_id, papi_get_page_type_key() );
		}

		// Update page type id.
		return papi_set_page_type_id( $post_id, $page_type_switch_id );
	}
}

if ( papi_is_admin() ) {
	new Papi_Admin_Page_Type_Switcher;
}


================================================
FILE: src/admin/class-papi-admin-view.php
================================================
<?php

/**
 * Admin class that handle admin view rendering.
 */
final class Papi_Admin_View {

	/**
	 * Path to view dir.
	 *
	 * @var string
	 */
	protected $path = '';

	/**
	 * The constructor.
	 *
	 * @param string $path
	 */
	public function __construct( $path = '' ) {
		$this->path = empty( $path ) ? PAPI_PLUGIN_DIR . '/admin/views/' : $path;
	}

	/**
	 * Check if file exists.
	 *
	 * @param  string $file
	 *
	 * @return bool
	 */
	public function exists( $file ) {
		return file_exists( $this->file( $file ) );
	}

	/**
	 * Render file.
	 *
	 * @param  string $file
	 *
	 * @return string
	 */
	public function render( $file ) {
		if ( ! empty( $file ) && $this->exists( $file ) ) {
			require $this->file( $file );
		}
	}

	/**
	 * Get full path to file with php exstention.
	 *
	 * @param  string $file
	 *
	 * @return string
	 */
	protected function file( $file ) {
		return $this->path . $file . '.php';
	}
}


================================================
FILE: src/admin/class-papi-admin.php
================================================
<?php

/**
 * Admin class that handle loading of Papi types,
 * columns and loading of posts.
 */
final class Papi_Admin {

	/**
	 * The entry type.
	 *
	 * @var Papi_Entry_Type
	 */
	protected $entry_type;

	/**
	 * The post type.
	 *
	 * @var string
	 */
	protected $meta_type;

	/**
	 * The construct.
	 */
	public function __construct() {
		$this->load_files();
		$this->setup_actions();
		$this->setup_filters();
	}

	/**
	 * Cloning is forbidden.
	 *
	 * @codeCoverageIgnore
	 */
	public function __clone() {
		_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'papi' ), '3.0' );
	}

	/**
	 * Unserializing instances of this class is forbidden.
	 *
	 * @codeCoverageIgnore
	 */
	public function __wakeup() {
		_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'papi' ), '3.0' );
	}

	/**
	 * Preboot all types and setup the current type if any.
	 */
	public function admin_init() {
		$meta_type  = papi_get_meta_type();
		$meta_type  = ucfirst( $meta_type );
		$class_name = 'Papi_Admin_Entry_' . $meta_type;

		// A custom class is not required, e.g
		// options don't have one.
		if ( class_exists( $class_name ) ) {
			$class = call_user_func( [$class_name, 'instance'] );

			if ( ! $class->setup() ) {
				return;
			}
		}

		// Setup entry type.
		if ( $entry_type = $this->get_entry_type() ) {
			$entry_type->setup();
		}
	}

	/**
	 * Add custom body class when it's a page type.
	 *
	 * @param  string $classes
	 *
	 * @return string
	 */
	public function admin_body_class( $classes ) {
		if ( $entry_type = $this->get_entry_type() ) {
			$classes .= sprintf( ' papi-body papi-meta-type-%s', papi_get_meta_type() );

			// Add custom css classes from entry type.
			$arr = $entry_type->get_body_classes();
			$arr = is_string( $arr ) ? [ $arr ] : $arr;
			$arr = is_array( $arr ) ? $arr : [];

			$classes .= ' ' . implode( ' ', $arr );
		}

		// Add custom css classes from query string.
		if ( $css = papi_get_qs( 'papi_css' ) ) {
			$css = is_array( $css ) ? $css : [];
			$css = array_map( 'sanitize_text_field', $css );
			$classes .= ' ' . implode( ' ', $css );
		}

		return $classes;
	}

	/**
	 * Output Papi page type hidden field.
	 */
	public function edit_form_after_title() {
		wp_nonce_field( 'papi_save_data', 'papi_meta_nonce' );

		if ( $value = esc_attr( papi_get_entry_type_id() ) ) {
			papi_render_html_tag( 'input', [
				'data-papi-page-type-key' => true,
				'name'                    => esc_attr( papi_get_page_type_key() ),
				'type'                    => 'hidden',
				'value'                   => $value
			] );
		}
	}

	/**
	 * Get Entry Type instance.
	 *
	 * @return Papi_Entry_Type|false
	 */
	protected function get_entry_type() {
		if ( $this->entry_type instanceof Papi_Entry_Type ) {
			return $this->entry_type;
		}

		$entry_type_id = papi_get_entry_type_id();

		// If the entry type id is empty try to load
		// the entry type id from `page` query string.
		//
		// Example:
		//   /wp-admin/options-general.php?page=papi/option/site-option-type
		if ( empty( $entry_type_id ) ) {
			$entry_type_id = preg_replace( '/^papi\/\w+\//', '', papi_get_qs( 'page' ) );
		}

		// Use the default entry type id if empty.
		if ( empty( $entry_type_id ) ) {
			$entry_type_id = papi_get_entry_type_id();
		}

		// If no entry type id exists Papi can't setup a entry type.
		if ( empty( $entry_type_id ) ) {
			return false;
		}

		$entry_type = papi_get_entry_type_by_id( $entry_type_id );

		if ( $entry_type instanceof Papi_Entry_Type === false ) {
			return false;
		}

		$this->entry_type = $entry_type;

		return $entry_type;
	}

	/**
	 * Load admin files that are not loaded by the autoload.
	 */
	protected function load_files() {
		require_once __DIR__ . '/class-papi-admin-meta-handler.php';
		require_once __DIR__ . '/class-papi-admin-option-handler.php';
		require_once __DIR__ . '/class-papi-admin-entry-post.php';
		require_once __DIR__ . '/class-papi-admin-entry-taxonomy.php';
		require_once __DIR__ . '/class-papi-admin-columns.php';
		require_once __DIR__ . '/class-papi-admin-page-type-switcher.php';
	}

	/**
	 * Add docs links to plugin row meta.
	 *
	 * @param  array  $links
	 * @param  string $file
	 *
	 * @return array
	 */
	public function plugin_row_meta( array $links, $file ) {
		if ( $file === PAPI_PLUGIN_BASENAME ) {
			return array_merge( $links, [
				'docs' => '<a href="' . esc_url( 'https://wp-papi.github.io/docs/' ) . '" title="' . esc_attr( __( 'View Papi Documentation', 'papi' ) ) . '">' . __( 'Docs', 'papi' ) . '</a>',
			] );
		}

		return $links;
	}

	/**
	 * Setup actions.
	 */
	protected function setup_actions() {
		add_action( 'admin_init', [$this, 'admin_init'] );
		add_action( 'edit_form_after_title', [$this, 'edit_form_after_title'] );

		if ( $taxonomy = papi_get_taxonomy() ) {
			add_action( $taxonomy . '_add_form', [$this, 'edit_form_after_title'] );
			add_action( $taxonomy . '_edit_form', [$this, 'edit_form_after_title'] );
		}
	}

	/**
	 * Setup filters.
	 */
	protected function setup_filters() {
		add_filter( 'admin_body_class', [$this, 'admin_body_class'] );
		add_filter( 'plugin_row_meta', [$this, 'plugin_row_meta'], 10, 2 );
		add_filter( 'wp_link_query', [$this, 'wp_link_query'] );
		add_filter( 'wp_refresh_nonces', [$this, 'wp_refresh_nonces'], 11 );
		add_filter( 'pre_update_option', [$this, 'update_front_page'], 10, 2 );
	}

	/**
	 * Update page type to front page type when updating
	 * which page that should be used as front page.
	 *
	 * @param  mixed  $value
	 * @param  string $option
	 *
	 * @return mixed
	 */
	public function update_front_page( $value, $option ) {
		if ( $option !== 'page_on_front' ) {
			return $value;
		}

		$front_pages = papi_get_all_entry_types( [
			'types' => ['front-page'],
		] );

		if ( count( $front_pages ) === 0 ) {
			return $value;
		}

		$old_page_type_id = papi_get_page_type_id( $value );
		$new_page_type_id = $front_pages[0]->get_id();

		// Delete all old fields from old page type if any.
		if ( strtolower( $old_page_type_id ) !== strtolower( $new_page_type_id ) ) {
			if ( $page_type = papi_get_entry_type_by_id( $old_page_type_id ) ) {
				$slugs = array_map( function( $property ) {
					return $property->get_slug( true );
				}, $page_type->get_properties() );

				foreach ( $slugs as $slug ) {
					papi_delete_field( $value, $slug );
				}
			}
		}

		papi_set_page_type_id( $value, $new_page_type_id );

		return $value;
	}

	/**
	 * Filter the link query results.
	 *
	 * @param  array $results
	 *
	 * @return array
	 */
	public function wp_link_query( array $results ) {
		foreach ( $results as $index => $value ) {
			$post_type = papi_get_post_type( $value['ID'] );
			$name      = papi_get_page_type_name( $value['ID'] );

			if ( empty( $name ) ) {
				$name = papi_filter_settings_standard_page_type_name( $post_type );
			}

			$results[$index]['info'] = esc_html( $name );
		}

		return $results;
	}

	/**
	 * Check nonce expiration on the New/Edit Post screen and refresh if needed.
	 *
	 * @param  array $response
	 *
	 * @return array
	 */
	public function wp_refresh_nonces( array $response ) {
		if ( ! array_key_exists( 'wp-refresh-post-nonces', $response ) ) {
			return $response;
		}

		$response['wp-refresh-post-nonces']['replace']['papi_meta_nonce'] = wp_create_nonce( 'papi_save_data' );

		return $response;
	}
}

if ( papi_is_admin() ) {
	new Papi_Admin;
}


================================================
FILE: src/admin/views/add-new-page.php
================================================
<?php
$post_type_name = papi_get_post_type();
$post_type      = get_post_type_object( $post_type_name );
$post_type      = empty( $post_type ) ? get_post_type_object( 'page' ) : $post_type;
?>
<div class="wrap">
	<h1>
		<?php echo esc_html( sprintf( __( 'Add New %s', 'papi' ), $post_type->labels->singular_name ) ); ?>

		<label class="screen-reader-text" for="add-new-page-search">
			<?php echo esc_html( $post_type->labels->search_items ); ?>
		</label>

		<input placeholder="<?php echo esc_html( $post_type->labels->search_items ); ?>..." type="search" name="add-new-page-search" id="add-new-page-search" class="papi-search">
	</h1>

	<div class="papi-box-list">
		<?php
		$parent_page_type = papi_get_entry_type_by_id( papi_get_entry_type_id() );
		$page_types       = papi_get_all_page_types( $post_type_name );
		$show_standard    = papi_filter_settings_show_standard_page_type( $post_type_name );

		if ( $parent_page_type instanceof Papi_Page_Type ) {
			$child_types = $parent_page_type->get_child_types();
			$page_types  = empty( $child_types ) ? $page_types : $child_types;

			if ( ! $show_standard ) {
				$show_standard = $parent_page_type->standard_type;
			}
		}

		if ( $show_standard ) {
			$page_types[] = papi_get_standard_page_type( $post_type_name );
		}

		usort( $page_types, function ( $a, $b ) {
			return strcmp( $a->name, $b->name );
		} );

		$page_types    = papi_sort_order( array_reverse( $page_types ) );
		$use_thumbnail = false;

		foreach ( $page_types as $key => $page_type ) {
			if ( ! empty( $page_type->get_thumbnail() ) ) {
				$use_thumbnail = true;
			}
		}

		foreach ( $page_types as $key => $page_type ) {
			if ( ! papi_display_page_type( $page_type ) ) {
				continue;
			}

			papi_include_template( 'admin/views/partials/add-new-item.php', [
				'title'         => $page_type->name,
				'description'   => $page_type->description,
				'thumbnail'     => $page_type->get_thumbnail(),
				'url'           => papi_get_page_new_url( $page_type->get_id(), true, null ),
				'use_thumbnail' => $use_thumbnail
			] );
		}
		?>
	</div>
</div>


================================================
FILE: src/admin/views/partials/add-new-item.php
================================================
<a href="<?php echo esc_attr( $vars['url'] ); ?>" class="papi-box-item">
	<?php if ( $vars['use_thumbnail'] ): ?>
	<div class="papi-page-type hide">
		<?php if ( ! empty( $vars['thumbnail'] ) ): ?>
			<div class="papi-page-type-screenshot" style="background-image:url(<?php echo esc_html( $vars['thumbnail'] ); ?>)"></div>
		<?php else: ?>
			<div class="papi-page-type-screenshot">
				<div>
					<div><?php esc_html_e( 'Thumbnail missing', 'papi' ); ?></div>
				</div>
			</div>
		<?php endif; ?>
	</div>
	<?php endif; ?>

	<div class="papi-page-type-info">
		<h3><?php echo esc_html( $vars['title'] ); ?></h3>
		<p><?php echo esc_html( $vars['description'] ); ?></p>
	</div>

	<div class="papi-page-type-actions">
		<span class="button button-primary"><?php esc_html_e( 'Select', 'papi' ); ?></span>
	</div>
</a>


================================================
FILE: src/assets/js/components/pikaday.js
================================================
import moment from 'moment';

/*!
 * Pikaday
 *
 * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
 */

/**
 * feature detection and helper functions
 */
var hasMoment = typeof moment === 'function',
  hasEventListeners = !!window.addEventListener,
  document = window.document,
  sto = window.setTimeout,
  addEvent = function(el, e, callback, capture) {
    if (hasEventListeners) {
      el.addEventListener(e, callback, !!capture);
    } else {
      el.attachEvent('on' + e, callback);
    }
  },
  removeEvent = function(el, e, callback, capture) {
    if (hasEventListeners) {
      el.removeEventListener(e, callback, !!capture);
    } else {
      el.detachEvent('on' + e, callback);
    }
  },
  fireEvent = function(el, eventName, data) {
    var ev;

    if (document.createEvent) {
      ev = document.createEvent('HTMLEvents');
      ev.initEvent(eventName, true, false);
      ev = extend(ev, data);
      el.dispatchEvent(ev);
    } else if (document.createEventObject) {
      ev = document.createEventObject();
      ev = extend(ev, data);
      el.fireEvent('on' + eventName, ev);
    }
  },
  trim = function(str) {
    return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
  },
  hasClass = function(el, cn) {
    return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;
  },
  addClass = function(el, cn) {
    if (!hasClass(el, cn)) {
      el.className = el.className === '' ? cn : el.className + ' ' + cn;
    }
  },
  removeClass = function(el, cn) {
    el.className = trim(
      (' ' + el.className + ' ').replace(' ' + cn + ' ', ' ')
    );
  },
  isArray = function(obj) {
    return /Array/.test(Object.prototype.toString.call(obj));
  },
  isDate = function(obj) {
    return (
      /Date/.test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime())
    );
  },
  isWeekend = function(date) {
    var day = date.getDay();
    return day === 0 || day === 6;
  },
  isLeapYear = function(year) {
    // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951
    return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
  },
  getDaysInMonth = function(year, month) {
    return [
      31,
      isLeapYear(year) ? 29 : 28,
      31,
      30,
      31,
      30,
      31,
      31,
      30,
      31,
      30,
      31
    ][month];
  },
  setToStartOfDay = function(date) {
    if (isDate(date)) date.setHours(0, 0, 0, 0);
  },
  compareDates = function(a, b) {
    // Copy so we don't change the dates being passed in
    var _a = new Date(a.getTime());
    var _b = new Date(b.getTime());
    setToStartOfDay(_a);
    setToStartOfDay(_b);
    return _a.getTime() === _b.getTime();
  },
  extend = function(to, from, overwrite) {
    var prop, hasProp;
    for (prop in from) {
      hasProp = to[prop] !== undefined;
      if (
        hasProp &&
        typeof from[prop] === 'object' &&
        from[prop] !== null &&
        from[prop].nodeName === undefined
      ) {
        if (isDate(from[prop])) {
          if (overwrite) {
            to[prop] = new Date(from[prop].getTime());
          }
        } else if (isArray(from[prop])) {
          if (overwrite) {
            to[prop] = from[prop].slice(0);
          }
        } else {
          to[prop] = extend({}, from[prop], overwrite);
        }
      } else if (overwrite || !hasProp) {
        to[prop] = from[prop];
      }
    }
    return to;
  },
  adjustCalendar = function(calendar) {
    if (calendar.month < 0) {
      calendar.year -= Math.ceil(Math.abs(calendar.month) / 12);
      calendar.month += 12;
    }
    if (calendar.month > 11) {
      calendar.year += Math.floor(Math.abs(calendar.month) / 12);
      calendar.month -= 12;
    }
    return calendar;
  },
  /**
   * defaults and localisation
   */
  defaults = {
    // bind the picker to a form field
    field: null,

    // automatically show/hide the picker on `field` focus (default `true` if `field` is set)
    bound: undefined,

    // position of the datepicker, relative to the field (default to bottom & left)
    // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)
    position: 'bottom left',

    // automatically fit in the viewport even if it means repositioning from the position option
    reposition: true,

    // the default output format for `.toString()` and `field` value
    // set in `config` based on if showTime is set
    format: null,

    // an array giving the allowable input format(s).  As with moment,
    // the input formats may be either a single string or an array of strings.
    // Usually set in `config`
    inputFormats: null,

    // the initial date to view when first opened
    defaultDate: null,

    // make the `defaultDate` the initial selected value
    setDefaultDate: false,

    // first day of week (0: Sunday, 1: Monday etc)
    firstDay: 0,

    // the minimum/earliest date that can be selected
    minDate: null,
    // the maximum/latest date that can be selected
    maxDate: null,

    // number of years either side, or array of upper/lower range
    yearRange: 10,

    // show week numbers at head of row
    showWeekNumber: false,

    // used internally (don't config outside)
    minYear: 0,
    maxYear: 9999,
    minMonth: undefined,
    maxMonth: undefined,

    isRTL: false,

    // Additional text to append to the year in the calendar title
    yearSuffix: '',

    // Render the month after year in the calendar title
    showMonthAfterYear: false,

    // how many months are visible
    numberOfMonths: 1,

    // time
    showTime: true,
    showTimeFirst: false,
    showSeconds: false,
    use24hour: false,

    // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)
    // only used for the first display or when a selected date is not visible
    mainCalendar: 'left',

    // Specify a DOM element to render the calendar in
    container: undefined,

    // internationalization
    i18n: {
      previousMonth: 'Previous Month',
      nextMonth: 'Next Month',
      months: [
        'January',
        'February',
        'March',
        'April',
        'May',
        'June',
        'July',
        'August',
        'September',
        'October',
        'November',
        'December'
      ],
      weekdays: [
        'Sunday',
        'Monday',
        'Tuesday',
        'Wednesday',
        'Thursday',
        'Friday',
        'Saturday'
      ],
      weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
      midnight: 'Midnight',
      noon: 'Noon'
    },

    // Theme Classname
    theme: null,

    // callback function
    onSelect: null,
    onOpen: null,
    onClose: null,
    onDraw: null
  },
  /**
   * templating functions to abstract HTML rendering
   */
  renderDayName = function(opts, day, abbr) {
    day += opts.firstDay;
    while (day >= 7) {
      day -= 7;
    }
    return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];
  },
  renderDay = function(d, m, y, isSelected, isToday, isDisabled, isEmpty) {
    if (isEmpty) {
      return '<td class="is-empty"></td>';
    }
    var arr = [];
    if (isDisabled) {
      arr.push('is-disabled');
    }
    if (isToday) {
      arr.push('is-today');
    }
    if (isSelected) {
      arr.push('is-selected');
    }
    return (
      '<td data-day="' +
      d +
      '" class="' +
      arr.join(' ') +
      '">' +
      '<button class="pika-button pika-day" type="button" ' +
      'data-pika-year="' +
      y +
      '" data-pika-month="' +
      m +
      '" data-pika-day="' +
      d +
      '">' +
      d +
      '</button>' +
      '</td>'
    );
  },
  renderWeek = function(d, m, y) {
    // Lifted from http://javascript.about.com/library/blweekyear.htm, lightly modified.
    var onejan = new Date(y, 0, 1),
      weekNum = Math.ceil(
        ((new Date(y, m, d) - onejan) / 86400000 + onejan.getDay() + 1) / 7
      );
    return '<td class="pika-week">' + weekNum + '</td>';
  },
  renderRow = function(days, isRTL) {
    return '<tr>' + (isRTL ? days.reverse() : days).join('') + '</tr>';
  },
  renderBody = function(rows) {
    return '<tbody>' + rows.join('') + '</tbody>';
  },
  renderHead = function(opts) {
    var i,
      arr = [];
    if (opts.showWeekNumber) {
      arr.push('<th></th>');
    }
    for (i = 0; i < 7; i++) {
      arr.push(
        '<th scope="col"><abbr title="' +
          renderDayName(opts, i) +
          '">' +
          renderDayName(opts, i, true) +
          '</abbr></th>'
      );
    }
    return '<thead>' + (opts.isRTL ? arr.reverse() : arr).join('') + '</thead>';
  },
  renderTitle = function(instance, c, year, month, refYear) {
    var i,
      j,
      arr,
      opts = instance._o,
      isMinYear = year === opts.minYear,
      isMaxYear = year === opts.maxYear,
      html = '<div class="pika-title">',
      monthHtml,
      yearHtml,
      prev = true,
      next = true;

    for (arr = [], i = 0; i < 12; i++) {
      arr.push(
        '<option value="' +
          (year === refYear ? i - c : 12 + i - c) +
          '"' +
          (i === month ? ' selected' : '') +
          ((isMinYear && i < opts.minMonth) || (isMaxYear && i > opts.maxMonth)
            ? 'disabled'
            : '') +
          '>' +
          opts.i18n.months[i] +
          '</option>'
      );
    }
    monthHtml =
      '<div class="pika-label">' +
      opts.i18n.months[month] +
      '<select class="pika-select pika-select-month">' +
      arr.join('') +
      '</select></div>';

    if (isArray(opts.yearRange)) {
      i = opts.yearRange[0];
      j = opts.yearRange[1] + 1;
    } else {
      i = year - opts.yearRange;
      j = 1 + year + opts.yearRange;
    }

    for (arr = []; i < j && i <= opts.maxYear; i++) {
      if (i >= opts.minYear) {
        arr.push(
          '<option value="' +
            i +
            '"' +
            (i === year ? ' selected' : '') +
            '>' +
            i +
            '</option>'
        );
      }
    }
    yearHtml =
      '<div class="pika-label">' +
      year +
      opts.yearSuffix +
      '<select class="pika-select pika-select-year">' +
      arr.join('') +
      '</select></div>';

    if (opts.showMonthAfterYear) {
      html += yearHtml + monthHtml;
    } else {
      html += monthHtml + yearHtml;
    }

    if (isMinYear && (month === 0 || opts.minMonth >= month)) {
      prev = false;
    }

    if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {
      next = false;
    }

    if (c === 0) {
      html +=
        '<button class="pika-prev' +
        (prev ? '' : ' is-disabled') +
        '" type="button">' +
        opts.i18n.previousMonth +
        '</button>';
    }
    if (c === instance._o.numberOfMonths - 1) {
      html +=
        '<button class="pika-next' +
        (next ? '' : ' is-disabled') +
        '" type="button">' +
        opts.i18n.nextMonth +
        '</button>';
    }

    return (html += '</div>');
  },
  renderTable = function(opts, data) {
    return (
      '<table cellpadding="0" cellspacing="0" class="pika-table">' +
      renderHead(opts) +
      renderBody(data) +
      '</table>'
    );
  },
  renderTimePicker = function(
    num_options,
    selected_val,
    select_class,
    display_func
  ) {
    var to_return = '<td><select class="pika-select ' + select_class + '">';
    for (var i = 0; i < num_options; i++) {
      to_return +=
        '<option value="' +
        i +
        '" ' +
        (i == selected_val ? 'selected' : '') +
        '>' +
        display_func(i) +
        '</option>';
    }
    to_return += '</select></td>';
    return to_return;
  },
  renderTime = function(hh, mm, ss, opts) {
    var to_return =
      '<table cellpadding="0" cellspacing="0" class="pika-time"><tbody><tr>' +
      renderTimePicker(24, hh, 'pika-select-hour', function(i) {
        if (opts.use24hour) {
          return i;
        } else {
          var to_return = (i % 12) + (i < 12 ? ' AM' : ' PM');
          if (to_return == '0 AM') {
            return opts.i18n.midnight;
          } else if (to_return == '0 PM') {
            return opts.i18n.noon;
          } else {
            return to_return;
          }
        }
      }) +
      '<td>:</td>' +
      renderTimePicker(60, mm, 'pika-select-minute', function(i) {
        if (i < 10) return '0' + i;
        return i;
      });

    if (opts.showSeconds) {
      to_return +=
        '<td>:</td>' +
        renderTimePicker(60, ss, 'pika-select-second', function(i) {
          if (i < 10) return '0' + i;
          return i;
        });
    }
    return to_return + '</tr></tbody></table>';
  },
  /**
   * Pikaday constructor
   */
  Pikaday = function(options) {
    var self = this,
      opts = self.config(options);

    self._onMouseDown = function(e) {
      if (!self._v) {
        return;
      }
      e = e || window.event;
      var target = e.target || e.srcElement;
      if (!target) {
        return;
      }

      // Do not preventDefaul when using time picker
      if (
        !hasClass(target, 'pika-select-hour') &&
        !hasClass(target, 'pika-select-minute') &&
        !hasClass(target, 'pika-select-second')
      ) {
        e.preventDefault();
      }

      if (!hasClass(target, 'is-disabled')) {
        if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty')) {
          var newDate = new Date(
            target.getAttribute('data-pika-year'),
            target.getAttribute('data-pika-month'),
            target.getAttribute('data-pika-day')
          );
          // Preserve time selection when date changed
          if (self._d && opts.showTime) {
            newDate.setHours(self._d.getHours());
            newDate.setMinutes(self._d.getMinutes());
          }
          self.setDate(newDate);
          if (opts.bound) {
            sto(function() {
              self.hide();
              if (opts.field) {
                opts.field.blur();
              }
            }, 100);
          }
          return;
        } else if (hasClass(target, 'pika-prev')) {
          self.prevMonth();
        } else if (hasClass(target, 'pika-next')) {
          self.nextMonth();
        }
      }
      if (!hasClass(target, 'pika-select')) {
        if (e.preventDefault) {
          e.preventDefault();
        } else {
          e.returnValue = false;
          return false;
        }
      } else {
        self._c = true;
      }
    };

    self._onChange = function(e) {
      e = e || window.event;
      var target = e.target || e.srcElement;
      if (!target) {
        return;
      }
      if (hasClass(target, 'pika-select-month')) {
        self.gotoMonth(target.value);
      } else if (hasClass(target, 'pika-select-year')) {
        self.gotoYear(target.value);
      } else if (hasClass(target, 'pika-select-hour')) {
        self.setTime(target.value);
      } else if (hasClass(target, 'pika-select-minute')) {
        self.setTime(null, target.value);
      } else if (hasClass(target, 'pika-select-second')) {
        self.setTime(null, null, target.value);
      }
    };

    self._onInputChange = function(e) {
      var date;

      if (e.firedBy === self) {
        return;
      }
      if (hasMoment) {
        date = moment(opts.field.value, opts.inputFormats);
        date = date && date.isValid() ? date.toDate() : null;
      } else {
        date = new Date(Date.parse(opts.field.value));
      }
      self.setDate(isDate(date) ? date : null);
      if (!self._v) {
        self.show();
      }
    };

    self._onInputFocus = function() {
      self.show();
    };

    self._onInputClick = function() {
      self.show();
    };

    self._onInputBlur = function() {
      // IE allows pika div to gain focus; catch blur the input field
      var pEl = document.activeElement;
      do {
        if (hasClass(pEl, 'pika-single')) {
          return;
        }
      } while ((pEl = pEl.parentNode));

      if (!self._c) {
        self._b = sto(function() {
          self.hide();
        }, 50);
      }
      self._c = false;
    };

    self._onClick = function(e) {
      e = e || window.event;
      var target = e.target || e.srcElement,
        pEl = target;
      if (!target) {
        return;
      }
      if (!hasEventListeners && hasClass(target, 'pika-select')) {
        if (!target.onchange) {
          target.setAttribute('onchange', 'return;');
          addEvent(target, 'change', self._onChange);
        }
      }
      do {
        if (
          hasClass(pEl, 'pika-single') ||
          pEl === opts.trigger ||
          (opts.showTime && hasClass(pEl, 'pika-time-container'))
        ) {
          return;
        }
      } while ((pEl = pEl.parentNode));
      if (self._v && target !== opts.trigger && pEl !== opts.trigger) {
        self.hide();
      }
    };

    self.el = document.createElement('div');
    self.el.className =
      'pika-single' +
      (opts.isRTL ? ' is-rtl' : '') +
      (opts.theme ? ' ' + opts.theme : '');

    addEvent(
      self.el,
      'ontouchend' in document ? 'ontouchend' : 'mousedown',
      self._onMouseDown,
      true
    );
    addEvent(self.el, 'change', self._onChange);

    if (opts.field) {
      if (opts.container) {
        opts.container.appendChild(self.el);
      } else if (opts.bound) {
        document.body.appendChild(self.el);
      } else {
        opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);
      }
      addEvent(opts.field, 'change', self._onInputChange);

      if (!opts.defaultDate) {
        if (hasMoment && opts.field.value) {
          opts.defaultDate = moment(
            opts.field.value,
            opts.inputFormats
          ).toDate();
        } else {
          opts.defaultDate = new Date(Date.parse(opts.field.value));
        }
        opts.setDefaultDate = true;
      }
    }

    var defDate = opts.defaultDate;

    if (isDate(defDate)) {
      if (opts.setDefaultDate) {
        self.setDate(defDate, true);
      } else {
        self.gotoDate(defDate);
      }
    } else {
      self.gotoDate(new Date());
    }

    if (opts.bound) {
      this.hide();
      self.el.className += ' is-bound';
      addEvent(opts.trigger, 'click', self._onInputClick);
      addEvent(opts.trigger, 'focus', self._onInputFocus);
      addEvent(opts.trigger, 'blur', self._onInputBlur);
    } else {
      this.show();
    }
  };

/**
 * public Pikaday API
 */
Pikaday.prototype = {
  /**
   * configure functionality
   */
  config: function(options) {
    if (!this._o) {
      this._o = extend({}, defaults, true);
    }

    var opts = extend(this._o, options, true);

    opts.isRTL = !!opts.isRTL;

    opts.field = opts.field && opts.field.nodeName ? opts.field : null;

    opts.theme =
      typeof opts.theme == 'string' && opts.theme ? opts.theme : null;

    opts.bound = !!(opts.bound !== undefined
      ? opts.field && opts.bound
      : opts.field);

    opts.trigger =
      opts.trigger && opts.trigger.nodeName ? opts.trigger : opts.field;

    opts.disableWeekends = !!opts.disableWeekends;

    opts.disableDayFn =
      typeof opts.disableDayFn == 'function' ? opts.disableDayFn : null;

    var nom = parseInt(opts.numberOfMonths, 10) || 1;
    opts.numberOfMonths = nom > 4 ? 4 : nom;

    if (!isDate(opts.minDate)) {
      opts.minDate = false;
    }
    if (!isDate(opts.maxDate)) {
      opts.maxDate = false;
    }
    if (opts.minDate && opts.maxDate && opts.maxDate < opts.minDate) {
      opts.maxDate = opts.minDate = false;
    }
    if (opts.minDate) {
      this.setMinDate(opts.minDate);
    }
    if (opts.maxDate) {
      if (!opts.showTime) setToStartOfDay(opts.maxDate);
      opts.maxYear = opts.maxDate.getFullYear();
      opts.maxMonth = opts.maxDate.getMonth();
    }

    if (isArray(opts.yearRange)) {
      var fallback = new Date().getFullYear() - 10;
      opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;
      opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;
    } else {
      opts.yearRange =
        Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;
      if (opts.yearRange > 100) {
        opts.yearRange = 100;
      }
    }

    // If no format is given, set based on showTime
    if (opts.format === null) {
      opts.format = 'YYYY-MM-DD';
      if (opts.showTime) {
        opts.format += ' HH:mm:ss';
      }
    }

    if (!opts.inputFormats) {
      opts.inputFormats = opts.format;
    }

    return opts;
  },

  /**
   * return a formatted string of the current selection (using Moment.js if available)
   */
  toString: function(format) {
    return !isDate(this._d)
      ? ''
      : hasMoment
      ? moment(this._d).format(format || this._o.format)
      : this._o.showTime
      ? this._d.toString()
      : this._d.toDateString();
  },

  /**
   * return a Moment.js object of the current selection (if available)
   */
  getMoment: function() {
    return hasMoment ? moment(this._d) : null;
  },

  /**
   * set the current selection from a Moment.js object (if available)
   */
  setMoment: function(date, preventOnSelect) {
    if (hasMoment && moment.isMoment(date)) {
      this.setDate(date.toDate(), preventOnSelect);
    }
  },

  /**
   * return a Date object of the current selection
   */
  getDate: function() {
    return isDate(this._d) ? new Date(this._d.getTime()) : null;
  },

  /**
   * set time components
   * Currently defaulting to setting date to today if not set
   */
  setTime: function(hours, minutes, seconds) {
    if (!this._d) {
      this._d = new Date();
      this._d.setHours(0, 0, 0, 0);
    }
    if (hours) {
      this._d.setHours(hours);
    }
    if (minutes) {
      this._d.setMinutes(minutes);
    }
    if (seconds) {
      this._d.setSeconds(seconds);
    }
    this.setDate(this._d);
  },

  /**
   * set the current selection
   */
  setDate: function(date, preventOnSelect) {
    if (!date) {
      this._d = null;

      if (this._o.field) {
        this._o.field.value = '';
        fireEvent(this._o.field, 'change', { firedBy: this });
      }

      return this.draw();
    }
    if (typeof date === 'string') {
      date = new Date(Date.parse(date));
    }
    if (!isDate(date)) {
      return;
    }

    var min = this._o.minDate,
      max = this._o.maxDate;

    if (isDate(min) && date < min) {
      date = min;
    } else if (isDate(max) && date > max) {
      date = max;
    }

    this._d = new Date(date.getTime());

    if (this._o.showTime && !this._o.showSeconds) {
      this._d.setSeconds(0);
    } else if (!this._o.showTime) {
      setToStartOfDay(this._d);
    }

    this.gotoDate(this._d);

    if (this._o.field) {
      this._o.field.value = this.toString();
      fireEvent(this._o.field, 'change', { firedBy: this });
    }
    if (!preventOnSelect && typeof this._o.onSelect === 'function') {
      this._o.onSelect.call(this, this.getDate());
    }
  },

  /**
   * change view to a specific date
   */
  gotoDate: function(date) {
    var newCalendar = true;

    if (!isDate(date)) {
      return;
    }

    if (this.calendars) {
      var firstVisibleDate = new Date(
          this.calendars[0].year,
          this.calendars[0].month,
          1
        ),
        lastVisibleDate = new Date(
          this.calendars[this.calendars.length - 1].year,
          this.calendars[this.calendars.length - 1].month,
          1
        ),
        visibleDate = date.getTime();
      // get the end of the month
      lastVisibleDate.setMonth(lastVisibleDate.getMonth() + 1);
      lastVisibleDate.setDate(lastVisibleDate.getDate() - 1);
      newCalendar =
        visibleDate < firstVisibleDate.getTime() ||
        lastVisibleDate.getTime() < visibleDate;
    }

    if (newCalendar) {
      this.calendars = [
        {
          month: date.getMonth(),
          year: date.getFullYear(),
          hour: date.getHours(),
          minute: date.getMinutes(),
          second: date.getSeconds()
        }
      ];
      if (this._o.mainCalendar === 'right') {
        this.calendars[0].month += 1 - this._o.numberOfMonths;
      }
    }

    this.adjustCalendars();
  },

  adjustCalendars: function() {
    this.calendars[0] = adjustCalendar(this.calendars[0]);
    for (var c = 1; c < this._o.numberOfMonths; c++) {
      this.calendars[c] = adjustCalendar({
        month: this.calendars[0].month + c,
        year: this.calendars[0].year
      });
    }
    this.draw();
  },

  gotoToday: function() {
    this.gotoDate(new Date());
  },

  /**
   * change view to a specific month (zero-index, e.g. 0: January)
   */
  gotoMonth: function(month) {
    if (!isNaN(month)) {
      this.calendars[0].month = parseInt(month, 10);
      this.adjustCalendars();
    }
  },

  nextMonth: function() {
    this.calendars[0].month++;
    this.adjustCalendars();
  },

  prevMonth: function() {
    this.calendars[0].month--;
    this.adjustCalendars();
  },

  /**
   * change view to a specific full year (e.g. "2012")
   */
  gotoYear: function(year) {
    if (!isNaN(year)) {
      this.calendars[0].year = parseInt(year, 10);
      this.adjustCalendars();
    }
  },

  /**
   * change the minDate
   */
  setMinDate: function(value) {
    if (!this._o.showTime) setToStartOfDay(this._o.minDate);
    setToStartOfDay(value);
    this._o.minDate = value;
    this._o.minYear = value.getFullYear();
    this._o.minMonth = value.getMonth();
  },

  /**
   * change the maxDate
   */
  setMaxDate: function(value) {
    this._o.maxDate = value;
  },

  /**
   * refresh the HTML
   */
  draw: function(force) {
    if (!this._v && !force) {
      return;
    }
    var opts = this._o,
      minYear = opts.minYear,
      maxYear = opts.maxYear,
      minMonth = opts.minMonth,
      maxMonth = opts.maxMonth,
      html = '';

    if (this._y <= minYear) {
      this._y = minYear;
      if (!isNaN(minMonth) && this._m < minMonth) {
        this._m = minMonth;
      }
    }
    if (this._y >= maxYear) {
      this._y = maxYear;
      if (!isNaN(maxMonth) && this._m > maxMonth) {
        this._m = maxMonth;
      }
    }

    var timeHtml = '';

    if (opts.showTime) {
      timeHtml =
        '<div class="pika-time-container">' +
        renderTime(
          this._d ? this._d.getHours() : 0,
          this._d ? this._d.getMinutes() : 0,
          this._d ? this._d.getSeconds() : 0,
          opts
        ) +
        '</div>';
    }

    for (var c = 0; c < opts.numberOfMonths; c++) {
      html +=
        '<div class="pika-lendar">' +
        renderTitle(
          this,
          c,
          this.calendars[c].year,
          this.calendars[c].month,
          this.calendars[0].year
        ) +
        (opts.showTime && opts.showTimeFirst ? timeHtml : '') +
        this.render(this.calendars[c].year, this.calendars[c].month) +
        '</div>';
    }

    if (opts.showTime && !opts.showTimeFirst) {
      html += timeHtml;
    }

    this.el.innerHTML = html;

    if (opts.bound) {
      if (opts.field.type !== 'hidden') {
        sto(function() {
          opts.trigger.focus();
        }, 1);
      }
    }

    if (typeof this._o.onDraw === 'function') {
      var self = this;
      sto(function() {
        self._o.onDraw.call(self);
      }, 0);
    }
  },

  adjustPosition: function() {
    if (this._o.container) return;
    var field = this._o.trigger,
      pEl = field,
      width = this.el.offsetWidth,
      height = this.el.offsetHeight,
      viewportWidth = window.innerWidth || document.documentElement.clientWidth,
      viewportHeight =
        window.innerHeight || document.documentElement.clientHeight,
      scrollTop =
        window.pageYOffset ||
        document.body.scrollTop ||
        document.documentElement.scrollTop,
      left,
      top,
      clientRect;

    if (typeof field.getBoundingClientRect === 'function') {
      clientRect = field.getBoundingClientRect();
      left = clientRect.left + window.pageXOffset;
      top = clientRect.bottom + window.pageYOffset;
    } else {
      left = pEl.offsetLeft;
      top = pEl.offsetTop + pEl.offsetHeight;
      while ((pEl = pEl.offsetParent)) {
        left += pEl.offsetLeft;
        top += pEl.offsetTop;
      }
    }

    // default position is bottom & left
    if (
      (this._o.reposition && left + width > viewportWidth) ||
      (this._o.position.indexOf('right') > -1 &&
        left - width + field.offsetWidth > 0)
    ) {
      left = left - width + field.offsetWidth;
    }
    if (
      (this._o.reposition && top + height > viewportHeight + scrollTop) ||
      (this._o.position.indexOf('top') > -1 &&
        top - height - field.offsetHeight > 0)
    ) {
      top = top - height - field.offsetHeight;
    }

    this.el.style.cssText = [
      'position: absolute',
      'left: ' + left + 'px',
      'top: ' + top + 'px'
    ].join(';');
  },

  /**
   * render HTML for a particular month
   */
  render: function(year, month) {
    var opts = this._o,
      now = new Date(),
      days = getDaysInMonth(year, month),
      before = new Date(year, month, 1).getDay(),
      data = [],
      row = [];
    if (!opts.showTime) setToStartOfDay(now);
    if (opts.firstDay > 0) {
      before -= opts.firstDay;
      if (before < 0) {
        before += 7;
      }
    }
    var cells = days + before,
      after = cells;
    while (after > 7) {
      after -= 7;
    }
    cells += 7 - after;

    // Ensure we only compare date portion when deciding to show a date in picker
    var minDate_date = opts.minDate
      ? new Date(
          opts.minDate.getFullYear(),
          opts.minDate.getMonth(),
          opts.minDate.getDate()
        )
      : null;
    var maxDate_date = opts.maxDate
      ? new Date(
          opts.maxDate.getFullYear(),
          opts.maxDate.getMonth(),
          opts.maxDate.getDate()
        )
      : null;

    for (var i = 0, r = 0; i < cells; i++) {
      var day = new Date(year, month, 1 + (i - before)),
        isSelected = isDate(this._d) ? compareDates(day, this._d) : false,
        isToday = compareDates(day, now),
        isEmpty = i < before || i >= days + before,
        isDisabled =
          (minDate_date && day < minDate_date) ||
          (maxDate_date && day > maxDate_date) ||
          (opts.disableWeekends && isWeekend(day)) ||
          (opts.disableDayFn && opts.disableDayFn(day));

      row.push(
        renderDay(
          1 + (i - before),
          month,
          year,
          isSelected,
          isToday,
          isDisabled,
          isEmpty
        )
      );

      if (++r === 7) {
        if (opts.showWeekNumber) {
          row.unshift(renderWeek(i - before, month, year));
        }
        data.push(renderRow(row, opts.isRTL));
        row = [];
        r = 0;
      }
    }
    return renderTable(opts, data);
  },

  isVisible: function() {
    return this._v;
  },

  show: function() {
    if (!this._v) {
      removeClass(this.el, 'is-hidden');
      this._v = true;
      this.draw();
      if (this._o.bound) {
        addEvent(document, 'click', this._onClick);
        this.adjustPosition();
      }
      if (typeof this._o.onOpen === 'function') {
        this._o.onOpen.call(this);
      }
    }
  },

  hide: function() {
    var v = this._v;
    if (v !== false) {
      if (this._o.bound) {
        removeEvent(document, 'click', this._onClick);
      }
      this.el.style.cssText = '';
      addClass(this.el, 'is-hidden');
      this._v = false;
      if (v !== undefined && typeof this._o.onClose === 'function') {
        this._o.onClose.call(this);
      }
    }
  },

  /**
   * GAME OVER
   */
  destroy: function() {
    this.hide();
    removeEvent(this.el, 'mousedown', this._onMouseDown, true);
    removeEvent(this.el, 'change', this._onChange);
    if (this._o.field) {
      removeEvent(this._o.field, 'change', this._onInputChange);
      if (this._o.bound) {
        removeEvent(this._o.trigger, 'click', this._onInputClick);
        removeEvent(this._o.trigger, 'focus', this._onInputFocus);
        removeEvent(this._o.trigger, 'blur', this._onInputBlur);
      }
    }
    if (this.el.parentNode) {
      this.el.parentNode.removeChild(this.el);
    }
  }
};

export default Pikaday;


================================================
FILE: src/assets/js/components/select2.js
================================================
import $ from 'jquery';

export default function (selector) {
  return {
    templateSelection: function (result) {
      // placeholder.
      if (result.id === '') {
        result.element = $(selector).find('[data-placeholder]');
      }

      let htmlText = '<div><span>' + result.text + '</span> <!--edit--> <!--new--></div>';

      const editUrl = $(result.element).data('edit-url');
      if (editUrl) {
        const editText = papiL10n.edit;
        const editHtml = '<a href="#" class="papi-iframe-link-open" data-url="' + editUrl + '" data-title="' + editText + '" data-selector="' + selector.name + '">' + editText + '</a>';
        htmlText = htmlText.replace('<!--edit-->', editHtml);
      }

      const newUrl = $(result.element).data('new-url');
      if (newUrl) {
        const newText = papiL10n.new;
        const newHtml = '<a href="#" class="papi-iframe-link-open" data-url="' + newUrl + '" data-title="' + newText + '" data-selector="' + selector.name + '">' + newText + '</a>';
        htmlText = htmlText.replace('<!--new-->', newHtml);
      }

      if (typeof htmlText !== 'undefined') {
        const $html = $(htmlText);

        $html.find('a').on('mousedown', function(e) {
          e.stopPropagation();
        }).on('click', function(e) {
          e.preventDefault();
        });

        return $html;
      }

      return result.text;
    }
  }
};


================================================
FILE: src/assets/js/core.js
================================================
import $ from 'jquery';
import select2Options from 'components/select2';

class Core {
  /**
   * Initialize Papi core class.
   */
  static init () {
    const core = new Core();

    core.addCurrentClassToMenuItem();
    core.binds();
    core.pageTypeSwitcher();
    core.prepareBoxes();
    core.setSelectedMenuItem();
  }

  /**
   * Autosave fields on heartbeat.
   *
   * @param {object} e
   * @param {object} xhr
   * @param {object} options
   */
  autosave (e, xhr, options) {
    const reg = /action=(.+?)&/;
    const val = reg.exec(options.data);

    if (val !== null && val.length && val[1] === 'heartbeat') {
      const formdata = $('form#post').serializeArray();

      $.each(formdata, function (index, field) {
        if (field.name.substring(0, 5) === 'papi_' || field.name.substring(0, 5) === '_papi') {
          // Fetch editor id if any.
          const editorID = $('[name="' + field.name + '"]').attr('id');

          // Test if the editor id is a editor.
          if (typeof window.tinymce !== 'undefined' && window.tinymce.get(editorID)) {
            const editor = window.tinymce.get(editorID);

            // Save the editor content.
            if (editor && editor.isDirty() && !editor.isHidden()) {
              editor.save();
            }

            // Modify field content with real editor content.
            field.value = $('#' + editorID).val();
          }

          options.data += '&' + field.name + '=' + field.value;
        }
      });
    }
  }

  /**
   * Bind elements with functions.
   */
  binds () {
    $('.papi-box-list > li > p').on('click', this.redirect);
    $('input[name="add-new-page-search"]').on('keyup', this.search);
    $('[data-papi-href]').on('click touchstart', this.redirect);

    if ('select2' in $.fn) {
      $('.inside .papi-table tr .papi-component-select2').each(function (i, elm) {
        $(elm).select2(select2Options(elm));
      });

      // Fix issue with browsers where selected attribute is not removed correct.
      $(document.body).on('change', 'select.papi-component-select2:not([multiple])', function () {
        $(this).find('option[selected]').removeAttr('selected');
      });
    }

    $('.papi-meta-type-term button.handlediv').on('click', this.handlediv);

    // Autosave fields on heartbeat.
    $(document).ajaxSend(this.autosave);
  }

  /**
   * Add current class to menu item.
   */
  addCurrentClassToMenuItem () {
    let $submenu = $('.wp-has-current-submenu .wp-submenu');
    let $menuitem = $submenu.find('a[href*="papi-add-new-page"]').parent();

    if (!$menuitem.hasClass('current') && !$submenu.find('li.current').length) {
      $menuitem.addClass('current');
    }
  }

  /**
   * Handle expanded postbox div.
   *
   * @param  {object} e
   */
  handlediv (e) {
    e.preventDefault();

    const $this = $(this);
    const $parent = $this.parent();
    const $inside = $parent.find('.inside');

    $parent.parent().toggleClass('closed');
    $inside.toggleClass('papi-hide');
    $this.attr('aria-expanded', !$inside.hasClass('papi-hide'));
  }

  /**
   * Page type switcher.
   */
  pageTypeSwitcher () {
    $('.misc-pub-section.curtime.misc-pub-section-last').removeClass('misc-pub-section-last');
    $('#papi-page-type-switcher-edit').on('click', function (e) {
      e.preventDefault();
      $(this).hide();
      $('.papi-page-type-switcher > div').slideDown();
    });
    $('#papi-page-type-switcher-save').on('click', function (e) {
      e.preventDefault();
      $('.papi-page-type-switcher > div').slideUp();
      $('#papi-page-type-switcher-edit').show();
      $('.papi-page-type-switcher > span').text($('.papi-page-type-switcher select :selected').text());
    });
    $('#papi-page-type-switcher-cancel').on('click', function (e) {
      e.preventDefault();
      $('.papi-page-type-switcher > div').slideUp();
      $('#papi-page-type-switcher-edit').show();
    });
  }

  /**
   * Redirect to location from `papi-href` data attribute
   * or closest tag with href attribute.
   *
   * @param {object} e
   */
  redirect (e) {
    e.preventDefault();
    let $this = $(this);
    let papiHref = $this.data().papiHref;

    if (papiHref !== undefined) {
      window.location = papiHref;
    } else {
      window.location = $(this).closest('[href]').attr('href');
    }
  }

  /**
   * Search in page types box list.
   *
   * @param {object} e
   */
  search (e) {
    e.preventDefault();

    let $this = $(this);
    let $list = $('.papi-box-list');
    let val = $this.val();

    // Destroy masonry before searching the list.
    $('.papi-box-list').masonry('destroy');

    $list.find('.papi-box-item').each(function () {
      let $item = $(this);

      if ($item.text().toLowerCase().indexOf(val) === -1) {
        $item.addClass('papi-hide');
      } else {
        $item.removeClass('papi-hide');
      }
    });

    // Enable masonry after searching the list.
    $('.papi-box-list').masonry({
      itemSelector: '.papi-box-item:not(.papi-hide)',
      isResizable: true
    });
  }

  /**
   * Prepare boxes with equal height.
   */
  prepareBoxes () {
    let $boxItems = $('.papi-box-item');
    let thumbnails = $boxItems.find('.papi-page-type-screenshot').length;
    let boxMaxHeight = 0;

    if (!thumbnails) {
      $boxItems = $('.papi-page-type-info');
    }

    $boxItems.each(function () {
      let $this = $(this);

      if (thumbnails) {
        $this.find('.papi-post-type-info').removeAttr('style');
      } else {
        $this.removeAttr('style');
      }

      let height = $this.height();
      boxMaxHeight = height > boxMaxHeight ? height : boxMaxHeight;
    });

    $boxItems.each(function () {
      let $this = $(this);
      let height = boxMaxHeight;

      if (thumbnails) {
        let $thumb = $this.find('.papi-page-type-screenshot');

        if ($thumb.length) {
          height = height - $thumb.height();
        } else {
          height += 5;
        }

        $this.find('.papi-page-type-info').height(height);
      } else {
        $this.height(height);
      }
    });

    // Enable masonry after setting equal height.
    $('.papi-box-list').masonry({
      itemSelector: '.papi-box-item:not(.papi-hide)',
      isResizable: true
    });
  }

  /**
   * Set selected menu item if it isn't selected.
   */
  setSelectedMenuItem () {
    let href = typeof window.location === 'string' ? window.location : window.location.href;
    let $adminmenu = $('#adminmenu');

    if (!$adminmenu.find('li.current > a.current').length) {
      href = href.substr(href.lastIndexOf('/') + 1);
      href = href.replace(/%2F/g, '/');
      $('a[href="' + href + '"]', $adminmenu).addClass('current').parent().addClass('current');
    }
  }
}

export default Core;


================================================
FILE: src/assets/js/modals/iframe.js
================================================
import $ from 'jquery';

/**
 * Iframe modal.
 */
class Iframe {

  /**
   * The iframe template to use.
   *
   * @return {function}
   */
  get template() {
    const template = [
      '<div tabindex="0" id="papi-iframe-modal-dialog" role="dialog">',
        '<div class="papi-iframe-modal">',
          '<div class="papi-iframe-modal-content">',
            '<div class="papi-iframe-modal-header">',
            '<button type="button" class="papi-iframe-modal-header-close">',
              '<span><span class="screen-reader-text"><%= closeText %></span></span>',
            '</button>',
            '<div class="papi-iframe-modal-header-title">',
              '<h1><%= title %></h1>',
            '</div>',
          '</div>',
          '<iframe id="papi-iframe-modal-frame" src="" frameborder="0" allowtransparency="true"></iframe>',
        '</div>',
      '</div>',
      '<div class="papi-iframe-modal-backdrop" role="presentation"></div>'
    ].join('');

    return window._.template(template);
  }

  /**
   * Initialize Papi iframe modal class.
   */
  static init() {
    if ($('body').hasClass('papi-iframe-mode')) {
      return;
    }

    $(document).on('click', 'a.papi-iframe-link-open', function(e) {
      e.preventDefault();

      if (typeof window.papi.iframe !== 'undefined') {
        window.papi.iframe.close();
        window.papi.iframe = undefined;
      }

      const $this = $(this);

      window.papi.iframe = new Iframe({
        selector: $this.data('selector'),
        title: $this.data('title'),
        url: $this.data('url')
      });
      window.papi.iframe.open();
    });
  }

  /**
   * Constructor.
   *
   * @param {object} options
   */
  constructor(options) {
    this.options = options || {
      selector: '',
      title: '',
      url: ''
    };

    this.url = options.url + '&papi_css[]=papi-iframe-mode';

    this.$iframe = $(this.template({
      closeText: papiL10n.close,
      title: options.title
    }));
  }

  /**
   * Open iframe modal.
   */
  open() {
    // Add iframe source and load event.
    this.$iframe.find('#papi-iframe-modal-frame')
      .attr('src', this.url)
      .on('load', this.loaded.bind(this));

    // Add click event to close button.
    this.$iframe.find('.papi-iframe-modal-header-close')
      .on('click', this.close.bind(this));

    $('body').css({'overflow': 'hidden'}).append(this.$iframe);
  }

  /**
   * Add iframe events when iframe is loaded.
   *
   * @param {object} e
   */
  loaded(e) {
    let $this = $(e.currentTarget);
    let $contents = $this.contents();

    $contents.find('#post').on('submit', this.submit.bind(this));
  }

  /**
   * Change current title in dropdown on iframe submit.
   *
   * @param {object} e
   */
  submit(e) {
    $(document).trigger('papi/iframe/submit', [{
      selector: this.options.selector,
      iframe: e.currentTarget,
      url: this.options.url
    }]);
  }

  /**
   * Close iframe modal.
   */
  close() {
    $('#papi-iframe-modal-dialog').hide();
    $(document).off('focusin');
    $('body').css({'overflow': 'auto'});
    $('.papi-iframe-modal-close').off('click');
    $('#papi-iframe-modal-dialog').remove();
  }
}

export default Iframe;


================================================
FILE: src/assets/js/properties/color.js
================================================
import $ from 'jquery';

/**
 * Property Color.
 *
 * Uses the build in color picker in WordPress.
 */
class Color {
  /**
   * Initialize Property Color.
   */
  static init () {
    new Color().binds();
  }

  /**
   * Bind elements with functions.
   */
  binds () {
    let self = this;

    $('.papi-property-color-picker input').each(self.showColorPicker);

    // Bind all new inputs when added in repeater.
    $(document).on('papi/property/repeater/added', '[data-property="color"]', function () {
      $('.papi-property-color-picker input').each(self.showColorPicker);
    });
  }

  /**
   * Show color picker.
   */
  showColorPicker () {
    const $el = $(this);
    const settings = $el.data().settings || {};

    if (!$el.parent().hasClass('papi-property-color-picker')) {
      return;
    }

    if (typeof settings.default_color !== 'undefined') {
      settings.defaultColor = settings.default_color;
      delete settings.default_color;
    }

    if (typeof settings.palettes !== 'undefined') {
      settings.palettes = $.isArray(settings.palettes) && settings.palettes.length ? settings.palettes : true;
    }

    $el.wpColorPicker(settings);
  }
}

export default Color;


================================================
FILE: src/assets/js/properties/datetime.js
================================================
import $ from 'jquery';
import Pikaday from 'components/Pikaday';

/**
 * Property Datetime.
 *
 * Using Pikaday with time fields and some custom fixes.
 */
class Datetime {
  /**
   * Initialize Property Datetime.
   */
  static init () {
    new Datetime().binds();
  }

  /**
   * Bind elements with functions.
   */
  binds () {
    this.pikaday($('.inside > .papi-table > tbody > tr > td > input.papi-property-datetime'));
    this.pikaday($('.papi-table .papi-table input.papi-property-datetime'));

    $(document).on('papi/property/repeater/added', '[data-property="datetime"]', this.updateSelect.bind(this));
  }

  /**
   * Initialize Pikaday.
   *
   * @param {object} $prop
   */
  pikaday ($props) {
    if (!$props.length) {
      return;
    }

    $props.each(function () {
      let $prop = $(this);
      let settings = $prop.data().settings;

      // Expects settings to be defined.
      if (typeof settings === 'undefined') {
        return;
      }

      // Fixes to 24 hours actually works if you forget to change the format.
      if (settings.use24hour) {
        settings.format = settings.format.replace(/hh/, 'HH');
      }

      settings.field = $prop[0];

      /* eslint-disable */
      new Pikaday(settings);
      /* eslint-enable */
    });
  }

  /**
   * Initialize pikaday field when added to repeater.
   *
   * @param {object} e
   */
  updateSelect (e) {
    e.preventDefault();
    this.pikaday($(e.currentTarget).prev().find('.papi-property-datetime'));
  }
}

export default Datetime;


================================================
FILE: src/assets/js/properties/dropdown.js
================================================
import $ from 'jquery';

/**
 * Property Dropdown.
 *
 * Using Select2.
 */
class Dropdown {
  /**
   * Initialize Property Color.
   */
  static init () {
    new Dropdown().binds();
  }

  /**
   * Bind elements with functions.
   */
  binds () {
    $(document).on('papi/property/repeater/added', '[data-property="dropdown"]', this.update.bind(this));
  }

  /**
   * Update select if isn't a select2.
   */
  update (e) {
    e.preventDefault();

    const $select = $(e.currentTarget).parent().find('select');

    if ($select.hasClass('papi-component-select2') && 'select2' in $.fn) {
      $select.select2();
    }
  }
}

export default Dropdown;


================================================
FILE: src/assets/js/properties/editor.js
================================================
import $ from 'jquery';

/* global tinymce, tinyMCE, tinyMCEPreInit, QTags */

class Editor {
  /**
   * Custom TinyMCE settings.
   *
   * @var {object}
   */
  get customTinyMCESettings () {
    return {
      elements: [],
      mode: 'exact',
      /* eslint-disable */
      theme_advanced_resizing: true
      /* eslint-enable */
    };
  }

  /**
   * Bind elements with functions.
   */
  binds () {
    $(document).on('papi/property/repeater/added', '[data-property="editor"]', this.update.bind(this));
    $(this.loaded);
  }

  /**
   * Get TinyMCE editor.
   *
   * @param {string} id
   *
   * @return {object}
   */
  createTinyMceEditor (id) {
    let mceInit;

    if (!tinyMCEPreInit.mceInit[id]) {
      const obj = tinyMCEPreInit.mceInit.content === undefined
        ? tinyMCEPreInit.mceInit.papiHiddenEditor : tinyMCEPreInit.mceInit.content;
      mceInit = tinyMCEPreInit.mceInit[id] = $.extend({}, obj);
    } else {
      mceInit = tinyMCEPreInit.mceInit[id];
    }

    mceInit = $.extend(mceInit, this.customTinyMCESettings, {
      selector: '#' + id,
      elements: id
    });

    tinymce.init(mceInit);
  }

  /**
   * Close all QTags.
   *
   * @param {object} $iframe
   */
  closeAllQTags ($iframe) {
    if (typeof QTags === 'undefined' || typeof $iframe.canvas === 'undefined') {
      return;
    }

    QTags.closeAllTags($iframe.id);
  }

  /**
   * Get elements.
   *
   * @param {object} selectors
   *
   * @return {object}
   */
  getElements (selectors) {
    return {
      $dom: tinyMCE.DOM,
      $iframe: $('#' + selectors.iframe)
    };
  }

  /**
   * Get TinyMCE Id.
   *
   * @param {string} id
   *
   * @return {string}
   */
  getId (id) {
    return id.replace('wp-', '').replace('-wrap', '');
  }

  /**
   * Get selectors.
   *
   * @param {string} id
   *
   * @return {object}
   */
  getSelectors (id) {
    return {
      id: id,
      iframe: id + '_ifr',
      htmlTab: '#' + id + '-html',
      visualTab: '#' + id + '-tmce',
      wrap: 'wp-' + id + '-wrap'
    };
  }

  /**
   * Fix so visual tab is visible at page load.
   */
  static init () {
    new Editor().binds();
  }

  /**
   * Change post id if zero when dom is loaded.
   */
  loaded () {
    if (window.wp.media.view.settings.post.id === 0) {
      window.wp.media.view.settings.post.id = parseInt($('#post_ID').val(), 10);
    }
  }

  /**
   * Initialize QTags.
   *
   * @param {string} id
   */
  qtInit (id) {
    const qtContent = tinyMCEPreInit.qtInit.content === undefined
      ? tinyMCEPreInit.qtInit.papiHiddenEditor : tinyMCEPreInit.qtInit.content;

    if (qtContent !== undefined) {
      const qtInit = tinyMCEPreInit.qtInit[id] = $.extend({}, qtContent, {
        id: id,
        buttons: qtContent.buttons.replace(',fullscreen', '')
      });

      try {
        /* eslint-disable */
        new QTags(qtInit);
        /* eslint-enable */
      } catch (e) {
      }

      QTags._buttonsInit();
    }
  }

  /**
   * Update editor when it is added to repeater.
   *
   * @param {object} e
   */
  update (e) {
    e.preventDefault();

    const $this = $(e.currentTarget);
    const $prev = $this.prev();
    let id = '';

    // Support `vertical` layout in flexible and repeater.
    if ($prev.length && $prev[0].tagName.toLowerCase() === 'tr') {
      id = this.getId($prev.find('div[id]').attr('id'));
    } else {
      id = this.getId($this.parent().find('div[id]').attr('id'));
    }

    if (tinyMCE.editors[id] !== undefined) {
      return;
    }

    const selectors = this.getSelectors(id);
    const elements = this.getElements(selectors);

    this.closeAllQTags(elements.$iframe);
    this.qtInit(selectors.id);
    this.createTinyMceEditor(id);

    $(selectors.visualTab).removeAttr('onclick').on('click', function (e) {
      e.preventDefault();

      if (typeof window.switchEditors.switchto === 'function') {
        window.switchEditors.switchto(this);
      } else {
        window.switchEditors.go(id, 'tmce');
      }
    });

    $(selectors.htmlTab).removeAttr('onclick').on('click', function (e) {
      e.preventDefault();

      if (typeof window.switchEditors.switchto === 'function') {
        window.switchEditors.switchto(this);
      } else {
        window.switchEditors.go(id, 'html');
      }
    });

    elements.$dom.addClass(selectors.wrap, 'tmce-active');
    elements.$dom.removeClass(selectors.wrap, 'html-active');
  }
}

export default Editor;


================================================
FILE: src/assets/js/properties/file.js
================================================
import $ from 'jquery';
import Utils from 'utils';

/**
 * Property File.
 *
 * Using the build in media management in WordPress.
 */
class File {
  /**
   * The file template to compile.
   *
   * @return {function}
   */
  get template () {
    return window.wp.template('papi-property-file');
  }

  /**
   * Initialize Property Image.
   */
  static init () {
    new File().binds();
  }

  /**
   * Bind elements with functions.
   */
  binds () {
    $('.inside .papi-table > tbody .papi-property-file.multiple .attachments').sortable({
      revert: true
    });

    $(document).on('click', '.papi-property-file .papi-file-select > .button', this.add.bind(this));
    $(document).on('mouseenter mouseleave', '.papi-property-file .attachment', this.hover.bind(this));
    $(document).on('click', '.papi-property-file .attachment a', this.remove.bind(this));
    $(document).on('change', '.papi-property-repeater-top', this.update.bind(this));
    $(document).on('click', '.papi-property-file .attachment', this.replace.bind(this));
  }

  /**
   * Add new image.
   *
   * @param {object} e
   */
  add (e) {
    e.preventDefault();

    const $this = $(e.currentTarget);
    const $prop = $this.closest('.papi-property-file');
    const $select = $this.closest('p');
    const $target = $prop.find('.attachments');
    const fileType = $prop.data('file-type');
    const multiple = $prop.hasClass('multiple');
    const slug = $this.data().slug;
    const self = this;
    let library = {};

    if (fileType === 'image') {
      library.type = 'image';
    }

    Utils.wpMediaEditor({
      library: library,
      multiple: multiple
    }).on('insert', (attachment) => {
      let data = {
        alt: attachment.alt,
        id: attachment.id,
        slug: slug,
        url: attachment.url
      };

      if (attachment.sizes !== undefined && attachment.sizes.thumbnail !== undefined) {
        data.url = attachment.sizes.thumbnail.url;
      }

      if (attachment.type !== 'image') {
        data.url = attachment.icon;
      }

      if (fileType === 'file') {
        data.filename = attachment.filename;
      }

      self.render($target, data);

      if (!multiple) {
        $select.addClass('papi-hide');
      }
    }).open();
  }

  /**
   * Toggle the remove button.
   *
   * @param {object} e
   */
  hover (e) {
    e.preventDefault();
    $(e.currentTarget).find('a').toggle();
  }

  /**
   * Remove a image.
   *
   * @param {object} e
   */
  remove (e) {
    e.stopPropagation();
    e.preventDefault();

    const $this = $(e.currentTarget);
    const $prop = $this.closest('.papi-property-file');

    $prop
      .find('.papi-file-select')
      .removeClass('papi-hide');

    $this.closest('.attachment')
      .remove();

    // Trigger conditional rule.
    $prop
      .find('input[type=hidden]')
      .trigger('change');
  }

  /**
   * Render the image with the template.
   *
   * @param {object} $el
   * @param {object} data
   */
  render ($el, data) {
    let template = this.template;
    template = window._.template($.trim(template()));
    $el.append('<div class="attachment">' + template(data) + '</div>');

    // Trigger conditional rule.
    $el.find('input[type=hidden]').trigger('change');
  }

  /**
   * Replace image with another one.
   *
   * @param {object} e
   */
  replace (e) {
    e.preventDefault();

    const $this = $(e.currentTarget);
    const $prop = $this.closest('.papi-property-file');
    const $img = $this.find('img[src]');
    const $input = $this.find('input[type=hidden]');
    const postId = $input.val();
    let library = {};

    if ($prop.data('file-type') === 'image') {
      library.type = 'image';
    }

    Utils.wpMediaEditor({
      library: library,
      multiple: false
    }).on('open', () => {
      let selection = Utils.wpMediaFrame.state().get('selection');
      const attachment = window.wp.media.attachment(postId);

      attachment.fetch();
      selection.add(attachment ? [attachment] : []);
    }).on('insert', (attachment) => {
      let url = attachment.url;

      if (attachment.sizes !== undefined && attachment.sizes.thumbnail !== undefined) {
        url = attachment.sizes.thumbnail.url;
      }

      if (attachment.type !== 'image') {
        url = attachment.icon;
      }

      if ($prop.data('file-type') === 'file') {
        $this.find('.filename div').text(attachment.filename);
      }

      $img.attr('src', url).attr('alt', attachment.alt);
      $input.val(attachment.id);

      // Trigger conditional rule.
      $input.trigger('change');
    }).open();
  }

  /**
   * Update when added to repeater.
   *
   * @param {object} e
   */
  update (e) {
    e.preventDefault();

    $(e.currentTarget)
      .find('tr').last()
      .find('.attachments')
      .sortable({
        revert: true
      });
  }
}

export default File;


================================================
FILE: src/assets/js/properties/flexible.js
================================================
import $ from 'jquery';
import Repeater from 'properties/repeater';
import Utils from 'utils';

class Flexible extends Repeater {
  /**
   * The template to use.
   *
   * @var {function}
   */
  get template () {
    return window.wp.template('papi-property-flexible-row');
  }

  /**
   * Initialize Property Flexible.
   */
  static init () {
    new Flexible().binds();
  }

  /**
   * Prepare to add a new row to the repeater
   * and then call fetch to fetch Papi ajax data.
   *
   * @param {object} $this
   */
  add ($this) {
    const $repeater = $this.closest('.papi-property-repeater-top');
    const $tbody = $repeater.find('.repeater-tbody').first();
    const counter = $tbody.children().length;
    const jsonText = this.getJSON($this);
    const layout = $this.data().layout;
    const limit = $repeater.data().limit;
    const append = limit === undefined || limit === -1 || $tbody.find('> tr').length < limit;

    if (!jsonText.length || !append) {
      return;
    }

    let properties = $.parseJSON(jsonText);

    const self = this;
    this.fetch(properties, counter, layout, function (res) {
      self.addRow($tbody, counter, res);
    });
  }

  /**
   * Bind elements with functions.
   */
  binds () {
    const self = this;

    $('.repeater-tbody').sortable({
      revert: true,
      handle: '.handle',
      helper: function (e, ui) {
        ui.children().each(function () {
          $(this).width($(this).width());
        });
        return ui;
      },
      start: function (e, ui) {
        let editorIds = $.map($(ui.item).find('.wp-editor-area').get(), function (elem) { return elem.id; });
        self.deactivateEditors(editorIds);
      },
      stop: function (e, ui) {
        self.updateRowNumber($(this).closest('.repeater-tbody'));

        let editorIds = $.map($(ui.item).find('.wp-editor-area').get(), function (elem) { return elem.id; });
        self.activateEditors(editorIds);
      }
    });

    $(document).on('click', '.papi-property-flexible > .bottom button[type="button"]', function (e) {
      e.preventDefault();

      const $this = $(this);
      const $prev = $this.prev();
      const offset = $this.closest('.flexible-layouts-btn-wrap').offset().top - $('#wpadminbar').offset().top;

      if ($prev.height() > offset) {
        $prev.removeClass('flexible-layouts-top').addClass('flexible-layouts-bottom');
      } else {
        $prev.removeClass('flexible-layouts-bottom').addClass('flexible-layouts-top');
      }

      $prev.removeClass('flexible-layouts-hidden');
    });

    $(document).on('click', '.papi-property-flexible .flexible-layouts li a', function (e) {
      e.preventDefault();
      $(this).closest('.flexible-layouts').addClass('flexible-layouts-hidden');
      self.add($(this));
    });

    $(document).on('mouseup', 'body', function (e) {
      const $layouts = $('.flexible-layouts:not(.flexible-layouts-hidden)');
      if (!$layouts.is(e.target) && $layouts.has(e.target).length === 0) {
        $layouts.addClass('flexible-layouts-hidden');
      }
    });

    $(document).on('click', '.papi-property-flexible .repeater-remove-item', function (e) {
      e.preventDefault();
      self.remove($(this));
    });
  }

  /**
   * Fetch properties from Papi ajax.
   *
   * @param {array} properties
   * @param {int} counter
   * @param {string} flexibleLayout
   * @param {function} callback
   */
  fetch (properties, counter, flexibleLayout, callback) {
    const params = {
      'action': 'get_properties',
      'counter': counter,
      'flexible_layout': flexibleLayout,
      'meta_type': Utils.getMetaType()
    };

    params[Utils.getMetaTypeKey()] = Utils.getMetaTypeValue();

    $.ajax({
      type: 'POST',
      data: {
        properties: JSON.stringify(properties)
      },
      url: papi.ajaxUrl + '?' + $.param(params),
      dataType: 'json'
    }).success(callback);
  }

  /**
   * Remove item from the flexible repeater.
   *
   * @param {object} $this
   */
  remove ($this) {
    let $tbody = $this.closest('.papi-property-repeater-top');

    if ($tbody.hasClass('papi-property-flexible')) {
      $tbody = $tbody.find('.repeater-tbody');
      $this.closest('tr').remove();
      this.updateRowNumber($tbody);
    }
  }

  /**
   * Update database row number.
   *
   * @param {object} $tbody
   */
  updateDatabaseRowNumber ($tbody) {
    let counter = $tbody.find('tr tbody tr').length;

    $tbody
      .closest('.papi-property-repeater-top')
      .find('.papi-property-repeater-rows')
      .val($tbody.find('tr tbody tr').length);

    this.triggerRule($tbody, counter);
  }
}

export default Flexible;


================================================
FILE: src/assets/js/properties/link.js
================================================
import $ from 'jquery';

/**
 * Property Link.
 *
 * Using the build in link manager in WordPress.
 */
class Link {
  /**
   * The link template to compile.
   *
   * @return {function}
   */
  get template () {
    return window.wp.template('papi-property-link');
  }

  /**
   * Initialize Property Link.
   */
  static init () {
    new Link().binds();
  }

  /**
   * Bind elements with functions.
   */
  binds () {
    $(document).on('click', '.papi-property-link button[data-link-action="add"]', this.add.bind(this));
    $(document).on('click', '.papi-property-link button[data-link-action="edit"]', this.edit.bind(this));
    $(document).on('click', '.papi-property-link button[data-link-action="remove"]', this.remove.bind(this));
    $(document).on('click', '#wp-link-submit', this.render.bind(this));
  }

  /**
   * Add new link.
   *
   * @param {object} e
   */
  add (e) {
    e.preventDefault();

    const $this = $(e.currentTarget);

    this.$el = $this.closest('.papi-property-link');
    this.$p = this.$el.find('p');

    // Create a new window.wpLink.update that only
    // close the wpLink window. Save the old to later.
    this.oldLinkUpdate = window.wpLink.update;
    window.wpLink.update = function () {
      window.wpLink.close();
    };

    window.wpLink.open();
  }

  /**
   * Add new link.
   *
   * @param {object} e
   */
  edit (e) {
    e.preventDefault();

    const $this = $(e.currentTarget);

    this.$el = $this.closest('.papi-property-link');
    this.$p = this.$el.find('p');

    // Create a new window.wpLink.update that only
    // close the wpLink window. Save the old to later.
    this.oldLinkUpdate = window.wpLink.update;
    window.wpLink.update = function () {
Download .txt
gitextract_jmguve0w/

├── .babelrc
├── .editorconfig
├── .gitattributes
├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── issue_template.md
│   ├── pull_request_template.md
│   └── workflows/
│       └── php.yml
├── .gitignore
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── composer.json
├── docker-compose.yml
├── languages/
│   ├── papi-fr_FR.mo
│   ├── papi-fr_FR.po
│   ├── papi-sv_SE.mo
│   ├── papi-sv_SE.po
│   └── papi.pot
├── package.json
├── papi-loader.php
├── phpcs.xml
├── phpunit.xml.dist
├── src/
│   ├── admin/
│   │   ├── class-papi-admin-ajax.php
│   │   ├── class-papi-admin-assets.php
│   │   ├── class-papi-admin-columns.php
│   │   ├── class-papi-admin-entry-post.php
│   │   ├── class-papi-admin-entry-taxonomy.php
│   │   ├── class-papi-admin-entry.php
│   │   ├── class-papi-admin-menu.php
│   │   ├── class-papi-admin-meta-box-tabs.php
│   │   ├── class-papi-admin-meta-box.php
│   │   ├── class-papi-admin-meta-handler.php
│   │   ├── class-papi-admin-option-handler.php
│   │   ├── class-papi-admin-page-type-switcher.php
│   │   ├── class-papi-admin-view.php
│   │   ├── class-papi-admin.php
│   │   └── views/
│   │       ├── add-new-page.php
│   │       └── partials/
│   │           └── add-new-item.php
│   ├── assets/
│   │   ├── js/
│   │   │   ├── components/
│   │   │   │   ├── pikaday.js
│   │   │   │   └── select2.js
│   │   │   ├── core.js
│   │   │   ├── modals/
│   │   │   │   └── iframe.js
│   │   │   ├── properties/
│   │   │   │   ├── color.js
│   │   │   │   ├── datetime.js
│   │   │   │   ├── dropdown.js
│   │   │   │   ├── editor.js
│   │   │   │   ├── file.js
│   │   │   │   ├── flexible.js
│   │   │   │   ├── link.js
│   │   │   │   ├── module.js
│   │   │   │   ├── post.js
│   │   │   │   ├── reference.js
│   │   │   │   ├── relationship.js
│   │   │   │   ├── repeater.js
│   │   │   │   ├── term.js
│   │   │   │   └── url.js
│   │   │   ├── required.js
│   │   │   ├── rules.js
│   │   │   ├── tabs.js
│   │   │   ├── taxonomy.js
│   │   │   └── utils.js
│   │   └── scss/
│   │       ├── components/
│   │       │   ├── pikaday.scss
│   │       │   └── select2.scss
│   │       ├── modules/
│   │       │   ├── _admin.scss
│   │       │   ├── _attachment.scss
│   │       │   ├── _base.scss
│   │       │   ├── _box.scss
│   │       │   ├── _iframe.scss
│   │       │   ├── _options.scss
│   │       │   ├── _table.scss
│   │       │   ├── _tabs.scss
│   │       │   └── _utils.scss
│   │       ├── properties/
│   │       │   ├── _checkbox.scss
│   │       │   ├── _color.scss
│   │       │   ├── _divider.scss
│   │       │   ├── _dropdown.scss
│   │       │   ├── _file.scss
│   │       │   ├── _flexible.scss
│   │       │   ├── _group.scss
│   │       │   ├── _link.scss
│   │       │   ├── _post.scss
│   │       │   ├── _radio.scss
│   │       │   ├── _reference.scss
│   │       │   ├── _relationship.scss
│   │       │   ├── _repeater.scss
│   │       │   ├── _shared.scss
│   │       │   ├── _table.scss
│   │       │   ├── _term.scss
│   │       │   ├── _text.scss
│   │       │   └── _url.scss
│   │       └── style.scss
│   ├── cli/
│   │   ├── class-papi-cli-command.php
│   │   ├── class-papi-cli-post-command.php
│   │   ├── class-papi-cli-term-command.php
│   │   ├── class-papi-cli-type-command.php
│   │   └── class-papi-cli.php
│   ├── core/
│   │   ├── class-papi-core-autoload.php
│   │   ├── class-papi-core-box.php
│   │   ├── class-papi-core-conditional-rule.php
│   │   ├── class-papi-core-conditional-rules.php
│   │   ├── class-papi-core-conditional.php
│   │   ├── class-papi-core-container.php
│   │   ├── class-papi-core-data-handler.php
│   │   ├── class-papi-core-data.php
│   │   ├── class-papi-core-meta-store.php
│   │   ├── class-papi-core-property.php
│   │   ├── class-papi-core-tab.php
│   │   └── class-papi-core-type.php
│   ├── lib/
│   │   ├── core/
│   │   │   ├── cache.php
│   │   │   ├── conditional.php
│   │   │   ├── data.php
│   │   │   ├── deprecated.php
│   │   │   ├── io.php
│   │   │   ├── meta.php
│   │   │   ├── post.php
│   │   │   ├── property.php
│   │   │   ├── slug.php
│   │   │   ├── tabs.php
│   │   │   ├── taxonomy.php
│   │   │   ├── template.php
│   │   │   ├── url.php
│   │   │   └── utilities.php
│   │   ├── fields/
│   │   │   ├── option.php
│   │   │   ├── page.php
│   │   │   └── taxonomy.php
│   │   ├── hooks/
│   │   │   ├── actions.php
│   │   │   ├── filters-page-type.php
│   │   │   ├── filters-taxonomy-type.php
│   │   │   └── filters.php
│   │   └── types/
│   │       ├── entry.php
│   │       ├── page.php
│   │       └── taxonomy.php
│   ├── papi-loader.php
│   ├── properties/
│   │   ├── class-papi-property-bool.php
│   │   ├── class-papi-property-checkbox.php
│   │   ├── class-papi-property-color.php
│   │   ├── class-papi-property-datetime.php
│   │   ├── class-papi-property-divider.php
│   │   ├── class-papi-property-dropdown.php
│   │   ├── class-papi-property-editor.php
│   │   ├── class-papi-property-email.php
│   │   ├── class-papi-property-file.php
│   │   ├── class-papi-property-flexible.php
│   │   ├── class-papi-property-gallery.php
│   │   ├── class-papi-property-group.php
│   │   ├── class-papi-property-hidden.php
│   │   ├── class-papi-property-html.php
│   │   ├── class-papi-property-image.php
│   │   ├── class-papi-property-link.php
│   │   ├── class-papi-property-module.php
│   │   ├── class-papi-property-number.php
│   │   ├── class-papi-property-post.php
│   │   ├── class-papi-property-radio.php
│   │   ├── class-papi-property-reference.php
│   │   ├── class-papi-property-relationship.php
│   │   ├── class-papi-property-repeater.php
│   │   ├── class-papi-property-sidebar.php
│   │   ├── class-papi-property-string.php
│   │   ├── class-papi-property-table.php
│   │   ├── class-papi-property-term.php
│   │   ├── class-papi-property-text.php
│   │   ├── class-papi-property-url.php
│   │   ├── class-papi-property-user.php
│   │   └── class-papi-property.php
│   ├── query/
│   │   └── class-papi-query.php
│   ├── rest-api/
│   │   ├── class-papi-rest-api-post.php
│   │   ├── class-papi-rest-api-settings.php
│   │   └── class-papi-rest-api.php
│   ├── stores/
│   │   ├── class-papi-option-store.php
│   │   ├── class-papi-post-store.php
│   │   └── class-papi-term-store.php
│   └── types/
│       ├── class-papi-attachment-type.php
│       ├── class-papi-entry-type.php
│       ├── class-papi-front-page-type.php
│       ├── class-papi-module-type.php
│       ├── class-papi-option-type.php
│       ├── class-papi-page-type.php
│       └── class-papi-taxonomy-type.php
├── tests/
│   ├── Dockerfile
│   ├── README.md
│   ├── bin/
│   │   └── install-cp-tests.sh
│   ├── bootstrap.php
│   ├── cases/
│   │   ├── admin/
│   │   │   ├── class-papi-admin-ajax-test.php
│   │   │   ├── class-papi-admin-assets-test.php
│   │   │   ├── class-papi-admin-columns-test.php
│   │   │   ├── class-papi-admin-entry-post-test.php
│   │   │   ├── class-papi-admin-entry-taxonomy-test.php
│   │   │   ├── class-papi-admin-menu-test.php
│   │   │   ├── class-papi-admin-meta-box-tabs-test.php
│   │   │   ├── class-papi-admin-meta-box-test.php
│   │   │   ├── class-papi-admin-meta-handler-test.php
│   │   │   ├── class-papi-admin-option-handler-test.php
│   │   │   ├── class-papi-admin-page-type-switcher.php
│   │   │   ├── class-papi-admin-test.php
│   │   │   └── class-papi-admin-view-test.php
│   │   ├── core/
│   │   │   ├── class-papi-conditional-rules-test.php
│   │   │   ├── class-papi-core-box-test.php
│   │   │   ├── class-papi-core-conditional-rule-test.php
│   │   │   ├── class-papi-core-conditional-test.php
│   │   │   ├── class-papi-core-container-test.php
│   │   │   ├── class-papi-core-data-test.php
│   │   │   ├── class-papi-core-property-test.php
│   │   │   ├── class-papi-core-tab-test.php
│   │   │   └── class-papi-core-type-test.php
│   │   ├── lib/
│   │   │   ├── core/
│   │   │   │   ├── cache-test.php
│   │   │   │   ├── conditional-test.php
│   │   │   │   ├── data-test.php
│   │   │   │   ├── deprecated-test.php
│   │   │   │   ├── io-test.php
│   │   │   │   ├── meta-test.php
│   │   │   │   ├── post-test.php
│   │   │   │   ├── property-test.php
│   │   │   │   ├── slug-test.php
│   │   │   │   ├── tabs-test.php
│   │   │   │   ├── taxonomy-test.php
│   │   │   │   ├── template-test.php
│   │   │   │   ├── url-test.php
│   │   │   │   └── utilities-test.php
│   │   │   ├── fields/
│   │   │   │   ├── option-test.php
│   │   │   │   ├── page-test.php
│   │   │   │   └── taxonomy-test.php
│   │   │   ├── hooks/
│   │   │   │   ├── actions-test.php
│   │   │   │   ├── filters-page-type-test.php
│   │   │   │   ├── filters-taxonomy-type-test.php
│   │   │   │   └── filters-test.php
│   │   │   └── types/
│   │   │       ├── entry-test.php
│   │   │       ├── page-test.php
│   │   │       └── taxonomy-test.php
│   │   ├── papi-loader-test.php
│   │   ├── properties/
│   │   │   ├── class-papi-property-bool-test.php
│   │   │   ├── class-papi-property-checkbox-test.php
│   │   │   ├── class-papi-property-color-test.php
│   │   │   ├── class-papi-property-datetime-test.php
│   │   │   ├── class-papi-property-divider-test.php
│   │   │   ├── class-papi-property-dropdown-test.php
│   │   │   ├── class-papi-property-editor-test.php
│   │   │   ├── class-papi-property-email-test.php
│   │   │   ├── class-papi-property-file-test.php
│   │   │   ├── class-papi-property-flexible-test.php
│   │   │   ├── class-papi-property-gallery-test.php
│   │   │   ├── class-papi-property-group-test.php
│   │   │   ├── class-papi-property-hidden-test.php
│   │   │   ├── class-papi-property-html-test.php
│   │   │   ├── class-papi-property-image-test.php
│   │   │   ├── class-papi-property-link-test.php
│   │   │   ├── class-papi-property-module-test.php
│   │   │   ├── class-papi-property-number-test.php
│   │   │   ├── class-papi-property-post-test.php
│   │   │   ├── class-papi-property-radio-test.php
│   │   │   ├── class-papi-property-reference-test.php
│   │   │   ├── class-papi-property-relationship-test.php
│   │   │   ├── class-papi-property-repeater-test.php
│   │   │   ├── class-papi-property-sidebar-test.php
│   │   │   ├── class-papi-property-string-test.php
│   │   │   ├── class-papi-property-term-test.php
│   │   │   ├── class-papi-property-test.php
│   │   │   ├── class-papi-property-text-test.php
│   │   │   ├── class-papi-property-url-test.php
│   │   │   └── class-papi-property-user-test.php
│   │   ├── query/
│   │   │   └── class-papi-query-test.php
│   │   ├── rest-api/
│   │   │   ├── class-papi-rest-api-post-test.php
│   │   │   ├── class-papi-rest-api-settings-test.php
│   │   │   └── class-papi-rest-api-test.php
│   │   ├── stores/
│   │   │   ├── class-papi-option-store-test.php
│   │   │   ├── class-papi-post-store-test.php
│   │   │   └── class-papi-term-store-test.php
│   │   └── types/
│   │       ├── class-papi-attachment-type-test.php
│   │       ├── class-papi-entry-type-test.php
│   │       ├── class-papi-option-type-test.php
│   │       ├── class-papi-page-type-test.php
│   │       └── class-papi-taxonomy-type-test.php
│   ├── data/
│   │   ├── classes/
│   │   │   └── class-say.php
│   │   ├── container/
│   │   │   └── class-container-test-stub.php
│   │   ├── core-types/
│   │   │   ├── abstract-core-type.php
│   │   │   ├── base-core-type.php
│   │   │   ├── broken-core-type.php
│   │   │   ├── info-core-type.php
│   │   │   └── info2-core-type.php
│   │   ├── entry-types/
│   │   │   ├── abstract-entry-type.php
│   │   │   ├── base-entry-type.php
│   │   │   ├── broken-entry-type.php
│   │   │   ├── info-entry-type.php
│   │   │   └── term-entry-type.php
│   │   ├── entry-types2/
│   │   │   └── term-entry-type.php
│   │   ├── page-types/
│   │   │   ├── big-page-type.php
│   │   │   ├── book-page-type.php
│   │   │   ├── boxes/
│   │   │   │   ├── big.php
│   │   │   │   ├── properties.php
│   │   │   │   └── simple.php
│   │   │   ├── broken-page-type.php
│   │   │   ├── display-not-page-type.php
│   │   │   ├── dot-page-type.php
│   │   │   ├── dot2-page-type.php
│   │   │   ├── duck-page-type.php
│   │   │   ├── editor-page-type.php
│   │   │   ├── empty-page-type.php
│   │   │   ├── extra-page-type.php
│   │   │   ├── faq-extra-page-type.php
│   │   │   ├── faq-extra2-page-type.php
│   │   │   ├── faq-page-type.php
│   │   │   ├── fields-page-type.php
│   │   │   ├── flex-page-type.php
│   │   │   ├── flex2-page-type.php
│   │   │   ├── front-page-type.php
│   │   │   ├── group-page-type.php
│   │   │   ├── hidden-page-type.php
│   │   │   ├── hidden2-page-type.php
│   │   │   ├── identifier-page-type.php
│   │   │   ├── module-page-type.php
│   │   │   ├── modules/
│   │   │   │   ├── image-module-type.php
│   │   │   │   ├── string-module-type.php
│   │   │   │   ├── top-module-type.php
│   │   │   │   └── video-module-type.php
│   │   │   ├── name-page-type.php
│   │   │   ├── namespace-page-type.php
│   │   │   ├── no-page-type.php
│   │   │   ├── options/
│   │   │   │   ├── class-settings-option-type.php
│   │   │   │   ├── header-option-type.php
│   │   │   │   └── properties-option-type.php
│   │   │   ├── others/
│   │   │   │   ├── attachment-type.php
│   │   │   │   └── media-attachment-type.php
│   │   │   ├── post-page-type.php
│   │   │   ├── price-page-type.php
│   │   │   ├── properties/
│   │   │   │   └── name.php
│   │   │   ├── properties-page-type.php
│   │   │   ├── rule-page-type.php
│   │   │   ├── simple-page-type.php
│   │   │   ├── tab-page-type.php
│   │   │   ├── tab2-page-type.php
│   │   │   ├── tabs/
│   │   │   │   ├── content.php
│   │   │   │   └── video.php
│   │   │   ├── test-page-type.php
│   │   │   └── twenty-page-type.php
│   │   ├── page-types2/
│   │   │   ├── any-page-type.php
│   │   │   └── look-page-type.php
│   │   ├── properties/
│   │   │   ├── array.php
│   │   │   ├── class-papi-property-fake.php
│   │   │   ├── class-papi-property-kvack.php
│   │   │   └── simple.php
│   │   └── taxonomy-types/
│   │       ├── broken-taxonomy-type.php
│   │       ├── empty-taxonomy-type.php
│   │       ├── faq-extra-taxonomy-type.php
│   │       ├── faq-extra2-taxonomy-type.php
│   │       ├── faq-taxonomy-type.php
│   │       ├── properties-taxonomy-type.php
│   │       └── simple-taxonomy-type.php
│   └── framework/
│       ├── class-papi-property-test-case.php
│       ├── functions.php
│       └── helpers.php
└── webpack.config.js
Download .txt
SYMBOL INDEX (2127 symbols across 280 files)

FILE: src/admin/class-papi-admin-ajax.php
  class Papi_Admin_Ajax (line 6) | class Papi_Admin_Ajax {
    method __construct (line 25) | public function __construct() {
    method add_endpoint (line 33) | public function add_endpoint() {
    method ajax_url (line 45) | public function ajax_url() {
    method handle_papi_ajax (line 62) | public function handle_papi_ajax() {
    method get_entry_type (line 93) | public function get_entry_type() {
    method get_posts (line 112) | public function get_posts() {
    method get_property (line 154) | public function get_property() {
    method get_properties (line 181) | public function get_properties() {
    method get_rules_result (line 229) | public function get_rules_result() {
    method get_shortcode (line 277) | public function get_shortcode() {
    method get_terms (line 292) | public function get_terms() {
    method render_error (line 314) | public function render_error( $message ) {
    method setup_actions (line 323) | protected function setup_actions() {

FILE: src/admin/class-papi-admin-assets.php
  class Papi_Admin_Assets (line 6) | final class Papi_Admin_Assets {
    method __construct (line 11) | public function __construct() {
    method enqueue_css (line 20) | public function enqueue_css() {
    method enqueue_js (line 29) | public function enqueue_js() {
    method enqueue_locale (line 49) | public function enqueue_locale() {

FILE: src/admin/class-papi-admin-columns.php
  class Papi_Admin_Columns (line 6) | final class Papi_Admin_Columns {
    method __construct (line 25) | public function __construct() {
    method get_meta_type_value (line 36) | protected function get_meta_type_value() {
    method manage_page_type_posts_columns (line 47) | public function manage_page_type_posts_columns( array $defaults = [] ) {
    method manage_page_type_posts_custom_column (line 81) | public function manage_page_type_posts_custom_column( $column_name, $p...
    method manage_page_type_sortable_columns (line 125) | public function manage_page_type_sortable_columns( $columns ) {
    method pre_get_posts (line 140) | public function pre_get_posts( WP_Query $query ) {
    method restrict_page_types (line 169) | public function restrict_page_types() {
    method setup_actions (line 216) | protected function setup_actions() {
    method setup_filters (line 233) | protected function setup_filters() {
    method setup_globals (line 250) | protected function setup_globals() {

FILE: src/admin/class-papi-admin-entry-post.php
  class Papi_Admin_Entry_Post (line 3) | class Papi_Admin_Entry_Post extends Papi_Admin_Entry {
    method __construct (line 15) | public function __construct() {
    method get_revision_ui_diff (line 31) | public function get_revision_ui_diff( $return, $compare_from, $compare...
    method hidden_meta_boxes (line 62) | public function hidden_meta_boxes() {
    method hidden_meta_box_editor (line 75) | public function hidden_meta_box_editor() {
    method load_post_new (line 83) | public function load_post_new() {
    method redirect_post_location (line 126) | public function redirect_post_location( $location ) {
    method setup (line 144) | public function setup() {
    method setup_actions (line 158) | protected function setup_actions() {
    method setup_filters (line 167) | protected function setup_filters() {

FILE: src/admin/class-papi-admin-entry-taxonomy.php
  class Papi_Admin_Entry_Taxonomy (line 6) | class Papi_Admin_Entry_Taxonomy extends Papi_Admin_Entry {
    method __construct (line 18) | public function __construct() {
    method add_form_fields (line 25) | public function add_form_fields() {
    method prepare_taxonomy_types (line 83) | protected function prepare_taxonomy_types( array $taxonomy_types ) {
    method setup_actions (line 105) | protected function setup_actions() {
    method setup_taxonomies_hooks (line 112) | public function setup_taxonomies_hooks() {

FILE: src/admin/class-papi-admin-entry.php
  class Papi_Admin_Entry (line 3) | abstract class Papi_Admin_Entry {
    method instance (line 17) | public static function instance() {
    method setup (line 30) | public function setup() {
    method setup_actions (line 37) | protected function setup_actions() {
    method setup_filters (line 43) | protected function setup_filters() {

FILE: src/admin/class-papi-admin-menu.php
  class Papi_Admin_Menu (line 6) | final class Papi_Admin_Menu {
    method __construct (line 11) | public function __construct() {
    method admin_bar_menu (line 18) | public function admin_bar_menu() {
    method get_entry_type (line 29) | protected function get_entry_type() {
    method override_labels (line 40) | protected function override_labels( Papi_Entry_Type $entry_type ) {
    method page_items_menu (line 72) | public function page_items_menu() {
    method post_types_menu (line 103) | public function post_types_menu() {
    method render_view (line 188) | public function render_view() {
    method setup_actions (line 213) | protected function setup_actions() {

FILE: src/admin/class-papi-admin-meta-box-tabs.php
  class Papi_Admin_Meta_Box_Tabs (line 7) | final class Papi_Admin_Meta_Box_Tabs {
    method __construct (line 22) | public function __construct( array $tabs = [], $render = true ) {
    method get_tabs (line 39) | public function get_tabs() {
    method html (line 46) | protected function html() {

FILE: src/admin/class-papi-admin-meta-box.php
  class Papi_Admin_Meta_Box (line 6) | final class Papi_Admin_Meta_Box {
    method __construct (line 20) | public function __construct( Papi_Core_Box $box ) {
    method admin_head (line 37) | public function admin_head() {
    method meta_box_css_classes (line 55) | public function meta_box_css_classes( array $classes ) {
    method move_meta_box_after_title (line 64) | public function move_meta_box_after_title() {
    method get_post_type (line 75) | protected function get_post_type() {
    method get_title (line 94) | protected function get_title() {
    method render_meta_box (line 113) | public function render_meta_box( $post, array $args ) {
    method setup_actions (line 135) | protected function setup_actions() {
    method setup_meta_box (line 163) | public function setup_meta_box() {

FILE: src/admin/class-papi-admin-meta-handler.php
  class Papi_Admin_Meta_Handler (line 6) | final class Papi_Admin_Meta_Handler extends Papi_Core_Data_Handler {
    method get_meta_type (line 13) | protected function get_meta_type() {
    method overwrite_post_data (line 26) | protected function overwrite_post_data( $post_id ) {
    method pre_save (line 50) | protected function pre_save( $id ) {
    method save_meta_boxes (line 77) | public function save_meta_boxes( $id, $post = null ) {
    method save_revision (line 132) | public function save_revision( $revision_id ) {
    method save_properties (line 164) | public function save_properties( $id ) {
    method restore_post_revision (line 202) | public function restore_post_revision( $post_id, $revision_id ) {
    method setup_actions (line 221) | protected function setup_actions() {
    method valid_post_id (line 236) | protected function valid_post_id( $post_id ) {

FILE: src/admin/class-papi-admin-option-handler.php
  class Papi_Admin_Option_Handler (line 6) | final class Papi_Admin_Option_Handler extends Papi_Core_Data_Handler {
    method save_properties (line 11) | public function save_properties() {
    method setup_actions (line 43) | protected function setup_actions() {

FILE: src/admin/class-papi-admin-page-type-switcher.php
  class Papi_Admin_Page_Type_Switcher (line 3) | class Papi_Admin_Page_Type_Switcher {
    method __construct (line 8) | public function __construct() {
    method admin_init (line 15) | public function admin_init() {
    method metabox (line 23) | public function metabox() {
    method save_post (line 89) | public function save_post( $post_id, $post ) {

FILE: src/admin/class-papi-admin-view.php
  class Papi_Admin_View (line 6) | final class Papi_Admin_View {
    method __construct (line 20) | public function __construct( $path = '' ) {
    method exists (line 31) | public function exists( $file ) {
    method render (line 42) | public function render( $file ) {
    method file (line 55) | protected function file( $file ) {

FILE: src/admin/class-papi-admin.php
  class Papi_Admin (line 7) | final class Papi_Admin {
    method __construct (line 26) | public function __construct() {
    method __clone (line 37) | public function __clone() {
    method __wakeup (line 46) | public function __wakeup() {
    method admin_init (line 53) | public function admin_init() {
    method admin_body_class (line 81) | public function admin_body_class( $classes ) {
    method edit_form_after_title (line 106) | public function edit_form_after_title() {
    method get_entry_type (line 124) | protected function get_entry_type() {
    method load_files (line 164) | protected function load_files() {
    method plugin_row_meta (line 181) | public function plugin_row_meta( array $links, $file ) {
    method setup_actions (line 194) | protected function setup_actions() {
    method setup_filters (line 207) | protected function setup_filters() {
    method update_front_page (line 224) | public function update_front_page( $value, $option ) {
    method wp_link_query (line 265) | public function wp_link_query( array $results ) {
    method wp_refresh_nonces (line 287) | public function wp_refresh_nonces( array $response ) {

FILE: src/assets/js/core.js
  class Core (line 4) | class Core {
    method init (line 8) | static init () {
    method autosave (line 25) | autosave (e, xhr, options) {
    method binds (line 59) | binds () {
    method addCurrentClassToMenuItem (line 84) | addCurrentClassToMenuItem () {
    method handlediv (line 98) | handlediv (e) {
    method pageTypeSwitcher (line 113) | pageTypeSwitcher () {
    method redirect (line 139) | redirect (e) {
    method search (line 156) | search (e) {
    method prepareBoxes (line 186) | prepareBoxes () {
    method setSelectedMenuItem (line 237) | setSelectedMenuItem () {

FILE: src/assets/js/modals/iframe.js
  class Iframe (line 6) | class Iframe {
    method template (line 13) | get template() {
    method init (line 38) | static init() {
    method constructor (line 67) | constructor(options) {
    method open (line 85) | open() {
    method loaded (line 103) | loaded(e) {
    method submit (line 115) | submit(e) {
    method close (line 126) | close() {

FILE: src/assets/js/properties/color.js
  class Color (line 8) | class Color {
    method init (line 12) | static init () {
    method binds (line 19) | binds () {
    method showColorPicker (line 33) | showColorPicker () {

FILE: src/assets/js/properties/datetime.js
  class Datetime (line 9) | class Datetime {
    method init (line 13) | static init () {
    method binds (line 20) | binds () {
    method pikaday (line 32) | pikaday ($props) {
    method updateSelect (line 64) | updateSelect (e) {

FILE: src/assets/js/properties/dropdown.js
  class Dropdown (line 8) | class Dropdown {
    method init (line 12) | static init () {
    method binds (line 19) | binds () {
    method update (line 26) | update (e) {

FILE: src/assets/js/properties/editor.js
  class Editor (line 5) | class Editor {
    method customTinyMCESettings (line 11) | get customTinyMCESettings () {
    method binds (line 24) | binds () {
    method createTinyMceEditor (line 36) | createTinyMceEditor (id) {
    method closeAllQTags (line 60) | closeAllQTags ($iframe) {
    method getElements (line 75) | getElements (selectors) {
    method getId (line 89) | getId (id) {
    method getSelectors (line 100) | getSelectors (id) {
    method init (line 113) | static init () {
    method loaded (line 120) | loaded () {
    method qtInit (line 131) | qtInit (id) {
    method update (line 157) | update (e) {

FILE: src/assets/js/properties/file.js
  class File (line 9) | class File {
    method template (line 15) | get template () {
    method init (line 22) | static init () {
    method binds (line 29) | binds () {
    method add (line 46) | add (e) {
    method hover (line 99) | hover (e) {
    method remove (line 109) | remove (e) {
    method render (line 135) | render ($el, data) {
    method replace (line 149) | replace (e) {
    method update (line 200) | update (e) {

FILE: src/assets/js/properties/flexible.js
  class Flexible (line 5) | class Flexible extends Repeater {
    method template (line 11) | get template () {
    method init (line 18) | static init () {
    method add (line 28) | add ($this) {
    method binds (line 52) | binds () {
    method fetch (line 119) | fetch (properties, counter, flexibleLayout, callback) {
    method remove (line 144) | remove ($this) {
    method updateDatabaseRowNumber (line 159) | updateDatabaseRowNumber ($tbody) {

FILE: src/assets/js/properties/link.js
  class Link (line 8) | class Link {
    method template (line 14) | get template () {
    method init (line 21) | static init () {
    method binds (line 28) | binds () {
    method add (line 40) | add (e) {
    method edit (line 63) | edit (e) {
    method remove (line 96) | remove (e) {
    method render (line 120) | render (e) {

FILE: src/assets/js/properties/module.js
  class Module (line 9) | class Module {
    method optionTemplate (line 15) | get optionTemplate () {
    method optionPlaceholderTemplate (line 24) | get optionPlaceholderTemplate () {
    method init (line 31) | static init () {
    method binds (line 38) | binds () {
    method change (line 50) | change (e) {
    method iframeSubmit (line 120) | iframeSubmit (e, data) {
    method update (line 159) | update (e) {

FILE: src/assets/js/properties/post.js
  class Post (line 9) | class Post {
    method optionTemplate (line 15) | get optionTemplate () {
    method optionPlaceholderTemplate (line 24) | get optionPlaceholderTemplate () {
    method init (line 31) | static init () {
    method binds (line 38) | binds () {
    method change (line 50) | change (e) {
    method iframeSubmit (line 109) | iframeSubmit (e, data) {
    method update (line 148) | update (e) {

FILE: src/assets/js/properties/reference.js
  class Reference (line 6) | class Reference {
    method init (line 10) | static init () {
    method binds (line 17) | binds () {
    method toggle (line 26) | toggle (e) {

FILE: src/assets/js/properties/relationship.js
  class Relationship (line 6) | class Relationship {
    method init (line 10) | static init () {
    method add (line 18) | add (e) {
    method binds (line 46) | binds () {
    method remove (line 68) | remove (e) {
    method search (line 89) | search (e) {
    method triggerRule (line 111) | triggerRule ($prop) {
    method update (line 122) | update (e) {

FILE: src/assets/js/properties/repeater.js
  class Repeater (line 9) | class Repeater {
    method template (line 15) | get template () {
    method init (line 22) | static init () {
    method add (line 32) | add ($this) {
    method addRow (line 59) | addRow ($tbody, counter, res) {
    method binds (line 86) | binds () {
    method deactivateEditors (line 136) | deactivateEditors (ids) {
    method activateEditors (line 167) | activateEditors (ids) {
    method fetch (line 194) | fetch (properties, counter, callback) {
    method getJSON (line 220) | getJSON ($this) {
    method getHtml (line 231) | getHtml (data) {
    method replaceArrayNumber (line 246) | replaceArrayNumber (name, j, p) {
    method remove (line 270) | remove ($this) {
    method scrollDownTable (line 285) | scrollDownTable ($tbody) {
    method toggle (line 297) | toggle ($this) {
    method triggerRule (line 306) | triggerRule ($tbody, counter) {
    method updateRowNumber (line 317) | updateRowNumber ($tbody) {
    method updateDatabaseRowNumber (line 385) | updateDatabaseRowNumber ($tbody) {

FILE: src/assets/js/properties/term.js
  class Term (line 8) | class Term {
    method init (line 12) | static init () {
    method binds (line 19) | binds () {
    method change (line 30) | change (e) {
    method update (line 69) | update (e) {

FILE: src/assets/js/properties/url.js
  class Url (line 7) | class Url {
    method init (line 11) | static init () {
    method add (line 20) | add (e) {
    method binds (line 33) | binds () {

FILE: src/assets/js/required.js
  class Required (line 3) | class Required {
    method init (line 7) | static init () {
    method binds (line 14) | binds () {
    method requiredLink (line 24) | requiredLink (e) {
    method publishPost (line 36) | publishPost (e) {

FILE: src/assets/js/rules.js
  class Rules (line 4) | class Rules {
    method init (line 8) | static init () {
    method bindRule (line 18) | bindRule (slug, rule) {
    method binds (line 68) | binds () {
    method debounce (line 86) | debounce (fn, wait, immediate) {
    method display (line 113) | display (options) {
    method fetch (line 125) | fetch (options, callback) {
    method getPageTypeId (line 151) | getPageTypeId () {
    method getRuleSlug (line 173) | getRuleSlug (slug, rule) {
    method getSelector (line 212) | getSelector (ruleSlug) {
    method getTarget (line 223) | getTarget (slug) {
    method getValue (line 243) | getValue (slug) {
    method setupRules (line 316) | setupRules ($this) {

FILE: src/assets/js/tabs.js
  class Tabs (line 3) | class Tabs {
    method init (line 7) | static init () {
    method binds (line 14) | binds () {
    method changeTab (line 24) | changeTab (e) {
    method updateTabsTableBack (line 49) | updateTabsTableBack ($activeTab, addClass = false) {

FILE: src/assets/js/taxonomy.js
  class Taxonomy (line 3) | class Taxonomy {
    method init (line 7) | static init () {
    method binds (line 14) | binds () {
    method addNewTerm (line 23) | addNewTerm (e) {

FILE: src/assets/js/utils.js
  class Utils (line 5) | class Utils {
    method init (line 9) | static init () {
    method getMetaType (line 18) | static getMetaType () {
    method getMetaTypeKey (line 39) | static getMetaTypeKey () {
    method getMetaTypeValue (line 55) | static getMetaTypeValue () {
    method getParameterByName (line 79) | static getParameterByName (name) {
    method wpMediaEditor (line 91) | static wpMediaEditor (options) {
    method wpMediaFrame (line 116) | static get wpMediaFrame () {
    method wpMediaFrame (line 125) | static set wpMediaFrame (obj) {

FILE: src/cli/class-papi-cli-command.php
  class Papi_CLI_Command (line 6) | class Papi_CLI_Command extends WP_CLI_Command {
    method get_formatter (line 15) | protected function get_formatter( $assoc_args ) {
    method get_default_format_fields (line 28) | protected function get_default_format_fields() {
    method get_format_args (line 39) | protected function get_format_args( $assoc_args ) {

FILE: src/cli/class-papi-cli-post-command.php
  class Papi_CLI_Post_Command (line 6) | class Papi_CLI_Post_Command extends Papi_CLI_Command {
    method get_default_format_fields (line 13) | protected function get_default_format_fields() {
    method get (line 51) | public function get( $args, $assoc_args ) {
    method rename (line 105) | public function rename( $args, $assoc_args ) {

FILE: src/cli/class-papi-cli-term-command.php
  class Papi_CLI_Term_Command (line 6) | class Papi_CLI_Term_Command extends Papi_CLI_Command {
    method get_default_format_fields (line 13) | protected function get_default_format_fields() {
    method get (line 51) | public function get( $args, $assoc_args ) {
    method rename (line 105) | public function rename( $args, $assoc_args ) {

FILE: src/cli/class-papi-cli-type-command.php
  class Papi_CLI_Type_Command (line 6) | class Papi_CLI_Type_Command extends Papi_CLI_Command {
    method get_default_format_fields (line 13) | protected function get_default_format_fields() {
    method get_meta_type_value (line 24) | protected function get_meta_type_value( $entry_type ) {
    method list_ (line 76) | public function list_( $args, $assoc_args ) {

FILE: src/cli/class-papi-cli.php
  class Papi_CLI (line 6) | class Papi_CLI extends WP_CLI_Command {

FILE: src/core/class-papi-core-autoload.php
  class Papi_Core_Autoload (line 6) | final class Papi_Core_Autoload {
    method __construct (line 13) | public function __construct() {
    method autoload (line 24) | public function autoload( $class ) {

FILE: src/core/class-papi-core-box.php
  class Papi_Core_Box (line 3) | class Papi_Core_Box {
    method __construct (line 99) | public function __construct( array $args = [], array $properties = [] ) {
    method get_option (line 111) | public function get_option( $key ) {
    method set_option (line 121) | public function set_option( $key, $value ) {
    method setup_args (line 130) | protected function setup_args( array $args ) {
    method setup_properties (line 150) | protected function setup_properties( array $properties ) {
    method __toString (line 159) | public function __toString() {

FILE: src/core/class-papi-core-conditional-rule.php
  class Papi_Core_Conditional_Rule (line 6) | class Papi_Core_Conditional_Rule {
    method __construct (line 41) | public function __construct( array $rule ) {
    method get_field_slug (line 50) | public function get_field_slug() {
    method get_source (line 65) | public function get_source() {
    method setup_source (line 96) | public function setup_source( $value ) {
    method setup (line 118) | protected function setup( array $rule ) {

FILE: src/core/class-papi-core-conditional-rules.php
  class Papi_Core_Conditional_Rules (line 7) | class Papi_Core_Conditional_Rules {
    method __construct (line 12) | public function __construct() {
    method convert_bool (line 23) | protected function convert_bool( $str ) {
    method convert_prop (line 46) | protected function convert_prop( $value, Papi_Core_Conditional_Rule $r...
    method convert_number (line 92) | protected function convert_number( $str ) {
    method get_converted_value (line 103) | protected function get_converted_value( Papi_Core_Conditional_Rule $ru...
    method get_deep_value (line 133) | protected function get_deep_value( $slug, $value ) {
    method get_value (line 146) | protected function get_value( Papi_Core_Conditional_Rule $rule ) {
    method rule_equal (line 177) | public function rule_equal( Papi_Core_Conditional_Rule $rule ) {
    method rule_not_equal (line 189) | public function rule_not_equal( Papi_Core_Conditional_Rule $rule ) {
    method rule_greater_then (line 201) | public function rule_greater_then( Papi_Core_Conditional_Rule $rule ) {
    method rule_greater_then_or_equal (line 223) | public function rule_greater_then_or_equal( Papi_Core_Conditional_Rule...
    method rule_less_then (line 245) | public function rule_less_then( Papi_Core_Conditional_Rule $rule ) {
    method rule_less_then_or_equal (line 267) | public function rule_less_then_or_equal( Papi_Core_Conditional_Rule $r...
    method rule_in (line 289) | public function rule_in( Papi_Core_Conditional_Rule $rule ) {
    method rule_not_in (line 306) | public function rule_not_in( Papi_Core_Conditional_Rule $rule ) {
    method rule_like (line 323) | public function rule_like( Papi_Core_Conditional_Rule $rule ) {
    method get_between_values (line 347) | protected function get_between_values( Papi_Core_Conditional_Rule $rul...
    method rule_between (line 378) | public function rule_between( Papi_Core_Conditional_Rule $rule ) {
    method rule_not_between (line 395) | public function rule_not_between( Papi_Core_Conditional_Rule $rule ) {
    method rule_exists (line 412) | public function rule_exists( Papi_Core_Conditional_Rule $rule ) {
    method rule_not_exists (line 423) | public function rule_not_exists( Papi_Core_Conditional_Rule $rule ) {
    method rule_empty (line 434) | public function rule_empty( Papi_Core_Conditional_Rule $rule ) {
    method rule_not_empty (line 445) | public function rule_not_empty( Papi_Core_Conditional_Rule $rule ) {
    method setup_filters (line 452) | public function setup_filters() {

FILE: src/core/class-papi-core-conditional.php
  class Papi_Core_Conditional (line 7) | class Papi_Core_Conditional {
    method display (line 27) | public function display( array $rules, $property = null ) {
    method display_by_relation (line 48) | protected function display_by_relation( array $rules ) {
    method get_rule_slug (line 112) | protected function get_rule_slug( $rule, $property ) {
    method prepare_rules (line 142) | public function prepare_rules( array $rules, $property = null ) {

FILE: src/core/class-papi-core-container.php
  class Papi_Core_Container (line 6) | class Papi_Core_Container implements ArrayAccess {
    method bind (line 40) | public function bind( $id, $value = null, $singleton = false ) {
    method call_closure (line 71) | protected function call_closure( $closure, array $parameters = [] ) {
    method exists (line 115) | public function exists( $id ) {
    method get_closure (line 127) | protected function get_closure( $value, $singleton = false ) {
    method get_class_prefix (line 141) | protected function get_class_prefix( $id, $check = true ) {
    method is_singleton (line 164) | public function is_singleton( $id ) {
    method make (line 188) | public function make( $id, array $parameters = [] ) {
    method once (line 208) | public function once( $key, $callback ) {
    method remove (line 226) | public function remove( $id ) {
    method reset (line 234) | public function reset() {
    method singleton (line 246) | public function singleton( $id, $value = null ) {
    method offsetExists (line 259) | public function offsetExists( $id ) {
    method offsetGet (line 272) | public function offsetGet( $id ) {
    method offsetSet (line 284) | public function offsetSet( $id, $value ) {
    method offsetUnset (line 295) | public function offsetUnset( $id ) {

FILE: src/core/class-papi-core-data-handler.php
  class Papi_Core_Data_Handler (line 6) | class Papi_Core_Data_Handler {
    method __construct (line 18) | public function __construct() {
    method decode_property (line 30) | protected function decode_property( $key, $value ) {
    method get_post_data (line 46) | protected function get_post_data( $pattern = '/^papi\_.*/' ) {
    method get_pre_data (line 81) | protected function get_pre_data() {
    method get_pre_deep_keys_value (line 94) | protected function get_pre_deep_keys_value( array $arr ) {
    method prepare_post_data (line 121) | protected function prepare_post_data( $data ) {
    method prepare_properties_data (line 145) | protected function prepare_properties_data( array $data = [], $post_id...
    method santize_data (line 223) | protected function santize_data( $value ) {
    method setup_actions (line 242) | protected function setup_actions() {

FILE: src/core/class-papi-core-data.php
  class Papi_Core_Data (line 3) | class Papi_Core_Data {
    method __construct (line 24) | public function __construct( $type = 'post' ) {
    method delete (line 37) | public function delete( $id, $slug ) {
    method get_function (line 62) | public function get_function( $context = 'get' ) {
    method get (line 85) | public function get( $id, $slug ) {
    method update (line 114) | public function update( $id, $slug, $value ) {
    method update_clear_cache (line 196) | public function update_clear_cache( $id, $value ) {

FILE: src/core/class-papi-core-meta-store.php
  class Papi_Core_Meta_Store (line 6) | abstract class Papi_Core_Meta_Store {
    method get_property_meta_value (line 50) | public function get_property_meta_value( $slug ) {
    method get_type (line 65) | public function get_type() {
    method get_type_class (line 74) | public function get_type_class() {
    method get_value (line 88) | public function get_value( $id = null, $slug = null, $default = null, ...
    method format_value (line 137) | public function format_value( $slug, $value ) {
    method property (line 184) | protected function property( $slug = '' ) {
    method load_value (line 206) | public function load_value( $slug ) {
    method factory (line 265) | public static function factory( $post_id, $type = 'post' ) {
    method get_property (line 292) | abstract public function get_property( $slug, $child_slug = '' );
    method get_property_option (line 303) | public function get_property_option( $slug, $option, $default = null ) {
    method prepare_load_value (line 330) | protected function prepare_load_value( Papi_Core_Property $property, $...
    method prepare_property (line 341) | protected function prepare_property( Papi_Core_Property $property ) {
    method set_property_meta_value (line 353) | public function set_property_meta_value( $slug, $value ) {
    method valid (line 362) | abstract public function valid();

FILE: src/core/class-papi-core-property.php
  class Papi_Core_Property (line 6) | class Papi_Core_Property implements JsonSerializable {
    method __construct (line 120) | public function __construct() {
    method __get (line 133) | public function __get( $key ) {
    method __isset (line 144) | public function __isset( $key ) {
    method __set (line 154) | public function __set( $key, $value ) {
    method current_user_can (line 163) | public function current_user_can() {
    method delete_value (line 176) | public function delete_value( $slug, $post_id, $type ) {
    method disabled (line 185) | public function disabled() {
    method display (line 205) | public function display() {
    method factory (line 217) | public static function factory() {
    method format_value (line 299) | public function format_value( $value, $slug, $post_id ) {
    method get_child_property (line 313) | public function get_child_property( $slug, array $items = [] ) {
    method get_child_properties (line 334) | public function get_child_properties() {
    method get_convert_type (line 345) | public function get_convert_type() {
    method get_default_settings (line 354) | public function get_default_settings() {
    method get_meta_type (line 363) | public function get_meta_type() {
    method get_option (line 377) | public function get_option( $key, $default = null ) {
    method get_options (line 400) | public function get_options() {
    method get_parent_property (line 413) | public function get_parent_property() {
    method get_post_id (line 422) | public function get_post_id() {
    method get_rules (line 439) | public function get_rules() {
    method get_setting (line 451) | public function get_setting( $key, $default = null ) {
    method get_settings (line 470) | public function get_settings() {
    method get_slug (line 481) | public function get_slug( $remove_prefix = false ) {
    method get_store (line 494) | public function get_store() {
    method get_value (line 507) | public function get_value() {
    method html_id (line 519) | public function html_id( $suffix = '', $row = null ) {
    method html_name (line 545) | public function html_name( $sub_property = null, $row = null ) {
    method load_value (line 576) | public function load_value( $value, $slug, $post_id ) {
    method match_slug (line 589) | public function match_slug( $slug ) {
    method prepare_value (line 604) | protected function prepare_value( $value ) {
    method register (line 633) | public function register( $type = 'post' ) {
    method register_meta_sanitize_callback (line 673) | public function register_meta_sanitize_callback( $value ) {
    method rest_prepare_value (line 684) | public function rest_prepare_value( $value ) {
    method render_ajax_request (line 691) | public function render_ajax_request() {
    method render_is_allowed_by_rules (line 703) | public function render_is_allowed_by_rules( array $rules = [] ) {
    method set_store (line 716) | public function set_store( Papi_Core_Meta_Store $store ) {
    method set_post_id (line 725) | public function set_post_id( $post_id ) {
    method set_options (line 738) | public function set_options( $options = [] ) {
    method set_option (line 748) | public function set_option( $key, $value ) {
    method set_setting (line 762) | public function set_setting( $key, $value ) {
    method set_parent_property (line 773) | public function set_parent_property( Papi_Core_Property $parent_proper...
    method setup_actions (line 780) | protected function setup_actions() {
    method setup_filters (line 786) | protected function setup_filters() {
    method setup_properties (line 792) | protected function setup_properties() {
    method setup_options (line 811) | protected function setup_options( $options = [] ) {
    method setup_options_slug (line 861) | protected function setup_options_slug( $options ) {
    method setup_options_settings (line 891) | protected function setup_options_settings( $options ) {
    method update_value (line 910) | public function update_value( $value, $slug, $post_id ) {
    method __toString (line 923) | public function __toString() {
    method jsonSerialize (line 932) | public function jsonSerialize() {

FILE: src/core/class-papi-core-tab.php
  class Papi_Core_Tab (line 3) | class Papi_Core_Tab {
    method __construct (line 75) | public function __construct( array $args = [], array $properties = [] ) {
    method setup_args (line 85) | protected function setup_args( array $args ) {
    method setup_properties (line 102) | protected function setup_properties( array $properties ) {

FILE: src/core/class-papi-core-type.php
  class Papi_Core_Type (line 6) | class Papi_Core_Type {
    method __construct (line 57) | public function __construct( $file_path = '' ) {
    method allowed (line 69) | public function allowed() {
    method boot (line 78) | public function boot() {
    method get_class_name (line 88) | public function get_class_name() {
    method get_file_path (line 97) | public function get_file_path() {
    method get_id (line 106) | public function get_id() {
    method get_meta (line 120) | protected function get_meta() {
    method get_type (line 158) | public function get_type() {
    method has_name (line 167) | public function has_name() {
    method match_id (line 178) | public function match_id( $id ) {
    method new_class (line 187) | public function new_class() {
    method set_id (line 200) | public function set_id( $id ) {
    method setup_actions (line 209) | protected function setup_actions() {
    method setup_file (line 217) | protected function setup_file( $file_path ) {
    method setup_filters (line 227) | protected function setup_filters() {
    method setup_meta_data (line 233) | protected function setup_meta_data() {

FILE: src/lib/core/cache.php
  function papi_cache_delete (line 12) | function papi_cache_delete( $key, $suffix, $type = 'post' ) {
  function papi_cache_get (line 32) | function papi_cache_get( $key, $suffix = '', $type = 'post' ) {
  function papi_cache_key (line 51) | function papi_cache_key( $key, $suffix, $type = 'post' ) {
  function papi_cache_set (line 77) | function papi_cache_set( $key, $suffix, $value, $type = 'post' ) {

FILE: src/lib/core/conditional.php
  function papi_is_rule (line 10) | function papi_is_rule( $rule ) {
  function papi_rule (line 21) | function papi_rule( $rule ) {

FILE: src/lib/core/data.php
  function papi_data_delete (line 12) | function papi_data_delete( $id, $slug, $type = 'post' ) {
  function papi_data_get (line 23) | function papi_data_get( $id, $slug, $type = 'post' ) {
  function papi_data_update (line 37) | function papi_data_update( $id, $slug, $value, $type = 'post' ) {

FILE: src/lib/core/deprecated.php
  function papi_get_page (line 16) | function papi_get_page( $id = 0, $type = 'post' ) {

FILE: src/lib/core/io.php
  function register_papi_directory (line 10) | function register_papi_directory( $directory ) {
  function papi_get_all_files_in_directory (line 47) | function papi_get_all_files_in_directory( $directory = '' ) {
  function papi_get_core_type_file_path (line 79) | function papi_get_core_type_file_path( $file_path ) {
  function papi_get_all_core_type_files (line 105) | function papi_get_all_core_type_files() {
  function papi_get_file_path (line 129) | function papi_get_file_path( $file ) {
  function papi_get_core_type_base_path (line 155) | function papi_get_core_type_base_path( $file ) {

FILE: src/lib/core/meta.php
  function papi_get_meta_id (line 11) | function papi_get_meta_id( $type = null, $id = null ) {
  function papi_get_meta_id_column (line 28) | function papi_get_meta_id_column( $type = 'post' ) {
  function papi_get_meta_store (line 42) | function papi_get_meta_store( $post_id = 0, $type = 'post' ) {
  function papi_get_meta_type (line 54) | function papi_get_meta_type( $type = null ) {

FILE: src/lib/core/post.php
  function papi_get_post_id (line 10) | function papi_get_post_id( $post_id = null ) {
  function papi_get_parent_post_id (line 49) | function papi_get_parent_post_id() {
  function papi_get_post_type (line 60) | function papi_get_post_type( $post_id = null ) {
  function papi_get_post_type_label (line 105) | function papi_get_post_type_label( $post_type, $label, $default = '' ) {

FILE: src/lib/core/property.php
  function papi_from_property_array_slugs (line 11) | function papi_from_property_array_slugs( array $values, $slug ) {
  function papi_is_property (line 41) | function papi_is_property( $value ) {
  function papi_get_options_and_properties (line 54) | function papi_get_options_and_properties( $file_or_options = [], $proper...
  function papi_get_property_class_name (line 133) | function papi_get_property_class_name( $type ) {
  function papi_get_property_type (line 153) | function papi_get_property_type( $type ) {
  function papi_get_property_type_key (line 164) | function papi_get_property_type_key( $str = '' ) {
  function papi_get_property_type_key_f (line 189) | function papi_get_property_type_key_f( $str ) {
  function papi_is_property_type_key (line 200) | function papi_is_property_type_key( $str = '' ) {
  function papi_populate_properties (line 216) | function papi_populate_properties( $properties ) {
  function papi_property (line 257) | function papi_property( $file_or_options, array $values = [] ) {
  function papi_render_property (line 286) | function papi_render_property( $property ) {
  function papi_render_properties (line 301) | function papi_render_properties( array $properties ) {
  function papi_property_require_text (line 332) | function papi_property_require_text( $property ) {
  function papi_property_required_html (line 348) | function papi_property_required_html( $property, $text = false ) {
  function papi_property_from_array_slugs (line 364) | function papi_property_from_array_slugs( array $values, $slug ) {
  function papi_property_to_array_slugs (line 396) | function papi_property_to_array_slugs( array $value, $slug ) {

FILE: src/lib/core/slug.php
  function papi_prefix_slug (line 11) | function papi_prefix_slug( $prefix, $slug ) {
  function papify (line 31) | function papify( $str = '' ) {
  function unpapify (line 50) | function unpapify( $str ) {

FILE: src/lib/core/tabs.php
  function papi_tabs_setup (line 10) | function papi_tabs_setup( array $tabs ) {
  function papi_tab (line 42) | function papi_tab( $file_or_options, $properties = [] ) {

FILE: src/lib/core/taxonomy.php
  function papi_get_term_id (line 10) | function papi_get_term_id( $term_id = null ) {
  function papi_get_taxonomy (line 39) | function papi_get_taxonomy( $term_id = null ) {
  function papi_get_taxonomy_label (line 66) | function papi_get_taxonomy_label( $taxonomy, $label, $default = '' ) {

FILE: src/lib/core/template.php
  function papi_body_class (line 10) | function papi_body_class( array $classes ) {
  function papi_get_template_file_name (line 28) | function papi_get_template_file_name( $template ) {
  function papi_include_template (line 52) | function papi_include_template( $file, array $vars = [] ) {
  function papi_template (line 74) | function papi_template( $file, array $values = [], $convert_to_object = ...
  function papi_template_include (line 115) | function papi_template_include( $original_template ) {

FILE: src/lib/core/url.php
  function papi_get_page_new_url (line 13) | function papi_get_page_new_url( $page_type, $append_admin_url = true, $p...
  function papi_append_post_type_query (line 33) | function papi_append_post_type_query( $url, $post_type_arg = null ) {
  function papi_include_query_strings (line 84) | function papi_include_query_strings( $first_character = '?', array $allo...

FILE: src/lib/core/utilities.php
  function papi_camel_case (line 10) | function papi_camel_case( $str ) {
  function papi_cast_string_value (line 25) | function papi_cast_string_value( $str ) {
  function papi_convert_to_string (line 50) | function papi_convert_to_string( $obj ) {
  function papi_current_user_is_allowed (line 73) | function papi_current_user_is_allowed( $capabilities = [] ) {
  function papi_doing_ajax (line 92) | function papi_doing_ajax() {
  function papi_esc_html (line 104) | function papi_esc_html( $obj, $keys = [] ) {
  function papi_f (line 149) | function papi_f( $str = '', $len = 1 ) {
  function papi_get_class_name (line 174) | function papi_get_class_name( $file ) {
  function papi_get_lang (line 234) | function papi_get_lang() {
  function papi_get_only_objects (line 254) | function papi_get_only_objects( array $arr ) {
  function papi_get_or_post (line 265) | function papi_get_or_post( $key ) {
  function papi_get_qs (line 287) | function papi_get_qs( $qs, $keep_keys = false ) {
  function papi_get_sanitized_post (line 340) | function papi_get_sanitized_post( $key ) {
  function papi_html_name (line 355) | function papi_html_name( $name ) {
  function papi_html_tag (line 381) | function papi_html_tag( $tag, $attr = [] ) {
  function papi_is_admin (line 452) | function papi_is_admin() {
  function papi_is_empty (line 464) | function papi_is_empty( $obj ) {
  function papi_is_json (line 492) | function papi_is_json( $obj ) {
  function papi_maybe_json_decode (line 506) | function papi_maybe_json_decode( $str, $assoc = false ) {
  function papi_maybe_json_encode (line 517) | function papi_maybe_json_encode( $obj ) {
  function papi_maybe_convert_to_array (line 532) | function papi_maybe_convert_to_array( $obj ) {
  function papi_maybe_convert_to_object (line 543) | function papi_maybe_convert_to_object( $obj ) {
  function papi_maybe_get_callable_value (line 555) | function papi_maybe_get_callable_value( $callable, $args = [] ) {
  function papi_nl2br (line 584) | function papi_nl2br( $str ) {
  function papi_render_html_tag (line 596) | function papi_render_html_tag( $tag, $attr = [] ) {
  function papi_santize_data (line 607) | function papi_santize_data( $obj ) {
  function papi_sort_order (line 629) | function papi_sort_order( $array, $key = 'sort_order' ) {
  function papi_slugify (line 683) | function papi_slugify( $str, $replace = [], $delimiter = '-' ) {
  function papi_to_array (line 711) | function papi_to_array( $obj ) {
  function papi_underscorify (line 727) | function papi_underscorify( $str ) {

FILE: src/lib/fields/option.php
  function papi_delete_option (line 10) | function papi_delete_option( $slug ) {
  function papi_get_option (line 22) | function papi_get_option( $slug, $default = null ) {
  function papi_option_shortcode (line 35) | function papi_option_shortcode( $atts ) {
  function papi_update_option (line 61) | function papi_update_option( $slug, $value = null ) {
  function the_papi_option (line 71) | function the_papi_option( $slug = null, $default = null ) {

FILE: src/lib/fields/page.php
  function papi_delete_field (line 12) | function papi_delete_field( $id = null, $slug = null, $type = 'post' ) {
  function papi_field_shortcode (line 62) | function papi_field_shortcode( $atts ) {
  function papi_field_value (line 95) | function papi_field_value( $slugs, $value, $default = null ) {
  function papi_get_field (line 126) | function papi_get_field( $id = null, $slug = null, $default = null, $typ...
  function papi_get_fields (line 172) | function papi_get_fields( $id = 0, $type = 'post' ) {
  function papi_get_slugs (line 227) | function papi_get_slugs( $id = 0, $only_slugs = false, $type = 'post' ) {
  function papi_update_field (line 282) | function papi_update_field( $id = null, $slug = null, $value = null, $ty...
  function the_papi_field (line 329) | function the_papi_field( $id = null, $slug = null, $default = null ) {

FILE: src/lib/fields/taxonomy.php
  function papi_delete_term_field (line 11) | function papi_delete_term_field( $term_id, $slug = '' ) {
  function papi_get_term_field (line 33) | function papi_get_term_field( $term_id = null, $slug = null, $default = ...
  function papi_get_term_fields (line 54) | function papi_get_term_fields( $id = 0 ) {
  function papi_get_term_slugs (line 68) | function papi_get_term_slugs( $id = 0, $only_slugs = false ) {
  function papi_taxonomy_shortcode (line 86) | function papi_taxonomy_shortcode( $atts ) {
  function papi_update_term_field (line 115) | function papi_update_term_field( $term_id = null, $slug = null, $value =...
  function the_papi_term_field (line 140) | function the_papi_term_field( $term_id = null, $slug = null, $default = ...

FILE: src/lib/hooks/filters-page-type.php
  function papi_filter_settings_only_page_type (line 10) | function papi_filter_settings_only_page_type( $post_type ) {
  function papi_filter_settings_show_page_type (line 28) | function papi_filter_settings_show_page_type( $post_type, $page_type ) {
  function papi_filter_settings_standard_page_type_description (line 53) | function papi_filter_settings_standard_page_type_description( $post_type...
  function papi_filter_settings_standard_page_type_name (line 75) | function papi_filter_settings_standard_page_type_name( $post_type ) {
  function papi_filter_settings_show_standard_page_type (line 97) | function papi_filter_settings_show_standard_page_type( $post_type ) {
  function papi_filter_settings_show_standard_page_type_in_filter (line 108) | function papi_filter_settings_show_standard_page_type_in_filter( $post_t...
  function papi_filter_settings_standard_page_type_thumbnail (line 121) | function papi_filter_settings_standard_page_type_thumbnail( $post_type ) {

FILE: src/lib/hooks/filters-taxonomy-type.php
  function papi_filter_settings_only_taxonomy_type (line 10) | function papi_filter_settings_only_taxonomy_type( $taxonomy ) {
  function papi_filter_settings_standard_taxonomy_type_name (line 27) | function papi_filter_settings_standard_taxonomy_type_name( $taxonomy ) {
  function papi_filter_settings_show_standard_taxonomy_type (line 41) | function papi_filter_settings_show_standard_taxonomy_type( $taxonomy ) {

FILE: src/lib/hooks/filters.php
  function papi_filter_conditional_rule_allowed (line 10) | function papi_filter_conditional_rule_allowed( $rule ) {
  function papi_filter_format_value (line 39) | function papi_filter_format_value( $type, $value, $slug, $id, $meta_type...
  function papi_filter_load_value (line 56) | function papi_filter_load_value( $type, $value, $slug, $id, $meta_type =...
  function papi_filter_settings_directories (line 65) | function papi_filter_settings_directories() {
  function papi_filter_settings_sort_order (line 90) | function papi_filter_settings_sort_order() {
  function papi_filter_update_value (line 107) | function papi_filter_update_value( $type, $value, $slug, $id, $meta_type...

FILE: src/lib/types/entry.php
  function papi_get_entry_type_body_classes (line 11) | function papi_get_entry_type_body_classes( $id = 0, $type = null ) {
  function papi_get_entry_type_css_class (line 39) | function papi_get_entry_type_css_class( $id = 0, $type = null ) {
  function papi_get_entry_type_count (line 63) | function papi_get_entry_type_count( $entry_type ) {
  function papi_entry_type_exists (line 98) | function papi_entry_type_exists( $id ) {
  function papi_get_all_entry_types (line 128) | function papi_get_all_entry_types( array $args = [] ) {
  function papi_get_entry_type (line 229) | function papi_get_entry_type( $file_path ) {
  function papi_get_entry_type_by_id (line 281) | function papi_get_entry_type_by_id( $id ) {
  function papi_get_entry_type_by_meta_id (line 327) | function papi_get_entry_type_by_meta_id( $id = 0, $type = null ) {
  function papi_get_entry_type_id (line 352) | function papi_get_entry_type_id( $id = 0, $type = null ) {
  function papi_get_entry_type_template (line 384) | function papi_get_entry_type_template( $id = 0, $type = null ) {
  function papi_is_entry_type (line 443) | function papi_is_entry_type( $str = '' ) {

FILE: src/lib/types/page.php
  function papi_display_page_type (line 10) | function papi_display_page_type( $page_type ) {
  function papi_get_all_page_types (line 60) | function papi_get_all_page_types( $post_type = '' ) {
  function papi_get_page_type_id (line 83) | function papi_get_page_type_id( $post_id = 0 ) {
  function papi_get_page_type_key (line 94) | function papi_get_page_type_key( $suffix = '' ) {
  function papi_get_page_type_name (line 108) | function papi_get_page_type_name( $post_id = 0 ) {
  function papi_get_post_types (line 135) | function papi_get_post_types() {
  function papi_get_standard_page_type (line 153) | function papi_get_standard_page_type( $post_type ) {
  function papi_get_standard_page_type_id (line 178) | function papi_get_standard_page_type_id( $post_type ) {
  function papi_is_page_type (line 190) | function papi_is_page_type( $str = '' ) {
  function papi_load_page_type_id (line 203) | function papi_load_page_type_id( $entry_type_id = '', $type = 'post', $p...
  function papi_set_page_type_id (line 274) | function papi_set_page_type_id( $post_id, $page_type ) {
  function the_papi_page_type_name (line 289) | function the_papi_page_type_name( $post_id = 0 ) {

FILE: src/lib/types/taxonomy.php
  function papi_get_taxonomy_type_id (line 10) | function papi_get_taxonomy_type_id( $term_id = 0 ) {
  function papi_get_taxonomy_type_name (line 21) | function papi_get_taxonomy_type_name( $term_id = 0 ) {
  function papi_load_taxonomy_type_id (line 51) | function papi_load_taxonomy_type_id( $entry_type_id = '', $type = 'term'...
  function papi_get_taxonomies (line 113) | function papi_get_taxonomies() {
  function papi_set_taxonomy_type_id (line 134) | function papi_set_taxonomy_type_id( $term_id, $taxonomy_type ) {
  function the_papi_taxonomy_type_name (line 149) | function the_papi_taxonomy_type_name( $term_id = 0 ) {

FILE: src/papi-loader.php
  class Papi_Loader (line 10) | final class Papi_Loader extends Papi_Core_Container {
    method instance (line 31) | public static function instance() {
    method __call (line 47) | public function __call( $name, $arguments ) {
    method __construct (line 54) | protected function __construct() {
    method __clone (line 74) | public function __clone() {
    method __wakeup (line 83) | public function __wakeup() {
    method constants (line 90) | protected function constants() {
    method define (line 126) | protected function define( $name, $value ) {
    method init (line 135) | protected function init() {
    method load_textdomain (line 159) | protected function load_textdomain() {
    method require_files (line 170) | protected function require_files() {
    method deactivate (line 234) | public static function deactivate() {
    method reset (line 254) | public function reset() {
    method setup_container (line 263) | protected function setup_container() {
  function papi (line 275) | function papi() {

FILE: src/properties/class-papi-property-bool.php
  class Papi_Property_Bool (line 6) | class Papi_Property_Bool extends Papi_Property {
    method format_value (line 32) | public function format_value( $value, $slug, $post_id ) {
    method html (line 45) | public function html() {
    method load_value (line 71) | public function load_value( $value, $slug, $post_id ) {
    method prepare_value (line 82) | protected function prepare_value( $value ) {
    method update_value (line 99) | public function update_value( $value, $slug, $post_id ) {

FILE: src/properties/class-papi-property-checkbox.php
  class Papi_Property_Checkbox (line 7) | class Papi_Property_Checkbox extends Papi_Property {
    method format_value (line 33) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 50) | public function get_default_settings() {
    method html (line 60) | public function html() {

FILE: src/properties/class-papi-property-color.php
  class Papi_Property_Color (line 7) | class Papi_Property_Color extends Papi_Property {
    method get_default_settings (line 14) | public function get_default_settings() {
    method html (line 32) | public function html() {

FILE: src/properties/class-papi-property-datetime.php
  class Papi_Property_Datetime (line 6) | class Papi_Property_Datetime extends Papi_Property {
    method get_default_settings (line 13) | public function get_default_settings() {
    method html (line 28) | public function html() {

FILE: src/properties/class-papi-property-divider.php
  class Papi_Property_Divider (line 6) | class Papi_Property_Divider extends Papi_Property {
    method html (line 18) | public function html() {
    method render_row_html (line 41) | protected function render_row_html() {

FILE: src/properties/class-papi-property-dropdown.php
  class Papi_Property_Dropdown (line 6) | class Papi_Property_Dropdown extends Papi_Property {
    method format_value (line 25) | public function format_value( $value, $slug, $post_id ) {
    method is_string_items (line 44) | public function is_string_items() {
    method get_default_settings (line 61) | public function get_default_settings() {
    method get_items (line 77) | protected function get_items() {
    method html (line 84) | public function html() {
    method load_value (line 174) | public function load_value( $value, $slug, $post_id ) {
    method update_value (line 189) | public function update_value( $value, $slug, $post_id ) {

FILE: src/properties/class-papi-property-editor.php
  class Papi_Property_Editor (line 6) | class Papi_Property_Editor extends Papi_Property {
    method add_mce_buttons (line 11) | protected function add_mce_buttons() {
    method format_value (line 28) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 37) | public function get_default_settings() {
    method mce_buttons (line 56) | public function mce_buttons( array $buttons = [] ) {
    method html (line 67) | public function html() {
    method reove_mce_buttons (line 97) | protected function reove_mce_buttons() {

FILE: src/properties/class-papi-property-email.php
  class Papi_Property_Email (line 6) | class Papi_Property_Email extends Papi_Property_String {

FILE: src/properties/class-papi-property-file.php
  class Papi_Property_File (line 6) | class Papi_Property_File extends Papi_Property {
    method format_value (line 39) | public function format_value( $value, $slug, $post_id ) {
    method get_file (line 111) | public function get_file( $value ) {
    method get_file_value (line 149) | protected function get_file_value( $value ) {
    method get_default_settings (line 172) | public function get_default_settings() {
    method html (line 182) | public function html() {
    method get_labels (line 284) | public function get_labels() {
    method render_file_template (line 294) | public function render_file_template() {
    method update_value (line 324) | public function update_value( $values, $slug, $post_id ) {
    method wp_get_attachment_metadata (line 358) | public function wp_get_attachment_metadata( $data, $post_id ) {
    method is_attachment (line 373) | protected function is_attachment( $id ) {
    method setup_actions (line 380) | protected function setup_actions() {
    method setup_filters (line 387) | protected function setup_filters() {

FILE: src/properties/class-papi-property-flexible.php
  class Papi_Property_Flexible (line 7) | class Papi_Property_Flexible extends Papi_Property_Repeater {
    method delete_value (line 60) | public function delete_value( $slug, $post_id, $type ) {
    method format_value (line 84) | public function format_value( $values, $repeater_slug, $post_id ) {
    method is_layout_key (line 192) | protected function is_layout_key( $key ) {
    method get_json_id (line 204) | protected function get_json_id( $key, $extra = '' ) {
    method get_layout (line 215) | protected function get_layout( $slug ) {
    method get_layout_value (line 234) | protected function get_layout_value( $layout ) {
    method get_results (line 251) | protected function get_results( $value, $repeater_slug, $post_id ) {
    method get_settings_layouts (line 393) | protected function get_settings_layouts() {
    method load_value (line 409) | public function load_value( $value, $repeater_slug, $post_id ) {
    method load_child_properties (line 437) | protected function load_child_properties( array $results, $property = ...
    method prepare_properties (line 502) | protected function prepare_properties( $layouts ) {
    method render_ajax_request (line 543) | public function render_ajax_request() {
    method render_json_template (line 570) | protected function render_json_template( $slug ) {
    method render_layout_input (line 604) | protected function render_layout_input( $value ) {
    method render_properties (line 617) | protected function render_properties( $row, $value ) {
    method render_repeater (line 729) | protected function render_repeater( $options ) {
    method render_repeater_row (line 781) | protected function render_repeater_row() {
    method render_repeater_row_template (line 844) | public function render_repeater_row_template() {
    method setup_actions (line 866) | protected function setup_actions() {
    method valid_layout (line 877) | protected function valid_layout( array $layout ) {

FILE: src/properties/class-papi-property-gallery.php
  class Papi_Property_Gallery (line 6) | class Papi_Property_Gallery extends Papi_Property_Image {
    method get_default_settings (line 27) | public function get_default_settings() {

FILE: src/properties/class-papi-property-group.php
  class Papi_Property_Group (line 6) | class Papi_Property_Group extends Papi_Property_Repeater {
    method format_value (line 18) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 40) | public function get_default_settings() {
    method get_settings_properties (line 51) | protected function get_settings_properties() {
    method html (line 64) | public function html() {
    method prepare_properties (line 85) | protected function prepare_properties( $properties ) {
    method update_value (line 117) | public function update_value( $values, $slug, $post_id ) {

FILE: src/properties/class-papi-property-hidden.php
  class Papi_Property_Hidden (line 6) | class Papi_Property_Hidden extends Papi_Property_String {

FILE: src/properties/class-papi-property-html.php
  class Papi_Property_Html (line 6) | class Papi_Property_Html extends Papi_Property {
    method get_default_settings (line 20) | public function get_default_settings() {
    method html (line 30) | public function html() {

FILE: src/properties/class-papi-property-image.php
  class Papi_Property_Image (line 6) | class Papi_Property_Image extends Papi_Property_File {
    method get_labels (line 20) | public function get_labels() {

FILE: src/properties/class-papi-property-link.php
  class Papi_Property_Link (line 6) | class Papi_Property_Link extends Papi_Property {
    method delete_value (line 43) | public function delete_value( $slug, $post_id, $type ) {
    method format_value (line 70) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 79) | public function get_default_settings() {
    method load_value (line 92) | public function load_value( $value, $slug, $post_id ) {
    method html (line 114) | public function html() {
    method prepare_link_array (line 175) | protected function prepare_link_array( $link, $slug ) {
    method render_link_template (line 213) | public function render_link_template() {
    method update_value (line 261) | public function update_value( $values, $slug, $post_id ) {
    method setup_actions (line 299) | protected function setup_actions() {

FILE: src/properties/class-papi-property-module.php
  class Papi_Property_Module (line 7) | class Papi_Property_Module extends Papi_Property {
    method format_value (line 36) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 73) | public function get_default_settings() {
    method get_post_type (line 93) | protected function get_post_type() {
    method get_posts (line 105) | protected function get_posts( $post_type = null ) {
    method get_templates (line 132) | protected function get_templates( $id ) {
    method html (line 151) | public function html() {
    method render_option_template (line 277) | public function render_option_template() {
    method setup_actions (line 306) | protected function setup_actions() {

FILE: src/properties/class-papi-property-number.php
  class Papi_Property_Number (line 6) | class Papi_Property_Number extends Papi_Property {
    method get_convert_type (line 20) | public function get_convert_type() {
    method format_value (line 36) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 51) | public function get_default_settings() {
    method get_value (line 65) | public function get_value() {
    method html (line 76) | public function html() {

FILE: src/properties/class-papi-property-post.php
  class Papi_Property_Post (line 7) | class Papi_Property_Post extends Papi_Property {
    method format_value (line 26) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 70) | public function get_default_settings() {
    method get_labels (line 94) | protected function get_labels() {
    method get_post_types (line 112) | protected function get_post_types() {
    method get_posts (line 123) | protected function get_posts( $post_type = '' ) {
    method get_post_value (line 180) | protected function get_post_value( $post ) {
    method html (line 210) | public function html() {
    method render_option_template (line 347) | public function render_option_template() {
    method setup_actions (line 385) | protected function setup_actions() {

FILE: src/properties/class-papi-property-radio.php
  class Papi_Property_Radio (line 7) | class Papi_Property_Radio extends Papi_Property {
    method format_value (line 19) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 28) | public function get_default_settings() {
    method html (line 38) | public function html() {

FILE: src/properties/class-papi-property-reference.php
  class Papi_Property_Reference (line 7) | class Papi_Property_Reference extends Papi_Property {
    method get_default_settings (line 14) | public function get_default_settings() {
    method html (line 24) | public function html() {

FILE: src/properties/class-papi-property-relationship.php
  class Papi_Property_Relationship (line 7) | class Papi_Property_Relationship extends Papi_Property {
    method convert_post_to_item (line 30) | protected function convert_post_to_item( WP_Post $post ) {
    method format_value (line 47) | public function format_value( $values, $slug, $post_id ) {
    method get_default_settings (line 135) | public function get_default_settings() {
    method get_sort_option (line 156) | public function get_sort_option( $post_id ) {
    method get_sort_options (line 170) | public static function get_sort_options() {
    method get_items (line 227) | protected function get_items( $settings ) {
    method get_post_value (line 267) | protected function get_post_value( $value ) {
    method html (line 288) | public function html() {
    method load_value (line 394) | public function load_value( $values, $slug, $post_id ) {
    method sort_value (line 408) | public function sort_value( $values, $slug, $post_id ) {
    method update_value (line 430) | public function update_value( $values, $slug, $post_id ) {

FILE: src/properties/class-papi-property-repeater.php
  class Papi_Property_Repeater (line 6) | class Papi_Property_Repeater extends Papi_Property {
    method delete_value (line 45) | public function delete_value( $slug, $post_id, $type ) {
    method format_value (line 69) | public function format_value( $values, $repeater_slug, $post_id ) {
    method get_child_slug (line 176) | protected function get_child_slug( $repeater_slug, $child_slug ) {
    method get_default_settings (line 185) | public function get_default_settings() {
    method get_results (line 204) | protected function get_results( $value, $repeater_slug, $post_id ) {
    method get_row_results (line 311) | protected function get_row_results( $dbresults ) {
    method get_settings_properties (line 349) | protected function get_settings_properties() {
    method html (line 362) | public function html() {
    method layout (line 387) | protected function layout( $layout ) {
    method load_value (line 401) | public function load_value( $value, $repeater_slug, $post_id ) {
    method load_child_properties (line 428) | protected function load_child_properties( array $results, $property = ...
    method prepare_properties (line 461) | protected function prepare_properties( $items ) {
    method prepare_property_for_json (line 489) | protected function prepare_property_for_json( $property ) {
    method remove_repeater_rows (line 520) | protected function remove_repeater_rows( $post_id, $repeater_slug ) {
    method render_ajax_request (line 566) | public function render_ajax_request() {
    method render_json_template (line 582) | protected function render_json_template( $slug ) {
    method render_properties (line 611) | protected function render_properties( $row, $value ) {
    method render_repeater (line 678) | protected function render_repeater( $options ) {
    method render_repeater_head (line 710) | protected function render_repeater_head() {
    method render_repeater_rows (line 738) | protected function render_repeater_rows() {
    method render_repeater_rows_template (line 788) | public function render_repeater_rows_template() {
    method setup_actions (line 810) | protected function setup_actions() {
    method update_value (line 823) | public function update_value( $values, $repeater_slug, $post_id ) {

FILE: src/properties/class-papi-property-sidebar.php
  class Papi_Property_Sidebar (line 6) | class Papi_Property_Sidebar extends Papi_Property_Dropdown {
    method format_value (line 25) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 43) | public function get_default_settings() {
    method get_items (line 57) | public function get_items() {

FILE: src/properties/class-papi-property-string.php
  class Papi_Property_String (line 6) | class Papi_Property_String extends Papi_Property {
    method format_value (line 25) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 44) | public function get_default_settings() {
    method get_value (line 56) | public function get_value() {
    method html (line 69) | public function html() {

FILE: src/properties/class-papi-property-table.php
  class Papi_Property_Table (line 3) | class Papi_Property_Table extends Papi_Property {
    method build_table (line 20) | protected function build_table( array $arr, $child = false ) {
    method get_default_settings (line 66) | public function get_default_settings() {
    method html (line 76) | public function html() {

FILE: src/properties/class-papi-property-term.php
  class Papi_Property_Term (line 6) | class Papi_Property_Term extends Papi_Property {
    method format_value (line 24) | public function format_value( $value, $slug, $term_id ) {
    method get_default_settings (line 75) | public function get_default_settings() {
    method get_labels (line 97) | protected function get_labels() {
    method get_taxonomies (line 115) | protected function get_taxonomies() {
    method get_terms (line 126) | protected function get_terms( $taxonomy ) {
    method get_term_value (line 148) | protected function get_term_value( $term ) {
    method html (line 175) | public function html() {

FILE: src/properties/class-papi-property-text.php
  class Papi_Property_Text (line 6) | class Papi_Property_Text extends Papi_Property {
    method format_value (line 18) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 41) | public function get_default_settings() {
    method get_value (line 53) | public function get_value() {
    method html (line 66) | public function html() {

FILE: src/properties/class-papi-property-url.php
  class Papi_Property_Url (line 6) | class Papi_Property_Url extends Papi_Property {
    method get_default_settings (line 13) | public function get_default_settings() {
    method html (line 22) | public function html() {
    method load_value (line 56) | public function load_value( $value, $slug, $post_id ) {
    method update_value (line 71) | public function update_value( $value, $slug, $post_id ) {

FILE: src/properties/class-papi-property-user.php
  class Papi_Property_User (line 6) | class Papi_Property_User extends Papi_Property_Dropdown {
    method format_value (line 25) | public function format_value( $value, $slug, $post_id ) {
    method get_default_settings (line 42) | public function get_default_settings() {
    method get_value (line 56) | public function get_value() {
    method get_items (line 71) | public function get_items() {
    method load_value (line 98) | public function load_value( $value, $slug, $post_id ) {
    method update_value (line 111) | public function update_value( $value, $slug, $post_id ) {

FILE: src/properties/class-papi-property.php
  class Papi_Property (line 7) | class Papi_Property extends Papi_Core_Property {
    method get_value (line 14) | public function get_value() {
    method html (line 42) | public function html() {
    method can_render (line 50) | public function can_render() {
    method render (line 73) | public function render() {
    method render_ajax_request (line 91) | public function render_ajax_request() {
    method render_description_html (line 98) | protected function render_description_html() {
    method render_hidden_html (line 111) | protected function render_hidden_html() {
    method render_label_html (line 137) | protected function render_label_html() {
    method render_property_html (line 151) | protected function render_property_html() {
    method render_row_html (line 170) | protected function render_row_html() {
    method render_rules_json (line 214) | protected function render_rules_json() {

FILE: src/query/class-papi-query.php
  class Papi_Query (line 3) | class Papi_Query {
    method __construct (line 41) | public function __construct( array $args = [], $type = 'post' ) {
    method __get (line 54) | public function __get( $key ) {
    method first (line 69) | public function first() {
    method parse_args (line 80) | public function parse_args( array $args ) {
    method parse_post_args (line 101) | protected function parse_post_args( array $args ) {
    method parse_term_args (line 126) | protected function parse_term_args( array $args ) {
    method get_query_class (line 149) | public function get_query_class() {
    method get_query_args (line 171) | public function get_query_args() {
    method get_result (line 242) | public function get_result() {
    method last (line 257) | public function last() {

FILE: src/rest-api/class-papi-rest-api-post.php
  class Papi_REST_API_Post (line 3) | class Papi_REST_API_Post {
    method __construct (line 8) | public function __construct() {
    method get_page_type (line 22) | public function get_page_type( array $data, $field_name, $request ) {
    method get_post (line 39) | public function get_post( WP_Post $post ) {
    method prepare_response (line 62) | public function prepare_response( $response ) {
    method setup_fields (line 77) | public function setup_fields() {

FILE: src/rest-api/class-papi-rest-api-settings.php
  class Papi_REST_API_Settings (line 3) | class Papi_REST_API_Settings {
    method __construct (line 15) | public function __construct() {
    method register (line 24) | public function register() {
    method pre_get_setting (line 47) | public function pre_get_setting( $value ) {
    method get_setting (line 64) | public function get_setting( $key, $value ) {
    method prepare_response (line 89) | public function prepare_response( $response ) {

FILE: src/rest-api/class-papi-rest-api.php
  class Papi_REST_API (line 3) | final class Papi_REST_API {
    method __construct (line 8) | public function __construct() {
    method load_files (line 16) | protected function load_files() {
    method register_routes (line 24) | public function register_routes() {
    method rest_api_init (line 30) | public function rest_api_init() {
    method setup_actions (line 37) | protected function setup_actions() {

FILE: src/stores/class-papi-option-store.php
  class Papi_Option_Store (line 6) | class Papi_Option_Store extends Papi_Core_Meta_Store {
    method __construct (line 20) | public function __construct( $id = 0 ) {
    method get_property (line 33) | public function get_property( $slug, $child_slug = '' ) {
    method valid (line 71) | public function valid() {

FILE: src/stores/class-papi-post-store.php
  class Papi_Post_Store (line 6) | class Papi_Post_Store extends Papi_Core_Meta_Store {
    method __construct (line 27) | public function __construct( $id = 0 ) {
    method get_permalink (line 39) | public function get_permalink() {
    method get_post (line 48) | public function get_post() {
    method get_status (line 57) | public function get_status() {
    method get_property (line 69) | public function get_property( $slug, $child_slug = '' ) {
    method prepare_load_value (line 90) | protected function prepare_load_value( Papi_Core_Property $property, $...
    method valid (line 109) | public function valid() {

FILE: src/stores/class-papi-term-store.php
  class Papi_Term_Store (line 6) | class Papi_Term_Store extends Papi_Core_Meta_Store {
    method __construct (line 27) | public function __construct( $id = 0 ) {
    method get_permalink (line 39) | public function get_permalink() {
    method get_term (line 48) | public function get_term() {
    method valid (line 57) | public function valid() {
    method get_property (line 69) | public function get_property( $slug, $child_slug = '' ) {

FILE: src/types/class-papi-attachment-type.php
  class Papi_Attachment_Type (line 8) | class Papi_Attachment_Type extends Papi_Page_Type {
    method get_post_type (line 29) | public function get_post_type() {
    method setup_filters (line 36) | protected function setup_filters() {
    method edit_attachment (line 52) | public function edit_attachment( $form_fields, $post ) {
    method save_attachment (line 102) | public function save_attachment( $post ) {
    method singleton (line 116) | public function singleton() {

FILE: src/types/class-papi-entry-type.php
  class Papi_Entry_Type (line 7) | class Papi_Entry_Type extends Papi_Core_Type {
    method add_help_tabs (line 54) | public function add_help_tabs() {
    method body_classes (line 102) | public function body_classes() {
    method box (line 112) | protected function box( $file_or_options = [], $properties = [] ) {
    method call_parent_register (line 145) | protected function call_parent_register() {
    method convert_properties (line 171) | protected function convert_properties( $properties ) {
    method fields (line 205) | public function fields( $fields ) {
    method get_body_classes (line 216) | public function get_body_classes() {
    method get_boxes (line 229) | public function get_boxes() {
    method get_labels (line 290) | public function get_labels() {
    method get_menu (line 299) | public function get_menu() {
    method get_property (line 311) | public function get_property( $slug, $child_slug = '' ) {
    method get_properties (line 372) | public function get_properties() {
    method help (line 393) | public function help() {
    method help_sidebar (line 405) | public function help_sidebar() {
    method merge_boxes (line 416) | protected function merge_boxes( array $boxes ) {
    method property (line 443) | protected function property( $file_or_options = [], $values = [] ) {
    method singleton (line 452) | public function singleton() {
    method setup (line 459) | public function setup() {
    method tab (line 486) | protected function tab( $file_or_options = [], $properties = [] ) {
    method template (line 502) | protected function template( $file, $values = [] ) {

FILE: src/types/class-papi-front-page-type.php
  class Papi_Front_Page_Type (line 3) | class Papi_Front_Page_Type extends Papi_Page_Type {

FILE: src/types/class-papi-module-type.php
  class Papi_Module_Type (line 7) | class Papi_Module_Type extends Papi_Page_Type {

FILE: src/types/class-papi-option-type.php
  class Papi_Option_Type (line 8) | class Papi_Option_Type extends Papi_Entry_Type {
    method render (line 41) | public function render() {

FILE: src/types/class-papi-page-type.php
  class Papi_Page_Type (line 7) | class Papi_Page_Type extends Papi_Entry_Type {
    method __construct (line 124) | public function __construct( $file_path = '' ) {
    method allowed (line 135) | public function allowed() {
    method display (line 152) | public function display( $post_type ) {
    method get_body_classes (line 161) | public function get_body_classes() {
    method get_child_types (line 180) | public function get_child_types() {
    method get_labels (line 200) | public function get_labels() {
    method get_post_type (line 217) | public function get_post_type() {
    method get_post_type_supports (line 226) | protected function get_post_type_supports() {
    method get_thumbnail (line 259) | public function get_thumbnail() {
    method has_post_type (line 274) | public function has_post_type( $post_type ) {
    method remove_post_type_support (line 281) | public function remove_post_type_support() {
    method remove_meta_boxes (line 318) | public function remove_meta_boxes() {
    method setup (line 377) | public function setup() {
    method setup_post_types (line 404) | protected function setup_post_types() {
    method setup_page_templates (line 422) | protected function setup_page_templates() {

FILE: src/types/class-papi-taxonomy-type.php
  class Papi_Taxonomy_Type (line 6) | class Papi_Taxonomy_Type extends Papi_Entry_Type {
    method allowed (line 48) | public function allowed() {
    method display (line 65) | public function display( $taxonomy ) {
    method get_labels (line 75) | public function get_labels() {
    method setup_actions (line 90) | protected function setup_actions() {
    method edit_form (line 101) | public function edit_form() {
    method setup_meta_data (line 125) | protected function setup_meta_data() {

FILE: tests/cases/admin/class-papi-admin-ajax-test.php
  class Papi_Admin_Ajax_Test (line 6) | class Papi_Admin_Ajax_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 16) | public function tearDown() {
    method wp_die_handler (line 22) | public function wp_die_handler( $message ) {
    method test_actions (line 25) | public function test_actions() {
    method test_endpoint (line 33) | public function test_endpoint() {
    method test_handle_papi_ajax_doing_ajax (line 51) | public function test_handle_papi_ajax_doing_ajax() {
    method test_handle_papi_ajax_action (line 55) | public function test_handle_papi_ajax_action() {
    method test_handle_papi_ajax (line 72) | public function test_handle_papi_ajax() {
    method test_get_entry_type_fail (line 77) | public function test_get_entry_type_fail() {
    method test_get_entry_type_success (line 91) | public function test_get_entry_type_success() {
    method test_get_posts (line 109) | public function test_get_posts() {
    method test_get_posts_fields (line 122) | public function test_get_posts_fields() {
    method test_get_posts_fake_post_type (line 139) | public function test_get_posts_fake_post_type() {
    method test_get_property (line 156) | public function test_get_property() {
    method test_get_property_fail (line 172) | public function test_get_property_fail() {
    method test_get_properties (line 188) | public function test_get_properties() {
    method test_get_properties_fail (line 215) | public function test_get_properties_fail() {
    method test_get_properties_fail_2 (line 235) | public function test_get_properties_fail_2() {
    method test_get_properties_fail_3 (line 248) | public function test_get_properties_fail_3() {
    method test_get_rules_result_success (line 263) | public function test_get_rules_result_success() {
    method test_get_rules_result_success_2 (line 292) | public function test_get_rules_result_success_2() {
    method test_get_rules_result_success_3 (line 320) | public function test_get_rules_result_success_3() {
    method test_get_rules_result_fail (line 353) | public function test_get_rules_result_fail() {
    method test_get_rules_result_fail_2 (line 364) | public function test_get_rules_result_fail_2() {
    method test_get_rules_result_fail_3 (line 375) | public function test_get_rules_result_fail_3() {
    method test_get_rules_result_fail_4 (line 387) | public function test_get_rules_result_fail_4() {
    method test_get_rules_result_fail_5 (line 412) | public function test_get_rules_result_fail_5() {
    method test_get_rules_result_fail_6 (line 435) | public function test_get_rules_result_fail_6() {
    method test_get_rules_result_fail_7 (line 468) | public function test_get_rules_result_fail_7() {
    method test_get_rules_result_fail_8 (line 501) | public function test_get_rules_result_fail_8() {
    method test_get_shortcode_fail (line 534) | public function test_get_shortcode_fail() {
    method test_get_shortcode_success (line 546) | public function test_get_shortcode_success() {
    method test_get_terms (line 562) | public function test_get_terms() {
    method test_render_error (line 588) | public function test_render_error() {

FILE: tests/cases/admin/class-papi-admin-assets-test.php
  class Papi_Admin_Assets_Test (line 6) | class Papi_Admin_Assets_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 13) | public function tearDown() {
    method test_actions (line 18) | public function test_actions() {
    method test_enqueue_css (line 32) | public function test_enqueue_css() {
    method test_enqueue_js (line 36) | public function test_enqueue_js() {
    method test_enqueue_locale (line 43) | public function test_enqueue_locale() {

FILE: tests/cases/admin/class-papi-admin-columns-test.php
  class Papi_Admin_Columns_Test (line 6) | class Papi_Admin_Columns_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 19) | public function tearDown() {
    method test_manage_page_type_posts_columns (line 24) | public function test_manage_page_type_posts_columns() {
    method test_manage_page_type_posts_columns_hide_filter (line 36) | public function test_manage_page_type_posts_columns_hide_filter() {
    method test_manage_page_type_sortable_columns (line 45) | public function test_manage_page_type_sortable_columns() {
    method test_manage_page_type_posts_columns_title_filter (line 52) | public function test_manage_page_type_posts_columns_title_filter() {
    method test_manage_page_type_posts_custom_column_standard (line 67) | public function test_manage_page_type_posts_custom_column_standard() {
    method test_manage_page_type_posts_custom_column_empty (line 75) | public function test_manage_page_type_posts_custom_column_empty() {
    method test_manage_page_type_posts_custom_column_auto (line 83) | public function test_manage_page_type_posts_custom_column_auto() {
    method test_manage_page_type_posts_custom_column_fake (line 92) | public function test_manage_page_type_posts_custom_column_fake() {
    method test_manage_taxonomy_posts_custom_column_empty (line 101) | public function test_manage_taxonomy_posts_custom_column_empty() {
    method test_manage_page_type_posts_custom_column_hide_filter (line 109) | public function test_manage_page_type_posts_custom_column_hide_filter() {
    method test_pre_get_posts (line 120) | public function test_pre_get_posts() {
    method test_restrict_page_types (line 151) | public function test_restrict_page_types() {
    method test_restrict_page_types_2 (line 159) | public function test_restrict_page_types_2() {
    method test_setup_actions (line 168) | public function test_setup_actions() {
    method test_setup_filters (line 175) | public function test_setup_filters() {

FILE: tests/cases/admin/class-papi-admin-entry-post-test.php
  class Papi_Admin_Entry_Post_Test (line 6) | class Papi_Admin_Entry_Post_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 19) | public function tearDown() {
    method test_hidden_meta_boxes (line 25) | public function test_hidden_meta_boxes() {
    method test_hidden_meta_boxes_2 (line 33) | public function test_hidden_meta_boxes_2() {
    method test_hidden_meta_box_editor (line 41) | public function test_hidden_meta_box_editor() {
    method test_load_post_new (line 46) | public function test_load_post_new() {
    method test_load_post_new_2 (line 53) | public function test_load_post_new_2() {
    method test_load_post_new_3 (line 66) | public function test_load_post_new_3() {
    method test_load_post_new_4 (line 83) | public function test_load_post_new_4() {
    method test_setup_actions (line 98) | public function test_setup_actions() {

FILE: tests/cases/admin/class-papi-admin-entry-taxonomy-test.php
  class Papi_Admin_Entry_Taxonomy_Test (line 6) | class Papi_Admin_Entry_Taxonomy_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 13) | public function tearDown() {
    method test_add_form_fields_empty (line 19) | public function test_add_form_fields_empty() {
    method test_add_form_fields_single (line 25) | public function test_add_form_fields_single() {
    method test_add_form_fields_single_plus_standard (line 38) | public function test_add_form_fields_single_plus_standard() {
    method test_add_form_fields_several (line 53) | public function test_add_form_fields_several() {
    method test_setup_actions (line 66) | public function test_setup_actions() {

FILE: tests/cases/admin/class-papi-admin-menu-test.php
  class Papi_Admin_Menu_Test (line 6) | class Papi_Admin_Menu_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 22) | public function tearDown() {
    method test_admin_bar_menu (line 27) | public function test_admin_bar_menu() {
    method test_admin_bar_menu_taxonomy (line 51) | public function test_admin_bar_menu_taxonomy() {
    method test_admin_bar_menu_2 (line 73) | public function test_admin_bar_menu_2() {
    method test_page_items_menu (line 87) | public function test_page_items_menu() {
    method test_post_types_menu (line 91) | public function test_post_types_menu() {
    method test_post_types_menu_2 (line 124) | public function test_post_types_menu_2() {
    method test_post_types_menu_hidden_2 (line 180) | public function test_post_types_menu_hidden_2() {
    method test_render_view (line 194) | public function test_render_view() {
    method test_setup_actions_admin (line 204) | public function test_setup_actions_admin() {
    method test_setup_actions (line 220) | public function test_setup_actions() {

FILE: tests/cases/admin/class-papi-admin-meta-box-tabs-test.php
  class Papi_Admin_Meta_Box_Tabs_Test (line 6) | class Papi_Admin_Meta_Box_Tabs_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 22) | public function tearDown() {
    method test_construct (line 27) | public function test_construct() {
    method test_papi_admin_meta_box_tab_class (line 32) | public function test_papi_admin_meta_box_tab_class() {
    method test_render (line 45) | public function test_render() {
    method test_tabs (line 50) | public function test_tabs() {

FILE: tests/cases/admin/class-papi-admin-meta-box-test.php
  class Papi_Admin_Meta_Box_Test (line 6) | class Papi_Admin_Meta_Box_Test extends WP_UnitTestCase {
    method test_add_property (line 8) | public function test_add_property() {
    method test_after_title (line 23) | public function test_after_title() {
    method test_admin_meta_box_construct (line 40) | public function test_admin_meta_box_construct() {
    method test_admin_meta_box_hidden_box (line 51) | public function test_admin_meta_box_hidden_box() {
    method test_admin_meta_box_capabilities (line 70) | public function test_admin_meta_box_capabilities() {
    method test_move_meta_box_after_title (line 79) | public function test_move_meta_box_after_title() {
    method test_meta_box_css_classes (line 95) | public function test_meta_box_css_classes() {
    method test_render_meta_box (line 101) | public function test_render_meta_box() {
    method test_required (line 121) | public function test_required() {

FILE: tests/cases/admin/class-papi-admin-meta-handler-test.php
  class Papi_Admin_Meta_Handler_Test (line 6) | class Papi_Admin_Meta_Handler_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 31) | public function tearDown() {
    method test_actions (line 45) | public function test_actions() {
    method test_save_meta_boxes (line 51) | public function test_save_meta_boxes() {
    method test_save_meta_boxes_2 (line 72) | public function test_save_meta_boxes_2() {
    method test_save_meta_boxes_3 (line 93) | public function test_save_meta_boxes_3() {
    method test_save_meta_boxes_4 (line 119) | public function test_save_meta_boxes_4() {
    method test_save_meta_boxes_5 (line 144) | public function test_save_meta_boxes_5() {
    method test_save_meta_boxes_apostrophe (line 169) | public function test_save_meta_boxes_apostrophe() {
    method test_save_meta_boxes_fail_1 (line 193) | public function test_save_meta_boxes_fail_1() {
    method test_save_meta_boxes_fail_2 (line 217) | public function test_save_meta_boxes_fail_2() {
    method test_save_meta_boxes_fail_3 (line 240) | public function test_save_meta_boxes_fail_3() {
    method test_save_meta_boxes_fail_4 (line 261) | public function test_save_meta_boxes_fail_4() {
    method test_save_properties (line 282) | public function test_save_properties() {
    method test_pre_data (line 310) | public function test_pre_data() {
    method test_overwrite (line 328) | public function test_overwrite() {
    method test_save_meta_boxes_taxonomy (line 350) | public function test_save_meta_boxes_taxonomy() {
    method test_save_meta_boxes_taxonomy_fail_1 (line 375) | public function test_save_meta_boxes_taxonomy_fail_1() {
    method test_save_meta_boxes_taxonomy_fail_2 (line 400) | public function test_save_meta_boxes_taxonomy_fail_2() {
    method test_save_meta_boxes_taxonomy_fail_3 (line 424) | public function test_save_meta_boxes_taxonomy_fail_3() {
    method test_restore_post_revision (line 446) | public function test_restore_post_revision() {
    method test_save_revision (line 476) | public function test_save_revision() {

FILE: tests/cases/admin/class-papi-admin-option-handler-test.php
  class Papi_Admin_Option_Handler_Test (line 6) | class Papi_Admin_Option_Handler_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 21) | public function tearDown() {
    method test_actions (line 35) | public function test_actions() {
    method test_save_options_without_nonce (line 40) | public function test_save_options_without_nonce() {
    method test_save_options_with_nonce (line 55) | public function test_save_options_with_nonce() {
    method test_save_properties_fail (line 72) | public function test_save_properties_fail() {

FILE: tests/cases/admin/class-papi-admin-page-type-switcher.php
  class Papi_Admin_Page_Type_Switcher_Test (line 6) | class Papi_Admin_Page_Type_Switcher_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 16) | public function tearDown() {
    method test_admin_init (line 24) | public function test_admin_init() {
    method test_metabox_1 (line 31) | public function test_metabox_1() {
    method test_metabox_2 (line 37) | public function test_metabox_2() {
    method test_save_post (line 49) | public function test_save_post() {
    method test_save_post_standard_type (line 118) | public function test_save_post_standard_type() {
    method test_save_post_revision (line 185) | public function test_save_post_revision() {
    method test_save_post_autosave (line 206) | public function test_save_post_autosave() {

FILE: tests/cases/admin/class-papi-admin-test.php
  class Papi_Admin_Test (line 6) | class Papi_Admin_Test extends WP_UnitTestCase {
    method setUp (line 18) | public function setUp() {
    method tearDown (line 30) | public function tearDown() {
    method register_template_paths (line 35) | public function register_template_paths( $new_templates ) {
    method test_admin_body_class (line 50) | public function test_admin_body_class() {
    method test_admin_body_class_with_entry_type_body_classes (line 60) | public function test_admin_body_class_with_entry_type_body_classes() {
    method test_admin_init (line 70) | public function test_admin_init() {
    method test_edit_form_after_title (line 81) | public function test_edit_form_after_title() {
    method test_edit_form_after_title_2 (line 86) | public function test_edit_form_after_title_2() {
    method test_plugin_row_meta (line 92) | public function test_plugin_row_meta() {
    method test_setup_actions (line 101) | public function test_setup_actions() {
    method test_setup_filters (line 119) | public function test_setup_filters() {
    method test_update_front_page (line 130) | public function test_update_front_page() {
    method test_wp_link_query (line 140) | public function test_wp_link_query() {
    method test_wp_refresh_nonces (line 167) | public function test_wp_refresh_nonces() {

FILE: tests/cases/admin/class-papi-admin-view-test.php
  class Papi_Admin_View_Test (line 6) | class Papi_Admin_View_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 12) | public function tearDown() {
    method test_exists (line 16) | public function test_exists() {
    method test_render (line 21) | public function test_render() {

FILE: tests/cases/core/class-papi-conditional-rules-test.php
  class Papi_Core_Conditional_Rules_Test (line 6) | class Papi_Core_Conditional_Rules_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 23) | public function tearDown() {
    method save_properties (line 31) | private function save_properties( $property ) {
    method test_rule_equal_option (line 43) | public function test_rule_equal_option() {
    method test_rule_equal (line 80) | public function test_rule_equal() {
    method test_rule_equal_bool_true (line 123) | public function test_rule_equal_bool_true() {
    method test_rule_equal_bool_false (line 141) | public function test_rule_equal_bool_false() {
    method test_rule_not_equal (line 159) | public function test_rule_not_equal() {
    method test_rule_not_equal_bool_true (line 186) | public function test_rule_not_equal_bool_true() {
    method test_rule_not_equal_bool_false (line 204) | public function test_rule_not_equal_bool_false() {
    method test_rule_greater_then (line 222) | public function test_rule_greater_then() {
    method test_rule_greater_then_or_equal (line 282) | public function test_rule_greater_then_or_equal() {
    method test_rule_less_then (line 334) | public function test_rule_less_then() {
    method test_rule_less_then_or_equal (line 378) | public function test_rule_less_then_or_equal() {
    method test_rule_in (line 422) | public function test_rule_in() {
    method test_rule_not_in (line 457) | public function test_rule_not_in() {
    method test_rule_like (line 508) | public function test_rule_like() {
    method test_rule_between (line 560) | public function test_rule_between() {
    method test_rule_not_between (line 619) | public function test_rule_not_between() {
    method test_rule_exists (line 686) | public function test_rule_exists() {
    method test_rule_not_exists (line 711) | public function test_rule_not_exists() {
    method test_rule_empty (line 736) | public function test_rule_empty() {
    method test_rule_not_empty (line 761) | public function test_rule_not_empty() {
    method test_setup_filters (line 786) | public function test_setup_filters() {

FILE: tests/cases/core/class-papi-core-box-test.php
  class Papi_Core_Box_Test (line 6) | class Papi_Core_Box_Test extends WP_UnitTestCase {
    method test_get_option_null (line 8) | public function test_get_option_null() {
    method test_option_value (line 13) | public function test_option_value() {
    method test_options (line 19) | public function test_options() {
    method test_excluded_options (line 27) | public function test_excluded_options() {

FILE: tests/cases/core/class-papi-core-conditional-rule-test.php
  class Papi_Core_Conditional_Rule_Test (line 6) | class Papi_Core_Conditional_Rule_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 18) | public function tearDown() {
    method test_operator (line 23) | public function test_operator() {
    method test_slug (line 27) | public function test_slug() {
    method test_source (line 31) | public function test_source() {
    method test_source_callable_failied (line 35) | public function test_source_callable_failied() {
    method test_source_callable (line 58) | public function test_source_callable() {
    method test_source_closure (line 88) | public function test_source_closure() {
    method source_callable (line 103) | public function source_callable( $slug ) {
    method test_value (line 111) | public function test_value() {
  function source_callable (line 116) | function source_callable( $slug ) {

FILE: tests/cases/core/class-papi-core-conditional-test.php
  class Papi_Core_Conditional_Test (line 6) | class Papi_Core_Conditional_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 14) | public function tearDown() {
    method test_failed_display (line 19) | public function test_failed_display() {
    method test_success_display (line 67) | public function test_success_display() {
    method test_custom_display (line 95) | public function test_custom_display() {
    method test_display_with_simple_slug (line 132) | public function test_display_with_simple_slug() {
    method test_display_with_array_slug (line 189) | public function test_display_with_array_slug() {

FILE: tests/cases/core/class-papi-core-container-test.php
  class Papi_Core_Container_Test (line 3) | class Papi_Core_Container_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 10) | public function tearDown() {
    method test_make_not_defined (line 15) | public function test_make_not_defined() {
    method test_bind (line 20) | public function test_bind() {
    method test_closure (line 25) | public function test_closure() {
    method test_closure_injection (line 37) | public function test_closure_injection() {
    method test_exists (line 57) | public function test_exists() {
    method test_once (line 62) | public function test_once() {
    method test_remove (line 79) | public function test_remove() {
    method test_reset (line 85) | public function test_reset() {
    method test_singleton (line 93) | public function test_singleton() {
    method test_offset_exists (line 119) | public function test_offset_exists() {
    method test_offset_get (line 124) | public function test_offset_get() {
    method test_offset_set (line 129) | public function test_offset_set() {
    method test_offset_unset (line 134) | public function test_offset_unset() {

FILE: tests/cases/core/class-papi-core-data-test.php
  class Papi_Core_Data_Test (line 6) | class Papi_Core_Data_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 15) | public function tearDown() {
    method test_delete (line 21) | public function test_delete() {
    method test_delete_option (line 33) | public function test_delete_option() {
    method test_get (line 45) | public function test_get() {
    method test_get_option (line 54) | public function test_get_option() {
    method test_get_term (line 63) | public function test_get_term() {
    method test_update (line 72) | public function test_update() {

FILE: tests/cases/core/class-papi-core-property-test.php
  class Papi_Core_Property_Test (line 6) | class Papi_Core_Property_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 19) | public function tearDown() {
    method test_converter (line 24) | public function test_converter() {
    method test_current_user_can (line 135) | public function test_current_user_can() {
    method test_default_options (line 152) | public function test_default_options() {
    method test_disabled (line 183) | public function test_disabled() {
    method test_display (line 204) | public function test_display() {
    method test_factory (line 214) | public function test_factory() {
    method test_factory_fake (line 225) | public function test_factory_fake() {
    method test_factory_bad_value (line 232) | public function test_factory_bad_value() {
    method test_factory_property (line 237) | public function test_factory_property() {
    method test_factory_slug (line 245) | public function test_factory_slug() {
    method test_factory_slug_empty (line 255) | public function test_factory_slug_empty() {
    method test_factory_slug_false (line 264) | public function test_factory_slug_false() {
    method test_format_value (line 277) | public function test_format_value() {
    method test_get_child_property_fail (line 288) | public function test_get_child_property_fail() {
    method test_get_child_property_success (line 297) | public function test_get_child_property_success() {
    method test_get_convert_type (line 318) | public function test_get_convert_type() {
    method test_get_default_settings (line 324) | public function test_get_default_settings() {
    method test_get_default_value_fail (line 330) | public function test_get_default_value_fail() {
    method test_get_default_value_success (line 346) | public function test_get_default_value_success() {
    method test_get_meta_type (line 360) | public function test_get_meta_type() {
    method test_get_option (line 365) | public function test_get_option() {
    method test_get_options (line 393) | public function test_get_options() {
    method test_get_store (line 404) | public function test_get_store() {
    method test_get_post_id (line 409) | public function test_get_post_id() {
    method test_get_setting (line 415) | public function test_get_setting() {
    method test_get_settings (line 430) | public function test_get_settings() {
    method test_get_slug (line 451) | public function test_get_slug() {
    method test_get_value (line 467) | public function test_get_value() {
    method test_html_id (line 471) | public function test_html_id() {
    method test_html_id_array (line 483) | public function test_html_id_array() {
    method test_html_name (line 518) | public function test_html_name() {
    method test_html_name_array (line 527) | public function test_html_name_array() {
    method test_load_value (line 555) | public function test_load_value() {
    method test_layout (line 566) | public function test_layout() {
    method test_match_slug (line 585) | public function test_match_slug() {
    method test_post_type_option (line 608) | public function test_post_type_option() {
    method test_set_option (line 621) | public function test_set_option() {
    method test_set_options (line 634) | public function test_set_options() {
    method test_set_post_id (line 667) | public function test_set_post_id() {
    method test_set_settings (line 683) | public function test_set_settings() {
    method test_update_value (line 697) | public function test_update_value() {
    method test_update_value_empty (line 708) | public function test_update_value_empty() {
    method test_update_value_with_empty_values (line 721) | public function test_update_value_with_empty_values() {
    method test_update_value_with_key_value (line 734) | public function test_update_value_with_key_value() {
    method test_value_serialize (line 747) | public function test_value_serialize() {

FILE: tests/cases/core/class-papi-core-tab-test.php
  class Papi_Core_Tab_Test (line 6) | class Papi_Core_Tab_Test extends WP_UnitTestCase {
    method test_options (line 8) | public function test_options() {

FILE: tests/cases/core/class-papi-core-type-test.php
  class Papi_Core_Type_Test (line 6) | class Papi_Core_Type_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 24) | public function tearDown() {
    method test_core_type_allowed (line 33) | public function test_core_type_allowed() {
    method test_core_type_get_id (line 37) | public function test_core_type_get_id() {
    method test_core_type_get_meta (line 41) | public function test_core_type_get_meta() {
    method test_core_type_get_meta_abstract (line 51) | public function test_core_type_get_meta_abstract() {
    method test_core_type_get_type (line 62) | public function test_core_type_get_type() {
    method test_core_type_has_name (line 66) | public function test_core_type_has_name() {
    method test_core_type_match_id (line 72) | public function test_core_type_match_id() {
    method test_core_type_new_class (line 77) | public function test_core_type_new_class() {
    method test_set_id (line 82) | public function test_set_id() {

FILE: tests/cases/lib/core/cache-test.php
  class Papi_Lib_Core_Cache_Test (line 3) | class Papi_Lib_Core_Cache_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 17) | public function tearDown() {
    method test_papi_cache_delete_1 (line 22) | public function test_papi_cache_delete_1() {
    method test_papi_cache_delete_2 (line 33) | public function test_papi_cache_delete_2() {
    method test_papi_cache_delete_admin (line 41) | public function test_papi_cache_delete_admin() {
    method test_papi_cache_get (line 55) | public function test_papi_cache_get() {
    method test_papi_cache_get_admin (line 60) | public function test_papi_cache_get_admin() {
    method test_papi_cache_key (line 81) | public function test_papi_cache_key() {
    method test_papi_cache_set (line 98) | public function test_papi_cache_set() {
    method test_papi_cache_set_admin (line 103) | public function test_papi_cache_set_admin() {

FILE: tests/cases/lib/core/conditional-test.php
  class Papi_Lib_Core_Conditional_Test (line 3) | class Papi_Lib_Core_Conditional_Test extends WP_UnitTestCase {
    method test_papi_is_rule (line 5) | public function test_papi_is_rule() {
    method test_papi_rule (line 20) | public function test_papi_rule() {

FILE: tests/cases/lib/core/data-test.php
  class Papi_Lib_Core_Data_Test (line 3) | class Papi_Lib_Core_Data_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 10) | public function tearDown() {
    method test_papi_data_delete (line 15) | public function test_papi_data_delete() {
    method test_papi_data_get (line 22) | public function test_papi_data_get() {
    method test_papi_data_update (line 29) | public function test_papi_data_update() {

FILE: tests/cases/lib/core/deprecated-test.php
  class Papi_Lib_Core_Deprecated_Test (line 3) | class Papi_Lib_Core_Deprecated_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method deprecated_function_run (line 18) | public function deprecated_function_run( $function ) {
    method tearDown (line 22) | public function tearDown() {
    method test_papi_get_page (line 31) | public function test_papi_get_page() {

FILE: tests/cases/lib/core/io-test.php
  class Papi_Lib_Core_IO_Test (line 3) | class Papi_Lib_Core_IO_Test extends WP_UnitTestCase {
    method test_register_papi_directory (line 5) | public function test_register_papi_directory() {
    method test_papi_get_all_files_in_directory (line 20) | public function test_papi_get_all_files_in_directory() {
    method test_papi_get_core_type_file_path (line 38) | public function test_papi_get_core_type_file_path() {
    method test_papi_get_all_core_type_files (line 65) | public function test_papi_get_all_core_type_files() {
    method test_papi_get_file_path (line 79) | public function test_papi_get_file_path() {
    method test_papi_get_core_type_base_path (line 100) | public function test_papi_get_core_type_base_path() {

FILE: tests/cases/lib/core/meta-test.php
  class Papi_Lib_Core_Meta_Test (line 3) | class Papi_Lib_Core_Meta_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 12) | public function tearDown() {
    method test_papi_get_meta_id (line 17) | public function test_papi_get_meta_id() {
    method test_papi_get_meta_id_column (line 30) | public function test_papi_get_meta_id_column() {
    method test_papi_get_meta_store (line 39) | public function test_papi_get_meta_store() {
    method test_papi_get_meta_type (line 50) | public function test_papi_get_meta_type() {
    method test_papi_get_meta_type_quried_object (line 66) | public function test_papi_get_meta_type_quried_object() {
    method test_papi_get_meta_type_wp_query (line 93) | public function test_papi_get_meta_type_wp_query() {
    method test_papi_get_meta_type_admin (line 105) | public function test_papi_get_meta_type_admin() {
    method test_papi_get_meta_type_admin_ajax (line 121) | public function test_papi_get_meta_type_admin_ajax() {

FILE: tests/cases/lib/core/post-test.php
  class Papi_Lib_Core_Post_Test (line 3) | class Papi_Lib_Core_Post_Test extends WP_UnitTestCase {
    method test_papi_get_post_id (line 5) | public function test_papi_get_post_id() {
    method test_papi_get_parent_post_id (line 51) | public function test_papi_get_parent_post_id() {
    method test_papi_get_post_type (line 58) | public function test_papi_get_post_type() {
    method test_papi_get_post_type_label (line 101) | public function test_papi_get_post_type_label() {

FILE: tests/cases/lib/core/property-test.php
  class Papi_Lib_Core_Property_Test (line 3) | class Papi_Lib_Core_Property_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 15) | public function tearDown() {
    method test_papi_property_from_array_slugs (line 20) | public function test_papi_property_from_array_slugs() {
    method test_papi_is_property (line 39) | public function test_papi_is_property() {
    method test_papi_get_options_and_properties (line 51) | public function test_papi_get_options_and_properties() {
    method test_papi_get_property_class_name (line 164) | public function test_papi_get_property_class_name() {
    method test_papi_get_property_type (line 177) | public function test_papi_get_property_type() {
    method test_papi_get_property_type_custom (line 192) | public function test_papi_get_property_type_custom() {
    method test_papi_get_property_type_key (line 197) | public function test_papi_get_property_type_key() {
    method test_papi_get_property_type_f (line 208) | public function test_papi_get_property_type_f() {
    method test_papi_is_property_type_key (line 218) | public function test_papi_is_property_type_key() {
    method test_papi_render_property (line 227) | public function test_papi_render_property() {
    method test_papi_render_required_property (line 266) | public function test_papi_render_required_property() {
    method test_papi_render_properties (line 277) | public function test_papi_render_properties() {
    method test_papi_require_text (line 290) | public function test_papi_require_text() {
    method test_papi_required_html (line 300) | public function test_papi_required_html() {
    method test_papi_populate_properties (line 310) | public function test_papi_populate_properties() {
    method test_papi_property (line 380) | public function test_papi_property() {
    method test_papi_property_template (line 396) | public function test_papi_property_template() {
    method test_papi_property_template_in_page_type (line 403) | public function test_papi_property_template_in_page_type() {
    method test_papi_property_to_array_slugs (line 414) | public function test_papi_property_to_array_slugs() {

FILE: tests/cases/lib/core/slug-test.php
  class Papi_Lib_Core_Slug_Test (line 3) | class Papi_Lib_Core_Slug_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 11) | public function tearDown() {
    method test_papify (line 17) | public function test_papify() {
    method test_unpapify (line 29) | public function test_unpapify() {

FILE: tests/cases/lib/core/tabs-test.php
  class Papi_Lib_Core_Tabs_Test (line 3) | class Papi_Lib_Core_Tabs_Test extends WP_UnitTestCase {
    method test_papi_tabs_setup (line 8) | public function test_papi_tabs_setup() {
    method test_papi_tab (line 25) | public function test_papi_tab() {

FILE: tests/cases/lib/core/taxonomy-test.php
  class Papi_Lib_Core_Taxonomy_Test (line 3) | class Papi_Lib_Core_Taxonomy_Test extends WP_UnitTestCase {
    method test_papi_get_term_id (line 5) | public function test_papi_get_term_id() {
    method test_papi_get_term_id_wp_query (line 25) | public function test_papi_get_term_id_wp_query() {
    method test_papi_get_taxonomy (line 32) | public function test_papi_get_taxonomy() {
    method test_papi_get_taxonomy_label (line 45) | public function test_papi_get_taxonomy_label() {

FILE: tests/cases/lib/core/template-test.php
  class Papi_Lib_Core_Template_Test (line 3) | class Papi_Lib_Core_Template_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 12) | public function tearDown() {
    method test_papi_body_class (line 17) | public function test_papi_body_class() {
    method test_papi_get_template_file_name (line 37) | public function test_papi_get_template_file_name() {
    method test_papi_include_template (line 53) | public function test_papi_include_template() {
    method test_papi_template (line 67) | public function test_papi_template() {
    method test_papi_template_include (line 96) | public function test_papi_template_include() {
    method test_filter_papi_template_include (line 121) | public function test_filter_papi_template_include() {
    method test_filter_papi_pre_template_include (line 146) | public function test_filter_papi_pre_template_include() {

FILE: tests/cases/lib/core/url-test.php
  class Papi_Lib_Core_Url_Test (line 3) | class Papi_Lib_Core_Url_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 10) | public function tearDown() {
    method test_papi_get_page_new_url (line 15) | public function test_papi_get_page_new_url() {
    method test_papi_append_post_type_query (line 24) | public function test_papi_append_post_type_query() {
    method test_papi_append_post_type_query_fail (line 43) | public function test_papi_append_post_type_query_fail() {
    method test_papi_include_query_strings (line 48) | public function test_papi_include_query_strings() {

FILE: tests/cases/lib/core/utilities-test.php
  class Papi_Lib_Core_Utilities_Test (line 3) | class Papi_Lib_Core_Utilities_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 11) | public function tearDown() {
    method test_papi_camel_case (line 17) | public function test_papi_camel_case() {
    method test_papi_convert_to_string (line 24) | public function test_papi_convert_to_string() {
    method test_papi_current_user_is_allowed (line 36) | public function test_papi_current_user_is_allowed() {
    method test_papi_doing_ajax (line 52) | public function test_papi_doing_ajax() {
    method test_papi_esc_html (line 62) | public function test_papi_esc_html() {
    method test_papi_f (line 83) | public function test_papi_f() {
    method test_papi_maybe_get_callable_value (line 97) | public function test_papi_maybe_get_callable_value() {
    method test_papi_get_class_name (line 105) | public function test_papi_get_class_name() {
    method test_papi_get_lang (line 118) | public function test_papi_get_lang() {
    method test_papi_get_only_objects (line 136) | public function test_papi_get_only_objects() {
    method test_papi_get_or_post (line 152) | public function test_papi_get_or_post() {
    method test_papi_get_qs (line 172) | public function test_papi_get_qs() {
    method test_papi_get_sanitized_post (line 197) | public function test_papi_get_sanitized_post() {
    method test_papi_html_name (line 207) | public function test_papi_html_name() {
    method test_papi_html_tag (line 221) | public function test_papi_html_tag() {
    method test_papi_render_html_tag (line 268) | public function test_papi_render_html_tag() {
    method test_papi_is_empty (line 312) | public function test_papi_is_empty() {
    method test_papi_is_json (line 325) | public function test_papi_is_json() {
    method test_papi_maybe_convert_to_array (line 340) | public function test_papi_maybe_convert_to_array() {
    method test_papi_maybe_convert_to_object (line 350) | public function test_papi_maybe_convert_to_object() {
    method test_papi_maybe_json_decode (line 360) | public function test_papi_maybe_json_decode() {
    method test_papi_maybe_json_encode (line 375) | public function test_papi_maybe_json_encode() {
    method test_papi_nl2br (line 388) | public function test_papi_nl2br() {
    method test_papi_santize_data (line 393) | public function test_papi_santize_data() {
    method test_papi_sort_order (line 408) | public function test_papi_sort_order() {
    method test_papi_slugify (line 429) | public function test_papi_slugify() {
    method test_papi_slugify_locale (line 440) | public function test_papi_slugify_locale() {
    method test_papi_to_array (line 446) | public function test_papi_to_array() {
    method test_papi_underscorify (line 455) | public function test_papi_underscorify() {

FILE: tests/cases/lib/fields/option-test.php
  class Papi_Lib_Fields_Option_Test (line 3) | class Papi_Lib_Fields_Option_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 19) | public function tearDown() {
    method test_papi_delete_option (line 27) | public function test_papi_delete_option() {
    method test_papi_get_option (line 42) | public function test_papi_get_option() {
    method test_papi_option_shortcode (line 55) | public function test_papi_option_shortcode() {
    method test_papi_update_option (line 69) | public function test_papi_update_option() {
    method test_the_papi_option (line 85) | public function test_the_papi_option() {

FILE: tests/cases/lib/fields/page-test.php
  class Papi_Lib_Fields_Page_Test (line 3) | class Papi_Lib_Fields_Page_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 19) | public function tearDown() {
    method test_papi_delete_field (line 24) | public function test_papi_delete_field() {
    method test_papi_get_field (line 48) | public function test_papi_get_field() {
    method test_papi_get_fields (line 74) | public function test_papi_get_fields() {
    method test_papi_get_field_cache (line 92) | public function test_papi_get_field_cache() {
    method test_papi_get_slugs (line 108) | public function test_papi_get_slugs() {
    method test_papi_field_value (line 138) | public function test_papi_field_value() {
    method test_papi_field_shortcode (line 149) | public function test_papi_field_shortcode() {
    method test_papi_update_field (line 178) | public function test_papi_update_field() {
    method test_the_papi_field (line 195) | public function test_the_papi_field() {

FILE: tests/cases/lib/fields/taxonomy-test.php
  class Papi_Lib_Fields_Taxonomy_Test (line 3) | class Papi_Lib_Fields_Taxonomy_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 19) | public function tearDown() {
    method test_papi_delete_term_field (line 24) | public function test_papi_delete_term_field() {
    method test_papi_get_term_field (line 48) | public function test_papi_get_term_field() {
    method test_papi_get_term_fields (line 70) | public function test_papi_get_term_fields() {
    method test_papi_get_term_slugs (line 77) | public function test_papi_get_term_slugs() {
    method test_papi_taxonomy_shortcode (line 103) | public function test_papi_taxonomy_shortcode() {
    method test_papi_update_term_field (line 130) | public function test_papi_update_term_field() {
    method test_the_papi_term_field (line 147) | public function test_the_papi_term_field() {

FILE: tests/cases/lib/hooks/actions-test.php
  class Papi_Lib_Actions_Test (line 6) | class Papi_Lib_Actions_Test extends WP_UnitTestCase {
    method test (line 8) | public function test() {

FILE: tests/cases/lib/hooks/filters-page-type-test.php
  class Papi_Lib_Filters_Page_Type_Test (line 6) | class Papi_Lib_Filters_Page_Type_Test extends WP_UnitTestCase {
    method test_papi_filter_settings_only_page_type (line 8) | public function test_papi_filter_settings_only_page_type() {
    method test_papi_filter_settings_show_page_type (line 24) | public function test_papi_filter_settings_show_page_type() {
    method test_papi_filter_settings_standard_page_type_description (line 52) | public function test_papi_filter_settings_standard_page_type_descripti...
    method test_papi_filter_settings_standard_page_type_name (line 71) | public function test_papi_filter_settings_standard_page_type_name() {
    method test_papi_filter_settings_show_standard_page_type (line 90) | public function test_papi_filter_settings_show_standard_page_type() {
    method test_papi_filter_settings_show_standard_page_type_in_filter (line 98) | public function test_papi_filter_settings_show_standard_page_type_in_f...
    method test_papi_filter_settings_standard_page_type_thumbnail (line 106) | public function test_papi_filter_settings_standard_page_type_thumbnail...

FILE: tests/cases/lib/hooks/filters-taxonomy-type-test.php
  class Papi_Lib_Filters_Taxonomy_Type_Test (line 6) | class Papi_Lib_Filters_Taxonomy_Type_Test extends WP_UnitTestCase {
    method test_papi_filter_settings_only_taxonomy_type (line 8) | public function test_papi_filter_settings_only_taxonomy_type() {
    method test_papi_filter_settings_standard_taxonomy_type_name (line 24) | public function test_papi_filter_settings_standard_taxonomy_type_name() {
    method test_papi_filter_settings_show_standard_taxonomy_type (line 35) | public function test_papi_filter_settings_show_standard_taxonomy_type() {

FILE: tests/cases/lib/hooks/filters-test.php
  class Papi_Lib_Filters_Test (line 6) | class Papi_Lib_Filters_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 13) | public function tearDown() {
    method test_papi_filter_format_value (line 18) | public function test_papi_filter_format_value() {
    method test_papi_filter_conditional_rule_allowed (line 28) | public function test_papi_filter_conditional_rule_allowed() {
    method test_papi_filter_load_value (line 49) | public function test_papi_filter_load_value() {
    method test_papi_filter_settings_default_sort_order (line 59) | public function test_papi_filter_settings_default_sort_order() {
    method test_papi_filter_page_type_directories (line 69) | public function test_papi_filter_page_type_directories() {
    method test_papi_filter_update_value (line 88) | public function test_papi_filter_update_value() {

FILE: tests/cases/lib/types/entry-test.php
  class Papi_Lib_Types_Entry_Test (line 3) | class Papi_Lib_Types_Entry_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 10) | public function tearDown() {
    method test_papi_get_entry_type_body_classes (line 18) | public function test_papi_get_entry_type_body_classes() {
    method test_papi_get_entry_type_css_class_page (line 32) | public function test_papi_get_entry_type_css_class_page() {
    method test_test_papi_get_entry_type_css_class_taxonomy (line 48) | public function test_test_papi_get_entry_type_css_class_taxonomy() {
    method test_papi_get_entry_type_count (line 60) | public function test_papi_get_entry_type_count() {
    method test_papi_entry_type_exists (line 81) | public function test_papi_entry_type_exists() {
    method test_papi_get_all_entry_types (line 91) | public function test_papi_get_all_entry_types() {
    method test_papi_get_all_entry_types_with_same_id (line 109) | public function test_papi_get_all_entry_types_with_same_id() {
    method test_papi_get_all_entry_types_option (line 125) | public function test_papi_get_all_entry_types_option() {
    method test_papi_get_entry_type (line 140) | public function test_papi_get_entry_type() {
    method test_papi_get_entry_type_by_id (line 157) | public function test_papi_get_entry_type_by_id() {
    method test_papi_get_entry_type_by_meta_id (line 177) | public function test_papi_get_entry_type_by_meta_id() {
    method test_papi_get_entry_type_template (line 198) | public function test_papi_get_entry_type_template() {
    method test_papi_get_entry_type_template_array (line 214) | public function test_papi_get_entry_type_template_array() {
    method test_papi_get_entry_type_template_array2 (line 223) | public function test_papi_get_entry_type_template_array2() {
    method test_papi_get_entry_type_id (line 232) | public function test_papi_get_entry_type_id() {
    method test_papi_is_entry_type (line 241) | public function test_papi_is_entry_type() {

FILE: tests/cases/lib/types/page-test.php
  class Papi_Lib_Types_Page_Test (line 3) | class Papi_Lib_Types_Page_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 10) | public function tearDown() {
    method test_papi_display_page_type (line 15) | public function test_papi_display_page_type() {
    method test_display_for_child_page_type (line 53) | public function test_display_for_child_page_type() {
    method test_display_for_child_page_type_2 (line 67) | public function test_display_for_child_page_type_2() {
    method test_papi_get_all_page_types (line 85) | public function test_papi_get_all_page_types() {
    method test_papi_get_page_type_id_meta_value (line 94) | public function test_papi_get_page_type_id_meta_value() {
    method test_papi_get_page_type_id_query_string (line 105) | public function test_papi_get_page_type_id_query_string() {;
    method test_papi_get_page_type_id_post_parent (line 111) | public function test_papi_get_page_type_id_post_parent() {
    method test_papi_get_page_type_id_container (line 127) | public function test_papi_get_page_type_id_container() {
    method test_papi_get_page_type_id_only_page_type_filter (line 135) | public function test_papi_get_page_type_id_only_page_type_filter() {
    method test_papi_get_page_type_key (line 150) | public function test_papi_get_page_type_key() {
    method test_papi_get_page_type_name (line 156) | public function test_papi_get_page_type_name() {
    method test_papi_get_post_types (line 174) | public function test_papi_get_post_types() {
    method test_papi_get_standard_page_type (line 190) | public function test_papi_get_standard_page_type() {
    method test_papi_get_standard_page_type_id (line 200) | public function test_papi_get_standard_page_type_id() {
    method test_papi_is_page_type (line 205) | public function test_papi_is_page_type() {
    method test_papi_set_page_type_id (line 227) | public function test_papi_set_page_type_id() {
    method test_the_papi_page_type_name (line 239) | public function test_the_papi_page_type_name() {

FILE: tests/cases/lib/types/taxonomy-test.php
  class Papi_Lib_Types_Taxonomy_Test (line 3) | class Papi_Lib_Types_Taxonomy_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 11) | public function tearDown() {
    method test_papi_get_taxonomy_type_id_meta_value (line 16) | public function test_papi_get_taxonomy_type_id_meta_value() {
    method test_papi_get_taxonomy_type_id_container (line 28) | public function test_papi_get_taxonomy_type_id_container() {
    method test_papi_get_taxonomy_type_name (line 36) | public function test_papi_get_taxonomy_type_name() {
    method test_papi_get_taxonomies (line 57) | public function test_papi_get_taxonomies() {
    method test_papi_load_taxonomy_type_id (line 73) | public function test_papi_load_taxonomy_type_id() {
    method test_papi_set_taxonomy_type_id (line 93) | public function test_papi_set_taxonomy_type_id() {
    method test_the_papi_taxonomy_type_name (line 105) | public function test_the_papi_taxonomy_type_name() {

FILE: tests/cases/papi-loader-test.php
  class Papi_Loader_Test (line 3) | class Papi_Loader_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 10) | public function tearDown() {
    method deprecated_function_run (line 15) | public function deprecated_function_run( $function ) {
    method wp_die_handler (line 18) | public function wp_die_handler( $message ) {
    method test_plugins_loaded_action (line 21) | public function test_plugins_loaded_action() {
    method test_papi_before_init_action (line 25) | public function test_papi_before_init_action() {
    method test_papi_init_action (line 39) | public function test_papi_init_action() {
    method test_papi_include (line 58) | public function test_papi_include() {
    method test_papi_loaded_action (line 72) | public function test_papi_loaded_action() {
    method test_constants (line 86) | public function test_constants() {
    method test_instance (line 92) | public function test_instance() {
    method test_plugin_activated (line 96) | public function test_plugin_activated() {
    method test_name (line 100) | public function test_name() {

FILE: tests/cases/properties/class-papi-property-bool-test.php
  class Papi_Property_Bool_Test (line 6) | class Papi_Property_Bool_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_convert_type (line 18) | public function test_property_convert_type() {
    method test_property_default_value (line 22) | public function test_property_default_value() {
    method test_property_format_value (line 26) | public function test_property_format_value() {
    method test_property_options (line 36) | public function test_property_options() {
    method test_property_load_value (line 42) | public function test_property_load_value() {
    method test_property_update_value (line 47) | public function test_property_update_value() {

FILE: tests/cases/properties/class-papi-property-checkbox-test.php
  class Papi_Property_Checkbox_Test (line 6) | class Papi_Property_Checkbox_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_convert_type (line 18) | public function test_property_convert_type() {
    method test_property_default_value (line 22) | public function test_property_default_value() {
    method test_property_format_value (line 26) | public function test_property_format_value() {
    method test_property_options (line 40) | public function test_property_options() {
    method test_property_settings (line 46) | public function test_property_settings() {

FILE: tests/cases/properties/class-papi-property-color-test.php
  class Papi_Property_Color_Test (line 6) | class Papi_Property_Color_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_format_value (line 18) | public function test_property_format_value() {
    method test_property_options (line 24) | public function test_property_options() {

FILE: tests/cases/properties/class-papi-property-datetime-test.php
  class Papi_Property_Datetime_Test (line 6) | class Papi_Property_Datetime_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_format_value (line 18) | public function test_property_format_value() {
    method test_property_options (line 24) | public function test_property_options() {

FILE: tests/cases/properties/class-papi-property-divider-test.php
  class Papi_Property_Divider_Test (line 6) | class Papi_Property_Divider_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_options (line 18) | public function test_property_options() {

FILE: tests/cases/properties/class-papi-property-dropdown-test.php
  class Papi_Property_Dropdown_Test (line 6) | class Papi_Property_Dropdown_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 23) | public function get_expected() {
    method test_property_convert_type (line 36) | public function test_property_convert_type() {
    method test_property_format_value (line 42) | public function test_property_format_value() {
    method test_property_options (line 56) | public function test_property_options() {
    method test_property_settings (line 70) | public function test_property_settings() {

FILE: tests/cases/properties/class-papi-property-editor-test.php
  class Papi_Property_Editor_Test (line 6) | class Papi_Property_Editor_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_mce_buttons (line 18) | public function test_mce_buttons() {
    method test_property_default_value (line 49) | public function test_property_default_value() {
    method test_property_format_value (line 58) | public function test_property_format_value() {
    method test_property_options (line 62) | public function test_property_options() {

FILE: tests/cases/properties/class-papi-property-email-test.php
  class Papi_Property_Email_Test (line 6) | class Papi_Property_Email_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_options (line 18) | public function test_property_options() {

FILE: tests/cases/properties/class-papi-property-file-test.php
  class Papi_Property_File_Test (line 6) | class Papi_Property_File_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 19) | public function get_expected() {
    method assert_values (line 28) | public function assert_values( $expected, $actual, $slug ) {
    method test_property_convert_type (line 38) | public function test_property_convert_type() {
    method test_property_default_value (line 42) | public function test_property_default_value() {
    method test_property_format_value (line 46) | public function test_property_format_value() {
    method test_property_format_value_wrong_values (line 50) | public function test_property_format_value_wrong_values() {
    method test_property_format_value_meta_key (line 57) | public function test_property_format_value_meta_key() {
    method test_property_options (line 64) | public function test_property_options() {
    method test_property_render_file_template (line 70) | public function test_property_render_file_template() {
    method test_property_settings (line 75) | public function test_property_settings() {
    method test_property_wp_get_attachment_metadata (line 79) | public function test_property_wp_get_attachment_metadata() {
    method test_property_wp_get_attachment_metadata_wrong_values (line 91) | public function test_property_wp_get_attachment_metadata_wrong_values() {

FILE: tests/cases/properties/class-papi-property-flexible-test.php
  class Papi_Property_Flexible_Test (line 6) | class Papi_Property_Flexible_Test extends Papi_Property_Test_Case {
    method assert_values (line 10) | public function assert_values( $expected, $actual, $slug ) {
    method get_value (line 22) | public function get_value() {
    method get_expected (line 48) | public function get_expected() {
    method test_property_convert_type (line 55) | public function test_property_convert_type() {
    method test_property_default_value (line 59) | public function test_property_default_value() {
    method test_property_format_value (line 63) | public function test_property_format_value() {
    method test_property_load_value (line 73) | public function test_property_load_value() {
    method test_property_options (line 77) | public function test_property_options() {
    method test_property_setting_add_new_label (line 83) | public function test_property_setting_add_new_label() {
    method test_property_render_repeater_rows_template (line 95) | public function test_property_render_repeater_rows_template() {
    method test_property_settings (line 100) | public function test_property_settings() {

FILE: tests/cases/properties/class-papi-property-gallery-test.php
  class Papi_Property_Gallery_Test (line 6) | class Papi_Property_Gallery_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_convert_type (line 18) | public function test_property_convert_type() {
    method test_property_default_value (line 22) | public function test_property_default_value() {
    method test_property_format_value (line 26) | public function test_property_format_value() {
    method test_property_options (line 116) | public function test_property_options() {
    method test_property_settings (line 122) | public function test_property_settings() {

FILE: tests/cases/properties/class-papi-property-group-test.php
  class Papi_Property_Group_Test (line 6) | class Papi_Property_Group_Test extends Papi_Property_Test_Case {
    method assert_values (line 10) | public function assert_values( $expected, $actual, $slug ) {
    method get_value (line 20) | public function get_value() {
    method get_expected (line 36) | public function get_expected() {
    method test_property_convert_type (line 43) | public function test_property_convert_type() {
    method test_property_default_value (line 47) | public function test_property_default_value() {
    method test_property_format_value (line 51) | public function test_property_format_value() {
    method test_property_load_value (line 63) | public function test_property_load_value() {
    method test_property_options (line 67) | public function test_property_options() {
    method test_property_settings (line 73) | public function test_property_settings() {
    method test_property_update_value (line 86) | public function test_property_update_value() {

FILE: tests/cases/properties/class-papi-property-hidden-test.php
  class Papi_Property_Hidden_Test (line 6) | class Papi_Property_Hidden_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_options (line 18) | public function test_property_options() {

FILE: tests/cases/properties/class-papi-property-html-test.php
  class Papi_Property_Html_Test (line 6) | class Papi_Property_Html_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_update_value (line 20) | public function get_update_value() {
    method get_expected (line 30) | public function get_expected() {
    method test_property_format_value (line 40) | public function test_property_format_value() {
    method test_property_options (line 45) | public function test_property_options() {
    method test_property_output (line 60) | public function test_property_output() {

FILE: tests/cases/properties/class-papi-property-image-test.php
  class Papi_Property_Image_Test (line 6) | class Papi_Property_Image_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_convert_type (line 18) | public function test_property_convert_type() {
    method test_property_default_value (line 22) | public function test_property_default_value() {
    method test_property_format_value (line 26) | public function test_property_format_value() {
    method test_property_options (line 91) | public function test_property_options() {
    method test_property_settings (line 97) | public function test_property_settings() {

FILE: tests/cases/properties/class-papi-property-link-test.php
  class Papi_Property_Link_Test (line 6) | class Papi_Property_Link_Test extends Papi_Property_Test_Case {
    method assert_values (line 10) | public function assert_values( $expected, $actual, $slug ) {
    method get_value (line 17) | public function get_value() {
    method get_expected (line 25) | public function get_expected() {
    method test_property_convert_type (line 33) | public function test_property_convert_type() {
    method test_property_default_value (line 37) | public function test_property_default_value() {
    method test_property_delete_value (line 41) | public function test_property_delete_value() {
    method test_property_format_value (line 47) | public function test_property_format_value() {
    method test_property_format_value_empty_target (line 68) | public function test_property_format_value_empty_target() {
    method test_property_format_value_real_post (line 82) | public function test_property_format_value_real_post() {
    method test_property_load_value (line 98) | public function test_property_load_value() {
    method test_property_load_value_empty_target (line 117) | public function test_property_load_value_empty_target() {
    method test_property_load_value_real_post (line 135) | public function test_property_load_value_real_post() {
    method test_property_options (line 159) | public function test_property_options() {
    method test_render_link_template (line 165) | public function test_render_link_template() {
    method test_property_update_value_empty_value (line 170) | public function test_property_update_value_empty_value() {
    method test_property_update_value_real_post (line 179) | public function test_property_update_value_real_post() {

FILE: tests/cases/properties/class-papi-property-module-test.php
  class Papi_Property_Module_Test (line 6) | class Papi_Property_Module_Test extends Papi_Property_Test_Case {
    method assert_values (line 10) | public function assert_values( $expected, $actual, $slug ) {
    method get_value (line 15) | public function get_value() {
    method get_expected (line 22) | public function get_expected() {
    method test_property_convert_type (line 29) | public function test_property_convert_type() {
    method test_property_default_value (line 33) | public function test_property_default_value() {
    method test_property_format_value (line 40) | public function test_property_format_value() {
    method test_property_options (line 52) | public function test_property_options() {
    method test_save_properties_value (line 58) | public function test_save_properties_value() {

FILE: tests/cases/properties/class-papi-property-number-test.php
  class Papi_Property_Number_Test (line 6) | class Papi_Property_Number_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_get_default_settings (line 18) | public function test_property_get_default_settings() {
    method test_property_convert_type (line 26) | public function test_property_convert_type() {
    method test_property_format_value (line 30) | public function test_property_format_value() {
    method test_property_options (line 36) | public function test_property_options() {

FILE: tests/cases/properties/class-papi-property-post-test.php
  class Papi_Property_Post_Test (line 6) | class Papi_Property_Post_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 19) | public function get_expected() {
    method assert_values (line 28) | public function assert_values( $expected, $actual, $slug ) {
    method test_property_convert_type (line 38) | public function test_property_convert_type() {
    method test_property_format_value (line 42) | public function test_property_format_value() {
    method test_property_format_value_meta_key (line 53) | public function test_property_format_value_meta_key() {
    method test_property_options (line 59) | public function test_property_options() {
    method test_property_settings (line 65) | public function test_property_settings() {

FILE: tests/cases/properties/class-papi-property-radio-test.php
  class Papi_Property_Radio_Test (line 6) | class Papi_Property_Radio_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_options (line 18) | public function test_property_options() {
    method test_property_format_value (line 24) | public function test_property_format_value() {

FILE: tests/cases/properties/class-papi-property-reference-test.php
  class Papi_Property_Reference_Test (line 6) | class Papi_Property_Reference_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_options (line 18) | public function test_property_options() {
    method test_property_settings (line 24) | public function test_property_settings() {

FILE: tests/cases/properties/class-papi-property-relationship-test.php
  class Papi_Property_Relationship_Test (line 6) | class Papi_Property_Relationship_Test extends Papi_Property_Test_Case {
    method assert_values (line 10) | public function assert_values( $expected, $actual, $slug ) {
    method get_value (line 18) | public function get_value() {
    method get_expected (line 28) | public function get_expected() {
    method test_property_convert_type (line 43) | public function test_property_convert_type() {
    method test_property_default_value (line 48) | public function test_property_default_value() {
    method test_property_format_value (line 53) | public function test_property_format_value() {
    method test_property_format_value_custom_items (line 66) | public function test_property_format_value_custom_items() {
    method test_get_sort_options_name_alphabetically (line 120) | public function test_get_sort_options_name_alphabetically() {
    method test_get_sort_options_post_created_date_ascending (line 132) | public function test_get_sort_options_post_created_date_ascending() {
    method test_get_sort_options_post_created_date_descending (line 144) | public function test_get_sort_options_post_created_date_descending() {
    method test_get_sort_options_post_id_ascending (line 156) | public function test_get_sort_options_post_id_ascending() {
    method test_get_sort_options_post_id_descending (line 168) | public function test_get_sort_options_post_id_descending() {
    method test_get_sort_options_post_order_value_ascending (line 180) | public function test_get_sort_options_post_order_value_ascending() {
    method test_get_sort_options_post_order_value_descending (line 192) | public function test_get_sort_options_post_order_value_descending() {
    method test_get_sort_options_post_modified_date_ascending (line 204) | public function test_get_sort_options_post_modified_date_ascending() {
    method test_get_sort_options_post_modified_date_descending (line 216) | public function test_get_sort_options_post_modified_date_descending() {
    method test_property_load_value (line 228) | public function test_property_load_value() {
    method test_property_options (line 235) | public function test_property_options() {
    method test_property_sort_value (line 245) | public function test_property_sort_value() {
    method test_property_sort_value_2 (line 257) | public function test_property_sort_value_2() {

FILE: tests/cases/properties/class-papi-property-repeater-test.php
  class Papi_Property_Repeater_Test (line 6) | class Papi_Property_Repeater_Test extends Papi_Property_Test_Case {
    method get_value (line 13) | public function get_value() {
    method get_expected (line 41) | public function get_expected() {
    method test_property_convert_type (line 61) | public function test_property_convert_type() {
    method test_property_default_value (line 65) | public function test_property_default_value() {
    method test_property_format_value (line 69) | public function test_property_format_value() {
    method test_property_load_value (line 81) | public function test_property_load_value() {
    method test_property_options (line 85) | public function test_property_options() {
    method test_property_setting_add_new_label (line 91) | public function test_property_setting_add_new_label() {
    method test_property_render_ajax_request (line 103) | public function test_property_render_ajax_request() {
    method test_property_render_repeater_rows_template (line 108) | public function test_property_render_repeater_rows_template() {
    method test_property_settings (line 113) | public function test_property_settings() {
    method test_property_update_value (line 126) | public function test_property_update_value() {

FILE: tests/cases/properties/class-papi-property-sidebar-test.php
  class Papi_Property_Sidebar_Test (line 6) | class Papi_Property_Sidebar_Test extends Papi_Property_Test_Case {
    method assert_values (line 10) | public function assert_values( $expected, $actual, $slug ) {
    method get_value (line 14) | public function get_value() {
    method get_expected (line 18) | public function get_expected() {
    method test_property_convert_type (line 22) | public function test_property_convert_type() {
    method test_property_options (line 26) | public function test_property_options() {
    method test_property_settings (line 32) | public function test_property_settings() {

FILE: tests/cases/properties/class-papi-property-string-test.php
  class Papi_Property_String_Test (line 6) | class Papi_Property_String_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 20) | public function get_expected() {
    method test_property_format_value (line 30) | public function test_property_format_value() {
    method test_property_options (line 37) | public function test_property_options() {

FILE: tests/cases/properties/class-papi-property-term-test.php
  class Papi_Property_Term_Test (line 6) | class Papi_Property_Term_Test extends Papi_Property_Test_Case {
    method setUp (line 10) | public function setUp() {
    method tearDown (line 18) | public function tearDown() {
    method get_value (line 24) | public function get_value() {
    method get_expected (line 33) | public function get_expected() {
    method assert_values (line 42) | public function assert_values( $expected, $actual, $slug ) {
    method test_property_convert_type (line 52) | public function test_property_convert_type() {
    method test_property_format_value (line 56) | public function test_property_format_value() {
    method test_property_format_value_meta_key (line 67) | public function test_property_format_value_meta_key() {
    method test_property_options (line 73) | public function test_property_options() {
    method test_property_settings (line 79) | public function test_property_settings() {

FILE: tests/cases/properties/class-papi-property-test.php
  class Papi_Property_Test (line 3) | class Papi_Property_Test extends WP_UnitTestCase {
    method setUp (line 5) | public function setUp() {
    method tearDown (line 16) | public function tearDown() {
    method test_get_value (line 21) | public function test_get_value() {
    method test_get_value_hardcoded (line 39) | public function test_get_value_hardcoded() {
    method test_get_value_option (line 56) | public function test_get_value_option() {
    method test_html (line 89) | public function test_html() {
    method test_render_with_description (line 94) | public function test_render_with_description() {
    method test_render_with_html_array_slug (line 106) | public function test_render_with_html_array_slug() {
    method test_render_with_lang (line 119) | public function test_render_with_lang() {
    method test_render_fail (line 153) | public function test_render_fail() {
    method test_render_with_after_class (line 183) | public function test_render_with_after_class() {
    method test_render_with_after_html (line 190) | public function test_render_with_after_html() {
    method test_render_with_before_class (line 197) | public function test_render_with_before_class() {
    method test_render_with_before_html (line 204) | public function test_render_with_before_html() {
    method test_format_cb_property (line 211) | public function test_format_cb_property() {

FILE: tests/cases/properties/class-papi-property-text-test.php
  class Papi_Property_Text_Test (line 6) | class Papi_Property_Text_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 20) | public function get_expected() {
    method test_property_format_value (line 30) | public function test_property_format_value() {
    method test_property_options (line 38) | public function test_property_options() {

FILE: tests/cases/properties/class-papi-property-url-test.php
  class Papi_Property_Url_Test (line 6) | class Papi_Property_Url_Test extends Papi_Property_Test_Case {
    method get_value (line 10) | public function get_value() {
    method get_expected (line 14) | public function get_expected() {
    method test_property_format_value (line 18) | public function test_property_format_value() {
    method test_property_load_value (line 23) | public function test_property_load_value() {
    method test_property_options (line 33) | public function test_property_options() {
    method test_property_output (line 43) | public function test_property_output() {
    method test_property_update_value (line 48) | public function test_property_update_value() {

FILE: tests/cases/properties/class-papi-property-user-test.php
  class Papi_Property_User_Test (line 6) | class Papi_Property_User_Test extends Papi_Property_Test_Case {
    method assert_values (line 10) | public function assert_values( $expected, $actual, $slug ) {
    method get_value (line 14) | public function get_value() {
    method get_expected (line 18) | public function get_expected() {
    method test_property_convert_type (line 22) | public function test_property_convert_type() {
    method test_property_format_value (line 26) | public function test_property_format_value() {
    method test_property_options (line 34) | public function test_property_options() {
    method test_property_settings (line 40) | public function test_property_settings() {

FILE: tests/cases/query/class-papi-query-test.php
  class Papi_Query_Test (line 6) | class Papi_Query_Test extends WP_UnitTestCase {
    method test_empty_query (line 8) | public function test_empty_query() {
    method test_missing_query (line 14) | public function test_missing_query() {
    method test_first (line 28) | public function test_first() {
    method test_last (line 52) | public function test_last() {
    method test_simple_query (line 76) | public function test_simple_query() {
    method test_real_page_type_query_fail (line 95) | public function test_real_page_type_query_fail() {
    method test_real_page_type_query_success (line 112) | public function test_real_page_type_query_success() {
    method test_real_page_type_meta_query (line 128) | public function test_real_page_type_meta_query() {
    method test_real_page_type_meta_key_value (line 154) | public function test_real_page_type_meta_key_value() {
    method test_real_taxonomy_type_query_fail (line 177) | public function test_real_taxonomy_type_query_fail() {
    method test_real_taxonomy_type_query_success (line 194) | public function test_real_taxonomy_type_query_success() {
    method test_real_taxonomy_type_meta_query (line 211) | public function test_real_taxonomy_type_meta_query() {
    method test_real_taxonomy_type_meta_key_value (line 238) | public function test_real_taxonomy_type_meta_key_value() {

FILE: tests/cases/rest-api/class-papi-rest-api-post-test.php
  class Papi_REST_API_Post_Test (line 6) | class Papi_REST_API_Post_Test extends WP_UnitTestCase {
    method setUp (line 13) | public function setUp() {
    method tearDown (line 23) | public function tearDown() {
    method test_actions (line 29) | public function test_actions() {
    method test_get_page_type (line 34) | public function test_get_page_type() {
    method test_get_post (line 50) | public function test_get_post() {
    method test_prepare_response (line 78) | public function test_prepare_response() {
    method test_setup_fields (line 100) | public function test_setup_fields() {

FILE: tests/cases/rest-api/class-papi-rest-api-settings-test.php
  class Papi_REST_API_Settings_Test (line 6) | class Papi_REST_API_Settings_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 22) | public function tearDown() {
    method test_actions (line 28) | public function test_actions() {
    method test_pre_get_setting (line 33) | public function test_pre_get_setting() {
    method test_get_setting (line 39) | public function test_get_setting() {
    method test_prepare_response (line 48) | public function test_prepare_response() {

FILE: tests/cases/rest-api/class-papi-rest-api-test.php
  class Papi_REST_API_Test (line 6) | class Papi_REST_API_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 14) | public function tearDown() {
    method test_actions (line 20) | public function test_actions() {

FILE: tests/cases/stores/class-papi-option-store-test.php
  class Papi_Option_Store_Test (line 6) | class Papi_Option_Store_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 20) | public function tearDown() {
    method test_get_property (line 25) | public function test_get_property() {
    method test_get_value (line 50) | public function test_get_value() {
    method test_get_value_cache (line 65) | public function test_get_value_cache() {
    method test_valid (line 81) | public function test_valid() {

FILE: tests/cases/stores/class-papi-post-store-test.php
  class Papi_Post_Store_Test (line 6) | class Papi_Post_Store_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 23) | public function tearDown() {
    method test_post_store_construct (line 28) | public function test_post_store_construct() {
    method test_get_type_class (line 33) | public function test_get_type_class() {
    method test_get_permalink (line 41) | public function test_get_permalink() {
    method test_get_post (line 46) | public function test_get_post() {
    method test_get_status (line 51) | public function test_get_status() {
    method test_get_value (line 55) | public function test_get_value() {
    method test_get_value_cache (line 69) | public function test_get_value_cache() {
    method test_load_value (line 85) | public function test_load_value() {
    method test_format_value (line 96) | public function test_format_value() {
    method test_post_store_editor_value (line 121) | public function test_post_store_editor_value() {
    method test_get_property (line 147) | public function test_get_property() {
    method test_valid (line 153) | public function test_valid() {

FILE: tests/cases/stores/class-papi-term-store-test.php
  class Papi_Term_Store_Test (line 6) | class Papi_Term_Store_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 21) | public function tearDown() {
    method test_term_store_construct (line 26) | public function test_term_store_construct() {
    method test_get_permalink (line 31) | public function test_get_permalink() {
    method test_get_term (line 36) | public function test_get_term() {
    method test_load_value (line 41) | public function test_load_value() {
    method test_format_value (line 52) | public function test_format_value() {
    method test_get_property (line 72) | public function test_get_property() {
    method test_valid (line 77) | public function test_valid() {

FILE: tests/cases/types/class-papi-attachment-type-test.php
  class Papi_Attachment_Type_Test (line 6) | class Papi_Attachment_Type_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 20) | public function tearDown() {
    method test_filters (line 28) | public function test_filters() {
    method test_post_type (line 35) | public function test_post_type() {
    method test_get_post_type (line 39) | public function test_get_post_type() {
    method test_meta (line 43) | public function test_meta() {
    method test_edit_attachment (line 47) | public function test_edit_attachment() {
    method test_save_attachment (line 58) | public function test_save_attachment() {

FILE: tests/cases/types/class-papi-entry-type-test.php
  class Papi_Entry_Type_Test (line 6) | class Papi_Entry_Type_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 24) | public function tearDown() {
    method test_body_classes (line 34) | public function test_body_classes() {
    method test_broken_page_type (line 40) | public function test_broken_page_type() {
    method test_get_body_classes (line 44) | public function test_get_body_classes() {
    method test_get_boxes (line 50) | public function test_get_boxes() {
    method test_get_boxes_abstract (line 61) | public function test_get_boxes_abstract() {
    method test_get_boxes_filter (line 68) | public function test_get_boxes_filter() {
    method test_get_class_name (line 86) | public function test_get_class_name() {
    method test_get_file_path (line 91) | public function test_get_file_path() {
    method test_get_id (line 100) | public function test_get_id() {
    method test_get_labels (line 105) | public function test_get_labels() {
    method test_get_property (line 110) | public function test_get_property() {
    method test_get_properties (line 125) | public function test_get_properties() {
    method test_get_type (line 130) | public function test_get_type() {
    method test_help_tabs (line 135) | public function test_help_tabs() {
    method test_help_tabs_meta_property (line 160) | public function test_help_tabs_meta_property() {
    method test_match_id (line 172) | public function test_match_id() {
    method test_new_class (line 177) | public function test_new_class() {
    method test_setup (line 182) | public function test_setup() {
    method test_sort_order (line 188) | public function test_sort_order() {

FILE: tests/cases/types/class-papi-option-type-test.php
  class Papi_Option_Type_Test (line 6) | class Papi_Option_Type_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 21) | public function tearDown() {
    method test_get_boxes (line 29) | public function test_get_boxes() {
    method test_get_property (line 39) | public function test_get_property() {
    method test_get_child_properties (line 67) | public function test_get_child_properties() {
    method test_meta_info (line 78) | public function test_meta_info() {
    method test_render (line 87) | public function test_render() {

FILE: tests/cases/types/class-papi-page-type-test.php
  class Papi_Page_Type_Test (line 6) | class Papi_Page_Type_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 33) | public function tearDown() {
    method test_display (line 49) | public function test_display() {
    method test_get_body_classes (line 54) | public function test_get_body_classes() {
    method test_get_boxes (line 60) | public function test_get_boxes() {
    method test_get_child_types (line 70) | public function test_get_child_types() {
    method test_get_labels (line 76) | public function test_get_labels() {
    method test_get_thumbnail (line 87) | public function test_get_thumbnail() {
    method test_get_property (line 93) | public function test_get_property() {
    method test_get_child_properties (line 178) | public function test_get_child_properties() {
    method test_has_post_type (line 193) | public function test_has_post_type() {
    method test_meta_info (line 199) | public function test_meta_info() {
    method test_parent_boxes (line 245) | public function test_parent_boxes() {
    method test_publish_box (line 280) | public function test_publish_box() {
    method test_remove_post_type_supports (line 288) | public function test_remove_post_type_supports() {
    method test_remove_post_type_supports_faq_level_1 (line 297) | public function test_remove_post_type_supports_faq_level_1() {
    method test_remove_post_type_supports_faq_level_2 (line 306) | public function test_remove_post_type_supports_faq_level_2() {
    method test_remove_post_type_supports_faq_level_3 (line 317) | public function test_remove_post_type_supports_faq_level_3() {
    method test_remove_meta_boxes (line 330) | public function test_remove_meta_boxes() {
    method test_remove_all_meta_boxes (line 345) | public function test_remove_all_meta_boxes() {
    method test_setup_page_templates (line 361) | public function test_setup_page_templates() {
    method test_tabs_meta_boxes (line 377) | public function test_tabs_meta_boxes() {
    method test_any_post_type (line 399) | public function test_any_post_type() {

FILE: tests/cases/types/class-papi-taxonomy-type-test.php
  class Papi_Taxonomy_Type_Test (line 6) | class Papi_Taxonomy_Type_Test extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 22) | public function tearDown() {
    method test_display (line 32) | public function test_display() {
    method test_edit_form (line 37) | public function test_edit_form() {
    method test_get_boxes (line 45) | public function test_get_boxes() {
    method test_meta_data (line 55) | public function test_meta_data() {
    method test_get_labels (line 60) | public function test_get_labels() {
    method test_get_property (line 71) | public function test_get_property() {

FILE: tests/data/classes/class-say.php
  class Say (line 3) | class Say {
    method hello (line 4) | public function hello( $name ) {

FILE: tests/data/container/class-container-test-stub.php
  class Container_Test_Stub (line 5) | class Container_Test_Stub {
    method value (line 6) | public function value() {

FILE: tests/data/core-types/abstract-core-type.php
  class Abstract_Core_Type (line 7) | class Abstract_Core_Type extends Base_Core_Type {
    method meta (line 14) | public function meta() {

FILE: tests/data/core-types/base-core-type.php
  class Base_Core_Type (line 3) | abstract class Base_Core_Type extends Papi_Core_Type {
    method meta (line 4) | abstract public function meta();

FILE: tests/data/core-types/broken-core-type.php
  class Book_Core_Type (line 3) | class Book_Core_Type extends Papi_Core_Type {
    method meta (line 10) | public function meta() {
    method register (line 19) | public function register() {

FILE: tests/data/core-types/info-core-type.php
  class Info_Core_Type (line 3) | class Info_Core_Type extends Papi_Core_Type {
    method meta (line 10) | public function meta() {

FILE: tests/data/core-types/info2-core-type.php
  class Info2_Core_Type (line 7) | class Info2_Core_Type extends Info_Core_Type {
    method meta (line 14) | public function meta() {

FILE: tests/data/entry-types/abstract-entry-type.php
  class Abstract_Entry_Type (line 7) | class Abstract_Entry_Type extends Base_Entry_Type {
    method meta (line 14) | public function meta() {
    method register (line 24) | public function register() {

FILE: tests/data/entry-types/base-entry-type.php
  class Base_Entry_Type (line 3) | abstract class Base_Entry_Type extends Papi_Entry_Type {
    method meta (line 4) | abstract public function meta();
    method register (line 5) | abstract public function register();
    method register_content_box (line 7) | public function register_content_box() {

FILE: tests/data/entry-types/broken-entry-type.php
  class Book_Entry_Type (line 3) | class Book_Entry_Type extends Papi_Entry_Type {
    method meta2 (line 10) | public function meta2() {
    method register (line 19) | public function register() {

FILE: tests/data/entry-types/info-entry-type.php
  class Info_Entry_Type (line 3) | class Info_Entry_Type extends Papi_Entry_Type {
    method meta (line 10) | public function meta() {
    method body_classes (line 24) | public function body_classes() {
    method help (line 33) | public function help() {
    method register (line 45) | public function register() {

FILE: tests/data/entry-types/term-entry-type.php
  class Term_Entry_Type (line 3) | class Term_Entry_Type extends Papi_Entry_Type {
    method meta (line 10) | public function meta() {

FILE: tests/data/entry-types2/term-entry-type.php
  class Term_Entry_Type (line 3) | class Term_Entry_Type extends Papi_Entry_Type {
    method meta (line 10) | public function meta() {

FILE: tests/data/page-types/big-page-type.php
  class Big_Page_Type (line 3) | class Big_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method remove (line 24) | public function remove() {
    method register (line 31) | public function register() {

FILE: tests/data/page-types/book-page-type.php
  class Book_Page_Type (line 3) | class Book_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 23) | public function register() {

FILE: tests/data/page-types/broken-page-type.php
  class Broken_Page_Type (line 3) | class Broken_Page_Type extends Papi_Page_Type {
    method meta2 (line 10) | public function meta2() {
    method register (line 22) | public function register() {

FILE: tests/data/page-types/display-not-page-type.php
  class Display_Not_Page_Type (line 3) | class Display_Not_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 23) | public function register() {
    method display (line 31) | public function display( $post_type ) {

FILE: tests/data/page-types/dot-page-type.php
  class Dot_Page_Type (line 3) | class Dot_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method body_classes (line 23) | public function body_classes() {
    method register (line 30) | public function register() {

FILE: tests/data/page-types/dot2-page-type.php
  class Dot2_Page_Type (line 3) | class Dot2_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 21) | public function register() {

FILE: tests/data/page-types/duck-page-type.php
  class Duck_Page_Type (line 3) | class Duck_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 22) | public function register() {

FILE: tests/data/page-types/editor-page-type.php
  class Editor_Page_Type (line 3) | class Editor_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 21) | public function register() {

FILE: tests/data/page-types/empty-page-type.php
  class Empty_Page_Type (line 3) | class Empty_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 21) | public function register() {

FILE: tests/data/page-types/extra-page-type.php
  class Extra_Page_Type (line 3) | class Extra_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 21) | public function register() {

FILE: tests/data/page-types/faq-extra-page-type.php
  class FAQ_Extra_Page_Type (line 7) | class FAQ_Extra_Page_Type extends FAQ_Page_Type {
    method meta (line 14) | public function meta() {
    method remove (line 22) | public function remove() {
    method register (line 29) | public function register() {

FILE: tests/data/page-types/faq-extra2-page-type.php
  class FAQ_Extra2_Page_Type (line 7) | class FAQ_Extra2_Page_Type extends FAQ_Extra_Page_Type {
    method meta (line 14) | public function meta() {
    method remove (line 22) | public function remove() {
    method register (line 29) | public function register() {

FILE: tests/data/page-types/faq-page-type.php
  class FAQ_Page_Type (line 3) | class FAQ_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method publish_box (line 33) | public function publish_box() {
    method remove (line 42) | public function remove() {
    method register (line 49) | public function register() {

FILE: tests/data/page-types/fields-page-type.php
  class Fields_Page_Type (line 3) | class Fields_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method fields (line 18) | public function fields( $fields ) {
    method register (line 25) | public function register() {

FILE: tests/data/page-types/flex-page-type.php
  class Flex_Page_Type (line 3) | class Flex_Page_Type extends Papi_Page_Type {
    method meta (line 5) | public function meta() {
    method remove (line 14) | public function remove() {
    method register (line 18) | public function register() {

FILE: tests/data/page-types/flex2-page-type.php
  class Flex2_Page_Type (line 3) | class Flex2_Page_Type extends Papi_Page_Type {
    method meta (line 5) | public function meta() {
    method remove (line 14) | public function remove() {
    method register (line 18) | public function register() {
    method display (line 71) | public function display( $post_type ) {

FILE: tests/data/page-types/front-page-type.php
  class Front_Page_Type (line 3) | class Front_Page_Type extends Papi_Front_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 22) | public function register() {

FILE: tests/data/page-types/group-page-type.php
  class Group_Page_Type (line 3) | class Group_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method remove (line 23) | public function remove() {
    method register (line 30) | public function register() {

FILE: tests/data/page-types/hidden-page-type.php
  class Hidden_Page_Type (line 3) | class Hidden_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 23) | public function register() {

FILE: tests/data/page-types/hidden2-page-type.php
  class Hidden2_Page_Type (line 3) | class Hidden2_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 23) | public function register() {

FILE: tests/data/page-types/identifier-page-type.php
  class Identifier_Page_Type (line 3) | class Identifier_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 22) | public function register() {

FILE: tests/data/page-types/module-page-type.php
  class Module_Page_Type (line 3) | class Module_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 21) | public function register() {

FILE: tests/data/page-types/modules/image-module-type.php
  class Image_Module_Type (line 3) | class Image_Module_Type extends Papi_Module_Type {
    method meta (line 10) | public function meta() {
    method register (line 30) | public function register() {

FILE: tests/data/page-types/modules/string-module-type.php
  class String_Module_Type (line 3) | class String_Module_Type extends Papi_Module_Type {
    method meta (line 10) | public function meta() {
    method register (line 24) | public function register() {

FILE: tests/data/page-types/modules/top-module-type.php
  class Top_Module_Type (line 3) | class Top_Module_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 21) | public function register() {

FILE: tests/data/page-types/modules/video-module-type.php
  class Video_Module_Type (line 3) | class Video_Module_Type extends Papi_Module_Type {
    method meta (line 10) | public function meta() {
    method register (line 31) | public function register() {

FILE: tests/data/page-types/name-page-type.php
  class Name_Page_Type (line 3) | class Name_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 30) | public function register() {

FILE: tests/data/page-types/namespace-page-type.php
  class Namespace_Page_Type (line 5) | class Namespace_Page_Type extends \Papi_Page_Type {
    method meta (line 12) | public function meta() {
    method register (line 23) | public function register() {

FILE: tests/data/page-types/no-page-type.php
  class No_Page_Type (line 3) | class No_Page_Type extends Papi_Entry_Type {
    method meta (line 10) | public function meta() {
    method register (line 21) | public function register() {

FILE: tests/data/page-types/options/class-settings-option-type.php
  class Settings_Option_Type (line 3) | class Settings_Option_Type extends Papi_Option_Type {
    method meta (line 5) | public function meta() {
    method register (line 12) | public function register() {

FILE: tests/data/page-types/options/header-option-type.php
  class Header_Option_Type (line 3) | class Header_Option_Type extends Papi_Option_Type {
    method meta (line 5) | public function meta() {
    method register (line 13) | public function register() {
    method display (line 79) | public function display( $post_type ) {

FILE: tests/data/page-types/options/properties-option-type.php
  class Properties_Option_Type (line 3) | class Properties_Option_Type extends Papi_Option_Type {
    method meta (line 5) | public function meta() {
    method register (line 12) | public function register() {

FILE: tests/data/page-types/others/attachment-type.php
  class Attachment_Type (line 3) | class Attachment_Type extends Papi_Attachment_Type {
    method meta (line 5) | public function meta() {
    method register (line 11) | public function register() {

FILE: tests/data/page-types/others/media-attachment-type.php
  class Media_Attachment_Type (line 3) | class Media_Attachment_Type extends Papi_Attachment_Type {
    method meta (line 5) | public function meta() {
    method register (line 11) | public function register() {

FILE: tests/data/page-types/post-page-type.php
  class Post_Page_Type (line 3) | class Post_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 22) | public function register() {

FILE: tests/data/page-types/price-page-type.php
  class Price_Page_Type (line 3) | class Price_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method remove (line 23) | public function remove() {
    method register (line 30) | public function register() {

FILE: tests/data/page-types/properties-page-type.php
  class Properties_Page_Type (line 3) | class Properties_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method remove (line 23) | public function remove() {
    method register (line 30) | public function register() {

FILE: tests/data/page-types/rule-page-type.php
  class Rule_Page_Type (line 3) | class Rule_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 22) | public function register() {

FILE: tests/data/page-types/simple-page-type.php
  class Simple_Page_Type (line 3) | class Simple_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method body_classes (line 27) | public function body_classes() {
    method remove (line 36) | public function remove() {
    method register (line 43) | public function register() {
    method content_box (line 201) | public function content_box() {
    method content_box_broken (line 208) | public function content_box_broken() {

FILE: tests/data/page-types/tab-page-type.php
  class Tab_Page_Type (line 3) | class Tab_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 21) | public function register() {

FILE: tests/data/page-types/tab2-page-type.php
  class Tab2_Page_Type (line 3) | class Tab2_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method remove (line 23) | public function remove() {
    method register (line 30) | public function register() {

FILE: tests/data/page-types/test-page-type.php
  class Test_Page_Type (line 3) | class Test_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method help (line 23) | public function help() {
    method remove (line 35) | public function remove() {
    method register (line 42) | public function register() {

FILE: tests/data/page-types/twenty-page-type.php
  class Twenty_Page_Type (line 3) | class Twenty_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 21) | public function register() {

FILE: tests/data/page-types2/any-page-type.php
  class Any_Page_Type (line 3) | class Any_Page_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 22) | public function register() {

FILE: tests/data/page-types2/look-page-type.php
  class Look_Module_Type (line 3) | class Look_Module_Type extends Papi_Page_Type {
    method meta (line 10) | public function meta() {
    method register (line 21) | public function register() {

FILE: tests/data/properties/class-papi-property-fake.php
  class Papi_Property_Fake (line 3) | class Papi_Property_Fake {}

FILE: tests/data/properties/class-papi-property-kvack.php
  class Papi_Property_Kvack (line 3) | class Papi_Property_Kvack extends Papi_Property {
    method html (line 5) | public function html() {}

FILE: tests/data/taxonomy-types/broken-taxonomy-type.php
  class Broken_Taxonomy_Type (line 3) | class Broken_Taxonomy_Type extends Papi_Taxonomy_Type {
    method meta2 (line 10) | public function meta2() {
    method register (line 22) | public function register() {

FILE: tests/data/taxonomy-types/empty-taxonomy-type.php
  class Empty_Taxonomy_Type (line 3) | class Empty_Taxonomy_Type extends Papi_Taxonomy_Type {
    method meta (line 10) | public function meta() {
    method register (line 21) | public function register() {

FILE: tests/data/taxonomy-types/faq-extra-taxonomy-type.php
  class FAQ_Extra_Taxonomy_Type (line 7) | class FAQ_Extra_Taxonomy_Type extends FAQ_Taxonomy_Type {
    method meta (line 14) | public function meta() {
    method register (line 25) | public function register() {

FILE: tests/data/taxonomy-types/faq-extra2-taxonomy-type.php
  class FAQ_Extra2_Taxonomy_Type (line 7) | class FAQ_Extra2_Taxonomy_Type extends FAQ_Extra_Taxonomy_Type {
    method meta (line 14) | public function meta() {
    method register (line 25) | public function register() {

FILE: tests/data/taxonomy-types/faq-taxonomy-type.php
  class FAQ_Taxonomy_Type (line 3) | class FAQ_Taxonomy_Type extends Papi_Taxonomy_Type {
    method meta (line 10) | public function meta() {
    method register (line 23) | public function register() {

FILE: tests/data/taxonomy-types/properties-taxonomy-type.php
  class Properties_Taxonomy_Type (line 3) | class Properties_Taxonomy_Type extends Papi_Taxonomy_Type {
    method meta (line 10) | public function meta() {
    method register (line 22) | public function register() {

FILE: tests/data/taxonomy-types/simple-taxonomy-type.php
  class Simple_Taxonomy_Type (line 3) | class Simple_Taxonomy_Type extends Papi_Taxonomy_Type {
    method meta (line 10) | public function meta() {
    method display (line 29) | public function display( $taxonomy ) {
    method register (line 36) | public function register() {

FILE: tests/framework/class-papi-property-test-case.php
  class Papi_Property_Test_Case (line 3) | abstract class Papi_Property_Test_Case extends WP_UnitTestCase {
    method setUp (line 8) | public function setUp() {
    method tearDown (line 45) | public function tearDown() {
    method __get (line 57) | public function __get( $name ) {
    method assert_values (line 72) | public function assert_values( $expected, $actual, $slug ) {
    method get_value (line 79) | abstract public function get_value();
    method get_expected (line 84) | abstract public function get_expected();
    method save_properties (line 93) | public function save_properties( $property, $value = null, $type = 'po...
    method save_properties_value (line 147) | public function save_properties_value( $property = null, $type = 'post...
    method test_property_convert_type (line 220) | public function test_property_convert_type() {
    method test_property_default_value (line 229) | public function test_property_default_value() {
    method test_property_format_value (line 239) | public function test_property_format_value() {
    method test_property_get_default_settings (line 246) | public function test_property_get_default_settings() {
    method test_property_options (line 255) | abstract public function test_property_options();
    method test_property_output (line 260) | public function test_property_output() {
    method test_save_properties_value (line 272) | public function test_save_properties_value() {
    method get_update_value (line 288) | public function get_update_value() {
    method update_type_value (line 300) | public function update_type_value( $post_id = 0, $index = 0, $slug = n...
    method test_property_update_type_value (line 317) | public function test_property_update_type_value() {

FILE: tests/framework/functions.php
  function properties_output_html (line 6) | function properties_output_html() {
  function say_hello_stub (line 15) | function say_hello_stub() {
  function say_hello_name_stub (line 24) | function say_hello_name_stub( $name ) {
  function papi_test_register_book_post_type (line 31) | function papi_test_register_book_post_type() {
  function papi_test_register_faq_taxonomy (line 76) | function papi_test_register_faq_taxonomy() {
  function papi_test_register_hidden_post_type (line 107) | function papi_test_register_hidden_post_type() {

FILE: tests/framework/helpers.php
  function papi_test_create_property_post_data (line 11) | function papi_test_create_property_post_data( $values, $post = null ) {
Condensed preview — 354 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,230K chars).
[
  {
    "path": ".babelrc",
    "chars": 36,
    "preview": "{\n  \"presets\": [\"@jitesoft/main\"]\n}\n"
  },
  {
    "path": ".editorconfig",
    "chars": 324,
    "preview": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_style = space\nindent_size = 2\ninsert_final_newline = true\ntrim_"
  },
  {
    "path": ".gitattributes",
    "chars": 497,
    "preview": "* text=auto\n\n/bin export-ignore\n/src/assets export-ignore\n/tests export-ignore\n.coveralls.yml export-ignore\n.gitattribut"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 607,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\n\n---\n\n### What I expected\n\nA clear and concise descriptio"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 560,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\n\n---\n\n**Is your feature request related to a problem? "
  },
  {
    "path": ".github/issue_template.md",
    "chars": 353,
    "preview": "<!--\nThink you found a bug?\n======================\nUse the template below to log a new bug.\n\nHave a feature request?\n==="
  },
  {
    "path": ".github/pull_request_template.md",
    "chars": 162,
    "preview": "### Description\n\nPlease explain the changes you made here.\n\n### Checklist\n\n- [ ] Bug fix?\n- [ ] New feature?\n- [ ] Depre"
  },
  {
    "path": ".github/workflows/php.yml",
    "chars": 1152,
    "preview": "name: PHP Unit Tests\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\njobs:\n  build:\n    "
  },
  {
    "path": ".gitignore",
    "chars": 103,
    "preview": ".idea\nnode_modules\ntest.php\ntmp/\nbuild/\ncoverage/\nvendor\ncomposer.lock\ncomponents.js\nstyle.css\nmain.js\n"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 19683,
    "preview": "# Papi Changelog\n\n## [3.3.0]\n\n## Added\n\n* Added `papi/pre_template_include` filter to modify which template is loaded be"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3230,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 2877,
    "preview": "## Contributing to Papi\n\nEveryone is welcome to contribute with patches, bug-fixes and new features.\n\n## Ideas\n\nIf you h"
  },
  {
    "path": "LICENSE",
    "chars": 1086,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2013-2019 Fredrik Forsmo\n\nPermission is hereby granted, free of charge, to any pers"
  },
  {
    "path": "Makefile",
    "chars": 402,
    "preview": "all: css js\n\ncss:\n\tnpm run css\n\ndeps:\n\tcomposer install\n\tnpm install -g yarn wp-pot-cli\n\tyarn\n\njs:\n\tnpm run js\n\nlint:\n\tm"
  },
  {
    "path": "README.md",
    "chars": 2914,
    "preview": "# Papi\n\n![Papi](https://cloud.githubusercontent.com/assets/14610/9073902/16a6d906-3b05-11e5-9287-5644a96e9a82.png)\n\n[![L"
  },
  {
    "path": "composer.json",
    "chars": 1025,
    "preview": "{\n  \"name\": \"wp-papi/papi\",\n  \"type\": \"wordpress-plugin\",\n  \"license\": \"MIT\",\n  \"description\": \"WordPress Page Type API "
  },
  {
    "path": "docker-compose.yml",
    "chars": 374,
    "preview": "version: '3'\n\nservices:\n  mysql:\n    image: mariadb\n    environment:\n      - MYSQL_ROOT_PASSWORD=root\n  phpunit:\n    bui"
  },
  {
    "path": "languages/papi-fr_FR.po",
    "chars": 10624,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Papi\\n\"\n\"POT-Creation-Date: 2015-10-13 22:23+0100\\n\"\n\"PO-Revision-Date: 2015-10-"
  },
  {
    "path": "languages/papi-sv_SE.po",
    "chars": 10564,
    "preview": "msgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Papi\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: \\n\"\n\"PO-Revision-Date: 20"
  },
  {
    "path": "languages/papi.pot",
    "chars": 7826,
    "preview": "# Copyright (C) 2017 papi\n# This file is distributed under the same license as the papi package.\nmsgid \"\"\nmsgstr \"\"\n\"Pro"
  },
  {
    "path": "package.json",
    "chars": 1511,
    "preview": "{\n  \"name\": \"papi\",\n  \"version\": \"3.2.0\",\n  \"repository\": \"wp-papi/papi\",\n  \"description\": \"WordPress Page Type API with"
  },
  {
    "path": "papi-loader.php",
    "chars": 327,
    "preview": "<?php\n\n/**\n * Plugin Name: Papi\n * Description: Page Type API with custom fields\n * Author: Fredrik Forsmo\n * Author URI"
  },
  {
    "path": "phpcs.xml",
    "chars": 2126,
    "preview": "<?xml version=\"1.0\"?>\n<ruleset name=\"Papi\">\n  <description>Papi rules for PHP_CodeSniffer</description>\n\n  <exclude-patt"
  },
  {
    "path": "phpunit.xml.dist",
    "chars": 847,
    "preview": "<phpunit backupGlobals=\"false\"\n  backupStaticAttributes=\"false\"\n  beStrictAboutTestsThatDoNotTestAnything=\"true\"\n  beStr"
  },
  {
    "path": "src/admin/class-papi-admin-ajax.php",
    "chars": 7559,
    "preview": "<?php\n\n/**\n * Admin class that handle ajax calls.\n */\nclass Papi_Admin_Ajax {\n\n\t/**\n\t * The action prefix for Papi ajax "
  },
  {
    "path": "src/admin/class-papi-admin-assets.php",
    "chars": 1501,
    "preview": "<?php\n\n/**\n * Admin class that handle assets.\n */\nfinal class Papi_Admin_Assets {\n\n\t/**\n\t * The constructor.\n\t */\n\tpubli"
  },
  {
    "path": "src/admin/class-papi-admin-columns.php",
    "chars": 7092,
    "preview": "<?php\n\n/**\n * Admin class that handle table columns.\n */\nfinal class Papi_Admin_Columns {\n\n\t/**\n\t * Current post type.\n\t"
  },
  {
    "path": "src/admin/class-papi-admin-entry-post.php",
    "chars": 4192,
    "preview": "<?php\n\nclass Papi_Admin_Entry_Post extends Papi_Admin_Entry {\n\n\t/**\n\t * The post type.\n\t *\n\t * @var string\n\t */\n\tprotect"
  },
  {
    "path": "src/admin/class-papi-admin-entry-taxonomy.php",
    "chars": 3910,
    "preview": "<?php\n\n/**\n * Admin class that handles taxonomy modifications.\n */\nclass Papi_Admin_Entry_Taxonomy extends Papi_Admin_En"
  },
  {
    "path": "src/admin/class-papi-admin-entry.php",
    "chars": 597,
    "preview": "<?php\n\nabstract class Papi_Admin_Entry {\n\n\t/**\n\t * The instance.\n\t *\n\t * @var Papi_Admin_Entry\n\t */\n\tprotected static $i"
  },
  {
    "path": "src/admin/class-papi-admin-menu.php",
    "chars": 5138,
    "preview": "<?php\n\n/**\n * Admin class that handles admin menus.\n */\nfinal class Papi_Admin_Menu {\n\n\t/**\n\t * The construct.\n\t */\n\tpub"
  },
  {
    "path": "src/admin/class-papi-admin-meta-box-tabs.php",
    "chars": 2189,
    "preview": "<?php\n\n/**\n * Admin class that handles admin tabs in\n * meta boxes.\n */\nfinal class Papi_Admin_Meta_Box_Tabs {\n\n\t/**\n\t *"
  },
  {
    "path": "src/admin/class-papi-admin-meta-box.php",
    "chars": 4006,
    "preview": "<?php\n\n/**\n * Admin class that handles admin meta boxes.\n */\nfinal class Papi_Admin_Meta_Box {\n\n\t/**\n\t * The core box.\n\t"
  },
  {
    "path": "src/admin/class-papi-admin-meta-handler.php",
    "chars": 6553,
    "preview": "<?php\n\n/**\n * Admin class that handle meta data, like post or term.\n */\nfinal class Papi_Admin_Meta_Handler extends Papi"
  },
  {
    "path": "src/admin/class-papi-admin-option-handler.php",
    "chars": 1082,
    "preview": "<?php\n\n/**\n * Admin class that handle option post data.\n */\nfinal class Papi_Admin_Option_Handler extends Papi_Core_Data"
  },
  {
    "path": "src/admin/class-papi-admin-page-type-switcher.php",
    "chars": 6106,
    "preview": "<?php\n\nclass Papi_Admin_Page_Type_Switcher {\n\n\t/**\n\t * The construct.\n\t */\n\tpublic function __construct() {\n\t\tadd_action"
  },
  {
    "path": "src/admin/class-papi-admin-view.php",
    "chars": 924,
    "preview": "<?php\n\n/**\n * Admin class that handle admin view rendering.\n */\nfinal class Papi_Admin_View {\n\n\t/**\n\t * Path to view dir"
  },
  {
    "path": "src/admin/class-papi-admin.php",
    "chars": 7403,
    "preview": "<?php\n\n/**\n * Admin class that handle loading of Papi types,\n * columns and loading of posts.\n */\nfinal class Papi_Admin"
  },
  {
    "path": "src/admin/views/add-new-page.php",
    "chars": 2090,
    "preview": "<?php\n$post_type_name = papi_get_post_type();\n$post_type      = get_post_type_object( $post_type_name );\n$post_type     "
  },
  {
    "path": "src/admin/views/partials/add-new-item.php",
    "chars": 817,
    "preview": "<a href=\"<?php echo esc_attr( $vars['url'] ); ?>\" class=\"papi-box-item\">\n\t<?php if ( $vars['use_thumbnail'] ): ?>\n\t<div "
  },
  {
    "path": "src/assets/js/components/pikaday.js",
    "chars": 32343,
    "preview": "import moment from 'moment';\n\n/*!\n * Pikaday\n *\n * Copyright © 2014 David Bushell | BSD & MIT license | https://github.c"
  },
  {
    "path": "src/assets/js/components/select2.js",
    "chars": 1391,
    "preview": "import $ from 'jquery';\n\nexport default function (selector) {\n  return {\n    templateSelection: function (result) {\n    "
  },
  {
    "path": "src/assets/js/core.js",
    "chars": 6769,
    "preview": "import $ from 'jquery';\nimport select2Options from 'components/select2';\n\nclass Core {\n  /**\n   * Initialize Papi core c"
  },
  {
    "path": "src/assets/js/modals/iframe.js",
    "chars": 3205,
    "preview": "import $ from 'jquery';\n\n/**\n * Iframe modal.\n */\nclass Iframe {\n\n  /**\n   * The iframe template to use.\n   *\n   * @retu"
  },
  {
    "path": "src/assets/js/properties/color.js",
    "chars": 1198,
    "preview": "import $ from 'jquery';\n\n/**\n * Property Color.\n *\n * Uses the build in color picker in WordPress.\n */\nclass Color {\n  /"
  },
  {
    "path": "src/assets/js/properties/datetime.js",
    "chars": 1532,
    "preview": "import $ from 'jquery';\nimport Pikaday from 'components/Pikaday';\n\n/**\n * Property Datetime.\n *\n * Using Pikaday with ti"
  },
  {
    "path": "src/assets/js/properties/dropdown.js",
    "chars": 654,
    "preview": "import $ from 'jquery';\n\n/**\n * Property Dropdown.\n *\n * Using Select2.\n */\nclass Dropdown {\n  /**\n   * Initialize Prope"
  },
  {
    "path": "src/assets/js/properties/editor.js",
    "chars": 4442,
    "preview": "import $ from 'jquery';\n\n/* global tinymce, tinyMCE, tinyMCEPreInit, QTags */\n\nclass Editor {\n  /**\n   * Custom TinyMCE "
  },
  {
    "path": "src/assets/js/properties/file.js",
    "chars": 4874,
    "preview": "import $ from 'jquery';\nimport Utils from 'utils';\n\n/**\n * Property File.\n *\n * Using the build in media management in W"
  },
  {
    "path": "src/assets/js/properties/flexible.js",
    "chars": 4643,
    "preview": "import $ from 'jquery';\nimport Repeater from 'properties/repeater';\nimport Utils from 'utils';\n\nclass Flexible extends R"
  },
  {
    "path": "src/assets/js/properties/link.js",
    "chars": 3692,
    "preview": "import $ from 'jquery';\n\n/**\n * Property Link.\n *\n * Using the build in link manager in WordPress.\n */\nclass Link {\n  /*"
  },
  {
    "path": "src/assets/js/properties/module.js",
    "chars": 4065,
    "preview": "import $ from 'jquery';\nimport select2Options from 'components/select2';\n\n/**\n * Property Module.\n *\n * Using Select2.\n "
  },
  {
    "path": "src/assets/js/properties/post.js",
    "chars": 3849,
    "preview": "import $ from 'jquery';\nimport select2Options from 'components/select2';\n\n/**\n * Property Post.\n *\n * Using Select2.\n */"
  },
  {
    "path": "src/assets/js/properties/reference.js",
    "chars": 571,
    "preview": "import $ from 'jquery';\n\n/**\n * Property Reference.\n */\nclass Reference {\n  /**\n   * Initialize Property Reference.\n   *"
  },
  {
    "path": "src/assets/js/properties/relationship.js",
    "chars": 3348,
    "preview": "import $ from 'jquery';\n\n/**\n * Property Relationship.\n */\nclass Relationship {\n  /**\n   * Initialize Property Relations"
  },
  {
    "path": "src/assets/js/properties/repeater.js",
    "chars": 9653,
    "preview": "import $ from 'jquery';\nimport Utils from 'utils';\n\n/* global tinymce, tinyMCEPreInit */\n\n/**\n * Property Repeater.\n */\n"
  },
  {
    "path": "src/assets/js/properties/term.js",
    "chars": 1803,
    "preview": "import $ from 'jquery';\n\n/**\n * Property Term.\n *\n * Using Select2.\n */\nclass Term {\n  /**\n   * Initialize Property Term"
  },
  {
    "path": "src/assets/js/properties/url.js",
    "chars": 599,
    "preview": "import $ from 'jquery';\nimport Utils from 'utils';\n\n/**\n * Property Url.\n */\nclass Url {\n  /**\n   * Initialize Property "
  },
  {
    "path": "src/assets/js/required.js",
    "chars": 2027,
    "preview": "import $ from 'jquery';\n\nclass Required {\n  /**\n   * Initialize Papi core class.\n   */\n  static init () {\n    new Requir"
  },
  {
    "path": "src/assets/js/rules.js",
    "chars": 7019,
    "preview": "import $ from 'jquery';\nimport Utils from 'utils';\n\nclass Rules {\n  /**\n   * Initialize Papi rules class.\n   */\n  static"
  },
  {
    "path": "src/assets/js/tabs.js",
    "chars": 1430,
    "preview": "import $ from 'jquery';\n\nclass Tabs {\n  /**\n   * Initialize Papi tabs class.\n   */\n  static init () {\n    new Tabs().bin"
  },
  {
    "path": "src/assets/js/taxonomy.js",
    "chars": 1266,
    "preview": "import $ from 'jquery';\n\nclass Taxonomy {\n  /**\n   * Initialize Papi taxonomy class.\n   */\n  static init () {\n    new Ta"
  },
  {
    "path": "src/assets/js/utils.js",
    "chars": 2520,
    "preview": "import $ from 'jquery';\n\nconst wp = window.wp;\n\nclass Utils {\n  /**\n   * Initialize Papi core class.\n   */\n  static init"
  },
  {
    "path": "src/assets/scss/components/pikaday.scss",
    "chars": 4009,
    "preview": ".papi-body {\n\n  /*!\n   * Pikaday\n   * Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/\n   */\n\n "
  },
  {
    "path": "src/assets/scss/components/select2.scss",
    "chars": 18106,
    "preview": ".papi-body {\n  .select2-container {\n    box-sizing: border-box;\n    display: inline-block;\n    margin: 0;\n    position: "
  },
  {
    "path": "src/assets/scss/modules/_admin.scss",
    "chars": 1638,
    "preview": "#papi-hidden-editor,\n#wp-papiHiddenEditor-wrap,\nlabel[for=\"papi-hidden-editor-hide\"],\n.papi-iframe-mode .compat-field-pa"
  },
  {
    "path": "src/assets/scss/modules/_attachment.scss",
    "chars": 44,
    "preview": ".papi-media-title {\n  margin-bottom: 5px;\n}\n"
  },
  {
    "path": "src/assets/scss/modules/_base.scss",
    "chars": 2597,
    "preview": "// Add new page\n.papi-search {\n  font-size: 16px;\n  font-weight: 300;\n  left: 20px;\n  line-height: 1.5;\n  position: rela"
  },
  {
    "path": "src/assets/scss/modules/_box.scss",
    "chars": 623,
    "preview": "// Papi meta box style\n\n.papi-box h3 {\n  font-size: 14px;\n  line-height: 1.4;\n  margin: 0;\n  padding: 8px 12px;\n}\n\n#post"
  },
  {
    "path": "src/assets/scss/modules/_iframe.scss",
    "chars": 1652,
    "preview": ".papi-iframe-link-open {\n  float: right;\n  margin-right: 10px;\n}\n\n.papi-iframe-modal {\n  position: fixed;\n  top: 30px;\n "
  },
  {
    "path": "src/assets/scss/modules/_options.scss",
    "chars": 723,
    "preview": ".papi-options-logo {\n  background: url('../images/logotype.png') no-repeat;\n  -moz-background-size: cover;\n  -o-backgrou"
  },
  {
    "path": "src/assets/scss/modules/_table.scss",
    "chars": 3126,
    "preview": "// Table\n.papi-table,\n.papi-meta-type-term .form-table {\n  border-spacing: 0;\n  cursor: default !important;\n\n  * {\n    w"
  },
  {
    "path": "src/assets/scss/modules/_tabs.scss",
    "chars": 2145,
    "preview": "// Tabs wrapper\n\n.papi-tabs-wrapper {\n\n  float: left;\n  width: 100%;\n\n  .papi-tabs-back {\n    background: #f4f2f2;\n    b"
  },
  {
    "path": "src/assets/scss/modules/_utils.scss",
    "chars": 336,
    "preview": "// Utils\n\n.papi-pull-left {\n  float: left;\n}\n\n.papi-pull-right {\n  float: right;\n}\n\n.papi-clear {\n  clear: both;\n}\n\n.pap"
  },
  {
    "path": "src/assets/scss/properties/_checkbox.scss",
    "chars": 303,
    "preview": ".papi-property-checkbox {\n\n  @media screen and (min-width: 782px) {\n    p {\n      margin: 0;\n    }\n  }\n\n  @media screen "
  },
  {
    "path": "src/assets/scss/properties/_color.scss",
    "chars": 119,
    "preview": ".papi-property-color-picker .wp-picker-input-wrap {\n  margin-top: -1px;\n\n  .button {\n    width: auto !important;\n  }\n}\n"
  },
  {
    "path": "src/assets/scss/properties/_divider.scss",
    "chars": 519,
    "preview": ".papi-property-divider {\n  h3 {\n    border-bottom: none;\n    font-size: 13px !important;\n    line-height: 1.4;\n    margi"
  },
  {
    "path": "src/assets/scss/properties/_dropdown.scss",
    "chars": 207,
    "preview": ".attachment-compat .papi-component-select2 {\n  width: 99.2%;\n}\n\n.papi-table tr td .select2-hidden-accessible {\n  width: "
  },
  {
    "path": "src/assets/scss/properties/_file.scss",
    "chars": 896,
    "preview": ".papi-property-file {\n\n  .attachment {\n    cursor: move;\n    margin: 0 5px 0 -8px;\n    max-height: 150px;\n    max-width:"
  },
  {
    "path": "src/assets/scss/properties/_flexible.scss",
    "chars": 3897,
    "preview": ".papi-property-flexible {\n\n  .flexible-row-label {\n    background: #f9f9f9;\n    border-top: 1px #eaeaea solid;\n  }\n\n  .f"
  },
  {
    "path": "src/assets/scss/properties/_group.scss",
    "chars": 882,
    "preview": ".papi-property-group {\n  margin-right: -31px;\n\n  > .papi-table {\n    margin: -11px 0 -10px -15px;\n  }\n}\n\n.papi-property-"
  },
  {
    "path": "src/assets/scss/properties/_link.scss",
    "chars": 648,
    "preview": ".papi-property-link {\n  .link-table {\n    td {\n      &:first-child {\n        font-weight: bold;\n        border-left: 1px"
  },
  {
    "path": "src/assets/scss/properties/_post.scss",
    "chars": 1114,
    "preview": ".papi-property-post {\n  &.advanced {\n    margin-right: -30px;\n  }\n\n  > table {\n    margin: -11px 0 -10px -15px;\n\n    td "
  },
  {
    "path": "src/assets/scss/properties/_radio.scss",
    "chars": 297,
    "preview": ".papi-property-radio {\n\n  @media screen and (min-width: 782px) {\n    p {\n      margin: 0;\n    }\n  }\n\n  @media screen and"
  },
  {
    "path": "src/assets/scss/properties/_reference.scss",
    "chars": 1132,
    "preview": ".papi-property-reference {\n  li {\n    float: left;\n    width: 100%;\n\n    &:first-child {\n      margin-top: -10px;\n    }\n"
  },
  {
    "path": "src/assets/scss/properties/_relationship.scss",
    "chars": 1865,
    "preview": ".papi-property-relationship {\n  background: #fafafa;\n  border: 1px #eaeaea solid;\n\n  .relationship-inner {\n    padding: "
  },
  {
    "path": "src/assets/scss/properties/_repeater.scss",
    "chars": 5457,
    "preview": ".papi-property-repeater,\n.papi-property-flexible {\n  margin-right: -31px;\n\n  > .papi-table {\n    margin: -11px 0 -13px -"
  },
  {
    "path": "src/assets/scss/properties/_shared.scss",
    "chars": 152,
    "preview": ".papi-rq {\n  color: #f00;\n}\n\n.metabox-prefs {\n  .papi-rq {\n    display: none !important;\n  }\n}\n\n.papi-box .hndle .papi-r"
  },
  {
    "path": "src/assets/scss/properties/_table.scss",
    "chars": 458,
    "preview": ".papi-property-table {\n  margin-left: -15px;\n  margin-top: -11px;\n  margin-bottom: -10px;\n  > table {\n    th {\n      bor"
  },
  {
    "path": "src/assets/scss/properties/_term.scss",
    "chars": 1114,
    "preview": ".papi-property-term {\n  &.advanced {\n    margin-right: -30px;\n  }\n\n  > table {\n    margin: -11px 0 -10px -15px;\n\n    td "
  },
  {
    "path": "src/assets/scss/properties/_text.scss",
    "chars": 56,
    "preview": ".papi-property-text {\n  height: 250px;\n  width: 100%;\n}\n"
  },
  {
    "path": "src/assets/scss/properties/_url.scss",
    "chars": 319,
    "preview": "@media screen and (max-width: 782px) {\n  .papi-url-media-input {\n    width: 95%;\n  }\n\n  .papi-url-media-button {\n    flo"
  },
  {
    "path": "src/assets/scss/style.scss",
    "chars": 815,
    "preview": "@import \"components/pikaday\";\n@import \"components/select2\";\n\n@import \"modules/utils\";\n@import \"modules/admin\";\n@import \""
  },
  {
    "path": "src/cli/class-papi-cli-command.php",
    "chars": 1424,
    "preview": "<?php\n\n/**\n * Base class that must be extended by any Papi sub commands.\n */\nclass Papi_CLI_Command extends WP_CLI_Comma"
  },
  {
    "path": "src/cli/class-papi-cli-post-command.php",
    "chars": 2928,
    "preview": "<?php\n\n/**\n * Manage posts.\n */\nclass Papi_CLI_Post_Command extends Papi_CLI_Command {\n\n\t/**\n\t * Get default fields for "
  },
  {
    "path": "src/cli/class-papi-cli-term-command.php",
    "chars": 2955,
    "preview": "<?php\n\n/**\n * Manage terms.\n */\nclass Papi_CLI_Term_Command extends Papi_CLI_Command {\n\n\t/**\n\t * Get default fields for "
  },
  {
    "path": "src/cli/class-papi-cli-type-command.php",
    "chars": 2450,
    "preview": "<?php\n\n/**\n * Manage types.\n */\nclass Papi_CLI_Type_Command extends Papi_CLI_Command {\n\n\t/**\n\t * Get default fields for "
  },
  {
    "path": "src/cli/class-papi-cli.php",
    "chars": 309,
    "preview": "<?php\n\n/**\n * Manage Papi from CLI.\n */\nclass Papi_CLI extends WP_CLI_Command {\n}\n\nWP_CLI::add_command( 'papi', 'Papi_CL"
  },
  {
    "path": "src/core/class-papi-core-autoload.php",
    "chars": 1167,
    "preview": "<?php\n\n/**\n * Autoload class that autoload classes.\n */\nfinal class Papi_Core_Autoload {\n\n\t/**\n\t * The Constructor.\n\t *\n"
  },
  {
    "path": "src/core/class-papi-core-box.php",
    "chars": 2491,
    "preview": "<?php\n\nclass Papi_Core_Box {\n\n\t/**\n\t * Capabilities list.\n\t *\n\t * @var array\n\t */\n\tpublic $capabilities = [];\n\n\t/**\n\t * "
  },
  {
    "path": "src/core/class-papi-core-conditional-rule.php",
    "chars": 2396,
    "preview": "<?php\n\n/**\n * Core class that implements a conditional rule.\n */\nclass Papi_Core_Conditional_Rule {\n\n\t/**\n\t * The operat"
  },
  {
    "path": "src/core/class-papi-core-conditional-rules.php",
    "chars": 10800,
    "preview": "<?php\n\n/**\n * Conditional rules class that contains\n * all rules.\n */\nclass Papi_Core_Conditional_Rules {\n\n\t/**\n\t * The "
  },
  {
    "path": "src/core/class-papi-core-conditional.php",
    "chars": 3432,
    "preview": "<?php\n\n/**\n * Core class that handle if a conditional rule\n * should display the property or not.\n */\nclass Papi_Core_Co"
  },
  {
    "path": "src/core/class-papi-core-container.php",
    "chars": 5852,
    "preview": "<?php\n\n/**\n * Container class that implements a container.\n */\nclass Papi_Core_Container implements ArrayAccess {\n\n\t/**\n"
  },
  {
    "path": "src/core/class-papi-core-data-handler.php",
    "chars": 5137,
    "preview": "<?php\n\n/**\n * Core class that handle core post data.\n */\nclass Papi_Core_Data_Handler {\n\n\t/**\n\t * The fields that should"
  },
  {
    "path": "src/core/class-papi-core-data.php",
    "chars": 4415,
    "preview": "<?php\n\nclass Papi_Core_Data {\n\n\t/**\n\t * Does the meta use id?\n\t *\n\t * @var bool\n\t */\n\tprotected $id = false;\n\n\t/**\n\t * M"
  },
  {
    "path": "src/core/class-papi-core-meta-store.php",
    "chars": 7516,
    "preview": "<?php\n\n/**\n * Core class that implements a Papi meta store.\n */\nabstract class Papi_Core_Meta_Store {\n\n\t/**\n\t * The Word"
  },
  {
    "path": "src/core/class-papi-core-property.php",
    "chars": 19921,
    "preview": "<?php\n\n/**\n * Core class that implements a Papi property.\n */\nclass Papi_Core_Property implements JsonSerializable {\n\n\t/"
  },
  {
    "path": "src/core/class-papi-core-tab.php",
    "chars": 1760,
    "preview": "<?php\n\nclass Papi_Core_Tab {\n\n\t/**\n\t * The background of the tab.\n\t *\n\t * Possible values are: `white` or `grey`.\n\t *\n\t "
  },
  {
    "path": "src/core/class-papi-core-type.php",
    "chars": 4255,
    "preview": "<?php\n\n/**\n * Core class that implements a Papi type.\n */\nclass Papi_Core_Type {\n\n\t/**\n\t * The page type class name.\n\t *"
  },
  {
    "path": "src/lib/core/cache.php",
    "chars": 1638,
    "preview": "<?php\n\n/**\n * Delete value from cache.\n *\n * @param  string $key\n * @param  mixed  $suffix\n * @param  string $type\n *\n *"
  },
  {
    "path": "src/lib/core/conditional.php",
    "chars": 544,
    "preview": "<?php\n\n/**\n * Check if the given value is a instance of the rule class.\n *\n * @param  mixed $rule\n *\n * @return bool\n */"
  },
  {
    "path": "src/lib/core/data.php",
    "chars": 757,
    "preview": "<?php\n\n/**\n * Delete data from database.\n *\n * @param  int    $id\n * @param  string $slug\n * @param  string $type\n *\n * "
  },
  {
    "path": "src/lib/core/deprecated.php",
    "chars": 348,
    "preview": "<?php\n\n/**\n * This file is empty for now.\n * It will contain deprecated functions.\n */\n\n/**\n * Get the data page.\n *\n * "
  },
  {
    "path": "src/lib/core/io.php",
    "chars": 3999,
    "preview": "<?php\n\n/**\n * Register Papi directory.\n *\n * @param  array|string $directory\n *\n * @return bool\n */\nfunction register_pa"
  },
  {
    "path": "src/lib/core/meta.php",
    "chars": 2714,
    "preview": "<?php\n\n/**\n * Get meta id for a meta type.\n *\n * @param  string $type\n * @param  int    $id\n *\n * @return int\n */\nfuncti"
  },
  {
    "path": "src/lib/core/post.php",
    "chars": 2213,
    "preview": "<?php\n\n/**\n * Get post or page id from a object.\n *\n * @param  mixed $post_id\n *\n * @return int\n */\nfunction papi_get_po"
  },
  {
    "path": "src/lib/core/property.php",
    "chars": 9746,
    "preview": "<?php\n\n/**\n * Convert array of slugs to array with arrays in.\n *\n * @param  array  $values\n * @param  string $slug\n *\n *"
  },
  {
    "path": "src/lib/core/slug.php",
    "chars": 959,
    "preview": "<?php\n\n/**\n * Prefix slug. Handles slugs with papi prefix.\n *\n * @param  string $prefix\n * @param  string $slug\n *\n * @r"
  },
  {
    "path": "src/lib/core/tabs.php",
    "chars": 933,
    "preview": "<?php\n\n/**\n * Setup tabs.\n *\n * @param  array $tabs\n *\n * @return array\n */\nfunction papi_tabs_setup( array $tabs ) {\n\t$"
  },
  {
    "path": "src/lib/core/taxonomy.php",
    "chars": 1502,
    "preview": "<?php\n\n/**\n * Get term id from a object.\n *\n * @param  mixed $term_id\n *\n * @return int\n */\nfunction papi_get_term_id( $"
  },
  {
    "path": "src/lib/core/template.php",
    "chars": 3361,
    "preview": "<?php\n\n/**\n * Add page type class name as a css class on body.\n *\n * @param  array $classes\n *\n * @return array\n */\nfunc"
  },
  {
    "path": "src/lib/core/url.php",
    "chars": 2229,
    "preview": "<?php\n\n/**\n * Get the url to 'post-new.php' with query string of the page type to load.\n *\n * @param  string $page_type\n"
  },
  {
    "path": "src/lib/core/utilities.php",
    "chars": 13427,
    "preview": "<?php\n\n/**\n * Convert a value to camel case.\n *\n * @param  string $str\n *\n * @return null|string\n */\nfunction papi_camel"
  },
  {
    "path": "src/lib/fields/option.php",
    "chars": 1653,
    "preview": "<?php\n\n/**\n * Delete value in the database.\n *\n * @param  string $slug\n *\n * @return bool\n */\nfunction papi_delete_optio"
  },
  {
    "path": "src/lib/fields/page.php",
    "chars": 7224,
    "preview": "<?php\n\n/**\n * Delete value in the database.\n *\n * @param  int    $id\n * @param  string $slug\n * @param  string $type\n *\n"
  },
  {
    "path": "src/lib/fields/taxonomy.php",
    "chars": 3332,
    "preview": "<?php\n\n/**\n * Delete property value in the database.\n *\n * @param  int    $term_id\n * @param  string $slug\n *\n * @return"
  },
  {
    "path": "src/lib/hooks/actions.php",
    "chars": 6,
    "preview": "<?php\n"
  },
  {
    "path": "src/lib/hooks/filters-page-type.php",
    "chars": 3520,
    "preview": "<?php\n\n/**\n * Get the only page type that will be used for the given post type.\n *\n * @param  string $post_type\n *\n * @r"
  },
  {
    "path": "src/lib/hooks/filters-taxonomy-type.php",
    "chars": 1098,
    "preview": "<?php\n\n/**\n * Get the only taxonomy type that will be used for the given taxonomy.\n *\n * @param  string $taxonomy\n *\n * "
  },
  {
    "path": "src/lib/hooks/filters.php",
    "chars": 2493,
    "preview": "<?php\n\n/**\n * Get conditional rule value.\n *\n * @param  array|Papi_Core_Conditional_Rule $rule\n *\n * @return bool\n */\nfu"
  },
  {
    "path": "src/lib/types/entry.php",
    "chars": 9329,
    "preview": "<?php\n\n/**\n * Get entry type body classes.\n *\n * @param  int    $id\n * @param  string $type\n *\n * @return string\n */\nfun"
  },
  {
    "path": "src/lib/types/page.php",
    "chars": 6844,
    "preview": "<?php\n\n/**\n * Check if the page type should be displayed or not.\n *\n * @param  string|object $page_type\n *\n * @return bo"
  },
  {
    "path": "src/lib/types/taxonomy.php",
    "chars": 3323,
    "preview": "<?php\n\n/**\n * Get taxonomy type id by term id.\n *\n * @param  int $term_id\n *\n * @return string\n */\nfunction papi_get_tax"
  },
  {
    "path": "src/papi-loader.php",
    "chars": 6714,
    "preview": "<?php\n\n// Load Papi Container.\nrequire_once __DIR__ . '/core/class-papi-core-container.php';\n\n/**\n * Papi loader class t"
  },
  {
    "path": "src/properties/class-papi-property-bool.php",
    "chars": 1975,
    "preview": "<?php\n\n/**\n * Bool (true/false) property.\n */\nclass Papi_Property_Bool extends Papi_Property {\n\n\t/**\n\t * The convert typ"
  },
  {
    "path": "src/properties/class-papi-property-checkbox.php",
    "chars": 2193,
    "preview": "<?php\n\n/**\n * HTML checkbox property that can handle one or\n * more checkboxes.\n */\nclass Papi_Property_Checkbox extends"
  },
  {
    "path": "src/properties/class-papi-property-color.php",
    "chars": 1040,
    "preview": "<?php\n\n/**\n * Color property that implements WordPress color\n * picker as a property.\n */\nclass Papi_Property_Color exte"
  },
  {
    "path": "src/properties/class-papi-property-datetime.php",
    "chars": 2795,
    "preview": "<?php\n\n/**\n * Datetime property.\n */\nclass Papi_Property_Datetime extends Papi_Property {\n\n\t/**\n\t * Get default settings"
  },
  {
    "path": "src/properties/class-papi-property-divider.php",
    "chars": 1128,
    "preview": "<?php\n\n/**\n * Divider property.\n */\nclass Papi_Property_Divider extends Papi_Property {\n\n\t/**\n\t * Determine if the prope"
  },
  {
    "path": "src/properties/class-papi-property-dropdown.php",
    "chars": 4667,
    "preview": "<?php\n\n/**\n * Dropdown property.\n */\nclass Papi_Property_Dropdown extends Papi_Property {\n\n\t/**\n\t * The convert type.\n\t "
  },
  {
    "path": "src/properties/class-papi-property-editor.php",
    "chars": 2337,
    "preview": "<?php\n\n/**\n * WordPress editor property.\n */\nclass Papi_Property_Editor extends Papi_Property {\n\n\t/**\n\t * Add filters to"
  },
  {
    "path": "src/properties/class-papi-property-email.php",
    "chars": 195,
    "preview": "<?php\n\n/**\n * HTML5 email input property.\n */\nclass Papi_Property_Email extends Papi_Property_String {\n\n\t/**\n\t * The inp"
  },
  {
    "path": "src/properties/class-papi-property-file.php",
    "chars": 8303,
    "preview": "<?php\n\n/**\n * WordPress media file property.\n */\nclass Papi_Property_File extends Papi_Property {\n\n\t/**\n\t * The convert "
  },
  {
    "path": "src/properties/class-papi-property-flexible.php",
    "chars": 23306,
    "preview": "<?php\n\n/**\n * Flexible repeater property that can repeat multiple properties\n * with different properties per layout.\n *"
  },
  {
    "path": "src/properties/class-papi-property-gallery.php",
    "chars": 432,
    "preview": "<?php\n\n/**\n * WordPress media file property as a gallery.\n */\nclass Papi_Property_Gallery extends Papi_Property_Image {\n"
  },
  {
    "path": "src/properties/class-papi-property-group.php",
    "chars": 2869,
    "preview": "<?php\n\n/**\n * Group property that render child properties in a table.\n */\nclass Papi_Property_Group extends Papi_Propert"
  },
  {
    "path": "src/properties/class-papi-property-hidden.php",
    "chars": 306,
    "preview": "<?php\n\n/**\n * HTML hidden input property.\n */\nclass Papi_Property_Hidden extends Papi_Property_String {\n\n\t/**\n\t * Don't "
  },
  {
    "path": "src/properties/class-papi-property-html.php",
    "chars": 985,
    "preview": "<?php\n\n/**\n * HTML property that can display html in the admin.\n */\nclass Papi_Property_Html extends Papi_Property {\n\n\t/"
  },
  {
    "path": "src/properties/class-papi-property-image.php",
    "chars": 380,
    "preview": "<?php\n\n/**\n * WordPress media image property.\n */\nclass Papi_Property_Image extends Papi_Property_File {\n\n\t/**\n\t * File "
  },
  {
    "path": "src/properties/class-papi-property-link.php",
    "chars": 7818,
    "preview": "<?php\n\n/**\n * WordPress link manager property.\n */\nclass Papi_Property_Link extends Papi_Property {\n\n\t/**\n\t * The conver"
  },
  {
    "path": "src/properties/class-papi-property-module.php",
    "chars": 8093,
    "preview": "<?php\n\n/**\n * Module property that can handle relationship\n * between modules.\n */\nclass Papi_Property_Module extends Pa"
  },
  {
    "path": "src/properties/class-papi-property-number.php",
    "chars": 2088,
    "preview": "<?php\n\n/**\n * HTML5 number input property.\n */\nclass Papi_Property_Number extends Papi_Property {\n\n\t/**\n\t * The convert "
  },
  {
    "path": "src/properties/class-papi-property-post.php",
    "chars": 10172,
    "preview": "<?php\n\n/**\n * Post property that can handle relationship\n * between posts.\n */\nclass Papi_Property_Post extends Papi_Pro"
  },
  {
    "path": "src/properties/class-papi-property-radio.php",
    "chars": 1550,
    "preview": "<?php\n\n/**\n * HTML radio buttons property that can handle one or\n * more radio buttons.\n */\nclass Papi_Property_Radio ex"
  },
  {
    "path": "src/properties/class-papi-property-reference.php",
    "chars": 3280,
    "preview": "<?php\n\n/**\n * Property that shows which relationships that exists\n * between the current post and other posts.\n */\nclass"
  },
  {
    "path": "src/properties/class-papi-property-relationship.php",
    "chars": 12133,
    "preview": "<?php\n\n/**\n * Relationship property that can handle more than\n * one relationship between posts or other data items.\n */"
  },
  {
    "path": "src/properties/class-papi-property-repeater.php",
    "chars": 23879,
    "preview": "<?php\n\n/**\n * Repeater property that can repeat multiple properties.\n */\nclass Papi_Property_Repeater extends Papi_Prope"
  },
  {
    "path": "src/properties/class-papi-property-sidebar.php",
    "chars": 1192,
    "preview": "<?php\n\n/**\n * Sidebar property that populates a dropdown.\n */\nclass Papi_Property_Sidebar extends Papi_Property_Dropdown"
  },
  {
    "path": "src/properties/class-papi-property-string.php",
    "chars": 1546,
    "preview": "<?php\n\n/**\n * HTML text input property.\n */\nclass Papi_Property_String extends Papi_Property {\n\n\t/**\n\t * The input type "
  },
  {
    "path": "src/properties/class-papi-property-table.php",
    "chars": 1725,
    "preview": "<?php\n\nclass Papi_Property_Table extends Papi_Property {\n\n\t/**\n\t * The convert type.\n\t *\n\t * @var string\n\t */\n\tpublic $c"
  },
  {
    "path": "src/properties/class-papi-property-term.php",
    "chars": 7521,
    "preview": "<?php\n\n/**\n * Term property that populates a dropdown.\n */\nclass Papi_Property_Term extends Papi_Property {\n\n\t/**\n\t * Th"
  },
  {
    "path": "src/properties/class-papi-property-text.php",
    "chars": 1393,
    "preview": "<?php\n\n/**\n * HTML textarea property.\n */\nclass Papi_Property_Text extends Papi_Property {\n\n\t/**\n\t * Format the value of"
  },
  {
    "path": "src/properties/class-papi-property-url.php",
    "chars": 1633,
    "preview": "<?php\n\n/**\n * HTML5 url input property.\n */\nclass Papi_Property_Url extends Papi_Property {\n\n\t/**\n\t * Get default settin"
  },
  {
    "path": "src/properties/class-papi-property-user.php",
    "chars": 2139,
    "preview": "<?php\n\n/**\n * User property that populates a dropdown.\n */\nclass Papi_Property_User extends Papi_Property_Dropdown {\n\n\t/"
  },
  {
    "path": "src/properties/class-papi-property.php",
    "chars": 5945,
    "preview": "<?php\n\n/**\n * Base property that implements the rendering of\n * a property in WordPress admin.\n */\nclass Papi_Property e"
  },
  {
    "path": "src/query/class-papi-query.php",
    "chars": 5421,
    "preview": "<?php\n\nclass Papi_Query {\n\n\t/**\n\t * The query arguments.\n\t *\n\t * @var array\n\t */\n\tprotected $args;\n\n\t/**\n\t * The default"
  },
  {
    "path": "src/rest-api/class-papi-rest-api-post.php",
    "chars": 1931,
    "preview": "<?php\n\nclass Papi_REST_API_Post {\n\n\t/**\n\t * REST API Post construct.\n\t */\n\tpublic function __construct() {\n\t\tadd_filter("
  },
  {
    "path": "src/rest-api/class-papi-rest-api-settings.php",
    "chars": 2127,
    "preview": "<?php\n\nclass Papi_REST_API_Settings {\n\n\t/**\n\t * The post store class.\n\t *\n\t * @var Papi_Post_Store\n\t */\n\tprotected $entr"
  },
  {
    "path": "src/rest-api/class-papi-rest-api.php",
    "chars": 780,
    "preview": "<?php\n\nfinal class Papi_REST_API {\n\n\t/**\n\t * The constructor.\n\t */\n\tpublic function __construct() {\n\t\t$this->load_files("
  },
  {
    "path": "src/stores/class-papi-option-store.php",
    "chars": 1344,
    "preview": "<?php\n\n/**\n * Option store implementation of Papi meta store.\n */\nclass Papi_Option_Store extends Papi_Core_Meta_Store {"
  },
  {
    "path": "src/stores/class-papi-post-store.php",
    "chars": 2235,
    "preview": "<?php\n\n/**\n * Post store implementation of Papi meta store.\n */\nclass Papi_Post_Store extends Papi_Core_Meta_Store {\n\n\t/"
  },
  {
    "path": "src/stores/class-papi-term-store.php",
    "chars": 1558,
    "preview": "<?php\n\n/**\n * Term store implementation of Papi meta store.\n */\nclass Papi_Term_Store extends Papi_Core_Meta_Store {\n\n\t/"
  },
  {
    "path": "src/types/class-papi-attachment-type.php",
    "chars": 2611,
    "preview": "<?php\n\n/**\n * Papi type that handle attachment post type, post data\n * and rendering. All attachment types should extend"
  },
  {
    "path": "src/types/class-papi-entry-type.php",
    "chars": 10588,
    "preview": "<?php\n\n/**\n * Papi Entry Type is a base class that can\n * register boxes with properties.\n */\nclass Papi_Entry_Type exte"
  },
  {
    "path": "src/types/class-papi-front-page-type.php",
    "chars": 141,
    "preview": "<?php\n\nclass Papi_Front_Page_Type extends Papi_Page_Type {\n\n\t/**\n\t * The type name.\n\t *\n\t * @var string\n\t */\n\tpublic $ty"
  },
  {
    "path": "src/types/class-papi-module-type.php",
    "chars": 282,
    "preview": "<?php\n\n/**\n * Papi type that handle all post types except attachment.\n * All page types should extend this class.\n */\ncl"
  },
  {
    "path": "src/types/class-papi-option-type.php",
    "chars": 1241,
    "preview": "<?php\n\n/**\n * Papi type that handle option, option data\n * and rendering. All option types should extend this\n * class.\n"
  },
  {
    "path": "src/types/class-papi-page-type.php",
    "chars": 9365,
    "preview": "<?php\n\n/**\n * Papi type that handle all post types except attachment.\n * All page types should extend this class.\n */\ncl"
  },
  {
    "path": "src/types/class-papi-taxonomy-type.php",
    "chars": 2329,
    "preview": "<?php\n\n/**\n * Papi type that handle taxonomies.\n */\nclass Papi_Taxonomy_Type extends Papi_Entry_Type {\n\n\t/**\n\t * Fill la"
  },
  {
    "path": "tests/Dockerfile",
    "chars": 162,
    "preview": "FROM jitesoft/composer:7.4\n\nRUN apk --no-cache add bash mysql-client zlib-dev libjpeg-turbo-dev libpng-dev freetype-dev "
  },
  {
    "path": "tests/README.md",
    "chars": 3272,
    "preview": "# Papi Tests\n\n## Run tests with VVV\n\nThis guide will describe how to use [VVV](https://github.com/varying-vagrant-vagran"
  },
  {
    "path": "tests/bin/install-cp-tests.sh",
    "chars": 2999,
    "preview": "#!/usr/bin/env bash\n\nif [ $# -lt 3 ]; then\n\techo \"usage: $0 <db-name> <db-user> <db-pass> [db-host] [wp-version] [skip-d"
  },
  {
    "path": "tests/bootstrap.php",
    "chars": 549,
    "preview": "<?php\n\n// Load Composer autoload.\nrequire __DIR__ . '/../vendor/autoload.php';\n\n// Define fixtures directory constant\nde"
  },
  {
    "path": "tests/cases/admin/class-papi-admin-ajax-test.php",
    "chars": 13731,
    "preview": "<?php\n\n/**\n * @group ajax\n */\nclass Papi_Admin_Ajax_Test extends WP_UnitTestCase {\n\n\tpublic function setUp() {\n\t\tparent:"
  },
  {
    "path": "tests/cases/admin/class-papi-admin-assets-test.php",
    "chars": 1157,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_Assets_Test extends WP_UnitTestCase {\n\n\tpublic function setUp() {\n\t\tpare"
  },
  {
    "path": "tests/cases/admin/class-papi-admin-columns-test.php",
    "chars": 6216,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_Columns_Test extends WP_UnitTestCase {\n\n\tpublic function setUp() {\n\t\tpar"
  },
  {
    "path": "tests/cases/admin/class-papi-admin-entry-post-test.php",
    "chars": 3190,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_Entry_Post_Test extends WP_UnitTestCase {\n\n\tpublic function setUp() {\n\t\t"
  },
  {
    "path": "tests/cases/admin/class-papi-admin-entry-taxonomy-test.php",
    "chars": 2185,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_Entry_Taxonomy_Test extends WP_UnitTestCase {\n\n\tpublic function setUp() "
  },
  {
    "path": "tests/cases/admin/class-papi-admin-menu-test.php",
    "chars": 6263,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_Menu_Test extends WP_UnitTestCase {\n\n\tpublic function setUp() {\n\t\tparent"
  },
  {
    "path": "tests/cases/admin/class-papi-admin-meta-box-tabs-test.php",
    "chars": 1542,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_Meta_Box_Tabs_Test extends WP_UnitTestCase {\n\n\tpublic function setUp() {"
  },
  {
    "path": "tests/cases/admin/class-papi-admin-meta-box-test.php",
    "chars": 3936,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_Meta_Box_Test extends WP_UnitTestCase {\n\n\t public function test_add_prop"
  },
  {
    "path": "tests/cases/admin/class-papi-admin-meta-handler-test.php",
    "chars": 14946,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_Meta_Handler_Test extends WP_UnitTestCase {\n\n\tpublic function setUp() {\n"
  },
  {
    "path": "tests/cases/admin/class-papi-admin-option-handler-test.php",
    "chars": 2514,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_Option_Handler_Test extends WP_UnitTestCase {\n\n\tpublic function setUp() "
  },
  {
    "path": "tests/cases/admin/class-papi-admin-page-type-switcher.php",
    "chars": 7579,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_Page_Type_Switcher_Test extends WP_UnitTestCase {\n\n\tpublic function setU"
  },
  {
    "path": "tests/cases/admin/class-papi-admin-test.php",
    "chars": 4793,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_Test extends WP_UnitTestCase {\n\n\t/**\n\t * @var Papi_Admin\n\t */\n\tprotected"
  },
  {
    "path": "tests/cases/admin/class-papi-admin-view-test.php",
    "chars": 489,
    "preview": "<?php\n\n/**\n * @group admin\n */\nclass Papi_Admin_View_Test extends WP_UnitTestCase {\n\n\tpublic function setUp() {\n\t\t$this-"
  },
  {
    "path": "tests/cases/core/class-papi-conditional-rules-test.php",
    "chars": 16207,
    "preview": "<?php\n\n/**\n * @group core\n */\nclass Papi_Core_Conditional_Rules_Test extends WP_UnitTestCase {\n\n\tpublic function setUp()"
  },
  {
    "path": "tests/cases/core/class-papi-core-box-test.php",
    "chars": 861,
    "preview": "<?php\n\n/**\n * @group core\n */\nclass Papi_Core_Box_Test extends WP_UnitTestCase {\n\n\tpublic function test_get_option_null("
  },
  {
    "path": "tests/cases/core/class-papi-core-conditional-rule-test.php",
    "chars": 2784,
    "preview": "<?php\n\n/**\n * @group core\n */\nclass Papi_Core_Conditional_Rule_Test extends WP_UnitTestCase {\n\n\tpublic function setUp() "
  }
]

// ... and 154 more files (download for full content)

About this extraction

This page contains the full source code of the wp-papi/papi GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 354 files (1.1 MB), approximately 338.5k tokens, and a symbol index with 2127 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!