Repository: 10up/simple-page-ordering Branch: develop Commit: 67975525b17a Files: 53 Total size: 425.2 KB Directory structure: gitextract_wni4x_4h/ ├── .distignore ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitattributes ├── .github/ │ ├── CODEOWNERS │ └── workflows/ │ ├── build-release-zip.yml │ ├── close-stale-issues.yml │ ├── cypress.yml │ ├── dependency-review.yml │ ├── jslint.yml │ ├── php-compatibility.yml │ ├── phpcs.yml │ ├── plugin-check.yml │ ├── push-asset-readme-update.yml │ ├── push-deploy.yml │ ├── repo-automator.yml │ └── wordpress-version-checker.yml ├── .gitignore ├── .nvmrc ├── .phpcs.xml.dist ├── .wordpress-org/ │ └── blueprints/ │ ├── blueprint.json │ └── demo-data.xml ├── .wordpress-version-checker.json ├── .wp-env.json ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CREDITS.md ├── LICENSE.md ├── README.md ├── assets/ │ ├── css/ │ │ └── scss/ │ │ └── simple-page-ordering.scss │ └── js/ │ └── src/ │ └── simple-page-ordering.js ├── class-simple-page-ordering.php ├── composer.json ├── package.json ├── readme.txt ├── simple-page-ordering.php ├── tests/ │ ├── bin/ │ │ ├── initialize.sh │ │ ├── set-wp-config.js │ │ └── wp-cli.yml │ ├── cypress/ │ │ ├── config.config.js │ │ ├── fixtures/ │ │ │ └── example.json │ │ ├── integration/ │ │ │ ├── admin.test.js │ │ │ ├── page-ordering.test.js │ │ │ ├── post-ordering.test.js │ │ │ └── reset-page-ordering.test.js │ │ ├── plugins/ │ │ │ └── index.js │ │ ├── support/ │ │ │ ├── commands.js │ │ │ └── index.js │ │ └── tsconfig.json │ └── test-plugins/ │ └── enable-ordering-for-posts.php └── webpack.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .distignore ================================================ # Directories to ignore /.git /.github /.wordpress-org /assets /node_modules /tests /vendor # Files to ignore /.* /CHANGELOG.md /CODE_OF_CONDUCT.md /composer.json /composer.lock /CONTRIBUTING.md /CREDITS.md /Gruntfile.js /LICENSE.md /package-lock.json /package.json /README.md /webpack.config.js /10up-lib/wp-compat-validation-tool/replace-namespace.sh ================================================ FILE: .editorconfig ================================================ root = true [*] indent_style = space indent_size = 2 [*.{php,js,css,scss}] end_of_line = lf insert_final_newline = true indent_style = tab indent_size = 4 ================================================ FILE: .eslintignore ================================================ webpack.config.js tests/ dist/ node_modules/ ================================================ FILE: .eslintrc.js ================================================ module.exports = { env: { jquery: true }, extends: ['@10up/eslint-config/wordpress'], }; ================================================ FILE: .gitattributes ================================================ # Directories to ignore /.git export-ignore /.github export-ignore /.wordpress-org export-ignore /assets export-ignore /bin export-ignore /node_modules export-ignore /tests export-ignore /vendor export-ignore # Files to ignore /.editorconfig export-ignore /.gitattributes export-ignore /.gitignore export-ignore /.phpcs.xml.dist export-ignore /.wp-env.json export-ignore /.wp-env.override.json export-ignore /CHANGELOG.md export-ignore /CODE_OF_CONDUCT.md export-ignore /composer.json export-ignore /composer.lock export-ignore /CONTRIBUTING.md export-ignore /CREDITS.md export-ignore /Gruntfile.js export-ignore /LICENSE.md export-ignore /package-lock.json export-ignore /package.json export-ignore /README.md export-ignore /webpack.config.js export-ignore /.nvmrc export-ignore ================================================ FILE: .github/CODEOWNERS ================================================ # These owners will be the default owners for everything in the repo. Unless a later match takes precedence, @jeffpaul and @dkotter, as primary maintainers will be requested for review when someone opens a Pull Request. * @jeffpaul @dkotter # GitHub and WordPress.org specifics /.github/ @jeffpaul /.wordpress-org/ @jeffpaul CODE_OF_CONDUCT.md @jeffpaul LICENSE.md @jeffpaul ================================================ FILE: .github/workflows/build-release-zip.yml ================================================ name: Build release zip permissions: contents: read on: workflow_dispatch: workflow_call: push: branches: - trunk jobs: build: name: Build release zip runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Cache node_modules id: cache-node-modules uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 env: cache-name: cache-node-modules with: path: node_modules key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - name: Install Composer dependencies run: composer install --no-dev - name: Setup node version and npm cache uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version-file: '.nvmrc' - name: Install Node dependencies if: steps.cache-node-modules.outputs.cache-hit != 'true' run: npm ci --no-optional - name: Build plugin run: npm run build - name: Generate ZIP file uses: 10up/action-wordpress-plugin-build-zip@b9e621e1261ccf51592b6f3943e4dc4518fca0d1 # v1.0.2 ================================================ FILE: .github/workflows/close-stale-issues.yml ================================================ name: 'Close stale issues' # **What it does**: Closes issues where the original author doesn't respond to a request for information. # **Why we have it**: To remove the need for maintainers to remember to check back on issues periodically to see if contributors have responded. on: schedule: # Schedule for every day at 1:30am UTC - cron: '30 1 * * *' permissions: issues: write jobs: stale: runs-on: ubuntu-latest steps: - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0 with: days-before-stale: 7 days-before-close: 7 stale-issue-message: > It has been 7 days since more information was requested from you in this issue and we have not heard back. This issue is now marked as stale and will be closed in 7 days, but if you have more information to add then please comment and the issue will stay open. close-issue-message: > This issue has been automatically closed because there has been no response to our request for more information. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. See [this blog post on bug reports and the importance of repro steps](https://www.lee-dohm.com/2015/01/04/writing-good-bug-reports/) for more information about the kind of information that may be helpful. stale-issue-label: 'stale' close-issue-reason: 'not_planned' any-of-labels: 'needs:feedback' remove-stale-when-updated: true ================================================ FILE: .github/workflows/cypress.yml ================================================ name: E2E test on: push: branches: - develop - trunk pull_request: branches: - develop permissions: contents: read actions: read jobs: build: uses: 10up/simple-page-ordering/.github/workflows/build-release-zip.yml@develop cypress: needs: build name: ${{ matrix.core.name }} runs-on: ubuntu-latest strategy: matrix: core: - {name: 'WP latest', version: 'latest'} - {name: 'WP minimum', version: 'WordPress/WordPress#6.8'} - {name: 'WP trunk', version: 'WordPress/WordPress#master'} steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Download build zip uses: actions/download-artifact@b14cf4c92620c250e1c074ab0a5800e37df86765 # v4.2.0 with: name: ${{ github.event.repository.name }} path: ${{ github.event.repository.name }} - name: Display structure of downloaded files run: ls -R working-directory: ${{ github.event.repository.name }} - name: Cache node_modules id: cache-node-modules uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 env: cache-name: cache-node-modules with: path: | node_modules ~/.cache ~/.npm key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - name: Install dependencies run: npm install - name: Set the core version and plugins config run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }},./tests/test-plugins - name: Set up WP environment run: npm run env:start - name: Test run: npm run cypress:run - name: Update summary if: always() run: | npx mochawesome-merge ./tests/cypress/reports/*.json -o tests/cypress/reports/mochawesome.json rm -rf ./tests/cypress/reports/mochawesome-*.json npx mochawesome-json-to-md -p ./tests/cypress/reports/mochawesome.json -o ./tests/cypress/reports/mochawesome.md npx mochawesome-report-generator tests/cypress/reports/mochawesome.json -o tests/cypress/reports/ cat ./tests/cypress/reports/mochawesome.md >> $GITHUB_STEP_SUMMARY - name: Make artifacts available uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 if: failure() with: name: cypress-artifact retention-days: 2 path: | ${{ github.workspace }}/tests/cypress/screenshots/ ${{ github.workspace }}/tests/cypress/videos/ ${{ github.workspace }}/tests/cypress/logs/ ${{ github.workspace }}/tests/cypress/reports/ ================================================ FILE: .github/workflows/dependency-review.yml ================================================ # Dependency Review Action # # This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. # # Source repository: https://github.com/actions/dependency-review-action # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement name: 'Dependency Review' on: [pull_request] permissions: contents: read jobs: dependency-review: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Dependency Review uses: actions/dependency-review-action@72eb03d02c7872a771aacd928f3123ac62ad6d3a # v4.3.3 with: license-check: true vulnerability-check: false config-file: 10up/.github/.github/dependency-review-config.yml@trunk ================================================ FILE: .github/workflows/jslint.yml ================================================ name: JS Lint on: push: branches: - develop - trunk pull_request: branches: - develop permissions: checks: write contents: read pull-requests: write jobs: jslint: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Use desired version of NodeJS uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version-file: '.nvmrc' - name: Install dependencies run: npm install - name: Build run: npm run build - name: Generate linting report run: npm run lint-js -- --output-file eslint-report.json --format json continue-on-error: true - name: Annotate code linting results uses: ataylorme/eslint-annotate-action@5f4dc2e3af8d3c21b727edb597e5503510b1dc9c # v2.2.0 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' report-json: 'eslint-report.json' - name: Update summary run: | npm_config_yes=true npx github:10up/eslint-json-to-md --path ./eslint-report.json --output ./eslint-report.md cat eslint-report.md >> $GITHUB_STEP_SUMMARY if: ${{ failure() }} ================================================ FILE: .github/workflows/php-compatibility.yml ================================================ name: PHP Compatibility permissions: contents: read on: push: branches: - develop - trunk pull_request: branches: - develop jobs: php-compatibility: name: PHP minimum 7.4 runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set PHP version uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 with: php-version: 7.4 tools: composer:v2 coverage: none - name: Install dependencies run: composer install - name: Run PHP Compatibility run: vendor/bin/phpcs simple-page-ordering.php --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.4- ================================================ FILE: .github/workflows/phpcs.yml ================================================ name: PHPCS permissions: contents: read on: push: branches: - develop - trunk pull_request: branches: - develop jobs: phpcs: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set PHP version uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 with: php-version: '7.4' tools: composer:v2 coverage: none - name: Install dependencies run: composer install - name: Run PHPCS run: vendor/bin/phpcs simple-page-ordering.php --extensions=php -s ================================================ FILE: .github/workflows/plugin-check.yml ================================================ name: Plugin Check on: push: branches: - develop - trunk pull_request: branches: - develop # Disable permissions for all available scopes by default. # Any needed permissions should be configured at the job level. permissions: {} jobs: build: uses: 10up/simple-page-ordering/.github/workflows/build-release-zip.yml@develop permissions: contents: read plugin-check: needs: build name: Run Plugin Check runs-on: ubuntu-latest permissions: contents: read steps: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Download build zip uses: actions/download-artifact@b14cf4c92620c250e1c074ab0a5800e37df86765 # v4.2.0 with: name: ${{ github.event.repository.name }} path: ${{ github.event.repository.name }}-artifact - name: Remove files from .distignore working-directory: ${{ github.event.repository.name }}-artifact run: | if [ -f .distignore ]; then while IFS= read -r line; do rm -rf "${line}" done < .distignore fi - name: Display structure of distributed files run: ls -R working-directory: ${{ github.event.repository.name }}-artifact - name: Run plugin check uses: wordpress/plugin-check-action@6f5a57e173c065a394b78688f75df543e4011902 # v1.1.5 with: build-dir: ${{ github.event.repository.name }}-artifact exclude-directories: '.github,tests,.phpcs.xml.dist' ignore-codes: 'hidden_files,unexpected_markdown_file' slug: simple-page-ordering ================================================ FILE: .github/workflows/push-asset-readme-update.yml ================================================ name: Plugin asset/readme update permissions: contents: read on: push: branches: - trunk jobs: trunk: name: Push to trunk runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup node version uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version-file: .nvmrc cache: npm - name: Build run: | npm install npm run build composer install --no-dev - name: WordPress.org plugin asset/readme update uses: 10up/action-wordpress-plugin-asset-update@2480306f6f693672726d08b5917ea114cb2825f7 # v2.2.0 env: SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} SVN_USERNAME: ${{ secrets.SVN_USERNAME }} ================================================ FILE: .github/workflows/push-deploy.yml ================================================ name: Deploy to WordPress.org permissions: contents: read on: push: tags: - "*" jobs: tag: name: New tag runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Build run: | npm install npm run build - name: Install Composer dependencies run: composer install --no-dev - name: WordPress Plugin Deploy uses: 10up/action-wordpress-plugin-deploy@54bd289b8525fd23a5c365ec369185f2966529c2 # v2.3.0 env: SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} SVN_USERNAME: ${{ secrets.SVN_USERNAME }} ================================================ FILE: .github/workflows/repo-automator.yml ================================================ name: 'Repo Automator' permissions: contents: read pull-requests: write on: issues: types: - opened push: branches: - develop pull_request: types: - opened - edited - synchronize - converted_to_draft - ready_for_review branches: - develop jobs: Validate: runs-on: ubuntu-latest steps: - uses: 10up/action-repo-automator@280f5dc0b4ed1b5c50c816e08623bdefce55cdce # v2.1.3 with: fail-label: needs:feedback pass-label: needs:code-review conflict-label: needs:refresh reviewers: | team:open-source-practice env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .github/workflows/wordpress-version-checker.yml ================================================ name: "WordPress version checker" on: push: branches: - develop - trunk pull_request: branches: - develop schedule: - cron: '0 0 * * 1' permissions: issues: write jobs: wordpress-version-checker: runs-on: ubuntu-latest steps: - name: WordPress version checker uses: skaut/wordpress-version-checker@9d247334f5b30202cb9c1f4aee74c52f37399f69 # v2.2.3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .gitignore ================================================ .DS_Store .eslintcache localization node_modules vendor .wp-env.override.json dist/ 10up-lib/ tests/cypress/screenshots tests/cypress/videos tests/cypress/downloads tests/cypress/reports eslint-report.json ================================================ FILE: .nvmrc ================================================ v20.11.0 ================================================ FILE: .phpcs.xml.dist ================================================ . 10up-lib/ dist/ node_modules/ vendor/ tests/ ================================================ FILE: .wordpress-org/blueprints/blueprint.json ================================================ { "$schema": "https://playground.wordpress.net/blueprint-schema.json", "landingPage": "\/wp-admin\/edit.php?post_type=page", "preferredVersions": { "php": "7.4", "wp": "latest" }, "phpExtensionBundles": ["kitchen-sink"], "steps": [ { "step": "login", "username": "admin", "password": "password" }, { "step": "importWxr", "file": { "resource": "url", "url": "https:\/\/raw.githubusercontent.com\/10up\/simple-page-ordering\/02d35c792a11be5f863c44308485e85505c48f17\/.wordpress-org\/blueprints\/demo-data.xml" } }, { "step": "installPlugin", "pluginZipFile": { "resource": "wordpress.org\/plugins", "slug": "simple-page-ordering" }, "options": { "activate": true } } ] } ================================================ FILE: .wordpress-org/blueprints/demo-data.xml ================================================ My WordPress Website https://playground.wordpress.net/ Fri, 15 Dec 2023 21:08:12 +0000 en-US 1.2 https://playground.wordpress.net/ https://playground.wordpress.net/ 1 1 179 180 188 195 189 181 187 191 190 192 182 184 193 183 1 194 179nav_menu 180nav_menu 181nav_menu 182nav_menu 184nav_menu 183nav_menu https://wordpress.org/?v=6.4.2 <![CDATA[Pages]]> https://playground.wordpress.net//?p=1726 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1726 1726 0 2 0 <![CDATA[Categories]]> https://playground.wordpress.net//?p=1727 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1727 1727 0 10 0 <![CDATA[]]> https://playground.wordpress.net//?p=1729 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1729 1729 0 24 0 <![CDATA[Depth]]> https://playground.wordpress.net//?p=1731 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1731 1731 0 29 0 <![CDATA[Level 01]]> https://playground.wordpress.net//?p=1732 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1732 1732 0 30 0 <![CDATA[Level 02]]> https://playground.wordpress.net//?p=1733 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1733 1733 0 31 0 <![CDATA[Level 03]]> https://playground.wordpress.net//?p=1734 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1734 1734 0 32 0 <![CDATA[Level 04]]> https://playground.wordpress.net//?p=1735 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1735 1735 0 33 0 <![CDATA[Level 05]]> https://playground.wordpress.net//?p=1736 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1736 1736 0 34 0 <![CDATA[Level 06]]> https://playground.wordpress.net//?p=1737 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1737 1737 0 35 0 <![CDATA[Level 07]]> https://playground.wordpress.net//?p=1738 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1738 1738 0 36 0 <![CDATA[Level 08]]> https://playground.wordpress.net//?p=1739 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1739 1739 0 37 0 <![CDATA[Level 09]]> https://playground.wordpress.net//?p=1740 Fri, 15 Dec 2023 21:05:24 +0000 https://playground.wordpress.net//?p=1740 1740 0 38 0 <![CDATA[Level 10]]> https://playground.wordpress.net//?p=1741 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1741 1741 0 39 0 <![CDATA[Advanced]]> https://playground.wordpress.net//?p=1742 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1742 1742 0 40 0 <![CDATA[Menu Description]]> https://playground.wordpress.net//?p=1743 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1743 1743 0 44 0 <![CDATA[Menu Title Attribute]]> https://playground.wordpress.net//?p=1744 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1744 1744 0 41 0 <![CDATA[Menu CSS Class]]> https://playground.wordpress.net//?p=1745 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1745 1745 0 42 0 <![CDATA[New Window / Tab]]> https://playground.wordpress.net//?p=1746 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1746 1746 0 43 0 <![CDATA[twitter.com]]> https://playground.wordpress.net//?p=1747 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1747 1747 0 1 0 <![CDATA[facebook.com]]> https://playground.wordpress.net//?p=1748 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1748 1748 0 2 0 <![CDATA[github.com]]> https://playground.wordpress.net//?p=1749 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1749 1749 0 3 0 <![CDATA[instagram.com]]> https://playground.wordpress.net//?p=1750 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1750 1750 0 5 0 <![CDATA[linkedin.com]]> https://playground.wordpress.net//?p=1751 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1751 1751 0 4 0 <![CDATA[]]> https://playground.wordpress.net//?p=1752 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1752 1752 0 2 0 <![CDATA[]]> https://playground.wordpress.net//?p=1753 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1753 1753 0 3 0 <![CDATA[]]> https://playground.wordpress.net//?p=1754 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1754 1754 1725 4 0 <![CDATA[]]> https://playground.wordpress.net//?p=1755 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1755 1755 1725 5 0 <![CDATA[]]> https://playground.wordpress.net//?p=1756 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1756 1756 1725 6 0 <![CDATA[]]> https://playground.wordpress.net//?p=1757 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1757 1757 0 7 0 <![CDATA[]]> https://playground.wordpress.net//?p=1758 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1758 1758 0 2 0 <![CDATA[]]> https://playground.wordpress.net//?p=1759 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1759 1759 0 3 0 <![CDATA[]]> https://playground.wordpress.net//?p=1760 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1760 1760 0 4 0 <![CDATA[]]> https://playground.wordpress.net//?p=1761 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1761 1761 1725 7 0 <![CDATA[]]> https://playground.wordpress.net//?p=1762 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1762 1762 1725 8 0 <![CDATA[]]> https://playground.wordpress.net//?p=1763 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1763 1763 1725 9 0 <![CDATA[]]> https://playground.wordpress.net//?p=1764 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1764 1764 0 10 0 <![CDATA[]]> https://playground.wordpress.net//?p=1765 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1765 1765 0 11 0 <![CDATA[]]> https://playground.wordpress.net//?p=1766 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1766 1766 0 12 0 <![CDATA[]]> https://playground.wordpress.net//?p=1767 Fri, 15 Dec 2023 21:05:25 +0000 https://playground.wordpress.net//?p=1767 1767 0 17 0 <![CDATA[]]> https://playground.wordpress.net//?p=1768 Fri, 15 Dec 2023 21:05:26 +0000 https://playground.wordpress.net//?p=1768 1768 0 2 0 <![CDATA[]]> https://playground.wordpress.net//?p=1769 Fri, 15 Dec 2023 21:05:26 +0000 https://playground.wordpress.net//?p=1769 1769 0 3 0 <![CDATA[]]> https://playground.wordpress.net//?p=1770 Fri, 15 Dec 2023 21:05:26 +0000 https://playground.wordpress.net//?p=1770 1770 0 4 0 <![CDATA[]]> https://playground.wordpress.net//?p=1771 Fri, 15 Dec 2023 21:05:26 +0000 https://playground.wordpress.net//?p=1771 1771 1725 7 0 <![CDATA[]]> https://playground.wordpress.net//?p=1772 Fri, 15 Dec 2023 21:05:26 +0000 https://playground.wordpress.net//?p=1772 1772 1725 8 0 <![CDATA[]]> https://playground.wordpress.net//?p=1773 Fri, 15 Dec 2023 21:05:26 +0000 https://playground.wordpress.net//?p=1773 1773 1725 9 0 <![CDATA[]]> https://playground.wordpress.net//?p=1774 Fri, 15 Dec 2023 21:05:26 +0000 https://playground.wordpress.net//?p=1774 1774 0 10 0 <![CDATA[]]> https://playground.wordpress.net//?p=1775 Fri, 15 Dec 2023 21:05:26 +0000 https://playground.wordpress.net//?p=1775 1775 0 11 0 <![CDATA[]]> https://playground.wordpress.net//?p=1776 Fri, 15 Dec 2023 21:05:26 +0000 https://playground.wordpress.net//?p=1776 1776 0 12 0 <![CDATA[]]> https://playground.wordpress.net//?p=1777 Fri, 15 Dec 2023 21:05:26 +0000 https://playground.wordpress.net//?p=1777 1777 0 17 0 <![CDATA[]]> https://playground.wordpress.net//?p=1814 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1814 1814 1725 8 0 <![CDATA[]]> https://playground.wordpress.net//?p=1815 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1815 1815 1725 9 0 <![CDATA[]]> https://playground.wordpress.net//?p=1816 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1816 1816 1725 5 0 <![CDATA[]]> https://playground.wordpress.net//?p=1817 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1817 1817 1725 6 0 <![CDATA[]]> https://playground.wordpress.net//?p=1818 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1818 1818 173 13 0 <![CDATA[]]> https://playground.wordpress.net//?p=1819 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1819 1819 173 14 0 <![CDATA[]]> https://playground.wordpress.net//?p=1820 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1820 1820 174 15 0 <![CDATA[]]> https://playground.wordpress.net//?p=1821 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1821 1821 174 16 0 <![CDATA[]]> https://playground.wordpress.net//?p=1822 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1822 1822 0 18 0 <![CDATA[]]> https://playground.wordpress.net//?p=1823 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1823 1823 0 19 0 <![CDATA[Lorem Ipsum]]> https://playground.wordpress.net//?page_id=146 Tue, 04 Sep 2007 16:52:50 +0000 https://wpthemetestdata.wordpress.com/lorem-ipsum/ 146 0 7 0 <![CDATA[Page with comments]]> https://playground.wordpress.net//?page_id=155 Tue, 04 Sep 2007 17:47:47 +0000 https://wpthemetestdata.wordpress.com/page-with-comments/ 155 1725 3 0 3 0 0 4 0 0 5 https://wpthemetestdata.wordpress.com/ 0 0 6 4 0 <![CDATA[Page with comments disabled]]> https://playground.wordpress.net//?page_id=156 Tue, 04 Sep 2007 17:48:10 +0000 https://wpthemetestdata.wordpress.com/page-with-comments-disabled/ 156 1725 4 0 <![CDATA[Level 3]]> https://playground.wordpress.net//?page_id=172 Tue, 11 Dec 2007 06:23:16 +0000 https://wpthemetestdata.wordpress.com/level-3/ 172 173 0 0 <![CDATA[Level 2]]> https://playground.wordpress.net//?page_id=173 Tue, 11 Dec 2007 06:23:33 +0000 https://wpthemetestdata.wordpress.com/level-2/ 173 174 0 0 <![CDATA[Level 1]]> https://playground.wordpress.net//?page_id=174 Tue, 11 Dec 2007 23:25:40 +0000 https://wpthemetestdata.wordpress.com/level-1/ 174 0 5 0 <![CDATA[Clearing Floats]]> https://playground.wordpress.net//?page_id=501 Sun, 01 Aug 2010 16:42:26 +0000 https://wpthemetestdata.wordpress.com/ This is the second page]]> 501 1725 2 0 <![CDATA[Front Page]]> https://playground.wordpress.net//?page_id=701 Sat, 21 May 2011 01:49:43 +0000 https://wpthemetestdata.wordpress.com/?page_id=701 701 0 0 0 <![CDATA[Page A]]> https://playground.wordpress.net//?page_id=733 Fri, 24 Jun 2011 01:38:52 +0000 https://wpthemetestdata.wordpress.com/?page_id=733 733 0 10 0 <![CDATA[Page B]]> https://playground.wordpress.net//?page_id=735 Fri, 24 Jun 2011 01:39:14 +0000 https://wpthemetestdata.wordpress.com/?page_id=735 735 0 11 0 <![CDATA[Level 2a]]> https://playground.wordpress.net//?page_id=742 Fri, 24 Jun 2011 02:03:33 +0000 https://wpthemetestdata.wordpress.com/?page_id=742 742 174 0 0 <![CDATA[About The Tests]]> https://playground.wordpress.net//?page_id=1725 Mon, 26 Jul 2010 02:40:01 +0000 https://wpthemetestdata.wordpress.com/about/ WordPress Theme Development Resources
  1. See the WordPress Theme Developer Handbook for examples of best practices.
  2. See the WordPress Code Reference for more information about WordPress' functions, classes, methods, and hooks.
  3. See Theme Unit Test for a robust test suite for your Theme and get the latest version of the test data you see here.
  4. See Releasing Your Theme for a guide to submitting your Theme to the Theme Directory.
]]>
1725 0 1 0
<![CDATA[]]> https://playground.wordpress.net//?p=1824 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1824 1824 1725 5 0 <![CDATA[]]> https://playground.wordpress.net//?p=1825 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1825 1825 1725 6 0 <![CDATA[]]> https://playground.wordpress.net//?p=1826 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1826 1826 173 13 0 <![CDATA[]]> https://playground.wordpress.net//?p=1827 Fri, 15 Dec 2023 21:05:30 +0000 https://playground.wordpress.net//?p=1827 1827 173 14 0 <![CDATA[]]> https://playground.wordpress.net//?p=1828 Fri, 15 Dec 2023 21:05:31 +0000 https://playground.wordpress.net//?p=1828 1828 174 15 0 <![CDATA[]]> https://playground.wordpress.net//?p=1829 Fri, 15 Dec 2023 21:05:31 +0000 https://playground.wordpress.net//?p=1829 1829 174 16 0 <![CDATA[]]> https://playground.wordpress.net//?p=1830 Fri, 15 Dec 2023 21:05:31 +0000 https://playground.wordpress.net//?p=1830 1830 0 18 0 <![CDATA[]]> https://playground.wordpress.net//?p=1831 Fri, 15 Dec 2023 21:05:31 +0000 https://playground.wordpress.net//?p=1831 1831 0 19 0 <![CDATA[Sample Page]]> https://playground.wordpress.net//?page_id=2 Fri, 15 Dec 2023 08:09:38 +0000 http://127.0.0.1:8000/?page_id=2

This is an example page. It's different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:

Hi there! I'm a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like piña coladas. (And gettin' caught in the rain.)

...or something like this:

The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.

As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!

]]>
2 0 0 0
<![CDATA[Privacy Policy]]> https://playground.wordpress.net//?page_id=3 Fri, 15 Dec 2023 08:09:38 +0000 http://127.0.0.1:8000/?page_id=3

Who we are

Suggested text: Our website address is: http://127.0.0.1:8000.

Comments

Suggested text: When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection.

An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.

Media

Suggested text: If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.

Cookies

Suggested text: If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.

If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.

When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed.

If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.

Embedded content from other websites

Suggested text: Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.

These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

Suggested text: If you request a password reset, your IP address will be included in the reset email.

How long we retain your data

Suggested text: If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.

For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.

What rights you have over your data

Suggested text: If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.

Where your data is sent

Suggested text: Visitor comments may be checked through an automated spam detection service.

]]>
3 0 0 0
<![CDATA[a Blog page]]> https://playground.wordpress.net//?page_id=703 Sat, 21 May 2011 01:51:43 +0000 https://wpthemetestdata.wordpress.com/?page_id=703 703 0 0 0 7 0 0 <![CDATA[Level 2b]]> https://playground.wordpress.net//?page_id=744 Fri, 24 Jun 2011 02:04:03 +0000 https://wpthemetestdata.wordpress.com/?page_id=744 744 174 0 0 <![CDATA[Level 3a]]> https://playground.wordpress.net//?page_id=746 Fri, 24 Jun 2011 02:04:24 +0000 https://wpthemetestdata.wordpress.com/?page_id=746 746 173 0 0 <![CDATA[Level 3b]]> https://playground.wordpress.net//?page_id=748 Fri, 24 Jun 2011 02:04:46 +0000 https://wpthemetestdata.wordpress.com/?page_id=748 748 173 0 0 <![CDATA[Page Image Alignment]]> https://playground.wordpress.net//?page_id=1133 Fri, 15 Mar 2013 23:19:23 +0000 http://wptest.io/demo/?page_id=1080 None, Left, Right, and Center. In addition, they also get the options of Thumbnail, Medium, Large & Fullsize. Be sure to try this page in RTL mode and it should look the same as LTR.

Image Alignment 580x300

The image above happens to be centered. Image Alignment 150x150 The rest of this paragraph is filler for the sake of seeing the text wrap around the 150x150 image, which is left aligned. As you can see there should be some space above, below, and to the right of the image. The text should not be creeping on the image. Creeping is just not right. Images need breathing room too. Let them speak like you words. Let them do their jobs without any hassle from the text. In about one more sentence here, we'll see that the text moves from the right of the image down below the image in seamless transition. Again, letting the do it's thang. Mission accomplished! And now for a massively large image. It also has no alignment. Image Alignment 1200x400 The image above, though 1200px wide, should not overflow the content area. It should remain contained with no visible disruption to the flow of content. Image Alignment 1200x400 And we try the large image again, with the center alignment since that sometimes is a problem. The image above, though 1200px wide, should not overflow the content area. It should remain contained with no visible disruption to the flow of content. Image Alignment 300x200 And now we're going to shift things to the right align. Again, there should be plenty of room above, below, and to the left of the image. Just look at him there... Hey guy! Way to rock that right side. I don't care what the left aligned image says, you look great. Don't let anyone else tell you differently. In just a bit here, you should see the text start to wrap below the right aligned image and settle in nicely. There should still be plenty of room and everything should be sitting pretty. Yeah... Just like that. It never felt so good to be right. And just when you thought we were done, we're going to do them all over again with captions! [caption id="attachment_906" align="aligncenter" width="580"]Image Alignment 580x300 Look at 580x300 getting some caption love.[/caption] The image above happens to be centered. The caption also has a link in it, just to see if it does anything funky. [caption id="attachment_904" align="alignleft" width="150"]Image Alignment 150x150 Bigger caption than the image usually is.[/caption] The rest of this paragraph is filler for the sake of seeing the text wrap around the 150x150 image, which is left aligned. As you can see the should be some space above, below, and to the right of the image. The text should not be creeping on the image. Creeping is just not right. Images need breathing room too. Let them speak like you words. Let them do their jobs without any hassle from the text. In about one more sentence here, we'll see that the text moves from the right of the image down below the image in seamless transition. Again, letting the do it's thang. Mission accomplished! And now for a massively large image. It also has no alignment. [caption id="attachment_907" align="alignnone" width="1200"]Image Alignment 1200x400 Comment for massive image for your eyeballs.[/caption] The image above, though 1200px wide, should not overflow the content area. It should remain contained with no visible disruption to the flow of content. [caption id="attachment_907" align="aligncenter" width="1200"]Image Alignment 1200x400 This massive image is centered.[/caption] And again with the big image centered. The image above, though 1200px wide, should not overflow the content area. It should remain contained with no visible disruption to the flow of content. [caption id="attachment_905" align="alignright" width="300"]Image Alignment 300x200 Feels good to be right all the time.[/caption] And now we're going to shift things to the right align. Again, there should be plenty of room above, below, and to the left of the image. Just look at him there... Hey guy! Way to rock that right side. I don't care what the left aligned image says, you look great. Don't let anyone else tell you differently. In just a bit here, you should see the text start to wrap below the right aligned image and settle in nicely. There should still be plenty of room and everything should be sitting pretty. Yeah... Just like that. It never felt so good to be right. And that's a wrap, yo! You survived the tumultuous waters of alignment. Image alignment achievement unlocked! Last thing is a small image aligned right. Whatever follows should be unaffected. Image Alignment 150x150]]>
1133 1725 0 0
<![CDATA[Page Markup And Formatting]]> https://playground.wordpress.net//?page_id=1134 Fri, 15 Mar 2013 23:20:05 +0000 http://wptest.io/demo/?page_id=1083 Headings

Header one

Header two

Header three

Header four

Header five
Header six

Blockquotes

Single line blockquote:
Stay hungry. Stay foolish.
Multi line blockquote with a cite reference:

The HTML <blockquote> Element (or HTML Block Quotation Element) indicates that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation (see Notes for how to change it). A URL for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the <cite> element.

multiple contributors - MDN HTML element reference - blockquote

Tables

Employee Salary
Jane $1 Because that's all Steve Jobs needed for a salary.
John $100K For all the blogging he does.
Jane $100M Pictures are worth a thousand words, right? So Tom x 1,000.
Jane $100B With hair like that?! Enough said...

Definition Lists

Definition List Title
Definition list division.
Startup
A startup company or startup is a company or temporary organization designed to search for a repeatable and scalable business model.
#dowork
Coined by Rob Dyrdek and his personal body guard Christopher "Big Black" Boykins, "Do Work" works as a self motivator, to motivating your friends.
Do It Live
I'll let Bill O'Reilly will explain this one.

Unordered Lists (Nested)

  • List item one
    • List item one
      • List item one
      • List item two
      • List item three
      • List item four
    • List item two
    • List item three
    • List item four
  • List item two
  • List item three
  • List item four

Ordered List (Nested)

  1. List item one -start at 8
    1. List item one
      1. List item one -reversed attribute
      2. List item two
      3. List item three
      4. List item four
    2. List item two
    3. List item three
    4. List item four
  2. List item two
  3. List item three
  4. List item four

HTML Tags

These supported tags come from the WordPress.com code FAQ. Address Tag
1 Infinite Loop Cupertino, CA 95014 United States
Anchor Tag (aka. Link) This is an example of a link. Abbreviation Tag The abbreviation srsly stands for "seriously". Acronym Tag (deprecated in HTML5) The acronym ftw stands for "for the win". Big Tag (deprecated in HTML5) These tests are a big deal, but this tag is no longer supported in HTML5. Cite Tag "Code is poetry." --Automattic Code Tag This tag styles blocks of code. .post-title { margin: 0 0 5px; font-weight: bold; font-size: 38px; line-height: 1.2; and here's a line of some really, really, really, really long text, just to see how it is handled and to find out how it overflows; } You will learn later on in these tests that word-wrap: break-word; will be your best friend. Delete Tag This tag will let you strike out text, but this tag is recommended supported in HTML5 (use the <s> instead). Emphasize Tag The emphasize tag should italicize text. Horizontal Rule Tag
This sentence is following a <hr /> tag. Insert Tag This tag should denote inserted text. Keyboard Tag This scarcely known tag emulates keyboard text, which is usually styled like the <code> tag. Preformatted Tag This tag is for preserving whitespace as typed, such as in poetry or ASCII art.

The Road Not Taken

 Robert Frost


	Two roads diverged in a yellow wood,
	And sorry I could not travel both          (\_/)
	And be one traveler, long I stood         (='.'=)
	And looked down one as far as I could     (")_(")
	To where it bent in the undergrowth;

	Then took the other, as just as fair,
	And having perhaps the better claim,          |\_/|
	Because it was grassy and wanted wear;       / @ @ \
	Though as for that the passing there        ( > º < )
	Had worn them really about the same,         `>>x<<´
	 /  O  \
	And both that morning equally lay
	In leaves no step had trodden black.
	Oh, I kept the first for another day!
	Yet knowing how way leads on to way,
	I doubted if I should ever come back.

	I shall be telling this with a sigh
	Somewhere ages and ages hence:
	Two roads diverged in a wood, and I—
	I took the one less traveled by,
	And that has made all the difference.


	and here's a line of some really, really, really, really long text, just to see how it is handled and to find out how it overflows;
Quote Tag for short, inline quotes Developers, developers, developers... --Steve Ballmer Strike Tag (deprecated in HTML5) and S Tag This tag shows strike-through text. Small Tag This tag shows smaller text. Strong Tag This tag shows bold text. Subscript Tag Getting our science styling on with H2O, which should push the "2" down. Superscript Tag Still sticking with science and Albert Einstein's E = MC2, which should lift the 2 up. Teletype Tag (obsolete in HTML5) This rarely used tag emulates teletype text, which is usually styled like the <code> tag. Underline Tag deprecated in HTML 4, re-introduced in HTML5 with other semantics This tag shows underlined text. Variable Tag This allows you to denote variables.]]>
1134 1725 0 0
<![CDATA[Ελληνικά-Greek]]> https://playground.wordpress.net//?page_id=1809 Fri, 14 Feb 2020 10:31:00 +0000 https://wpthemetestdata.wordpress.com/?page_id=1809 Headings Επικεφαλίδες

Επικεφαλίδα 1 Header one

Επικεφαλίδα 2 Header two

Επικεφαλίδα 3 Header three

Επικεφαλίδα 2 Header four

Επικεφαλίδα 5 Header five
Επικεφαλίδα 6Header six

Παράθεση άλλου Blockquotes

Single line blockquote: Μια γραμμή
Πάντα να είναι περίεργος.
Πολλές γραμμέ με αναφορά Multi line blockquote with a cite reference:
Το HTML <blockquote> ElementHTML Block Quotation Element) καταδεικνύει ότι το κείμενο έχει μια παράθεση. Συνήθως οπτικοποιείται με εσοχή (δείτε Σημειώσεις για το πως να το αλλάξετε. Ίσως να δίνεται και URL πηγής με την χρήση του cite attribute, μπλα, μπλα <cite> .
multiple contributors - MDN HTML element reference - blockquote

Πίνακες Tables

Υπάλληλος Employee Μισθός Salary
Τάδε κάποιος $1 Γιατί τόσα χρειάζεται για να ζήσει
Jane Doe $100K For all the blogging she does.
Fred Bloggs $100M Pictures are worth a thousand words, right? So Jane x 1,000.
Jane Bloggs $100B With hair like that?! Enough said...

Λίστες Definition Lists

Τίτλος λίστας Definition List Title
Υποδιαίρεση λίστας Definition list division.

Λίστα με κουκίδες Unordered Lists (Nested)

  • Πρώτο στοιχείο List item one
    • Στοιχείο πρώτο List item one
      • Στοιχείο λίστα ένα List item one
      • Στοιχείο λίστας δύο List item two
    • Στοιχείο δεύτερο -item two
  • Στοιχειο δύο List item two

Αριθμημένη λίστα(Nested)

  1. Στοιχειο ξεκινά με 8-start at 8
    1. Στοιχείο λίστας ενα List item one
      1. Στοιχείο λίστας ενα  -reversed attribute
      2. Στοιχείο λίστας δύο
    2. Δεύτερο στοιχείο
  2. Στοιχείο δύο

Ετικέττες HTML Tags

Διεύθυνση Address Tag
1 Απέραντη διαδρομή Infinite Loop Απλωπολή , ΤΚ 95014 Ελλάδα
Αγκυρωση Anchor Tag (aka. Link) Πάραδειγμα συνδέσμου. Συντομογραφία Abbreviation Tag Η συντομογραφία κτλ σημαίνει "Και τα λοιπά". Ακρωνύμιο Acronym Tag Το ακρωνύμιο κυρ σημαίνει "Κύριος". Big Tag Αυτό είναι μεγάλο θέμα Cite Tag "Φάε το φαϊ σου" --Όλες οι μαμάδες Code Tag This tag styles blocks of code. .post-title { margin: 0 0 5px; font-weight: bold; font-size: 38px; line-height: 1.2; και μία γραμμή με πολύ πάρα πολύ υπερβολικά πάρα πολύ μεγάλο κείμενο που πρέπει να δούμε πως το χειρίζεται η γραμματοσειρά και αν ξεχειλίζει από τις γραμμές και δημιουργεί πρόβλημα; } Διαγραφή Delete Tag Μπορείτε να διαγράφεται κείμενο, αλλά δεν συνιστάται. Έμφαση Emphasize Tag Θα πρέπει να κάνει ιταλικ italicize το κείμενο. Εισαγωγή Insert Tag Αυτό το tag υποδηλώνει εισηγμένο inserted κείμενο. Keyboard Tag Αυτό το ελάχιστο γνωστό κείμενο πληκτρολογίου keyboard Tag, συνήθως μορφοποιείται όμοια με το <κώδικα code> tag. Προδιαμορφωμένο Preformatted Tag

Ο Δρόμος που δεν διάλεξα - The Road Not Taken

Robert Frost
	 Δυο δρόμοι διασταυρώθηκαν σ' ένα χρυσαφένιο δάσος ,
	 Και προς λύπη μου και τους δυο τα πόδια μου να ταξιδέψουν δεν μπορούσαν
	 Κι επί μακρόν εστάθηκα , καθώς ένας ήμουν ταξιδευτής μονάχος ,
	 κι έστρεψα το βλέμμα μου στον πρώτο όσο να χαθεί στο βάθος
	 μέχρι εκεί που χάνονταν στα άγρια χόρτα που βλαστούσαν.

	Two roads diverged in a yellow wood,
	And sorry I could not travel both          (\_/)
	And be one traveler, long I stood         (='.'=)
	And looked down one as far as I could     (")_(")
	To where it bent in the undergrowth;

	Then took the other, as just as fair,
	And having perhaps the better claim,          |\_/|
	Because it was grassy and wanted wear;       / @ @ \
	Though as for that the passing there        ( > º < )
	Had worn them really about the same,         `>>x<<´
	 /  O  \
	And both that morning equally lay
	In leaves no step had trodden black.
	Oh, I kept the first for another day!
	Yet knowing how way leads on to way,
	I doubted if I should ever come back.

	I shall be telling this with a sigh
	Somewhere ages and ages hence:
	Two roads diverged in a wood, and I—
	I took the one less traveled by,
	And that has made all the difference.


	και μία μακριά, πάρα πολύ μακριά, υπερβολικά μακροσκελής δίχως νόημα πρόταση για να δούμε πως το χειρίζεται το θέμα εμφάνισης και αν αναδιπλώνεται, κρύβεται ή ξεχειλίζει;
Quote Tag for short, inline quotes Προγραμματιστές, προγραμματιστές, developers... --Steve Ballmer Strike Tag (deprecated in HTML5) and S Tag Αυτή η ετικέτα είναι με διαγράμμιση strike-through κείμενο text. Μικρά Small Tag Αυτή η ετικέτα είναι μικρότερο smaller κείμενο text. Strong Tag Αυτή η ετικέτα δείχνει έντονο bold κείμενο text. Subscript Tag Getting our science styling on with H2 δύοO, which should push the "2" down. Superscript Tag Still sticking with science and Albert Einstein's E = MC2 δύο, which should lift the 2 up. Teletype Tag (obsolete in HTML5) Αυτή η ετικέτα δείχνει τυλετυπος teletype κείμενο, which is usually styled like the <κώδικα code> tag. Underline Tag deprecated in HTML 4, re-introduced in HTML5 with other semantics Αυτή η ετικέτα δείχνει υπογράμμιση underlined text. Variable Tag Αυτή η ετικέτα δείχνει παράμετροι variables.]]>
1809 0 0 0
<![CDATA[Επίπεδο 2 -Second Greek level]]> https://playground.wordpress.net//?page_id=1811 Fri, 14 Feb 2020 10:31:47 +0000 https://wpthemetestdata.wordpress.com/?page_id=1811 1811 1809 0 0 <![CDATA[Επίπεδο 3]]> https://playground.wordpress.net//?page_id=1813 Fri, 14 Feb 2020 10:32:50 +0000 https://wpthemetestdata.wordpress.com/?page_id=1813 1813 1811 0 0
================================================ FILE: .wordpress-version-checker.json ================================================ { "readme": "readme.txt", "channel": "rc" } ================================================ FILE: .wp-env.json ================================================ { "plugins": [".","./tests/test-plugins"], "env": { "tests": { "mappings": { "wp-cli.yml": "./tests/bin/wp-cli.yml" } } } } ================================================ FILE: CHANGELOG.md ================================================ # Changelog All notable changes to this project will be documented in this file, per [the Keep a Changelog standard](http://keepachangelog.com/), and will adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] - TBD ## [2.8.0] - 2026-05-15 **Note that this release bumps the WordPress minimum version from 6.6 to 6.8.** ### Added - Add filter to disable page row actions (props [@sanketio](https://github.com/sanketio), [@faisal-alvi](https://github.com/faisal-alvi) via [#249](https://github.com/10up/simple-page-ordering/pull/249)). ### Fixed - Resolved issue with emoji in page titles (props [@jamesmorrison](https://github.com/jamesmorrison),[@dkotter](https://github.com/dkotter) via [#248](https://github.com/10up/simple-page-ordering/pull/248)). ### Changed - Indicate WordPress 7.0 compatibility (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@jasperfrontend](https://github.com/jasperfrontend), [@jeffpaul](https://github.com/jeffpaul) via [#254](https://github.com/10up/simple-page-ordering/pull/254), [#271](https://github.com/10up/simple-page-ordering/pull/271)). - Remove bundled translation file in favour of wp.org distributed file (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@dkotter](https://github.com/dkotter) via [#279](https://github.com/10up/simple-page-ordering/pull/279)). - Bump WordPress minimum supported version to 6.8 (props [@jeffpaul](https://github.com/jeffpaul), [@jasperfrontend](https://github.com/jasperfrontend) via [#271](https://github.com/10up/simple-page-ordering/pull/271)). ### Security - Bump 10up-toolkit to 6.5.0 (props [@jamesmorrison](https://github.com/jamesmorrison),[@dkotter](https://github.com/dkotter) via [#247](https://github.com/10up/simple-page-ordering/pull/247)). - Bump `http-proxy-middleware` from 2.0.6 to 2.0.9 and `tar-fs` from 2.1.2 to 3.0.9 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#244](https://github.com/10up/simple-page-ordering/pull/244)). - Bump `bytes` from 3.0.0 to 3.1.2 and `compression` from 1.7.4 to 1.8.1 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#246](https://github.com/10up/simple-page-ordering/pull/246)). - Bump `tmp` from 0.2.1 to 0.2.5, `@wordpress/env` from 9.2.0 to 10.28.0, `inquirer` from 8.2.6 to 8.2.7, `form-data` from 2.3.3 to 4.0.4, and `@cypress/request` from 3.0.1 to 3.0.9 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#250](https://github.com/10up/simple-page-ordering/pull/250)). - Bump `@babel/plugin-transform-modules-systemjs` from 7.23.9 to 7.29.4, `postcss` from 8.4.33 to 8.5.14, and `simple-git` from 3.33.0 to 3.36.0 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#277](https://github.com/10up/simple-page-ordering/pull/277)). - Updates the NPM dependencies throwing security alerts via NPM audit (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@dkotter](https://github.com/dkotter) via [#256](https://github.com/10up/simple-page-ordering/pull/256)). - Bump `lodash` from 4.17.21 to 4.18.1 (props [@dependabot](https://github.com/apps/dependabot), [@dkotter](https://github.com/dkotter) via [#258](https://github.com/10up/simple-page-ordering/pull/258), [#269](https://github.com/10up/simple-page-ordering/pull/269)). - Bump `webpack` from 5.94.0 to 5.105.0 (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@dependabot](https://github.com/apps/dependabot) via [#259](https://github.com/10up/simple-page-ordering/pull/259)). - Bump `qs` from 6.14.1 to 6.14.2 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#260](https://github.com/10up/simple-page-ordering/pull/260)). - Bump `immutable` from 4.3.5 to 4.3.8 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#261](https://github.com/10up/simple-page-ordering/pull/261)). - Bump `svgo` from 3.2.0 to 3.3.3 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#262](https://github.com/10up/simple-page-ordering/pull/262)). - Bump `simple-git` from 3.22.0 to 3.33.0 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#263](https://github.com/10up/simple-page-ordering/pull/263)). - Bump `flatted` from 3.2.9 to 3.4.2 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#264](https://github.com/10up/simple-page-ordering/pull/264)). - Bump `picomatch` from 2.3.1 to 2.3.2 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#266](https://github.com/10up/simple-page-ordering/pull/266)). - Bump `node-forge` from 1.3.3 to 1.4.0 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#268](https://github.com/10up/simple-page-ordering/pull/268)). - Bump `follow-redirects` from 1.15.11 to 1.16.0 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#270](https://github.com/10up/simple-page-ordering/pull/270)). - Bump `fast-uri` from 3.1.0 to 3.1.2 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#274](https://github.com/10up/simple-page-ordering/pull/274)). ### Developer - Add Patchstack security-reporting FAQ (props [@jeffpaul](https://github.com/jeffpaul) via [#257](https://github.com/10up/simple-page-ordering/pull/257)). ## [2.7.4] - 2025-05-19 **Note that this release bumps the WordPress minimum version from 6.5 to 6.6.** ### Changed - Bump WordPress "tested up to" version 6.8 (props [@jeffpaul](https://github.com/jeffpaul) via [#239](https://github.com/10up/simple-page-ordering/pull/239), [#240](https://github.com/10up/simple-page-ordering/pull/240)). - Bump WordPress minimum from 6.5 to 6.6 (props [@jeffpaul](https://github.com/jeffpaul) via [#239](https://github.com/10up/simple-page-ordering/pull/239)). ### Security - Bump `tar-fs` from 2.1.1 to 3.0.8 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#238](https://github.com/10up/simple-page-ordering/pull/238)). - Bump `@babel/runtime` from 7.23.9 to 7.27.0 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#237](https://github.com/10up/simple-page-ordering/pull/237)). ### Developer - Adjust `makepot` to only happen during deploy instead of during every build (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#241](https://github.com/10up/simple-page-ordering/pull/241)). - Update all third-party actions our workflows rely on to use versions based on specific commit hashes (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#235](https://github.com/10up/simple-page-ordering/pull/235)). ## [2.7.3] - 2025-03-11 **Note that this release bumps the WordPress minimum version from 6.4 to 6.5.** ### Changed - Bump WordPress "tested up to" version 6.7 (props [@sudip-md](https://github.com/sudip-md), [@godleman](https://github.com/godleman), [@jeffpaul](https://github.com/jeffpaul) via [#230](https://github.com/10up/simple-page-ordering/pull/230), [#231](https://github.com/10up/simple-page-ordering/pull/231)). - Bump WordPress minimum from 6.4 to 6.5 (props [@sudip-md](https://github.com/sudip-md), [@godleman](https://github.com/godleman), [@jeffpaul](https://github.com/jeffpaul) via [#230](https://github.com/10up/simple-page-ordering/pull/230), [#231](https://github.com/10up/simple-page-ordering/pull/231)). ### Security - Bump `webpack` from 5.90.0 to 5.94.0 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#224](https://github.com/10up/simple-page-ordering/pull/224)). - Bump `serve-static` from 1.15.0 to 1.16.2 and `express` from 4.19.2 to 4.21.0 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#226](https://github.com/10up/simple-page-ordering/pull/226)). - Bump `cookie` from 0.6.0 to 0.7.1 and `express` from 4.21.0 to 4.21.1 (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#228](https://github.com/10up/simple-page-ordering/pull/228)). - Bump `serialize-javascript` from 6.0.0 to 6.0.2 and `mocha` from 10.2.0 to 11.1.0 (props [@dependabot](https://github.com/apps/dependabot), [@dkotter](https://github.com/dkotter) via [#232](https://github.com/10up/simple-page-ordering/pull/232)). ### Developer - Update the README file to include a banner image and update badges shown (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#225](https://github.com/10up/simple-page-ordering/pull/225), [#227](https://github.com/10up/simple-page-ordering/pull/227)). ## [2.7.2] - 2024-08-21 **Note that this release bumps the WordPress minimum version from 6.3 to 6.4.** ### Changed - Bump WordPress "tested up to" version 6.6 (props [@sudip-md](https://github.com/sudip-md), [@ankitguptaindia](https://github.com/ankitguptaindia), [@jeffpaul](https://github.com/jeffpaul) via [#216](https://github.com/10up/simple-page-ordering/pull/216), [#217](https://github.com/10up/simple-page-ordering/pull/217)). - Bump WordPress minimum from 6.3 to 6.4 (props [@sudip-md](https://github.com/sudip-md), [@ankitguptaindia](https://github.com/ankitguptaindia), [@jeffpaul](https://github.com/jeffpaul) via [#216](https://github.com/10up/simple-page-ordering/pull/216)). ### Fixed - Issue where an `Undefined array key` error occurs when a post parent ID does not exist in the `$children_pages` array (props [@xDehy](https://github.com/xDehy), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#219](https://github.com/10up/simple-page-ordering/pull/219)). ### Security - Bump `express` from 4.18.2 to 4.19.2, `follow-redirects` from 1.15.5 to 1.15.6, `postcss` from 7.0.39 to 8.4.33, `10up-toolkit` from 5.2.3 to 6.1.0 and `webpack-dev-middleware` from 5.3.3 to 5.3.4 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#208](https://github.com/10up/simple-page-ordering/pull/208)). - Bump `braces` from 3.0.2 to 3.0.3 and `ws` from 7.5.9 to 7.5.10 (props [@dependabot](https://github.com/apps/dependabot), [@iamdharmesh](https://github.com/iamdharmesh) via [#214](https://github.com/10up/simple-page-ordering/pull/214)). ### Developer - Update the `importFile` step to be `importWxr` in our `blueprint.json` config (props [@ernilambar](https://github.com/ernilambar), [@dkotter](https://github.com/dkotter) via [#210](https://github.com/10up/simple-page-ordering/pull/210)). - Update repo badges, add WordPress Playground badge (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#221](https://github.com/10up/simple-page-ordering/pull/221)). ## [2.7.1] - 2024-06-03 ### Added - The missing Text Domain (props [@alexclassroom](https://github.com/alexclassroom), [@dkotter](https://github.com/dkotter) via [#199](https://github.com/10up/simple-page-ordering/pull/199)). - The "Testing" section in the `CONTRIBUTING.md` file (props [@kmgalanakis](https://github.com/kmgalanakis), [@jeffpaul](https://github.com/jeffpaul) via [#202](https://github.com/10up/simple-page-ordering/pull/202)). ### Changed - Bump WordPress "tested up to" version 6.5 (props [@jeffpaul](https://github.com/jeffpaul), [@sudip-md](https://github.com/sudip-md), [@dkotter](https://github.com/dkotter) via [#201](https://github.com/10up/simple-page-ordering/pull/201)). - Bump WordPress minimum from 5.7 to 6.3 (props [@jeffpaul](https://github.com/jeffpaul), [@sudip-md](https://github.com/sudip-md), [@dkotter](https://github.com/dkotter) via [#201](https://github.com/10up/simple-page-ordering/pull/201)). ### Fixed - Fixed error in call to `get_walked_pages` for custom post types (props [@sissibieber](https://github.com/sissibieber), [@zachgibb](https://github.com/zachgibb), [@peterwilsoncc](https://github.com/peterwilsoncc), [@mjot](https://github.com/mjot), [@jeffpaul](https://github.com/jeffpaul) via [#200](https://github.com/10up/simple-page-ordering/pull/200)). ## [2.7.0] - 2024-04-03 ### Added - Ability to modify the page hierarchy (props [@amityweb](https://github.com/amityweb), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc), [@shannonmfisher](https://github.com/shannonmfisher), [@ankitguptaindia](https://github.com/ankitguptaindia), [@faisal-alvi](https://github.com/faisal-alvi) via [#172](https://github.com/10up/simple-page-ordering/pull/172)). - Support for the WordPress.org plugin preview (props [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul) via [#183](https://github.com/10up/simple-page-ordering/pull/183)). ### Changed - Replaced custom HTML entity decoding code in favor of the `@wordpress/html-entities` package (props [@helen](https://github.com/helen), [@jeffpaul](https://github.com/jeffpaul), [@psorensen](https://github.com/psorensen), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#189](https://github.com/10up/simple-page-ordering/pull/189)). - Bump minimum `node` version from `16` to `20` and clean up NPM dependencies (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#188](https://github.com/10up/simple-page-ordering/pull/188)). - Updated CODEOWNERS (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#186](https://github.com/10up/simple-page-ordering/pull/186)). - Upgrade the download-artifact from v3 to v4 (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#194](https://github.com/10up/simple-page-ordering/pull/194)). - Replaced [lee-dohm/no-response](https://github.com/lee-dohm/no-response) with [actions/stale](https://github.com/actions/stale) to help with closing no-response/stale issues (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [@195](https://github.com/10up/simple-page-ordering/pull/195)). - Disabled auto sync pull requests with target branch (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#196](https://github.com/10up/simple-page-ordering/pull/196)). ### Security - Bump `@babel/traverse` from `7.20.12` to `7.23.6` (props [@dependabot](https://github.com/apps/dependabot), [@ravinderk](https://github.com/ravinderk) via [#184](https://github.com/10up/simple-page-ordering/pull/184)). - Bump `sharp` from `0.30.7` to `0.32.1` (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#182](https://github.com/10up/simple-page-ordering/pull/184)). - Bump `10up-toolkit` from `4.3.1` to `5.2.2` (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#182](https://github.com/10up/simple-page-ordering/pull/182)). ## [2.6.3] - 2023-11-09 ### Fixed - Deployment issue with version 2.6.2 (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#181](https://github.com/10up/simple-page-ordering/pull/181)) ## [2.6.2] - 2023-11-09 ### Changed - Update the `wp-compat-validation-tool` composer package to version `0.3.1` which properly removes the `.git` directory (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#180](https://github.com/10up/simple-page-ordering/pull/180)). ## [2.6.1] - 2023-11-08 ### Changed - Bump WordPress "tested up to" version 6.4 (props [@jeffpaul](https://github.com/jeffpaul), [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@faisal-alvi](https://github.com/faisal-alvi) via [#177](https://github.com/10up/simple-page-ordering/pull/177)). - Remove the .git directory from the `10up-lib` directory (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#175](https://github.com/10up/simple-page-ordering/pull/175)). ### Security - Bumps `@babel/traverse` from `7.20.12` to `7.23.2` (props [@peterwilsoncc](https://github.com/peterwilsoncc) via [#170](https://github.com/10up/simple-page-ordering/pull/170)). ## [2.6.0] - 2023-10-25 ### Added - A check for minimum required PHP version before loading the plugin (props [@vikrampm1](https://github.com/vikrampm1), [@kmgalanakis](https://github.com/kmgalanakis), [@Sidsector9](https://github.com/Sidsector9) via [#153](https://github.com/10up/simple-page-ordering/pull/153)). - Mochawesome reporter added for Cypress test report (props [@iamdharmesh](https://github.com/iamdharmesh), [@jayedul](https://github.com/jayedul), [@faisal-alvi](https://github.com/faisal-alvi) via [#146](https://github.com/10up/simple-page-ordering/pull/146)). - Repo Automator GitHub Action (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#158](https://github.com/10up/simple-page-ordering/pull/158)). ### Changed - Bump WordPress "tested up to" version 6.3 (props [@jeffpaul](https://github.com/jeffpaul), [@QAharshalkadu](https://github.com/QAharshalkadu) via [#156](https://github.com/10up/simple-page-ordering/pull/156)). - Slightly change how some of our text is translated, passing in the post type (props [@dkotter](https://github.com/dkotter), [@ravinderk](https://github.com/ravinderk) via [#149](https://github.com/10up/simple-page-ordering/pull/149)). - Updates the Dependency Review GitHub Action to check for GPL-compatible licenses (props [@jeffpaul](https://github.com/jeffpaul), [@Sidsector9](https://github.com/Sidsector9) via [#147](https://github.com/10up/simple-page-ordering/pull/147)). - Updated 10up Cypress Utilities to 0.2.0 (props [@iamdharmesh](https://github.com/iamdharmesh), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#160](https://github.com/10up/simple-page-ordering/pull/160)). ### Fixed - The "Are you sure..." popup text to be translatable (props [@kebbet](https://github.com/kebbet), [@bmarshall511](https://github.com/bmarshall511), [@dkotter](https://github.com/dkotter) via [#148](https://github.com/10up/simple-page-ordering/pull/148)). - Remove code that was no longer needed (props [@dkotter](https://github.com/dkotter), [@ravinderk](https://github.com/ravinderk) via [#149](https://github.com/10up/simple-page-ordering/pull/149)). - Add missing escaping (props [@dkotter](https://github.com/dkotter), [@ravinderk](https://github.com/ravinderk) via [#149](https://github.com/10up/simple-page-ordering/pull/149)). - Fatal error following the introduction of a namespace (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#162](https://github.com/10up/simple-page-ordering/pull/162)). - Hidden pagination in admin screen when Sort by Order is clicked (props [@tlovett1](https://github.com/tlovett1), [@dkotter](https://github.com/dkotter), [@Sidsector9](https://github.com/Sidsector9) via [#165](https://github.com/10up/simple-page-ordering/pull/165)). - Fatal errors on PHP 5.6 (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@Sidsector9](https://github.com/Sidsector9), [@iamdharmesh](https://github.com/iamdharmesh) via [#166](https://github.com/10up/simple-page-ordering/pull/166)). ### Security - Bump `word-wrap` from 1.2.3 to 1.2.4 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#](https://github.com/10up/simple-page-ordering/pull/151)). - Bump `tough-cookie` from 4.1.2 to 4.1.3 (props [@faisal-alvi](https://github.com/faisal-alvi) via [#152](https://github.com/10up/simple-page-ordering/pull/152)). - Bump `node-sass` from 7.0.3 to 9.0.0 (props [@faisal-alvi](https://github.com/faisal-alvi) via [#152](https://github.com/10up/simple-page-ordering/pull/152)). - Bump `@cypress/request` from 2.88.11 to 3.0.0 to resolve SSRF issue (props [@faisal-alvi](https://github.com/faisal-alvi), [@iamdharmesh](https://github.com/iamdharmesh), [@peterwilsoncc](https://github.com/peterwilsoncc), [@dkotter](https://github.com/dkotter) via [#152](https://github.com/10up/simple-page-ordering/pull/152), [#160](https://github.com/10up/simple-page-ordering/pull/160)). ## [2.5.1] - 2023-05-16 ### Security - Ensure we check user permissions properly in our REST endpoint (props [@mikhail-net](https://github.com/mikhail-net), [@dkotter](https://github.com/dkotter), [@peterwilsoncc](https://github.com/peterwilsoncc)). ## [2.5.0] - 2023-04-18 **Note that this release bumps the minimum required versions of PHP from 5.6 to 7.4 and WordPress from 3.8 to 5.7.** ### Added - Feature to reset page order (props [@pattonwebz](https://github.com/pattonwebz), [@ruscoe](https://github.com/ruscoe), [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter)) via [#129](https://github.com/10up/simple-page-ordering/pull/129). - JS linting GitHub Action (props [@Sidsector9](https://github.com/Sidsector9), [@kmgalanakis](https://github.com/kmgalanakis), [@peterwilsoncc](https://github.com/peterwilsoncc)) via [#136](https://github.com/10up/simple-page-ordering/pull/136). ### Changed - Bump minimum PHP version to 7.4 (props [@vikrampm1](https://github.com/vikrampm1), [@Sidsector9](https://github.com/Sidsector9), [@ravinderk](https://github.com/ravinderk), [@cadic](https://github.com/cadic)) via [#111](https://github.com/10up/simple-page-ordering/pull/111). - Bump minimum required WordPress version from 3.8 to 5.7 (props [@vikrampm1](https://github.com/vikrampm1), [@Sidsector9](https://github.com/Sidsector9), [@ravinderk](https://github.com/ravinderk), [@cadic](https://github.com/cadic)) via [#111](https://github.com/10up/simple-page-ordering/pull/111). - Bump WordPress "tested up to" version 6.2 (props [@av3nger](https://github.com/av3nger) via [#138](https://github.com/10up/simple-page-ordering/pull/138)). - Run E2E tests on the zip generated by "Build release zip" action (props [@iamdharmesh](https://github.com/iamdharmesh), [@jayedul](https://github.com/jayedul), [@dkotter](https://github.com/dkotter)) via [#135](https://github.com/10up/simple-page-ordering/pull/135). ### Fixed - Removed a typo in a REST response message (props [@ruscoe](https://github.com/ruscoe), [@Sidsector9](https://github.com/Sidsector9)) via [#133](https://github.com/10up/simple-page-ordering/pull/133). ### Security - Removed vulnerable NPM dependencies (props [@vikrampm1](https://github.com/vikrampm1), [@Sidsector9](https://github.com/Sidsector9), [@ravinderk](https://github.com/ravinderk), [@cadic](https://github.com/cadic)) via [#111](https://github.com/10up/simple-page-ordering/pull/111). - Bump `cypress` from `9.5.2` to `11.2.0` (props [@iamdharmesh](https://github.com/iamdharmesh), [@jayedul](https://github.com/jayedul), [@Sidsector9](https://github.com/Sidsector9)) via [#120](https://github.com/10up/simple-page-ordering/pull/120). - Bump `http-cache-semantics` from 4.1.0 to 4.1.1 (props [@peterwilsoncc](https://github.com/peterwilsoncc) via [#131](https://github.com/10up/simple-page-ordering/pull/131)). - Bump `webpack` from `5.75.0` to `5.76.1` (props [@Sidsector9](https://github.com/Sidsector9)) via [#134](https://github.com/10up/simple-page-ordering/pull/134). ## [2.4.4] - 2023-01-10 ### Changed - Update Support Level from `Active` to `Stable` (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#123](https://github.com/10up/simple-page-ordering/pull/123)). - Bump WordPress "tested up to" version to 6.1 (props [@jayedul](https://github.com/jayedul), [@dkotter](https://github.com/dkotter) via [#118](https://github.com/10up/simple-page-ordering/pull/118)). - Update the "Build release zip" workflow to use 10up's `build-zip` action (props [@iamdharmesh](https://github.com/iamdharmesh), [@faisal-alvi](https://github.com/faisal-alvi), [@dkotter](https://github.com/dkotter) via [#119](https://github.com/10up/simple-page-ordering/pull/119)). ### Security - Bump `loader-utils` from 2.0.3 to 2.0.4 (props [@dependabot](https://github.com/apps/dependabot) via [#115](https://github.com/10up/simple-page-ordering/pull/115)). - Bump `simple-git` from 3.12.0 to 3.15.1 (props [@dependabot](https://github.com/apps/dependabot) via [#121](https://github.com/10up/simple-page-ordering/pull/121)). ## [2.4.3] - 2022-11-08 ### Changed - Allow hierarchical post types that don't have `page-attributes` set to be sorted properly (props [@dkotter](https://github.com/dkotter), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#108](https://github.com/10up/simple-page-ordering/pull/108)). ### Security - Bump `got` from 10.7.0 to 11.8.5 (props [@dependabot](https://github.com/apps/dependabot) via [#106](https://github.com/10up/simple-page-ordering/pull/106)). - Bump `@wordpress/env` from 4.9.0 to 5.3.0 (props [@dependabot](https://github.com/apps/dependabot) via [#106](https://github.com/10up/simple-page-ordering/pull/106)). - Bump `scss-tokenizer` from 0.3.0 to 0.4.3 (props [@dependabot](https://github.com/apps/dependabot) via [#107](https://github.com/10up/simple-page-ordering/pull/107)). - Bump `node-sass` from 7.0.1 to 7.0.3 (props [@dependabot](https://github.com/apps/dependabot) via [#107](https://github.com/10up/simple-page-ordering/pull/107)). ## [2.4.2] - 2022-09-28 ### Changed - Replaced our Grunt build process with `10up-toolkit` (props [@cadic](https://github.com/cadic), [@peterwilsoncc](https://github.com/peterwilsoncc), [@dinhtungdu](https://github.com/dinhtungdu) via [#97](https://github.com/10up/simple-page-ordering/pull/97)). ### Fixed - Disable reordering for CPTs that don't support `page-attributes` (props [@dhanendran](https://github.com/dhanendran), [@dinhtungdu](https://github.com/dinhtungdu), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#103](https://github.com/10up/simple-page-ordering/pull/103)). ## [2.4.1] - 2022-06-21 ### Added - Missing text domain to strings (props [@kebbet](https://github.com/kebbet), [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul) via [#92](https://github.com/10up/simple-page-ordering/pull/92)). ### Fixed - Condition in REST page sorting logic in `rest_page_ordering` method (props [@szepeviktor](https://github.com/szepeviktor), [@iamdharmesh](https://github.com/iamdharmesh) via [#94](https://github.com/10up/simple-page-ordering/pull/94)). - PHP Coding standards (props [@szepeviktor](https://github.com/szepeviktor), [@dinhtungdu](https://github.com/dinhtungdu) via [#93](https://github.com/10up/simple-page-ordering/pull/93)). ### Changed - Bump WordPress "tested up to" version to 6.0 (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@vikrampm1](https://github.com/vikrampm1), [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul) via [#95](https://github.com/10up/simple-page-ordering/pull/95), [#98](https://github.com/10up/simple-page-ordering/pull/98)). ### Security - Bump `grunt` from 1.5.2 to 1.5.3 (props [@dependabot](https://github.com/apps/dependabot) via [#99](https://github.com/10up/simple-page-ordering/pull/99)). ## [2.4.0] - 2022-04-28 ### Added - REST API for reordering posts: `/wp-json/simplepageordering/v1/page_ordering/` (props [@rmccue](https://github.com/rmccue), [@ciprianimike](https://github.com/ciprianimike), [@cadic](https://github.com/cadic), [@lkraav](https://github.com/lkraav), [@dinhtungdu](https://github.com/dinhtungdu) via [#74](https://github.com/10up/simple-page-ordering/pull/74)). - [REST Endpoint Documentation](https://github.com/10up/simple-page-ordering/blob/develop/README.md). - Documentation to exclude post types (props [@dzulfriday](https://profiles.wordpress.org/dzulfriday/) [@dinhtungdu](https://github.com/dinhtungdu), [@jeffpaul](https://github.com/jeffpaul) via [#60](https://github.com/10up/simple-page-ordering/pull/60)). - PHP8 compatibility testing GitHub Action (props [@Sidsector9](https://profiles.wordpress.org/Sidsector9/), [@iamdharmesh](https://github.com/iamdharmesh) via [#84](https://github.com/10up/simple-page-ordering/pull/84)). - Cypress E2E tests (props [@dinhtungdu](https://github.com/dinhtungdu), [@iamdharmesh](https://github.com/iamdharmesh), [@faisal-alvi](https://github.com/faisal-alvi) via [#82](https://github.com/10up/simple-page-ordering/pull/82)). - Dependency security scanning GiHhub Action (props [@jeffpaul](https://github.com/jeffpaul), [Sidsector9](https://profiles.wordpress.org/Sidsector9/) via [#86](https://github.com/10up/simple-page-ordering/pull/86)). ### Changed - `PLUGIN_VERSION` to `SIMPLE_PAGE_ORDERING_VERSION` (props [@dinhtungdu](https://github.com/dinhtungdu), [@dkotter](https://github.com/dkotter) via [#81](https://github.com/10up/simple-page-ordering/pull/81)). - Bump WordPress "tested up to" version to 5.9 (props [@ankitguptaindia](https://github.com/ankitguptaindia), [@phpbits](https://github.com/phpbits), [@sudip-10up](https://github.com/sudip-10up) via [#69](https://github.com/10up/simple-page-ordering/pull/69), [#72](https://github.com/10up/simple-page-ordering/pull/72), [#76](https://github.com/10up/simple-page-ordering/pull/76)). ### Security - Bump `rmccue/requests` from 1.7.0 to 1.8.0 (props [@dependabot](https://github.com/apps/dependabot) via [#70](https://github.com/10up/simple-page-ordering/pull/70)). - Bump `async` from 2.6.3 to 2.6.4 (props [@dependabot](https://github.com/apps/dependabot) via [#87](https://github.com/10up/simple-page-ordering/pull/87)). ## [2.3.4] - 2020-04-07 ### Added - Acceptance testing using [WP Acceptance](https://github.com/10up/wpacceptance/) (props [@dinhtungdu](https://github.com/dinhtungdu) via [#42](https://github.com/10up/simple-page-ordering/pull/42)). ### Changed - Avoid failed reordering introduced in v2.3.3 when handling a large number of non-hierarchical items (props [@dinhtungdu](https://github.com/dinhtungdu) via [#51](https://github.com/10up/simple-page-ordering/pull/51)). - Bump WordPress version support to 5.4 (props [@tmoorewp](https://github.com/tmoorewp) via [#50](https://github.com/10up/simple-page-ordering/pull/50)). ### Fixed - Ensure titles of reordered items appear in a human-readable way (props [@dinhtungdu](https://github.com/dinhtungdu) via [#53](https://github.com/10up/simple-page-ordering/pull/53)). ## [2.3.3] - 2020-03-04 ### Added - Nonce verify for AJAX requests (props [@pattonwebz](https://github.com/pattonwebz), [@dtbaker](https://github.com/dtbaker) via [#23](https://github.com/10up/simple-page-ordering/pull/23)). ### Changed - Disable Post Revisions now using the correct action of `post_updated` (props [@jakejackson1](https://github.com/jakejackson1) via [#26](https://github.com/10up/simple-page-ordering/pull/26)). - Bump WordPress version "tested up to" 5.3 (props [@adamsilverstein](https://github.com/adamsilverstein), [@dinhtungdu](https://github.com/dinhtungdu) via [#30](https://github.com/10up/simple-page-ordering/pull/30), [#36](https://github.com/10up/simple-page-ordering/pull/36)). - Documentation updates (props [@jeffpaul](https://github.com/jeffpaul) via [#31](https://github.com/10up/simple-page-ordering/pull/31), [#33](https://github.com/10up/simple-page-ordering/pull/33)). ### Fixed - Mismatched localized data variable name (props [@dinhtungdu](https://github.com/dinhtungdu) via [#36](https://github.com/10up/simple-page-ordering/pull/36)). - VIP Go coding standards (props [@asharirfan](https://github.com/asharirfan), [@dinhtungdu](https://github.com/dinhtungdu), [@pereirinha](https://github.com/pereirinha), [@brentvr](https://github.com/brentvr) via [#38](https://github.com/10up/simple-page-ordering/pull/38)). ## [2.3.2] - 2018-05-08 ### Added - Allow cancellation of drag operation by pressing escape key. ### Fixed - Allow form input elements added to a row by plugins to be interacted with. ## [2.3.1] - 2018-04-13 ### Fixed - Prevent rows with hidden columns from jumping around while dragging. ## [2.3.0] - 2018-03-05 ### Added - Use WordPress core's spinner class. - Grunt-based build process with Sass. ### Changed - Use `WP_Query` instead of `get_posts()` for better performance. - Remove bundled translations in favor of WordPress.org language packs. ### Fixed - Avoid exceeding PHP's max input variables, which could cause incorrectly assigned page order. - Malformed URL that would take you to posts instead of pages. - PHPDoc and coding standards to align with 10up's Engineering Best Practices. ## [2.2.4] - 2015-02-08 ### Fixed - Redundant URL encoding when sorting in admin page list. ## [2.2.3] - 2014-09-27 ### Fixed - Ordering in WordPress 4.0 following core changes to `ORDER BY` in `WP_Query`. ## [2.2.2] - 2014-08-19 ### Added - German localization (props [@glueckpress](https://github.com/glueckpress)). ### Fixed - Column widths no longer change when dragging a row (partial props [@thomasgriffin](https://github.com/thomasgriffin)). ### Security - Closed obscure XSS vulnerability related to Sort by Order link (props [@SimonWaters](https://github.com/SimonWaters)). ## [2.2.1] - 2014-05-31 ### Added - Brazilian translation (props to "felds"). ### Fixed - Bring back translations / text domain (yikes!). ## [2.2.0] - 2014-04-06 ### Changed - Look and feel to better match WordPress 3.8 admin redesign. - Improved awareness of and compatibility with Quick Edit (inline editor). ### Fixed - Prevent collisions with themes and plugins bundling Simple Page Ordering. ## [2.1.2] - 2013-05-30 ### Fixed - Extreme edge case where post columns did not include the post title now supported. ## [2.1.1] - 2013-05-27 ### Fixed - Custom post types with page-attributes or hierarchical properties, but not both, breaking ordering. ## [2.1.0] - 2013-05-19 ### Added - Awareness of custom user capabilities for post types, in addition to a filter (`simple_page_ordering_edit_rights`) for overriding reordering rights (previously used `edit_others_pages` globally). - Awareness of custom post statuses (so they are not skipped during backend ordering operation). ### Changed - UI refinements: Better "spinner" positioning (and HiDPI), translucent row when.moving, improved appearance of "drop" placeholder, wait till row dragged by at least 5px to start sorting. - Major JavaScript refactoring and simplification (combined with new stylesheet) for better performance. ## [2.0.0] - 2012-11-12 ### Added - Drag pages into any part of the page hierarchy! No longer limited to same branch of tree! - Big performance improvements under the hood: leaner queries, batched requests, less processing. - New filters and hooks to extend / override default functionality. ### Changed - Scales much more reliably in situations with very high page counts due to batching of requests. - Order of the first page is now set to "1" instead of "0", so pages added after ordering are added at the top (instead of second). - Removed "number of pages" drop down, which is repetitive of a field accessible under Screen Options. - Improved compatibility with newer versions of WordPress. ## [1.0.0] - 2011-07-04 ### Added - Support for ordering non-hierarchical post types that have "page-attributes" support. - New filter link for "Sort by Order" to restore (hierarchical) or set (non-hierarchical, page attributes support) post list sort to menu order. ### Changed - Users are now forced to wait for current sort operation to finish before they can sort another item. - Smarter about "not sortable" view states. - Localization ready! Rough Spanish translation included. - Assorted other performance and code improvements. ### Fixed - Unexpected page ordering results when pages have not been explictly ordered yet (sorts by menu_order, then title, not just menu_order). - "Per page" drop down filter selection not saving between page loads (was broken in 3.1). - Items are always ordered with positive integers (potential negative sort orders had some performance benefits in last version, but sometimes caused issues). ## [0.9.6] - 2011-04-04 ### Fixed - Broken inline editing (quick edit) fields in Firefox. ## [0.9.5] - 2011-03-27 ### Changed - Smarter awareness of "sorted" modes in WordPress 3.1 (can only use when sorted by menu order). - Smarter awareness of "quick edit" mode (can't drag). - Generally simplified / better organized code. ## [0.9.0] - 2010-12-29 ### Added - Further directions in the plug-in description (some users were confused about how to use it). - Basic compatibility with 3.1 RC (prevent clashes with post list sorting). ### Changed - "Move" cursor only set if JavaScript enabled. ### Fixed - Page count display always showing "0" on non-hierarchical post types (Showing 1-X of X). - Hidden menu order not updating after sort (causing Quick Edit to reset order when used right after sorting). ## [0.8.4] - 2010-08-24 ### Changed - Loosened constraints on drag and drop to ease dropping into top and bottom position. - Improved some terminology (with custom post types in mind). ### Fixed - Row background staying "white" after dropping into a new position. - Double border on the bottom of the row while dragging. ## [0.8.2] - 2010-08-21 ### Changed - Simplified code - consolidated hooks. - Updated version requirements. [Unreleased]: https://github.com/10up/simple-page-ordering/compare/trunk...develop [2.8.0]: https://github.com/10up/simple-page-ordering/compare/2.7.4...2.8.0 [2.7.4]: https://github.com/10up/simple-page-ordering/compare/2.7.3...2.7.4 [2.7.3]: https://github.com/10up/simple-page-ordering/compare/2.7.2...2.7.3 [2.7.2]: https://github.com/10up/simple-page-ordering/compare/2.7.1...2.7.2 [2.7.1]: https://github.com/10up/simple-page-ordering/compare/2.7.0...2.7.1 [2.7.0]: https://github.com/10up/simple-page-ordering/compare/2.6.3...2.7.0 [2.6.3]: https://github.com/10up/simple-page-ordering/compare/2.6.2...2.6.3 [2.6.2]: https://github.com/10up/simple-page-ordering/compare/2.6.1...2.6.2 [2.6.1]: https://github.com/10up/simple-page-ordering/compare/2.6.0...2.6.1 [2.6.0]: https://github.com/10up/simple-page-ordering/compare/2.5.1...2.6.0 [2.5.1]: https://github.com/10up/simple-page-ordering/compare/2.5.0...2.5.1 [2.5.0]: https://github.com/10up/simple-page-ordering/compare/2.4.4...2.5.0 [2.4.4]: https://github.com/10up/simple-page-ordering/compare/2.4.3...2.4.4 [2.4.3]: https://github.com/10up/simple-page-ordering/compare/2.4.2...2.4.3 [2.4.2]: https://github.com/10up/simple-page-ordering/compare/2.4.1...2.4.2 [2.4.1]: https://github.com/10up/simple-page-ordering/compare/2.4.0...2.4.1 [2.4.0]: https://github.com/10up/simple-page-ordering/compare/2.3.4...2.4.0 [2.3.4]: https://github.com/10up/simple-page-ordering/compare/2.3.3...2.3.4 [2.3.3]: https://github.com/10up/simple-page-ordering/compare/2.3.2...2.3.3 [2.3.2]: https://github.com/10up/simple-page-ordering/compare/2.3.1...2.3.2 [2.3.1]: https://github.com/10up/simple-page-ordering/compare/2.3...2.3.1 [2.3.0]: https://github.com/10up/simple-page-ordering/compare/2.2.4...2.3 [2.2.4]: https://github.com/10up/simple-page-ordering/releases/tag/2.2.4 ================================================ 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, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, 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 opensource@10up.com. 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 https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing and Maintaining First, thank you for taking the time to contribute! The following is a set of guidelines for contributors as well as information and instructions around our maintenance process. The two are closely tied together in terms of how we all work together and set expectations, so while you may not need to know everything in here to submit an issue or pull request, it's best to keep them in the same document. ## Ways to contribute Contributing isn't just writing code - it's anything that improves the project. All contributions for Simple Page Ordering are managed right here on GitHub. Here are some ways you can help: ### Reporting bugs If you're running into an issue with the plugin, please take a look through [existing issues](https://github.com/10up/simple-page-ordering/issues) and [open a new one](https://github.com/10up/simple-page-ordering/issues/new) if needed. If you're able, include steps to reproduce, environment information, and screenshots/screencasts as relevant. ### Suggesting enhancements New features and enhancements are also managed via [issues](https://github.com/10up/simple-page-ordering/issues). As project owners, 10up sets the [direction and roadmap](#roadmap) and may not prioritize or decide to implement if outside of the main goals of the plugin. Simple Page Ordering is considered a feature-complete plugin and thus there are no plans for significant enhancements or features at this time. ### Pull requests Pull requests represent a proposed solution to a specified problem. They should always reference an issue that describes the problem and contains discussion about the problem itself. Discussion on pull requests should be limited to the pull request itself, i.e. code review. For more on how 10up writes and manages code, check out our [10up Engineering Best Practices](https://10up.github.io/Engineering-Best-Practices/). ### Testing Helping to test an open source project and provide feedback on success or failure of those tests is also a helpful contribution. You can find details on the Critical Flows and Test Cases in [this project's GitHub Wiki](https://github.com/10up/simple-page-ordering/wiki) as well as details on our overall approach to [Critical Flows and Test Cases in our Open Source Best Practices](https://10up.github.io/Open-Source-Best-Practices/testing/#critial-flows). Submitting the results of testing via our Critical Flows as a comment on a Pull Request of a specific feature or as an Issue when testing the entire project is the best approach for providing testing results. ## Maintenance process ### Triage Issues and WordPress.org forum posts should be reviewed weekly and triaged as necessary. Not all tasks have to be done at once or by the same person. Triage tasks include: * Responding to new WordPress.org forum posts and GitHub issues/PRs with an acknolwedgment and following up on existing open/unresolved items that have had movement in the previous week. * Marking forum posts as resolved when corresponding issues are fixed or as not a support issue if not relevant. * Creating GitHub issues for WordPress.org forum posts as necessary or linking to them from existing related issues. * Applying labels and milestones to GitHub issues. #### Issue labels All issues should be labeled as bugs (`type:bug`), enhancements/feature requests (`type:enhancement`), or questions/support (`type:question`). Each issue should only be of one "type". Issues with associated pull requests should be labeled `has:pr`. Bugs and enhancements that are closed without a related change should be labeled as `declined`, `duplicate`, or `invalid`. Invalid issues would be where a problem is not reproducible or opened in the wrong repo and should be relatively uncommon. These labels are all prefixed with `closed:`. There are two other labels that are GitHub defaults with more global meaning we've kept: `good first issue` and `help wanted`. #### Project boards A simple [triage board](https://github.com/10up/simple-page-ordering/projects/1) has been set up and is used to track what needs to be done next for each issue and PR. ### Review against WordPress updates During weekly triage, the tested up to version should be compared against the latest version of WordPress. If there's a newer version of WordPress, the plugin should be re-tested using any automated tests as well as any manual tests indicated below, and the tested up to version bumped and committed to both GitHub and the WordPress.org repository. ### Release cycle New releases are targeted based on number and severity of changes along with human availability. When a release is targeted, a due date will be assigned to the appropriate milestone. ### Roadmap Simple Page Ordering is considered a feature-complete plugin, with a handful of potential enhancements captured as [issues](https://github.com/10up/simple-page-ordering/issues). Of note are the ability to cancel a dragging operation and explorations of how to further mitigate time-out issues when reordering many pages. These do not currently have a targeted release date. ### Testing Head to the Pages list table and drag and drop pages to change the order. Refresh to ensure that changes have "stuck". A limited amount of hierarchical functionality is available - if you drop an item before a child page it will assume that child page's level of hierarchy. If you drag it out of the tree, it will become a top-level item. ### Release instructions 1. Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes. 2. Version bump: Bump the version number in `package.json`, `package-lock.json`, `readme.txt`, and `simple-page-ordering.php` if it does not already reflect the version being released. In `class-simple-page-ordering.php` update the plugin `SIMPLE_PAGE_ORDERING_VERSION` constant. 3. Changelog: Add/update the changelog in `readme.txt` and `CHANGELOG.md`. 4. Props: update `CREDITS.md` file with any new contributors, confirm maintainers are accurate. 5. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in `.distignore`. 6. Readme updates: Make any other readme changes as necessary. `README.md` is geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different. 7. Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then do the same for `develop` into `trunk`, ensuring you pull the most recent changes into `develop` first (`git checkout develop && git pull origin develop && git checkout trunk && git merge --no-ff develop`). `trunk` contains the stable development version. 8. Push: Push your `trunk` branch to GitHub (e.g. `git push origin trunk`). 9. [Compare](https://github.com/10up/simple-page-ordering/compare/trunk...develop) `trunk` to `develop` to ensure no additional changes were missed. 10. Test the pre-release ZIP locally by [downloading](https://github.com/10up/simple-page-ordering/actions/workflows/build-release-zip.yml) it from the Build release zip action artifact and installing it locally. Ensure this zip has all the files we expect, that it installs and activates correctly and that all basic functionality is working. 11. Either perform a regression testing utilizing the available [Critical Flows](https://10up.github.io/Open-Source-Best-Practices/testing/#critical-flows) and Test Cases or if [end-to-end tests](https://10up.github.io/Open-Source-Best-Practices/testing/#e2e-testing) cover a significant portion of those Critical Flows then run e2e tests. Only proceed if everything tests successfully. 12. Release: Create a [new release](https://github.com/10up/simple-page-ordering/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues on the [X.Y.Z milestone](https://github.com/10up/simple-page-ordering/milestone/#?closed=1). The release should now appear under [releases](https://github.com/10up/simple-page-ordering/releases) and in the WordPress admin as an update as well. 13. SVN: Wait for the [GitHub Action](https://github.com/10up/simple-page-ordering/actions) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes. 14. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/simple-page-ordering/. This may take a few minutes. 15. Close milestone: Edit the [X.Y.Z milestone](https://github.com/10up/simple-page-ordering/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description field`), then close the milestone. 16. Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`. ================================================ FILE: CREDITS.md ================================================ The following acknowledges the Maintainers for this repository, those who have Contributed to this repository (via bug reports, code, design, ideas, project management, translation, testing, etc.), and any Libraries utilized. ## Maintainers The following individuals are responsible for curating the list of issues, responding to pull requests, and ensuring regular releases happen. [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul). ## Contributors Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc. [10up (@10up)](https://github.com/10up), [Jake Goldman (@jakemgold)](https://github.com/jakemgold), [Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher), [Helen Hou-Sandí (@helen)](https://github.com/helen), [Oomph, Inc. (@oomphinc)](https://github.com/oomphinc), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Oscar Sanchez S. (@oscarssanchez)](https://github.com/oscarssanchez), [Ashar Irfan (@asharirfan)](https://github.com/asharirfan), [William Patton (@pattonwebz)](https://github.com/pattonwebz), [Ben Huson (@benhuson)](https://github.com/benhuson), [Jake Jackson (@jakejackson1)](https://github.com/jakejackson1), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [@dtbaker](https://github.com/dtbaker), [Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [Marco Pereirinha (@pereirinha)](https://github.com/pereirinha), [Brent van Rensburg (@brentvr)](https://github.com/brentvr), [Caspar Hübinger (@glueckpress)](https://github.com/glueckpress), [Thomas Griffin (@thomasgriffin)](https://github.com/thomasgriffin), [Simon Waters (@SimonWaters)](https://github.com/SimonWaters), [Dion Hulse (@dd32)](https://github.com/dd32), [Tim Moore (@tmoorewp)](https://github.com/tmoorewp), [Jeffrey Carandang (@phpbits)](https://github.com/phpbits), [Michele Cipriani (@ciprianimike)](https://github.com/ciprianimike), [Sudip Dadhaniya (@sudip-10up)](https://github.com/sudip-10up), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Max Lyuchin (@cadic)](https://github.com/cadic), [Leho Kraav (@lkraav)](https://github.com/lkraav), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Ankit Gupta (@ankitguptaindia)](https://github.com/ankitguptaindia), [(@dzulfriday)](https://profiles.wordpress.org/dzulfriday/), [Erik Betshammar (@kebbet)](https://github.com/kebbet), [Viktor Szépe (@szepeviktor)](https://github.com/szepeviktor), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Vikram Moparthy (@vikrampm1)](https://github.com/vikrampm1), [Dhanendran Rajagopal (@dhanendran)](https://github.com/dhanendran), [Jayedul Kabir (@jayedul)](https://github.com/jayedul), [Dan Ruscoe (@ruscoe)](https://github.com/ruscoe), [Ravinder Kumar (@ravinderk)](https://github.com/ravinderk), [Konstantinos Galanakis (@kmgalanakis)](https://github.com/kmgalanakis), [Dependabot (@dependabot)](https://github.com/apps/dependabot), [Mika (@mikhail-net)](https://github.com/mikhail-net), [Taylor Lovett (@tlovett1)](https://github.com/tlovett1), [Ben Marshall (@bmarshall511)](https://github.com/bmarshall511), [Harshal Kadu (@QAharshalkadu)](https://github.com/QAharshalkadu), [Laurence Cope (@amityweb)](https://github.com/amityweb), [Shannon Fisher (@shannonmfisher)](https://github.com/shannonmfisher), [Peter Sorensen (@psorensen)](https://github.com/psorensen), [Alex Lion (@alexclassroom)](https://github.com/alexclassroom), [Sudip Dadhaniya (@sudip-md)](https://github.com/sudip-md), [Sissi (@sissibieber)](https://github.com/sissibieber), [Zach Gibb (@zachgibb)](https://github.com/zachgibb), [Martin Jäcke (@mjot)](https://github.com/mjot), [Tom (@xDehy)](https://github.com/xDehy), [Nilambar Sharma (@ernilambar)](https://github.com/ernilambar), [David Godleman (@godleman)](https://github.com/godleman), [Anton Vanyukov (@av3nger)](https://github.com/av3nger), [James Morrison (@jamesmorrison)](https://github.com/jamesmorrison), [Jasper (@jasperfrontend)](https://github.com/jasperfrontend), [Sumit Bagthariya (@qasumitbagthariya)](https://github.com/qasumitbagthariya), [Ryan McCue (@rmccue)](https://github.com/rmccue), [Sanket Parmar (@sanketio)](https://github.com/sanketio), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9). ## Libraries The following software libraries are utilized in this repository. n/a. ================================================ FILE: LICENSE.md ================================================ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. ================================================ FILE: README.md ================================================ # Simple Page Ordering ![Simple Page Ordering](https://github.com/10up/simple-page-ordering/blob/develop/.wordpress-org/banner-1544x500.png) [![Support Level](https://img.shields.io/badge/support-stable-blue.svg)](#support-level) ![Required PHP Version](https://img.shields.io/wordpress/plugin/required-php/simple-page-ordering?label=Requires%20PHP) ![Required WP Version](https://img.shields.io/wordpress/plugin/wp-version/simple-page-ordering?label=Requires%20WordPress) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/simple-page-ordering?label=WordPress) [![GPLv2 License](https://img.shields.io/github/license/10up/simple-page-ordering.svg)](https://github.com/10up/simple-page-ordering/blob/develop/LICENSE.md) [![Dependency Review](https://github.com/10up/simple-page-ordering/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/10up/simple-page-ordering/actions/workflows/dependency-review.yml) [![E2E test](https://github.com/10up/simple-page-ordering/actions/workflows/cypress.yml/badge.svg)](https://github.com/10up/simple-page-ordering/actions/workflows/cypress.yml) [![PHP Compatibility](https://github.com/10up/simple-page-ordering/actions/workflows/php-compatibility.yml/badge.svg)](https://github.com/10up/simple-page-ordering/actions/workflows/php-compatibility.yml) [![PHPCS](https://github.com/10up/simple-page-ordering/actions/workflows/phpcs.yml/badge.svg)](https://github.com/10up/simple-page-ordering/actions/workflows/phpcs.yml) [![JS Lint](https://github.com/10up/simple-page-ordering/actions/workflows/jslint.yml/badge.svg)](https://github.com/10up/simple-page-ordering/actions/workflows/jslint.yml) [![CodeQL](https://github.com/10up/simple-page-ordering/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/10up/simple-page-ordering/actions/workflows/github-code-scanning/codeql) [![WordPress Playground Demo](https://img.shields.io/wordpress/plugin/v/simple-page-ordering?logo=wordpress&logoColor=FFFFFF&label=Playground%20Demo&labelColor=3858E9&color=3858E9)](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/10up/simple-page-ordering/add/badges/.wordpress-org/blueprints/blueprint.json) > Order your pages and other hierarchical post types with simple drag and drop right from the standard page list. ## Overview Order your pages and other custom post types that support "page-attributes" with drag and drop right from the built in page list. Drag and drop the page into the desired position. No new admin menus pages, no clunky, bolted on user interfaces. Drag and drop on the page or post-type screen. The plug-in is "capabilities aware" - only users with the ability to edit others' pages (editors and administrators) will be able to reorder content. Integrated help is included: click the "help" tab at the top right of the screen. Please note that the plug-in is not compatible with Internet Explorer 7 and earlier, due to limitations within those browsers. Want to help? Check out our [contributing guidelines](CONTRIBUTING.md) to get started. ## Installation 1. Install either via the WordPress.org plugin directory, or by uploading the files to your server. 1. Activate the plugin through the 'Plugins' menu in WordPress. 1. Get to work reordering your content! ## Frequently Asked Questions ### Why can't I reorder my posts? Generic posts are not displayed by menu order - they're displayed by chronology. You can theoretically add menu ordering to posts in your code (theme functions.php, plug-in) by using: `add_post_type_support( 'post', 'page-attributes' );` ### Can I make my custom post type take advantage of this plug-in? Yep. When you register the post type, include the `page-attributes` feature in the support list. This will add a `Sort by Order` option to the filter links above the drop downs. Once you sort by order, you can drag and drop the content. `'supports' => array( 'title', 'editor', 'page-attributes' ),` Alternatively, when you register the post type, set `hierarchical` to `true` - hierarchical post types natively order by menu order. You can also take advantage of the `simple_page_ordering_is_sortable` filter, which passes the result of the default check and the post type name, to override default behavior. ### I want my non-hierarchical post type to be sortable. Help! See the previous two answers - just add `page-attributes` to the list of supported post type features. ### I reordered my posts, but the order didn't change on the front end of my site! This plug-in doesn't change any *behavior* on the front end, it simply changes the menu order stored in WordPress. If you want a list of pages or custom post types to display in that defined order, you must change the post query's `orderby` parameter to `menu_order` (if it's not already). ### I reordered my content, it seemed to work, but when I refreshed, it went back to the old order! This most likely means the AJAX request - the server side code - failed after you dropped the content into the new position. Some shared hosts aggressively time out and limit AJAX requests. Version 2.0 batches these requests so you can try reducing the number of items it updates on each request using a filter in your theme's functions.php or a custom plug-in: `add_filter( 'simple_page_ordering_limit', function($number) { return 5; } );` Where 5 is the number of items to batch on each request (the default is 50). Note that this example uses PHP 5.3+ callback functions, so if you're still on PHP 5.2, you'll need to add a traditional callback. ### What happened to the drop down box that let me change the number of items on each page in the admin? This feature is already built into WordPress natively, but a bit tucked away. If you pull down the "Screen Options" tab up top (on the list of post objects) there's a field where you can specify the number of items to show per page. I decided it was not a very good practice to duplicate this. ### How can I modify sortable post types? Post types can be included or excluded by using the `simple_page_ordering_is_sortable` filter. For example, to exclude the `excluded_post_type` custom post type, add the following snippet in the theme function file or custom plugin: ``` add_filter( 'simple_page_ordering_is_sortable', function( $sortable, $post_type ) { if ( 'excluded_post_type' === $post_type ) { return false; } return $sortable; }, 10, 2 ); ``` To include the `include_post_type` custom post type, add the following snippet in the theme function file or custom plugin: ``` add_filter( 'simple_page_ordering_is_sortable', function( $sortable, $post_type ) { if ( 'include_post_type' === $post_type ) { return true; } return $sortable; }, 10, 2 ); ``` ### Can I use REST to order posts? Yes. The plugin registers the REST endpoint `simple-page-ordering/v1/page_ordering`. #### Input parameters | Name | Type |Description | Mandatory | Default value | |--------:|--------:|------------------------------------------------------------:|----------:|---------------:| | id | integer | The ID of the post you are positioning | yes | | | previd | integer | The ID of the post previous to the one you want to position | yes | | | nextid | integer | The ID of the post next to the one you want to position | yes | | | start | integer | The start index | no | 1 | | exclude | array | Array of post IDs to be excluded | no | empty array | #### Example request | Type | URL | |--------:|-------------------------------------------------------------------------------------:| | post | /wp-json/simple-page-ordering/v1/page_ordering/?id=2&previd=13&nextid=14&excluded=[] | ### Where do I report security bugs found in this plugin? Please report security bugs found in the source code of the Simple Page Ordering plugin through the [Patchstack Vulnerability Disclosure  Program](https://patchstack.com/database/vdp/9e5fbbad-6488-4bba-851e-b300dabc33a2). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. ## Support Level **Stable:** 10up is not planning to develop any new features for this, but will still respond to bug reports and security concerns. We welcome PRs, but any that include new features should be small and easy to integrate and should not include breaking changes. We otherwise intend to keep this tested up to the most recent version of WordPress. ## Changelog A complete listing of all notable changes to Simple Page Ordering are documented in [CHANGELOG.md](https://github.com/10up/simple-page-ordering/blob/develop/CHANGELOG.md). ## Contributing Please read [CODE_OF_CONDUCT.md](https://github.com/10up/simple-page-ordering/blob/develop/CODE_OF_CONDUCT.md) for details on our code of conduct, [CONTRIBUTING.md](https://github.com/10up/simple-page-ordering/blob/develop/CONTRIBUTING.md) for details on the process for submitting pull requests to us, and [CREDITS.md](https://github.com/10up/simple-page-ordering/blob/develop/CREDITS.md) for a listing of maintainers, contributors, and libraries for Simple Page Ordering. ## Like what you see? Work with the 10up WordPress Practice at Fueled ================================================ FILE: assets/css/scss/simple-page-ordering.scss ================================================ .wp-list-table { .ui-sortable { tr { cursor: move; &.inline-editor { cursor: default; } } } .spo-updating { tr { cursor: default; } } .ui-sortable-placeholder { outline: 1px dashed #bbb; background: #F1F1F1; visibility: visible !important; } .ui-sortable-helper { background-color: #fff; outline: 1px solid #e1e1e1; } } .spo-updating-row { .check-column { display: table-cell; // reset from core .spinner float: none; // reset from core .spinner margin: 0; // reset from core .spinner background-position: 9px 9px; input { visibility: hidden; } } } ================================================ FILE: assets/js/src/simple-page-ordering.js ================================================ import '../../css/scss/simple-page-ordering.scss'; import { decodeEntities } from '@wordpress/html-entities'; // eslint-disable-next-line import/no-unresolved import 'jquery-ui-sortable'; const sortable_post_table = jQuery('.wp-list-table tbody'); function update_simple_ordering_callback(response) { if (response === 'children') { window.location.reload(); return; } const changes = jQuery.parseJSON(response); const { new_pos } = changes; // eslint-disable-next-line no-restricted-syntax for (const key in new_pos) { if (key === 'next') { // eslint-disable-next-line no-continue continue; } const inline_key = document.getElementById(`inline_${key}`); // eslint-disable-next-line no-prototype-builtins if (inline_key !== null && new_pos.hasOwnProperty(key)) { const dom_menu_order = inline_key.querySelector('.menu_order'); if (undefined !== new_pos[key].menu_order) { if (dom_menu_order !== null) { dom_menu_order.textContent = new_pos[key].menu_order; } const dom_post_parent = inline_key.querySelector('.post_parent'); if (dom_post_parent !== null) { dom_post_parent.textContent = new_pos[key].post_parent; } let post_title = null; const dom_post_title = inline_key.querySelector('.post_title'); if (dom_post_title !== null) { post_title = dom_post_title.innerHTML; // Convert emoji img tags back to Unicode emoji characters // See: https://github.com/10up/simple-page-ordering/issues/205 post_title = post_title.replace( /]*class="emoji"[^>]*alt="([^"]*)"[^>]*>/g, '$1', ); } let dashes = 0; while (dashes < new_pos[key].depth) { post_title = `— ${post_title}`; dashes++; } const dom_row_title = inline_key.parentNode.querySelector('.row-title'); if (dom_row_title !== null && post_title !== null) { dom_row_title.innerHTML = decodeEntities(post_title); } } else if (dom_menu_order !== null) { dom_menu_order.textContent = new_pos[key]; } } } if (changes.next) { jQuery.post( window.ajaxurl, { action: 'simple_page_ordering', id: changes.next.id, previd: changes.next.previd, nextid: changes.next.nextid, start: changes.next.start, _wpnonce: window.simple_page_ordering_localized_data._wpnonce, excluded: JSON.stringify(changes.next.excluded), }, update_simple_ordering_callback, ); } else { jQuery('.spo-updating-row') .removeClass('spo-updating-row') .find('.check-column') .removeClass('spinner is-active'); sortable_post_table.removeClass('spo-updating').sortable('enable'); } } sortable_post_table.sortable({ items: '> tr', cursor: 'move', axis: 'y', containment: 'table.widefat', cancel: 'input, textarea, button, select, option, .inline-edit-row', distance: 2, opacity: 0.8, tolerance: 'pointer', create() { jQuery(document).keydown(function (e) { const key = e.key || e.keyCode; if (key === 'Escape' || key === 'Esc' || key === 27) { sortable_post_table.sortable('option', 'preventUpdate', true); sortable_post_table.sortable('cancel'); } }); }, start(e, ui) { if (typeof inlineEditPost !== 'undefined') { // eslint-disable-next-line no-undef inlineEditPost.revert(); } ui.placeholder.height(ui.item.height()); ui.placeholder.empty(); }, helper(e, ui) { const children = ui.children(); for (let i = 0; i < children.length; i++) { const selector = jQuery(children[i]); selector.width(selector.width()); } return ui; }, stop(e, ui) { if (sortable_post_table.sortable('option', 'preventUpdate')) { sortable_post_table.sortable('option', 'preventUpdate', false); } // remove fixed widths ui.item.children().css('width', ''); }, update(e, ui) { if (sortable_post_table.sortable('option', 'preventUpdate')) { sortable_post_table.sortable('option', 'preventUpdate', false); return; } sortable_post_table.sortable('disable').addClass('spo-updating'); ui.item.addClass('spo-updating-row'); ui.item.find('.check-column').addClass('spinner is-active'); const postid = ui.item[0].id.substr(5); // post id let prevpostid = false; const prevpost = ui.item.prev(); if (prevpost.length > 0) { prevpostid = prevpost.attr('id').substr(5); } let nextpostid = false; const nextpost = ui.item.next(); if (nextpost.length > 0) { nextpostid = nextpost.attr('id').substr(5); } // go do the sorting stuff via ajax jQuery.post( window.ajaxurl, { action: 'simple_page_ordering', id: postid, previd: prevpostid, nextid: nextpostid, _wpnonce: window.simple_page_ordering_localized_data._wpnonce, }, update_simple_ordering_callback, ); // fix cell colors const table_rows = document.querySelectorAll('tr.iedit'); let table_row_count = table_rows.length; while (table_row_count--) { if (table_row_count % 2 === 0) { jQuery(table_rows[table_row_count]).addClass('alternate'); } else { jQuery(table_rows[table_row_count]).removeClass('alternate'); } } }, }); jQuery(function () { // set up click handler for order reset link jQuery('#simple-page-ordering-reset').on('click', function (e) { e.preventDefault(); const post_type = jQuery(this).data('posttype'); if ( // eslint-disable-next-line no-alert window.confirm(window.simple_page_ordering_localized_data.confirmation_msg) ) { jQuery.post( window.ajaxurl, { action: 'reset_simple_page_ordering', post_type, _wpnonce: window.simple_page_ordering_localized_data._wpnonce, }, function () { window.location.reload(); }, ); } }); }); ================================================ FILE: class-simple-page-ordering.php ================================================ ID}", 'spo_nonce' ); if ( ! current_user_can( 'edit_post', $post->ID ) ) { wp_die( esc_html__( 'You are not allowed to edit this item.', 'simple-page-ordering' ) ); } if ( 0 === $post->post_parent ) { // Top level. Politely continue without doing anything. self::redirect_to_referer(); } $ancestors = get_post_ancestors( $post ); // If only one ancestor, set to top level page. if ( 1 === count( $ancestors ) ) { $parent_id = 0; } else { $parent_id = $ancestors[1]; } // Update the post. wp_update_post( array( 'ID' => $post->ID, 'post_parent' => $parent_id, ) ); self::redirect_to_referer(); } /** * Move a post out/down the post parent tree. * * This is a custom action on the edit page to modify the post parent * to be the child of it's previous sibling post on the current post * tree. * * @param int $post_id The post ID. */ public static function handle_move_under_sibling( $post_id ) { $post = get_post( $post_id ); if ( ! $post ) { self::redirect_to_referer(); } check_admin_referer( "simple-page-ordering-nonce-move-{$post->ID}", 'spo_nonce' ); if ( ! current_user_can( 'edit_post', $post->ID ) ) { wp_die( esc_html__( 'You are not allowed to edit this item.', 'simple-page-ordering' ) ); } list( 'top_level_pages' => $top_level_pages, 'children_pages' => $children_pages ) = self::get_walked_pages( $post->post_type ); // Get the relevant siblings. if ( 0 === $post->post_parent ) { $siblings = $top_level_pages; } else { $siblings = $children_pages[ $post->post_parent ]; } // Check if the post being moved is a top level page. $filtered_siblings = wp_list_filter( $siblings, array( 'ID' => $post->ID ) ); if ( empty( $filtered_siblings ) ) { // Something went wrong. Do nothing. self::redirect_to_referer(); } // Find the previous page in the sibling tree $key = array_key_first( $filtered_siblings ); if ( 0 === $key ) { // It's the first page. Do nothing. self::redirect_to_referer(); } $previous_page = $siblings[ $key - 1 ]; $previous_page_id = $previous_page->ID; // Update the post with the previous page as the parent. wp_update_post( array( 'ID' => $post->ID, 'post_parent' => $previous_page_id, ) ); self::redirect_to_referer(); } /** * Redirect the user after modifying the post parent. */ public static function redirect_to_referer() { global $post_type; $send_back = wp_get_referer(); if ( ! $send_back || str_contains( $send_back, 'post.php' ) || str_contains( $send_back, 'post-new.php' ) ) { if ( 'attachment' === $post_type ) { $send_back = admin_url( 'upload.php' ); } else { $send_back = admin_url( 'edit.php' ); if ( ! empty( $post_type ) ) { $send_back = add_query_arg( 'post_type', $post_type, $send_back ); } } } else { $send_back = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'ids' ), $send_back ); } wp_safe_redirect( $send_back ); exit; } /** * Walk the pages and return top level and children pages. * * @param string $post_type Post type to walk. * * @return array { * @type WP_Post[] $top_level_pages Top level pages. * @type WP_Post[] $children_pages Children pages. * } */ public static function get_walked_pages( $post_type = 'page' ) { global $wpdb; $pages = get_pages( array( 'sort_column' => 'menu_order title', 'post_type' => $post_type, ) ); $top_level_pages = array(); $children_pages = array(); $bad_parents = array(); foreach ( $pages as $page ) { // Catch and repair bad pages. if ( $page->post_parent === $page->ID ) { $page->post_parent = 0; // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery -- Intentionally using query for speed, cache is cleared afterwards. $wpdb->update( $wpdb->posts, array( 'post_parent' => 0 ), array( 'ID' => $page->ID ) ); clean_post_cache( $page ); $bad_parents[] = $page->ID; } if ( $page->post_parent > 0 ) { $children_pages[ $page->post_parent ][] = $page; } else { $top_level_pages[] = $page; } } // Reprime post cache for bad parents. _prime_post_caches( $bad_parents, false, false ); return array( 'top_level_pages' => $top_level_pages, 'children_pages' => $children_pages, ); } /** * Loads the plugin textdomain */ public static function load_textdomain() { _deprecated_function( __METHOD__, '2.8.0' ); } /** * Determine whether given post type is sortable or not. * * @param string $post_type Post type to check. * * @return boolean */ private static function is_post_type_sortable( $post_type = 'post' ) { $sortable = ( post_type_supports( $post_type, 'page-attributes' ) || is_post_type_hierarchical( $post_type ) ); /** * Change default ordering support for a post type. * * @since 2.0.0 * * @param boolean $sortable Whether this post type is sortable or not. * @param string $post_type The post type being checked. */ return apply_filters( 'simple_page_ordering_is_sortable', $sortable, $post_type ); } /** * Load up page ordering scripts for the edit screen */ public static function load_edit_screen() { $screen = get_current_screen(); $post_type = $screen->post_type; // is post type sortable? $sortable = self::is_post_type_sortable( $post_type ); if ( ! $sortable ) { return; } // does user have the right to manage these post objects? if ( ! self::check_edit_others_caps( $post_type ) ) { return; } // add view by menu order to views add_filter( 'views_' . $screen->id, array( __CLASS__, 'sort_by_order_link', ) ); add_action( 'pre_get_posts', array( __CLASS__, 'filter_query' ) ); add_action( 'wp', array( __CLASS__, 'wp' ) ); add_action( 'admin_head', array( __CLASS__, 'admin_head' ) ); add_action( 'page_row_actions', array( __CLASS__, 'page_row_actions' ), 10, 2 ); } /** * This is to enable pagination. * * @param WP_Query $query The WP_Query instance (passed by reference). */ public static function filter_query( $query ) { if ( ! $query->is_main_query() ) { return; } // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Filtering of List Table does not require sanitization. $is_simple_page_ordering = isset( $_GET['id'] ) ? 'simple-page-ordering' === $_GET['id'] : false; if ( ! $is_simple_page_ordering ) { return; } $query->set( 'posts_per_page', -1 ); } /** * when we load up our posts query, if we're actually sorting by menu order, initialize sorting scripts */ public static function wp() { $orderby = get_query_var( 'orderby' ); $screen = get_current_screen(); $post_type = $screen->post_type ?? 'post'; if ( ( is_string( $orderby ) && 0 === strpos( $orderby, 'menu_order' ) ) || ( isset( $orderby['menu_order'] ) && 'ASC' === $orderby['menu_order'] ) ) { $script_name = 'dist/js/simple-page-ordering.js'; $script_asset_path = plugin_dir_path( __FILE__ ) . 'dist/js/simple-page-ordering.asset.php'; $script_asset = file_exists( $script_asset_path ) ? require $script_asset_path // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable -- file exists check above. : false; if ( false !== $script_asset ) { $script_url = plugins_url( $script_name, __FILE__ ); wp_enqueue_script( 'simple-page-ordering', $script_url, $script_asset['dependencies'], $script_asset['version'], true ); wp_localize_script( 'simple-page-ordering', 'simple_page_ordering_localized_data', array( '_wpnonce' => wp_create_nonce( 'simple-page-ordering-nonce' ), /* translators: %1$s is replaced with the post type name */ 'confirmation_msg' => sprintf( esc_html__( 'Are you sure you want to reset the ordering of the "%1$s" post type?', 'simple-page-ordering' ), $post_type ), ) ); wp_enqueue_style( 'simple-page-ordering', plugins_url( '/dist/css/simple-page-ordering.css', __FILE__ ), array(), $script_asset['version'] ); } else { add_action( 'admin_notices', function () { ?>

Simple Page Ordering. Please run npm i; npm run build to create assets.', 'simple-page-ordering' ) ); ?>

post_type ?? 'post'; $screen->add_help_tab( array( 'id' => 'simple_page_ordering_help_tab', 'title' => esc_html__( 'Simple Page Ordering', 'simple-page-ordering' ), 'content' => sprintf( '

%s

%s', esc_html__( 'To reposition an item, simply drag and drop the row by "clicking and holding" it anywhere (outside of the links and form controls) and moving it to its new position.', 'simple-page-ordering' ), esc_attr( get_query_var( 'post_type' ) ), /* translators: %1$s is replaced with the post type name */ sprintf( esc_html__( 'Reset %1$s order', 'simple-page-ordering' ), $post_type ) ), ) ); } /** * Modify the row actions for hierarchical post types. * * This adds the actions to change the parent/child relationships. * * @param array $actions An array of row action links. * @param WP_Post $post The post object. */ public static function page_row_actions( $actions, $post ) { $post = get_post( $post ); if ( ! $post ) { return $actions; } if ( ! current_user_can( 'edit_post', $post->ID ) ) { return $actions; } /** * Allow or disallow new row actions. * * @since 2.7.5 * * @param boolean $should_add_actions Whether to add the new row actions. * @param array $actions An array of row action links. * @param WP_Post $post The post object. */ $should_add_actions = apply_filters( 'simple_page_ordering_allow_row_actions', true, $actions, $post ); if ( ! $should_add_actions ) { return $actions; } list( 'top_level_pages' => $top_level_pages, 'children_pages' => $children_pages ) = self::get_walked_pages( $post->post_type ); $edit_link = get_edit_post_link( $post->ID, 'raw' ); $move_under_grandparent_link = add_query_arg( array( 'action' => 'spo-move-under-grandparent', 'spo_nonce' => wp_create_nonce( "simple-page-ordering-nonce-move-{$post->ID}" ), 'post_type' => $post->post_type, ), $edit_link ); $move_under_sibling_link = add_query_arg( array( 'action' => 'spo-move-under-sibling', 'spo_nonce' => wp_create_nonce( "simple-page-ordering-nonce-move-{$post->ID}" ), 'post_type' => $post->post_type, ), $edit_link ); $parent_id = $post->post_parent; if ( $parent_id ) { $actions['spo-move-under-grandparent'] = sprintf( '%s', esc_url( $move_under_grandparent_link ), sprintf( /* translators: %s: parent page/post title */ __( 'Move out from under %s', 'simple-page-ordering' ), get_the_title( $parent_id ) ) ); } // Get the relevant siblings. if ( 0 === $post->post_parent ) { $siblings = $top_level_pages; } else { $siblings = $children_pages[ $post->post_parent ] ?? array(); } // Assume no sibling. $sibling = 0; // Check if the post being moved is a top level page. $filtered_siblings = wp_list_filter( $siblings, array( 'ID' => $post->ID ) ); if ( ! empty( $filtered_siblings ) ) { // Find the previous page in the sibling tree $key = array_key_first( $filtered_siblings ); if ( 0 === $key ) { // It's the first page, can't do anything. $sibling = 0; } else { $previous_page = $siblings[ $key - 1 ]; $sibling = $previous_page->ID; } } if ( $sibling ) { $actions['spo-move-under-sibling'] = sprintf( '%s', esc_url( $move_under_sibling_link ), sprintf( /* translators: %s: sibling page/post title */ __( 'Move under %s', 'simple-page-ordering' ), get_the_title( $sibling ) ) ); } return $actions; } /** * Page ordering ajax callback * * @return void */ public static function ajax_simple_page_ordering() { // check and make sure we have what we need if ( empty( $_POST['id'] ) || ( ! isset( $_POST['previd'] ) && ! isset( $_POST['nextid'] ) ) ) { die( - 1 ); } $nonce = isset( $_POST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_POST['_wpnonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'simple-page-ordering-nonce' ) ) { die( -1 ); } $post_id = empty( $_POST['id'] ) ? false : (int) $_POST['id']; $previd = empty( $_POST['previd'] ) ? false : (int) $_POST['previd']; $nextid = empty( $_POST['nextid'] ) ? false : (int) $_POST['nextid']; $start = empty( $_POST['start'] ) ? 1 : (int) $_POST['start']; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized after json_decode. $excluded = empty( $_POST['excluded'] ) ? array( $post_id ) : array_filter( json_decode( wp_unslash( $_POST['excluded'] ), true ), 'intval' ); // real post? $post = empty( $post_id ) ? false : get_post( (int) $post_id ); if ( ! $post ) { die( - 1 ); } // does user have the right to manage these post objects? if ( ! self::check_edit_others_caps( $post->post_type ) ) { die( - 1 ); } $result = self::page_ordering( $post_id, $previd, $nextid, $start, $excluded ); if ( is_wp_error( $result ) ) { die( -1 ); } die( wp_json_encode( $result ) ); } /** * Page ordering reset ajax callback * * @return void */ public static function ajax_reset_simple_page_ordering() { global $wpdb; $nonce = isset( $_POST['_wpnonce'] ) ? sanitize_key( wp_unslash( $_POST['_wpnonce'] ) ) : ''; if ( ! wp_verify_nonce( $nonce, 'simple-page-ordering-nonce' ) ) { die( -1 ); } // check and make sure we have what we need $post_type = isset( $_POST['post_type'] ) ? sanitize_text_field( wp_unslash( $_POST['post_type'] ) ) : ''; if ( empty( $post_type ) ) { die( -1 ); } // does user have the right to manage these post objects? if ( ! self::check_edit_others_caps( $post_type ) ) { die( -1 ); } /* * Reset the order of all posts of given post type. * * Doing this manually via a direct query for speed in order to bypass the overhead * of multiple calls to `wp_update_post()`. */ // phpcs:ignore WordPress.DB.DirectDatabaseQuery $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = %s AND menu_order != 0", $post_type ) ); $post_ids = array_map( 'intval', $post_ids ); // Required for cache keys. // phpcs:ignore WordPress.DB.DirectDatabaseQuery $wpdb->query( $wpdb->prepare( sprintf( "UPDATE $wpdb->posts SET menu_order = 0 WHERE ID IN (%s)", implode( ',', array_fill( 0, count( $post_ids ), '%d' ) ) ), $post_ids ) ); /* * Clear the post caches. * * `clean_post_cache()` is not used here as it will clear the post, post meta, terms and * other related caches. This is much more expensive than necessary for clearing the menu * order cache. */ if ( empty( $_wp_suspend_cache_invalidation ) ) { // Clear the post caches. wp_cache_delete_multiple( $post_ids, 'posts' ); wp_cache_set_posts_last_changed(); } die( 0 ); } /** * Page ordering function * * @param int $post_id The post ID. * @param int $previd The previous post ID. * @param int $nextid The next post ID. * @param int $start The start index. * @param array $excluded Array of post IDs. * * @return object|WP_Error|"children" */ public static function page_ordering( $post_id, $previd, $nextid, $start, $excluded ) { // real post? $post = empty( $post_id ) ? false : get_post( (int) $post_id ); if ( ! $post ) { return new WP_Error( 'invalid', __( 'Missing mandatory parameters.', 'simple-page-ordering' ) ); } // Badly written plug-in hooks for save post can break things. if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_error_reporting, WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_error_reporting -- Intentionally suppressing errors from third-party plugins during ordering. error_reporting( 0 ); } global $wp_version; $previd = empty( $previd ) ? false : (int) $previd; $nextid = empty( $nextid ) ? false : (int) $nextid; $start = empty( $start ) ? 1 : (int) $start; $excluded = empty( $excluded ) ? array( $post_id ) : array_filter( (array) $excluded, 'intval' ); $new_pos = array(); // store new positions for ajax $return_data = new stdClass(); do_action( 'simple_page_ordering_pre_order_posts', $post, $start ); // attempt to get the intended parent... if either sibling has a matching parent ID, use that $parent_id = $post->post_parent; $next_post_parent = $nextid ? wp_get_post_parent_id( $nextid ) : false; if ( $previd === $next_post_parent ) { // if the preceding post is the parent of the next post, move it inside $parent_id = $next_post_parent; } elseif ( $next_post_parent !== $parent_id ) { // otherwise, if the next post's parent isn't the same as our parent, we need to study $prev_post_parent = $previd ? wp_get_post_parent_id( $previd ) : false; if ( $prev_post_parent !== $parent_id ) { // if the previous post is not our parent now, make it so! $parent_id = ( false !== $prev_post_parent ) ? $prev_post_parent : $next_post_parent; } } // if the next post's parent isn't our parent, it might as well be false (irrelevant to our query) if ( $next_post_parent !== $parent_id ) { $nextid = false; } $max_sortable_posts = (int) apply_filters( 'simple_page_ordering_limit', 50 ); // should reliably be able to do about 50 at a time if ( $max_sortable_posts < 5 ) { // don't be ridiculous! $max_sortable_posts = 50; } // we need to handle all post stati, except trash (in case of custom stati) $post_stati = get_post_stati( array( 'show_in_admin_all_list' => true, ) ); $siblings_query = array( 'depth' => 1, 'posts_per_page' => $max_sortable_posts, 'post_type' => $post->post_type, 'post_status' => $post_stati, 'post_parent' => $parent_id, 'post__not_in' => $excluded, // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in -- Likely faster via the DB than PHP. 'orderby' => array( 'menu_order' => 'ASC', 'title' => 'ASC', ), 'update_post_term_cache' => false, 'update_post_meta_cache' => false, 'suppress_filters' => true, // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.SuppressFilters_suppress_filters 'ignore_sticky_posts' => true, ); if ( version_compare( $wp_version, '4.0', '<' ) ) { $siblings_query['orderby'] = 'menu_order title'; $siblings_query['order'] = 'ASC'; } $siblings = new WP_Query( $siblings_query ); // fetch all the siblings (relative ordering) // don't waste overhead of revisions on a menu order change (especially since they can't *all* be rolled back at once) remove_action( 'post_updated', 'wp_save_post_revision' ); foreach ( $siblings->posts as $sibling ) : // don't handle the actual post if ( $sibling->ID === $post->ID ) { continue; } // if this is the post that comes after our repositioned post, set our repositioned post position and increment menu order if ( $nextid === $sibling->ID ) { wp_update_post( array( 'ID' => $post->ID, 'menu_order' => $start, 'post_parent' => $parent_id, ) ); $ancestors = get_post_ancestors( $post->ID ); $new_pos[ $post->ID ] = array( 'menu_order' => $start, 'post_parent' => $parent_id, 'depth' => count( $ancestors ), ); ++$start; } // if repositioned post has been set, and new items are already in the right order, we can stop if ( isset( $new_pos[ $post->ID ] ) && $sibling->menu_order >= $start ) { $return_data->next = false; break; } // set the menu order of the current sibling and increment the menu order if ( $sibling->menu_order !== $start ) { wp_update_post( array( 'ID' => $sibling->ID, 'menu_order' => $start, ) ); } $new_pos[ $sibling->ID ] = $start; ++$start; if ( ! $nextid && $previd === $sibling->ID ) { wp_update_post( array( 'ID' => $post->ID, 'menu_order' => $start, 'post_parent' => $parent_id, ) ); $ancestors = get_post_ancestors( $post->ID ); $new_pos[ $post->ID ] = array( 'menu_order' => $start, 'post_parent' => $parent_id, 'depth' => count( $ancestors ), ); ++$start; } endforeach; // max per request if ( ! isset( $return_data->next ) && $siblings->max_num_pages > 1 ) { $return_data->next = array( 'id' => $post->ID, 'previd' => $previd, 'nextid' => $nextid, 'start' => $start, 'excluded' => array_merge( array_keys( $new_pos ), $excluded ), ); } else { $return_data->next = false; } do_action( 'simple_page_ordering_ordered_posts', $post, $new_pos ); if ( ! $return_data->next ) { // if the moved post has children, we need to refresh the page (unless we're continuing) $children = new WP_Query( array( 'posts_per_page' => 1, 'post_type' => $post->post_type, 'post_status' => $post_stati, 'post_parent' => $post->ID, 'fields' => 'ids', 'update_post_term_cache' => false, 'update_post_meta_cache' => false, 'ignore_sticky' => true, 'no_found_rows' => true, ) ); if ( $children->have_posts() ) { return 'children'; } } $return_data->new_pos = $new_pos; return $return_data; } /** * Append a sort by order link to the post actions * * @param array $views An array of available list table views. * * @return array */ public static function sort_by_order_link( $views ) { $class = ( get_query_var( 'orderby' ) === 'menu_order title' ) ? 'current' : ''; $query_string = remove_query_arg( array( 'orderby', 'order' ) ); if ( ! is_post_type_hierarchical( get_post_type() ) ) { $query_string = add_query_arg( 'orderby', 'menu_order title', $query_string ); $query_string = add_query_arg( 'order', 'asc', $query_string ); $query_string = add_query_arg( 'id', 'simple-page-ordering', $query_string ); } $views['byorder'] = sprintf( '%s', esc_url( $query_string ), $class, __( 'Sort by Order', 'simple-page-ordering' ) ); return $views; } /** * Checks to see if the current user has the capability to "edit others" for a post type * * @param string $post_type Post type name * * @return bool True or false */ private static function check_edit_others_caps( $post_type ) { $post_type_object = get_post_type_object( $post_type ); $edit_others_cap = empty( $post_type_object ) ? 'edit_others_' . $post_type . 's' : $post_type_object->cap->edit_others_posts; return apply_filters( 'simple_page_ordering_edit_rights', current_user_can( $edit_others_cap ), $post_type ); } /** * Registers the API endpoint for sorting from the REST endpoint */ public static function rest_api_init() { register_rest_route( 'simple-page-ordering/v1', 'page_ordering', array( 'methods' => 'POST', 'callback' => array( __CLASS__, 'rest_page_ordering' ), 'permission_callback' => array( __CLASS__, 'rest_page_ordering_permissions_check' ), 'args' => array( 'id' => array( 'description' => __( 'ID of item we want to sort', 'simple-page-ordering' ), 'required' => true, 'type' => 'integer', 'minimum' => 1, ), 'previd' => array( 'description' => __( 'ID of item we want to be previous to after sorting', 'simple-page-ordering' ), 'required' => true, 'type' => array( 'boolean', 'integer' ), ), 'nextid' => array( 'description' => __( 'ID of item we want to be next to after sorting', 'simple-page-ordering' ), 'required' => true, 'type' => array( 'boolean', 'integer' ), ), 'start' => array( 'default' => 1, 'description' => __( 'Index we start with when sorting', 'simple-page-ordering' ), 'required' => false, 'type' => 'integer', ), // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- false positive. 'exclude' => array( 'default' => array(), 'description' => __( 'Array of IDs we want to exclude', 'simple-page-ordering' ), 'required' => false, 'type' => 'array', 'items' => array( 'type' => 'integer', ), ), ), ) ); } /** * Check if a given request has access to reorder content. * * This check ensures the current user making the request has * proper permissions to edit the item, that the post type * is allowed in REST requests and the post type is sortable. * * @since 2.5.1 * * @param WP_REST_Request $request Full data about the request. * @return bool|WP_Error */ public static function rest_page_ordering_permissions_check( \WP_REST_Request $request ) { $post_id = $request->get_param( 'id' ); // Ensure we have a logged in user that can edit the item. if ( ! current_user_can( 'edit_post', $post_id ) ) { return false; } $post_type = get_post_type( $post_id ); $post_type_obj = get_post_type_object( $post_type ); // Ensure the post type is allowed in REST endpoints. if ( ! $post_type || empty( $post_type_obj ) || empty( $post_type_obj->show_in_rest ) ) { return false; } // Ensure this post type is sortable. if ( ! self::is_post_type_sortable( $post_type ) ) { return new WP_Error( 'not_enabled', esc_html__( 'This post type is not sortable.', 'simple-page-ordering' ) ); } return true; } /** * Handle REST page sorting * * @param WP_REST_Request $request The REST request object. */ public static function rest_page_ordering( \WP_REST_Request $request ) { $post_id = empty( $request->get_param( 'id' ) ) ? false : (int) $request->get_param( 'id' ); $previd = empty( $request->get_param( 'previd' ) ) ? false : (int) $request->get_param( 'previd' ); $nextid = empty( $request->get_param( 'nextid' ) ) ? false : (int) $request->get_param( 'nextid' ); $start = empty( $request->get_param( 'start' ) ) ? 1 : (int) $request->get_param( 'start' ); $excluded = empty( $request->get_param( 'excluded' ) ) ? array( $request->get_param( 'id' ) ) : array_filter( (array) json_decode( $request->get_param( 'excluded' ) ), 'intval' ); // Check and make sure we have what we need. if ( false === $post_id || ( false === $previd && false === $nextid ) ) { return new WP_Error( 'invalid', __( 'Missing mandatory parameters.', 'simple-page-ordering' ) ); } $page_ordering = self::page_ordering( $post_id, $previd, $nextid, $start, $excluded ); if ( is_wp_error( $page_ordering ) ) { return $page_ordering; } return new WP_REST_Response( array( 'status' => 200, 'response' => 'success', 'body_response' => $page_ordering, ) ); } } Simple_Page_Ordering::get_instance(); endif; ================================================ FILE: composer.json ================================================ { "name": "10up/simple-page-ordering", "description": "Order your pages and other hierarchical post types with simple drag and drop right from the standard page list.", "type": "wordpress-plugin", "keywords": [ "wordpress", "10up" ], "homepage": "https://github.com/10up/simple-page-ordering", "license": "GPLv2", "authors": [ { "name": "10up", "homepage": "https://10up.com/" } ], "support": { "issues": "https://github.com/10up/simple-page-ordering/issues", "source": "https://github.com/10up/simple-page-ordering" }, "minimum-stability": "dev", "require": { "10up/wp-compat-validation-tool": "0.4.0" }, "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, "composer/installers": true }, "platform-check": false }, "scripts": { "post-install-cmd": [ "./10up-lib/wp-compat-validation-tool/replace-namespace.sh Simple_Page_Ordering_Validator simple-page-ordering" ], "post-update-cmd": [ "./10up-lib/wp-compat-validation-tool/replace-namespace.sh Simple_Page_Ordering_Validator simple-page-ordering" ] }, "extra": { "installer-paths": { "./{$name}/": ["10up/wp-compat-validation-tool"] } }, "require-dev": { "wp-coding-standards/wpcs": "^3.0", "phpcompatibility/phpcompatibility-wp": "^3.0@dev", "automattic/vipwpcs": "^3.0" } } ================================================ FILE: package.json ================================================ { "name": "simple-page-ordering", "description": "Order your pages and other hierarchical post types with simple drag and drop right from the standard page list.", "version": "2.8.0", "author": "10up (https://10up.com)", "license": "GPL-2.0-or-later", "devDependencies": { "@10up/cypress-wp-utils": "^0.2.0", "@wordpress/dependency-extraction-webpack-plugin": "^5.1.0", "@wordpress/env": "^10.28.0", "@wordpress/eslint-plugin": "^17.5.0", "10up-toolkit": "^6.5.0", "cypress": "^13.0.0", "cypress-mochawesome-reporter": "^3.6.0", "mochawesome-json-to-md": "^0.7.2", "prettier": "^3.3.2" }, "scripts": { "cypress:open": "cypress open --config-file tests/cypress/config.config.js", "cypress:run": "cypress run --config-file tests/cypress/config.config.js", "env": "wp-env", "env:start": "wp-env start", "env:stop": "wp-env stop", "postenv:start": "./tests/bin/initialize.sh", "build": "10up-toolkit build", "dev": "10up-toolkit build --watch", "format-js": "10up-toolkit format-js", "lint-js": "10up-toolkit lint-js" }, "10up-toolkit": { "devURL": "https://simple-page-ordering.test", "entry": { "simple-page-ordering": "./assets/js/src/simple-page-ordering.js" } }, "dependencies": { "@wordpress/html-entities": "^3.50.0" } } ================================================ FILE: readme.txt ================================================ === Simple Page Ordering === Contributors: 10up, jakemgold, welcher, helen, thinkoomph, jeffpaul Donate link: http://10up.com/plugins/simple-page-ordering-wordpress/ Tags: order, re-order, ordering, page, menu order Tested up to: 7.0 Stable tag: 2.8.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Order your pages and other custom post types that support "page-attributes" with drag and drop right from the standard page list. == Description == Order your pages, hierarchical custom post types, or custom post types with "page-attributes" with drag and drop right from the built in page list. Drag and drop the page into the desired position. No new admin menus pages, no clunky, bolted on user interfaces. Drag and drop on the page or post-type screen. The plug-in is "capabilities aware" - only users with the ability to edit others' pages (editors and administrators) will be able to reorder content. Integrated help is included: click the "help" tab at the top right of the screen. Please note that the plug-in is not compatible with Internet Explorer 7 and earlier, due to limitations within those browsers. === Contributing === We'd love to have you join in on development over on [GitHub](https://github.com/10up/simple-page-ordering). == Installation == 1. Install either via the WordPress.org plugin directory, or by uploading the files to your server. 1. Activate the plugin through the 'Plugins' menu in WordPress. 1. Get to work reordering your content! == Frequently Asked Questions == = Why can't I reorder my posts? = Generic posts are not displayed by menu order - they're displayed by chronology. You can theoretically add menu ordering to posts in your code (theme functions.php, plug-in) by using: `add_post_type_support( 'post', 'page-attributes' );` = Can I make my custom post type take advantage of this plug-in? = Yep. When you register the post type, include the `page-attributes` feature in the support list. This will add a `Sort by Order` option to the filter links above the drop downs. Once you sort by order, you can drag and drop the content. `'supports' => array( 'title', 'editor', 'page-attributes' ),` Alternatively, when you register the post type, set `hierarchical` to `true` - hierarchical post types natively order by menu order. You can also take advantage of the `simple_page_ordering_is_sortable` filter, which passes the result of the default check and the post type name, to override default behavior. = I want my non-hierarchical post type to be sortable. Help! = See the previous two answers - just add `page-attributes` to the list of supported post type features. = I reordered my posts, but the order didn't change on the front end of my site! = This plug-in doesn't change any *behavior* on the front end, it simply changes the menu order stored in WordPress. If you want a list of pages or custom post types to display in that defined order, you must change the post query's `orderby` parameter to `menu_order` (if it's not already). = I reordered my content, it seemed to work, but when I refreshed, it went back to the old order! = This most likely means the AJAX request - the server side code - failed after you dropped the content into the new position. Some shared hosts aggressively time out and limit AJAX requests. Version 2.0 batches these requests so you can try reducing the number of items it updates on each request using a filter in your theme's functions.php or a custom plug-in: `add_filter( 'simple_page_ordering_limit', function($number) { return 5; } );` Where 5 is the number of items to batch on each request (the default is 50). Note that this example uses PHP 5.3+ callback functions, so if you're still on PHP 5.2, you'll need to add a traditional callback. = What happened to the drop down box that let me change the number of items on each page in the admin? = This feature is already built into WordPress natively, but a bit tucked away. If you pull down the "Screen Options" tab up top (on the list of post objects) there's a field where you can specify the number of items to show per page. I decided it was not a very good practice to duplicate this. = How can I modify sortable post types? = Post types can be included or excluded by using the `simple_page_ordering_is_sortable` filter. For example, to exclude the `excluded_post_type` custom post type, add the following snippet in the theme function file or custom plugin: ` add_filter( 'simple_page_ordering_is_sortable', function( $sortable, $post_type ) { if ( 'excluded_post_type' === $post_type ) { return false; } return $sortable; }, 10, 2 ); ` To include the `include_post_type` custom post type, add the following snippet in the theme function file or custom plugin: ` add_filter( 'simple_page_ordering_is_sortable', function( $sortable, $post_type ) { if ( 'include_post_type' === $post_type ) { return true; } return $sortable; }, 10, 2 ); ` = Can I use REST to order posts? = Yes. The plugin registers the REST endpoint `simple-page-ordering/v1/page_ordering`. = Where do I report security bugs found in this plugin? = Please report security bugs found in the source code of the Simple Page Ordering plugin through the [Patchstack Vulnerability Disclosure  Program](https://patchstack.com/database/vdp/9e5fbbad-6488-4bba-851e-b300dabc33a2). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. == Screenshots == 1. Dragging the page to its new position 1. Processing indicator == Changelog == = 2.8.0 - 2026-05-15 = * **Added:** Add filter to disable page row actions (props [@sanketio](https://github.com/sanketio), [@faisal-alvi](https://github.com/faisal-alvi) via [#249](https://github.com/10up/simple-page-ordering/pull/249)). * **Fixed:** Resolved issue with emoji in page titles (props [@jamesmorrison](https://github.com/jamesmorrison), [@dkotter](https://github.com/dkotter) via [#248](https://github.com/10up/simple-page-ordering/pull/248)). * **Changed:** Indicate WordPress 7.0 compatibility (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@jasperfrontend](https://github.com/jasperfrontend), [@jeffpaul](https://github.com/jeffpaul) via [#254](https://github.com/10up/simple-page-ordering/pull/254), [#271](https://github.com/10up/simple-page-ordering/pull/271)). * **Changed:** Remove bundled translation file in favour of wp.org distributed file (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@dkotter](https://github.com/dkotter) via [#279](https://github.com/10up/simple-page-ordering/pull/279)). * **Changed:** Bump WordPress minimum supported version to 6.8 (props [@jeffpaul](https://github.com/jeffpaul), [@jasperfrontend](https://github.com/jasperfrontend) via [#271](https://github.com/10up/simple-page-ordering/pull/271)). * **Security:** Bump 10up-toolkit to 6.5.0 (props [@jamesmorrison](https://github.com/jamesmorrison), [@dkotter](https://github.com/dkotter) via [#247](https://github.com/10up/simple-page-ordering/pull/247)). * **Security:** Bump `http-proxy-middleware` from 2.0.6 to 2.0.9 and `tar-fs` from 2.1.2 to 3.0.9 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#244](https://github.com/10up/simple-page-ordering/pull/244)). * **Security:** Bump `bytes` from 3.0.0 to 3.1.2 and `compression` from 1.7.4 to 1.8.1 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#246](https://github.com/10up/simple-page-ordering/pull/246)). * **Security:** Bump `tmp` from 0.2.1 to 0.2.5, `@wordpress/env` from 9.2.0 to 10.28.0, `inquirer` from 8.2.6 to 8.2.7, `form-data` from 2.3.3 to 4.0.4, and `@cypress/request` from 3.0.1 to 3.0.9 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#250](https://github.com/10up/simple-page-ordering/pull/250)). * **Security:** Bump `@babel/plugin-transform-modules-systemjs` from 7.23.9 to 7.29.4, `postcss` from 8.4.33 to 8.5.14, and `simple-git` from 3.33.0 to 3.36.0 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#277](https://github.com/10up/simple-page-ordering/pull/277)). * **Security:** Updates the NPM dependencies throwing security alerts via NPM audit (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@dkotter](https://github.com/dkotter) via [#256](https://github.com/10up/simple-page-ordering/pull/256)). * **Security:** Bump `lodash` from 4.17.21 to 4.18.1 (props [@dependabot](https://github.com/apps/dependabot), [@dkotter](https://github.com/dkotter) via [#258](https://github.com/10up/simple-page-ordering/pull/258), [#269](https://github.com/10up/simple-page-ordering/pull/269)). * **Security:** Bump `webpack` from 5.94.0 to 5.105.0 (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@dependabot](https://github.com/apps/dependabot) via [#259](https://github.com/10up/simple-page-ordering/pull/259)). * **Security:** Bump `qs` from 6.14.1 to 6.14.2 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#260](https://github.com/10up/simple-page-ordering/pull/260)). * **Security:** Bump `immutable` from 4.3.5 to 4.3.8 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#261](https://github.com/10up/simple-page-ordering/pull/261)). * **Security:** Bump `svgo` from 3.2.0 to 3.3.3 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#262](https://github.com/10up/simple-page-ordering/pull/262)). * **Security:** Bump `simple-git` from 3.22.0 to 3.33.0 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#263](https://github.com/10up/simple-page-ordering/pull/263)). * **Security:** Bump `flatted` from 3.2.9 to 3.4.2 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#264](https://github.com/10up/simple-page-ordering/pull/264)). * **Security:** Bump `picomatch` from 2.3.1 to 2.3.2 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#266](https://github.com/10up/simple-page-ordering/pull/266)). * **Security:** Bump `node-forge` from 1.3.3 to 1.4.0 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#268](https://github.com/10up/simple-page-ordering/pull/268)). * **Security:** Bump `follow-redirects` from 1.15.11 to 1.16.0 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#270](https://github.com/10up/simple-page-ordering/pull/270)). * **Security:** Bump `fast-uri` from 3.1.0 to 3.1.2 (props [@dkotter](https://github.com/dkotter), [@dependabot](https://github.com/apps/dependabot) via [#274](https://github.com/10up/simple-page-ordering/pull/274)). = 2.7.4 - 2025-05-19 = * **Changed:** Bump WordPress "tested up to" version 6.8 (props [@jeffpaul](https://github.com/jeffpaul) via [#239](https://github.com/10up/simple-page-ordering/pull/239), [#240](https://github.com/10up/simple-page-ordering/pull/240)). * **Changed:** Bump WordPress minimum from 6.5 to 6.6 (props [@jeffpaul](https://github.com/jeffpaul) via [#239](https://github.com/10up/simple-page-ordering/pull/239)). * **Security:** Bump `tar-fs` from 2.1.1 to 3.0.8 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#238](https://github.com/10up/simple-page-ordering/pull/238)). * **Security:** Bump `@babel/runtime` from 7.23.9 to 7.27.0 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#237](https://github.com/10up/simple-page-ordering/pull/237)). = 2.7.3 - 2025-03-11 = * **Changed:** Bump WordPress "tested up to" version 6.7 (props [@sudip-md](https://github.com/sudip-md), [@godleman](https://github.com/godleman), [@jeffpaul](https://github.com/jeffpaul) via [#230](https://github.com/10up/simple-page-ordering/pull/230), [#231](https://github.com/10up/simple-page-ordering/pull/231)). * **Changed:** Bump WordPress minimum from 6.4 to 6.5 (props [@sudip-md](https://github.com/sudip-md), [@godleman](https://github.com/godleman), [@jeffpaul](https://github.com/jeffpaul) via [#230](https://github.com/10up/simple-page-ordering/pull/230), [#231](https://github.com/10up/simple-page-ordering/pull/231)). * **Security:** Bump `webpack` from 5.90.0 to 5.94.0 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#224](https://github.com/10up/simple-page-ordering/pull/224)). * **Security:** Bump `serve-static` from 1.15.0 to 1.16.2 and `express` from 4.19.2 to 4.21.0 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#226](https://github.com/10up/simple-page-ordering/pull/226)). * **Security:** Bump `cookie` from 0.6.0 to 0.7.1 and `express` from 4.21.0 to 4.21.1 (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#228](https://github.com/10up/simple-page-ordering/pull/228)). * **Security:** Bump `serialize-javascript` from 6.0.0 to 6.0.2 and `mocha` from 10.2.0 to 11.1.0 (props [@dependabot](https://github.com/apps/dependabot), [@dkotter](https://github.com/dkotter) via [#232](https://github.com/10up/simple-page-ordering/pull/232)). = 2.7.2 - 2024-08-21 = * **Changed:** Bump WordPress "tested up to" version 6.6 (props [@sudip-md](https://github.com/sudip-md), [@ankitguptaindia](https://github.com/ankitguptaindia), [@jeffpaul](https://github.com/jeffpaul) via [#216](https://github.com/10up/simple-page-ordering/pull/216), [#217](https://github.com/10up/simple-page-ordering/pull/217)). * **Changed:** Bump WordPress minimum from 6.3 to 6.4 (props [@sudip-md](https://github.com/sudip-md), [@ankitguptaindia](https://github.com/ankitguptaindia), [@jeffpaul](https://github.com/jeffpaul) via [#216](https://github.com/10up/simple-page-ordering/pull/216)). * **Fixed:** Issue where an `Undefined array key` error occurs when a post parent ID does not exist in the `$children_pages` array (props [@xDehy](https://github.com/xDehy), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#219](https://github.com/10up/simple-page-ordering/pull/219)). * **Security:** Bump `express` from 4.18.2 to 4.19.2, `follow-redirects` from 1.15.5 to 1.15.6, `postcss` from 7.0.39 to 8.4.33, `10up-toolkit` from 5.2.3 to 6.1.0 and `webpack-dev-middleware` from 5.3.3 to 5.3.4 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#208](https://github.com/10up/simple-page-ordering/pull/208)). * **Security:** Bump `braces` from 3.0.2 to 3.0.3 and `ws` from 7.5.9 to 7.5.10 (props [@dependabot](https://github.com/apps/dependabot), [@iamdharmesh](https://github.com/iamdharmesh) via [#214](https://github.com/10up/simple-page-ordering/pull/214)). = 2.7.1 - 2024-06-03 = * **Added:** The missing Text Domain (props [@alexclassroom](https://github.com/alexclassroom), [@dkotter](https://github.com/dkotter) via [#199](https://github.com/10up/simple-page-ordering/pull/199)). * **Added:** The "Testing" section in the `CONTRIBUTING.md` file (props [@kmgalanakis](https://github.com/kmgalanakis), [@jeffpaul](https://github.com/jeffpaul) via [#202](https://github.com/10up/simple-page-ordering/pull/202)). * **Changed:** Bump WordPress "tested up to" version 6.5 (props [@jeffpaul](https://github.com/jeffpaul), [@sudip-md](https://github.com/sudip-md), [@dkotter](https://github.com/dkotter) via [#201](https://github.com/10up/simple-page-ordering/pull/201)). * **Changed:** Bump WordPress minimum from 5.7 to 6.3 (props [@jeffpaul](https://github.com/jeffpaul), [@sudip-md](https://github.com/sudip-md), [@dkotter](https://github.com/dkotter) via [#201](https://github.com/10up/simple-page-ordering/pull/201)). * **Fixed:** Fixed error in call to `get_walked_pages` for custom post types (props [@sissibieber](https://github.com/sissibieber), [@zachgibb](https://github.com/zachgibb), [@peterwilsoncc](https://github.com/peterwilsoncc), [@mjot](https://github.com/mjot), [@jeffpaul](https://github.com/jeffpaul) via [#200](https://github.com/10up/simple-page-ordering/pull/200)). = 2.7.0 - 2024-04-03 = * **Added:** Ability to modify the page hierarchy (props [@amityweb](https://github.com/amityweb), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc), [@shannonmfisher](https://github.com/shannonmfisher), [@ankitguptaindia](https://github.com/ankitguptaindia), [@faisal-alvi](https://github.com/faisal-alvi) via [#172](https://github.com/10up/simple-page-ordering/pull/172)). * **Added:** Support for the WordPress.org plugin preview (props [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul) via [#183](https://github.com/10up/simple-page-ordering/pull/183)). * **Changed:** Replaced custom HTML entity decoding code in favor of the `@wordpress/html-entities` package (props [@helen](https://github.com/helen), [@jeffpaul](https://github.com/jeffpaul), [@psorensen](https://github.com/psorensen), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#189](https://github.com/10up/simple-page-ordering/pull/189)). * **Changed:** Bump minimum `node` version from `16` to `20` and clean up NPM dependencies (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#188](https://github.com/10up/simple-page-ordering/pull/188)). * **Changed:** Updated CODEOWNERS (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#186](https://github.com/10up/simple-page-ordering/pull/186)). * **Changed:** Upgrade the download-artifact from v3 to v4 (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#194](https://github.com/10up/simple-page-ordering/pull/194)). * **Changed:** Replaced [lee-dohm/no-response](https://github.com/lee-dohm/no-response) with [actions/stale](https://github.com/actions/stale) to help with closing no-response/stale issues (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [@195](https://github.com/10up/simple-page-ordering/pull/195)). * **Changed:** Disabled auto sync pull requests with target branch (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#196](https://github.com/10up/simple-page-ordering/pull/196)). * **Security:** Bump `@babel/traverse` from `7.20.12` to `7.23.6` (props [@dependabot](https://github.com/apps/dependabot), [@ravinderk](https://github.com/ravinderk) via [#184](https://github.com/10up/simple-page-ordering/pull/184)). * **Security:** Bump `sharp` from `0.30.7` to `0.32.1` (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#182](https://github.com/10up/simple-page-ordering/pull/184)). * **Security:** Bump `10up-toolkit` from `4.3.1` to `5.2.2` (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#182](https://github.com/10up/simple-page-ordering/pull/182)). = 2.6.3 - 2023-11-09 = * **Fix:** Deployment issue with version 2.6.2 (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#181](https://github.com/10up/simple-page-ordering/pull/181)) = 2.6.2 - 2023-11-09 = * **Changed:** Update the `wp-compat-validation-tool` composer package to version `0.3.1` which properly removes the `.git` directory (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#180](https://github.com/10up/simple-page-ordering/pull/180)). = 2.6.1 - 2023-11-08 = * **Changed:** Bump WordPress "tested up to" version 6.4 (props [@jeffpaul](https://github.com/jeffpaul), [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@faisal-alvi](https://github.com/faisal-alvi) via [#177](https://github.com/10up/simple-page-ordering/pull/177)). * **Changed:** Remove the .git directory from the `10up-lib` directory (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#175](https://github.com/10up/simple-page-ordering/pull/175)). * **Security:** Bumps `@babel/traverse` from `7.20.12` to `7.23.2` (props [@peterwilsoncc](https://github.com/peterwilsoncc) via [#170](https://github.com/10up/simple-page-ordering/pull/170)). = 2.6.0 - 2023-10-25 = * **Added:** A check for minimum required PHP version before loading the plugin (props [@vikrampm1](https://github.com/vikrampm1), [@kmgalanakis](https://github.com/kmgalanakis), [@Sidsector9](https://github.com/Sidsector9) via [#153](https://github.com/10up/simple-page-ordering/pull/153)). * **Added:** Mochawesome reporter added for Cypress test report (props [@iamdharmesh](https://github.com/iamdharmesh), [@jayedul](https://github.com/jayedul), [@faisal-alvi](https://github.com/faisal-alvi) via [#146](https://github.com/10up/simple-page-ordering/pull/146)). * **Added:** Repo Automator GitHub Action (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#158](https://github.com/10up/simple-page-ordering/pull/158)). * **Changed:** Bump WordPress "tested up to" version 6.3 (props [@jeffpaul](https://github.com/jeffpaul), [@QAharshalkadu](https://github.com/QAharshalkadu)). * **Changed:** Slightly change how some of our text is translated, passing in the post type (props [@dkotter](https://github.com/dkotter), [@ravinderk](https://github.com/ravinderk) via [#149](https://github.com/10up/simple-page-ordering/pull/149)). * **Changed:** Updates the Dependency Review GitHub Action to check for GPL-compatible licenses (props [@jeffpaul](https://github.com/jeffpaul), [@Sidsector9](https://github.com/Sidsector9) via [#147](https://github.com/10up/simple-page-ordering/pull/147)). * **Changed:** Updated 10up Cypress Utilities to 0.2.0 (props [@iamdharmesh](https://github.com/iamdharmesh), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#160](https://github.com/10up/simple-page-ordering/pull/160)). * **Fixed:** The "Are you sure..." popup text to be translatable (props [@kebbet](https://github.com/kebbet), [@bmarshall511](https://github.com/bmarshall511), [@dkotter](https://github.com/dkotter) via [#148](https://github.com/10up/simple-page-ordering/pull/148)). * **Fixed:** Remove code that was no longer needed (props [@dkotter](https://github.com/dkotter), [@ravinderk](https://github.com/ravinderk) via [#149](https://github.com/10up/simple-page-ordering/pull/149)). * **Fixed:** Add missing escaping (props [@dkotter](https://github.com/dkotter), [@ravinderk](https://github.com/ravinderk) via [#149](https://github.com/10up/simple-page-ordering/pull/149)). * **Fixed:** Fatal error following the introduction of a namespace (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#162](https://github.com/10up/simple-page-ordering/pull/162)). * **Fixed:** Hidden pagination in admin screen when Sort by Order is clicked (props [@tlovett1](https://github.com/tlovett1), [@dkotter](https://github.com/dkotter), [@Sidsector9](https://github.com/Sidsector9) via [#165](https://github.com/10up/simple-page-ordering/pull/165)). * **Fixed:** Fatal errors on PHP 5.6 (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@Sidsector9](https://github.com/Sidsector9), [@iamdharmesh](https://github.com/iamdharmesh) via [#166](https://github.com/10up/simple-page-ordering/pull/166)). * **Security:** Bump `word-wrap` from 1.2.3 to 1.2.4 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#](https://github.com/10up/simple-page-ordering/pull/151)). * **Security:** Bump `tough-cookie` from 4.1.2 to 4.1.3 (props [@faisal-alvi](https://github.com/faisal-alvi) via [#152](https://github.com/10up/simple-page-ordering/pull/152)). * **Security:** Bump `node-sass` from 7.0.3 to 9.0.0 (props [@faisal-alvi](https://github.com/faisal-alvi) via [#152](https://github.com/10up/simple-page-ordering/pull/152)). * **Security:** Bump `@cypress/request` from 2.88.11 to 3.0.0 to resolve SSRF issue (props [@faisal-alvi](https://github.com/faisal-alvi), [@iamdharmesh](https://github.com/iamdharmesh), [@peterwilsoncc](https://github.com/peterwilsoncc), [@dkotter](https://github.com/dkotter) via [#152](https://github.com/10up/simple-page-ordering/pull/152), [#160](https://github.com/10up/simple-page-ordering/pull/160)). [View historical changelog details here](https://github.com/10up/simple-page-ordering/blob/develop/CHANGELOG.md). == Upgrade Notice == = 2.8.0 = This release bumps the minimum required version of WordPress from 6.6 to 6.8. = 2.7.4 = This release bumps the minimum required version of WordPress from 6.5 to 6.6. = 2.7.3 = This release bumps the minimum required version of WordPress from 6.4 to 6.5. = 2.7.2 = This release bumps the minimum required version of WordPress from 6.3 to 6.4. = 2.5.0 = This release bumps the minimum required versions of PHP from 5.6 to 7.4 and WordPress from 3.8 to 5.7. ================================================ FILE: simple-page-ordering.php ================================================ set_plugin_name( 'Simple Page Ordering' ) ->set_php_min_required_version( '7.4' ); if ( ! $simple_page_ordering_compat_checker->is_plugin_compatible() ) { return; } require_once __DIR__ . '/class-simple-page-ordering.php'; ================================================ FILE: tests/bin/initialize.sh ================================================ #!/bin/bash wp-env run tests-wordpress chmod -c ugo+w /var/www/html wp-env run tests-cli wp rewrite structure '/%postname%/' --hard wp-env run tests-cli wp site empty --yes # Create Posts wp-env run tests-cli wp post create --post_status=publish --post_title='Post 1' wp-env run tests-cli wp post create --post_status=publish --post_title='Post 2' wp-env run tests-cli wp post create --post_status=publish --post_title='Post 3' # Create Pages wp-env run tests-cli wp post create --post_status=publish --post_type=page --post_title='Page 1' --menu_order=10 wp-env run tests-cli wp post create --post_status=publish --post_type=page --post_title='Page 2' --menu_order=20 wp-env run tests-cli wp post create --post_status=publish --post_type=page --post_title='Page 3' --menu_order=30 wp-env run tests-cli wp post create --post_status=publish --post_type=page --post_title='Hey there! 👋' --menu_order=15 wp-env run tests-cli wp post create --post_status=publish --post_type=page --post_parent=6 --post_title='Child Page 1' --menu_order=10 wp-env run tests-cli wp post create --post_status=publish --post_type=page --post_parent=6 --post_title='Child Page 2' --menu_order=20 wp-env run tests-cli wp post create --post_status=publish --post_type=page --post_parent=6 --post_title='Child Page 3' --menu_order=30 ================================================ FILE: tests/bin/set-wp-config.js ================================================ #!/usr/bin/env node const fs = require( 'fs' ); const path = `${ process.cwd() }/.wp-env.override.json`; let config = fs.existsSync( path ) ? require( path ) : { plugins: [ '.' ] }; const args = {}; process.argv .slice(2, process.argv.length) .forEach( arg => { if (arg.slice(0,2) === '--') { const param = arg.split('='); const paramName = param[0].slice(2,param[0].length); const paramValue = param.length > 1 ? param[1] : true; args[paramName] = paramValue; } }); if ( ! args.core && ! args.plugins ) { return; } if ( 'latest' === args.core ) { delete args.core; } if( Object.keys(args).length === 0 ) { return; } if ( args.plugins ) { args.plugins = args.plugins.split(','); } config = { ...config, ...args, } try { fs.writeFileSync( path, JSON.stringify( config ) ); } catch ( err ) { console.error( err ); } ================================================ FILE: tests/bin/wp-cli.yml ================================================ apache_modules: - mod_rewrite ================================================ FILE: tests/cypress/config.config.js ================================================ const { defineConfig } = require('cypress') module.exports = defineConfig({ fixturesFolder: __dirname+'/fixtures', screenshotsFolder: __dirname+'/screenshots', videosFolder: __dirname+'/videos', downloadsFolder: __dirname+'/downloads', video: true, reporter: 'mochawesome', reporterOptions: { mochaFile: "mochawesome-[name]", reportDir: __dirname+"/reports", overwrite: false, html: false, json: true }, e2e: { // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. setupNodeEvents(on, config) { return require(__dirname+'/plugins/index.js')(on, config) }, specPattern: __dirname+'/integration/*.test.{js,jsx,ts,tsx}', supportFile: __dirname+'/support/index.js', }, }) ================================================ FILE: tests/cypress/fixtures/example.json ================================================ { "name": "Using fixtures to represent data", "email": "hello@cypress.io", "body": "Fixtures are a great way to mock data for responses to routes" } ================================================ FILE: tests/cypress/integration/admin.test.js ================================================ describe('Admin can login and make sure plugin is activated', () => { it('Can activate plugin if it is deactivated', () => { cy.login(); cy.visit('/wp-admin/plugins.php'); cy.get('body') .then(($body) => { if ($body.find('#the-list tr[data-slug="simple-page-ordering"] .deactivate > a').length > 0) { cy.get('#the-list tr[data-slug="simple-page-ordering"] .deactivate > a').click(); cy.get('#the-list tr[data-slug="simple-page-ordering"] .activate > a').click(); cy.get('#the-list tr[data-slug="simple-page-ordering"] .deactivate > a').should('have.text', 'Deactivate'); } else { cy.get('#the-list tr#simple-page-ordering .deactivate > a').click(); cy.get('#the-list tr#simple-page-ordering .activate > a').click(); cy.get('#the-list tr#simple-page-ordering .deactivate > a').should('have.text', 'Deactivate'); } }); }); it('Can see "Sort by Order" on Pages list page.', () => { cy.login(); cy.visit('/wp-admin/edit.php?post_type=page'); cy.get('.subsubsub .byorder').should('have.text', 'Sort by Order'); }); it('Pagination is visible when Clicking "Sort by Order"', () => { cy.login(); cy.visit( '/wp-admin/edit.php?post_type=page' ); cy.get( '#show-settings-link' ).click(); cy.get( '#edit_page_per_page' ).type( '{selectAll}{del}2' ); cy.get( '#screen-options-apply' ).click(); cy.get( '.byorder' ).click(); cy.get( '.pagination-links' ).should( 'be.visible' ); // Restore default pagination. cy.get( '#show-settings-link' ).click(); cy.get( '#edit_page_per_page' ).type( '{selectAll}{del}60' ); cy.get( '#screen-options-apply' ).click(); }); }); ================================================ FILE: tests/cypress/integration/page-ordering.test.js ================================================ describe('Test Page Order Change', () => { const firstTopLevelPage = '.wp-list-table tbody tr:nth-child(1)'; const secondTopLevelPage = '.wp-list-table tbody tr:nth-child(2)'; const firstChildPage = '.wp-list-table .level-0 + .level-1'; const secondChildPage = '.wp-list-table .level-0 + .level-1 + .level-1'; beforeEach(() => { cy.login(); cy.visit('/wp-admin/edit.php?post_type=page'); cy.get(`${firstTopLevelPage} .row-title`).invoke('text').as('initialFirstTopLevelPageTitle', { type: 'static' } ); cy.get(`${secondTopLevelPage} .row-title`).invoke('text').as('initialSecondTopLevelPageTitle', { type: 'static' } ); cy.get(`${firstChildPage} .row-title`).invoke('text').as('initialFirstChildPageTitle', { type: 'static' } ); cy.get(`${secondChildPage} .row-title`).invoke('text').as('initialSecondChildPageTitle', { type: 'static' } ); }); it('Can change parent pages order', () => { cy.get(firstTopLevelPage).drag(secondTopLevelPage); // wait for order update done. cy.get(`${secondTopLevelPage} .check-column input`).should('exist'); cy.get( '@initialSecondTopLevelPageTitle' ).then( initialSecondTopLevelPageTitle => { // Now that it has been reordered, the first row should have the initial second text. cy.get( `${firstTopLevelPage} .row-title` ).should('have.text', `${initialSecondTopLevelPageTitle}` ); } ); cy.get( '@initialFirstTopLevelPageTitle' ).then( initialFirstTopLevelPageTitle => { // Now that it has been reordered, the second row should have the initial first text. cy.get( `${secondTopLevelPage} .row-title` ).should('have.text', `${initialFirstTopLevelPageTitle}` ); } ); }); it('Can change Child pages order', () => { cy.get(firstChildPage).drag(secondChildPage); // wait for order update done. cy.get(`${secondChildPage} .check-column input`).should('exist'); cy.get( '@initialSecondChildPageTitle' ).then( initialSecondChildPageTitle => { // Now that it has been reordered, the first row should have the initial second text. cy.get( `${firstChildPage} .row-title` ).should('have.text', `${initialSecondChildPageTitle}` ); } ); cy.get( '@initialFirstChildPageTitle' ).then( initialFirstChildPageTitle => { // Now that it has been reordered, the second row should have the initial first text. cy.get( `${secondChildPage} .row-title` ).should('have.text', `${initialFirstChildPageTitle}` ); } ); }); it('Can preserve emojis in page titles during reordering', () => { // Find the emoji page that was created during setup cy.contains('.row-title', 'Hey there! 👋').should('exist').as('emojiPage'); // Get the parent row of our emoji page cy.get('@emojiPage').parents('tr').as('emojiPageRow'); // Store the initial emoji title text cy.get('@emojiPage').invoke('text').as('initialEmojiTitle'); // Get the ID of the emoji page row for debugging cy.get('@emojiPageRow').invoke('attr', 'id').then(rowId => { cy.log('Emoji page row ID:', rowId); }); // Perform the drag operation to trigger the callback cy.get('@emojiPageRow').drag(secondTopLevelPage); // Wait for the ordering update to complete with a timeout cy.get('.wp-list-table tbody tr .check-column input', { timeout: 10000 }).should('exist'); // Add a small wait to ensure the callback has completed cy.wait(1000); // Verify the emoji is still present and unchanged in the title cy.get('@initialEmojiTitle').then(initialTitle => { cy.log('Initial title was:', initialTitle); cy.contains('.row-title', 'Hey there! 👋') .should('exist') .should('have.text', initialTitle); }); }); // Reset page ordering state. after( () => { cy.login(); cy.visit('/wp-admin/edit.php?post_type=page'); cy.get( firstTopLevelPage ).drag( secondTopLevelPage ); cy.get( firstChildPage ).drag( secondChildPage ); } ); }); ================================================ FILE: tests/cypress/integration/post-ordering.test.js ================================================ describe('Test Post Order Change', () => { const firstPost = '.wp-list-table tbody tr:nth-child(1)'; const secondPost = '.wp-list-table tbody tr:nth-child(2)'; beforeEach(() => { cy.login(); cy.visit('/wp-admin/edit.php?orderby=menu_order+title&order=asc'); cy.get(`${firstPost} .row-title`).invoke('text').as('initialFirstPostTitle', { type: 'static' } ); cy.get(`${secondPost} .row-title`).invoke('text').as('initialSecondPostTitle', { type: 'static' } ); }); it('Can change posts order', () => { cy.get(firstPost).drag(secondPost); // wait for order update done. cy.get(`${secondPost} .check-column input`).should('exist'); cy.get( '@initialSecondPostTitle' ).then( initialSecondPostTitle => { // Now that it has been reordered, the first row should have the initial second text. cy.get( `${firstPost} .row-title` ).should('have.text', `${initialSecondPostTitle}` ); } ); cy.get( '@initialFirstPostTitle' ).then( initialFirstPostTitle => { // Now that it has been reordered, the second row should have the initial first text. cy.get( `${secondPost} .row-title` ).should('have.text', `${initialFirstPostTitle}` ); } ); }); }); ================================================ FILE: tests/cypress/integration/reset-page-ordering.test.js ================================================ describe( 'Test Reset Page Order Change', () => { it( 'Can reset pages order', () => { cy.login(); cy.visit('/wp-admin/edit.php?post_type=page'); const firstRow = '.wp-list-table tbody tr:nth-child(1)'; const secondRow = '.wp-list-table tbody tr:nth-child(2)'; // Alias titles as `firstRowText` and `secondRowText` for convenience. cy.get( firstRow ).find( '.row-title' ).invoke( 'text' ).as( 'firstRowText' ); cy.get( secondRow ).find( '.row-title' ).invoke( 'text' ).as( 'secondRowText' ); // Swap position of `Page 1` with `Page 2`. cy.get( firstRow ).drag( secondRow ); // Verifies if 1st row has title `Page 2`. cy.get( firstRow ).find( '.row-title' ).invoke( 'text' ).then( function( text ) { expect( text ).to.eq( this.secondRowText ); } ); // Verifies if 2nd row has title `Page 1`. cy.get( secondRow ).find( '.row-title' ).invoke( 'text' ).then( function( text ) { expect( text ).to.eq( this.firstRowText ); } ); // Now reset the page order and verify original values are back. cy.get( '#contextual-help-link' ).click(); cy.get( '#tab-link-simple_page_ordering_help_tab' ).click(); cy.get( '#simple-page-ordering-reset' ).click(); cy.on( 'window:confirm', () => true ); // Perform a reload as Cypress won't after window:confirm. cy.reload(); // Verifies if 1st row has title `Page 1`. cy.get( firstRow ).find( '.row-title' ).invoke( 'text' ).then( function( text ) { expect( text ).to.eq( this.firstRowText ); } ); // Verifies if 2nd row has title `Page 2`. cy.get( secondRow ).find( '.row-title' ).invoke( 'text' ).then( function( text ) { expect( text ).to.eq( this.secondRowText ); } ); } ); } ); ================================================ FILE: tests/cypress/plugins/index.js ================================================ /// // *********************************************************** // This example plugins/index.js can be used to load plugins // // You can change the location of this file or turn off loading // the plugins file with the 'pluginsFile' configuration option. // // You can read more here: // https://on.cypress.io/plugins-guide // *********************************************************** // This function is called when a project is opened or re-opened (e.g. due to // the project's config changing) const { loadConfig } = require( '@wordpress/env/lib/config' ); const getCacheDirectory = require( '@wordpress/env/lib/config/get-cache-directory' ); /** * @type {Cypress.PluginConfig} */ // eslint-disable-next-line no-unused-vars module.exports = async (on, config) => { const cacheDirectory = await getCacheDirectory(); const wpEnvConfig = await loadConfig( cacheDirectory ); if (wpEnvConfig) { const port = wpEnvConfig.env.tests.port || null; if (port) { config.baseUrl = wpEnvConfig.env.tests.config.WP_SITEURL; } } return config; }; ================================================ FILE: tests/cypress/support/commands.js ================================================ // *********************************************** // This example commands.js shows you how to // create various custom commands and overwrite // existing commands. // // For more comprehensive examples of custom // commands please read more here: // https://on.cypress.io/custom-commands // *********************************************** // // // -- This is a parent command -- // Cypress.Commands.add('login', (email, password) => { ... }) // // // -- This is a child command -- // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) // // // -- This is a dual command -- // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) // // // -- This will overwrite an existing command -- // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, target) => { const rectSource = subject[0].getBoundingClientRect(); cy.get(target).then(el => { const rectTarget = el[0].getBoundingClientRect(); cy.window().then((window) => { const pageX = rectSource.left + window.pageXOffset; const pageY = rectSource.top + window.pageYOffset; const targetPageX = rectTarget.left + window.pageXOffset; const targetPageY = rectTarget.top + window.pageYOffset; cy.wrap(subject) .trigger('mouseover', { force: true }) .trigger('mousedown', { which: 1, pageX, pageY, force: true }) .trigger('mousemove', { which: 1, pageX: targetPageX, pageY: targetPageY, force: true }) .trigger('mouseup', { force: true }); }); }); }); ================================================ FILE: tests/cypress/support/index.js ================================================ // *********************************************************** // This example support/index.js is processed and // loaded automatically before your test files. // // This is a great place to put global configuration and // behavior that modifies Cypress. // // You can change the location of this file or turn off // automatically serving support files with the // 'supportFile' configuration option. // // You can read more here: // https://on.cypress.io/configuration // *********************************************************** import '@10up/cypress-wp-utils'; // Import commands.js using ES2015 syntax: import './commands'; ================================================ FILE: tests/cypress/tsconfig.json ================================================ { "compilerOptions": { "allowJs": true, "types": ["cypress"] }, "include": ["**/*.*"] } ================================================ FILE: tests/test-plugins/enable-ordering-for-posts.php ================================================ plugin.constructor.name !== "DependencyExtractionWebpackPlugin" ), new DependencyExtractionWebpackPlugin({ requestToExternal(request) { if ("jquery-ui-sortable" === request) { return "jquery-ui-sortable"; } }, }), ], };