Repository: 10up/simple-podcasting Branch: develop Commit: f4aed4e51587 Files: 100 Total size: 323.6 KB Directory structure: gitextract_alta88pg/ ├── .distignore ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github/ │ ├── CODEOWNERS │ └── workflows/ │ ├── build-release-zip.yml │ ├── close-stale-issues.yml │ ├── cypress.yml │ ├── dependency-review.yml │ ├── php-compatibility.yml │ ├── phpcs.yml │ ├── phpunit.yml │ ├── push-asset-readme-update.yml │ ├── push-deploy.yml │ ├── repo-automator.yml │ └── wordpress-version-checker.yml ├── .gitignore ├── .husky/ │ ├── .gitignore │ └── pre-commit ├── .nvmrc ├── .phpcs.xml.dist ├── .prettierrc ├── .wordpress-org/ │ └── blueprints/ │ └── blueprint.json ├── .wordpress-version-checker.json ├── .wp-env.json ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CREDITS.md ├── LICENSE.md ├── README.md ├── assets/ │ ├── css/ │ │ ├── podcasting-edit-term.css │ │ ├── podcasting-editor-screen.css │ │ ├── podcasting-onboarding.scss │ │ └── podcasting-transcript.css │ └── js/ │ ├── blocks/ │ │ ├── latest-episode/ │ │ │ ├── index.js │ │ │ └── index.scss │ │ ├── podcast/ │ │ │ ├── index.js │ │ │ └── index.scss │ │ └── podcast-platforms/ │ │ ├── edit.js │ │ ├── index.js │ │ └── index.scss │ ├── blocks.js │ ├── create-podcast-show.js │ ├── deprecated.js │ ├── edit.js │ ├── onboarding.js │ ├── podcasting-edit-post.js │ ├── podcasting-edit-term.js │ └── transforms.js ├── composer.json ├── includes/ │ ├── admin/ │ │ ├── create-podcast-component.php │ │ ├── onboarding.php │ │ └── views/ │ │ ├── onboarding-header.php │ │ ├── onboarding-page-one.php │ │ └── onboarding-page-two.php │ ├── block-patterns.php │ ├── blocks/ │ │ ├── podcast/ │ │ │ └── markup.php │ │ └── podcast-transcript/ │ │ ├── cite.js │ │ ├── edit.js │ │ ├── formats.js │ │ ├── index.js │ │ ├── markup.php │ │ ├── styles.css │ │ └── time.js │ ├── blocks.php │ ├── create-podcast.php │ ├── customize-feed.php │ ├── datatypes.php │ ├── helpers.php │ ├── post-meta-box.php │ ├── rest-external-url.php │ ├── transcripts.php │ └── upgrade.php ├── package.json ├── phpunit.xml.dist ├── readme.txt ├── simple-podcasting.php ├── templates/ │ └── transcript.php ├── tests/ │ ├── bin/ │ │ └── set-wp-config.js │ ├── cypress/ │ │ ├── .eslintrc │ │ ├── config.config.js │ │ ├── fixtures/ │ │ │ └── example.json │ │ ├── integration/ │ │ │ ├── admin.test.js │ │ │ ├── block.test.js │ │ │ ├── onboarding.test.js │ │ │ ├── podcast-setting-panel.test.js │ │ │ └── taxonomy.test.js │ │ ├── plugins/ │ │ │ └── index.js │ │ ├── support/ │ │ │ ├── functions.js │ │ │ └── index.js │ │ └── tsconfig.json │ └── unit/ │ ├── bootstrap.php │ ├── test-blocks.php │ ├── test-customize-feed.php │ ├── test-datatypes.php │ ├── test-helpers.php │ ├── test-rest-external-url.php │ └── test-transcript.php └── webpack.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .distignore ================================================ # Directories /.git /.github /.husky /.wordpress-org /assets /gulp-tasks /node_modules /tests /vendor # Files .* /CHANGELOG.md /CODE_OF_CONDUCT.md /composer.json /composer.lock /CONTRIBUTING.md /CREDITS.md /gulpfile.babel.js /LICENSE.md /package.json /package-lock.json /phpunit.xml.dist /README.md /webpack.config.js ================================================ FILE: .editorconfig ================================================ root = true [*] charset = utf-8 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = tab [{*.json,*.yml,.babelrc,.bowerrc,.postcssrc}] indent_style = space indent_size = 2 [*.txt,wp-config-sample.php] end_of_line = crlf ================================================ FILE: .eslintignore ================================================ assets/js/frontend/vendor/*.js ================================================ FILE: .eslintrc ================================================ { "extends": [ "plugin:@wordpress/eslint-plugin/recommended" ], "ignorePatterns": ["**/vendor/**"] } ================================================ FILE: .github/CODEOWNERS ================================================ # These owners will be the default owners for everything in the repo. Unless a later match takes precedence, @10up/open-source-practice, as primary maintainers will be requested for review when someone opens a Pull Request. * @10up/open-source-practice # 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: Setup node version and npm cache uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version-file: '.nvmrc' cache: 'npm' - 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 permissions: contents: read pull-requests: write on: push: branches: - trunk - develop pull_request: branches: - develop jobs: build: uses: 10up/simple-podcasting/.github/workflows/build-release-zip.yml@develop cypress: needs: build runs-on: ubuntu-latest strategy: fail-fast: false matrix: core: - {name: 'WP latest', version: 'latest'} - {name: 'WP trunk', version: 'WordPress/WordPress#master'} - {name: 'WP minimum', version: 'WordPress/WordPress#6.6'} 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 }} - name: Set up WP environment run: npm run wp-env start continue-on-error: ${{ matrix.core.name == 'WP trunk' }} - name: Test run: npm run cypress:run continue-on-error: ${{ matrix.core.name == 'WP trunk' }} - 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/php-compatibility.yml ================================================ name: PHP Compatibility permissions: contents: read env: COMPOSER_VERSION: "2" COMPOSER_CACHE: "${{ github.workspace }}/.composer-cache" on: push: branches: - develop - trunk pull_request: branches: - develop jobs: php_compatibility: name: PHP ${{ matrix.php }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set standard 10up cache directories run: | composer config -g cache-dir "${{ env.COMPOSER_CACHE }}" - name: Prepare composer cache uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 with: path: ${{ env.COMPOSER_CACHE }} key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }} restore-keys: | composer-${{ env.COMPOSER_VERSION }}- - name: Set PHP version uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 with: php-version: '7.4' coverage: none tools: prestissimo, composer:v2 - name: Install dependencies run: composer install - name: Check PHP Compatibility run: ./vendor/bin/phpcs -p simple-podcasting.php includes --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.4- ================================================ FILE: .github/workflows/phpcs.yml ================================================ name: PHPCS permissions: contents: read on: push: branches: - develop - trunk paths: - "**.php" pull_request: branches: - develop paths: - "**.php" 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' coverage: none tools: composer:v2 - name: Install dependencies run: composer install - name: Test run: ./vendor/bin/phpcs --runtime-set testVersion 7.4 . ================================================ FILE: .github/workflows/phpunit.yml ================================================ name: Unit Tests permissions: contents: read env: COMPOSER_VERSION: "2" COMPOSER_CACHE: "${{ github.workspace }}/.composer-cache" on: push: branches: - develop - trunk pull_request: branches: - develop jobs: phpunit: name: ${{ matrix.php.name }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: php: - {name: 'PHP 7.4', version: '7.4'} - {name: 'PHP 8.1', version: '8.1'} steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set standard 10up cache directories run: | composer config -g cache-dir "${{ env.COMPOSER_CACHE }}" - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version-file: '.nvmrc' - name: Prepare composer cache uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 with: path: ${{ env.COMPOSER_CACHE }} key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }} restore-keys: | composer-${{ env.COMPOSER_VERSION }}- - name: Set PHP version uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 with: php-version: '${{ matrix.php.version }}' coverage: none tools: composer:v2 - name: Install dependencies run: composer install && npm install - name: Build run: npm run build - name: Test run: ./vendor/bin/phpunit -v ================================================ FILE: .github/workflows/push-asset-readme-update.yml ================================================ name: Plugin asset/readme update on: push: branches: - trunk permissions: contents: read jobs: trunk: name: Push to trunk runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: install node uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version-file: .nvmrc - name: Build run: | npm ci npm run build - 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: write packages: read actions: write on: release: types: [published] jobs: tag: name: New release runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: install node uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 with: node-version-file: .nvmrc - name: Build run: | npm ci npm run build npm run makepot - name: WordPress Plugin Deploy id: deploy uses: 10up/action-wordpress-plugin-deploy@54bd289b8525fd23a5c365ec369185f2966529c2 # v2.3.0 with: generate-zip: true env: SVN_USERNAME: ${{ secrets.SVN_USERNAME }} SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} - name: Upload release asset uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: files: ${{ github.workspace }}/${{ github.event.repository.name }}.zip ================================================ FILE: .github/workflows/repo-automator.yml ================================================ name: 'Repo Automator' permissions: contents: read issues: 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 ================================================ node_modules bower_components languages release vendor phpunit.xml .idea .phpunit.result.cache # Project Files dist ruleset.xml # Editors *.esproj *.tmproj *.tmproject tmtags .*.sw[a-z] *.un~ Session.vim *.swp *.csv # Mac OSX .DS_Store ._* .Spotlight-V100 .Trashes # Windows Thumbs.db Desktop.ini # E2E testing .wp-env.override.json artifacts tests/cypress/downloads tests/cypress/screenshots tests/cypress/videos tests/cypress/reports ================================================ FILE: .husky/.gitignore ================================================ _ ================================================ FILE: .husky/pre-commit ================================================ #!/bin/sh . "$(dirname "$0")/_/husky.sh" npx lint-staged ================================================ FILE: .nvmrc ================================================ v20 ================================================ FILE: .phpcs.xml.dist ================================================ . dist/ vendor/ tests/ ================================================ FILE: .prettierrc ================================================ { "useTabs": true, "printWidth": 90, "tabWidth": 4, "singleQuote": true } ================================================ FILE: .wordpress-org/blueprints/blueprint.json ================================================ { "$schema": "https://playground.wordpress.net/blueprint-schema.json", "landingPage": "\/wp-admin\/admin.php?page=simple-podcasting-onboarding&step=1", "preferredVersions": { "php": "7.4", "wp": "latest" }, "phpExtensionBundles": ["kitchen-sink"], "features": { "networking": true }, "steps": [ { "step": "login", "username": "admin", "password": "password" }, { "step": "installPlugin", "pluginZipFile": { "resource": "wordpress.org\/plugins", "slug": "simple-podcasting" }, "options": { "activate": true } } ] } ================================================ FILE: .wordpress-version-checker.json ================================================ { "readme": "readme.txt", "channel": "rc" } ================================================ FILE: .wp-env.json ================================================ { "plugins": ["."] } ================================================ 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/). ## [Unreleased] - TBD ## [1.9.1] - 2025-05-19 **Note that this release bumps the WordPress minimum version from 6.5 to 6.6.** ### Added - Screenshots for all new features (props [@gabriel-glo](https://github.com/gabriel-glo), [@jeffpaul](https://github.com/jeffpaul), [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#310](https://github.com/10up/simple-podcasting/pull/310)). ### Changed - Bump WordPress "tested up to" version to 6.8 (props [@jeffpaul](https://github.com/jeffpaul) via [#335](https://github.com/10up/simple-podcasting/pull/335), [#336](https://github.com/10up/simple-podcasting/pull/336)). - Bump WordPress minimum from 6.5 to 6.6 (props [@jeffpaul](https://github.com/jeffpaul) via [#335](https://github.com/10up/simple-podcasting/pull/335), [#336](https://github.com/10up/simple-podcasting/pull/336)). ### Fixed - Issue where podcast feed title unexpectedly adding site title (props [@kirtangajjar](https://github.com/kirtangajjar), [@peterwilsoncc](https://github.com/peterwilsoncc), [@dabowman](https://github.com/dabowman) via [#295](https://github.com/10up/simple-podcasting/pull/295)). ### Security - Bump `@wordpress/scripts` from 27.9.0 to 30.6.0 (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#328](https://github.com/10up/simple-podcasting/pull/328)). - Bump `cookie` from 0.4.2 to 0.7.1, `express` from 4.21.0 to 4.21.2, `@wordpress/e2e-test-utils-playwright` from 0.26.0 to 1.18.0, `serialize-javascript` from 6.0.0 to 6.0.2 and `mocha` from 10.4.0 to 11.1.0 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#332](https://github.com/10up/simple-podcasting/pull/332)). - Bump `axios` from 1.7.4 to 1.9.0 and `http-proxy-middleware` from 2.0.6 to 2.0.9 (props [@dependabot](https://github.com/apps/dependabot), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#338](https://github.com/10up/simple-podcasting/pull/338)). ### Developer - 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 [#333](https://github.com/10up/simple-podcasting/pull/333)). - Adjust `makepot` to only happen during deploy instead of during every prebuild (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#337](https://github.com/10up/simple-podcasting/pull/337)). ## [1.9.0] - 2024-11-18 **Note that this release bumps the WordPress minimum version from 5.7 to 6.5.** ### Added - New options to the Podcast block to allow for more display customization (props [@barneyjeffries](https://github.com/barneyjeffries), [@Firestorm980](https://github.com/Firestorm980), [@mehidi258](https://github.com/mehidi258), [@jayedul](https://github.com/jayedul), [@Sidsector9](https://github.com/Sidsector9), [@peterwilsoncc](https://github.com/peterwilsoncc), [@faisal-alvi](https://github.com/faisal-alvi), [@gusaus](https://github.com/gusaus), [@jeffpaul](https://github.com/jeffpaul) via [#272](https://github.com/10up/simple-podcasting/pull/272)). ### Changed - Update the rendering of the Podcast block to be more full featured and use all the newly added customization options (props [@barneyjeffries](https://github.com/barneyjeffries), [@Firestorm980](https://github.com/Firestorm980), [@mehidi258](https://github.com/mehidi258), [@jayedul](https://github.com/jayedul), [@Sidsector9](https://github.com/Sidsector9), [@peterwilsoncc](https://github.com/peterwilsoncc), [@faisal-alvi](https://github.com/faisal-alvi), [@gusaus](https://github.com/gusaus), [@sudar](https://github.com/sudar), [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#272](https://github.com/10up/simple-podcasting/pull/272), [#318](https://github.com/10up/simple-podcasting/pull/318), [#320](https://github.com/10up/simple-podcasting/pull/320), [#322](https://github.com/10up/simple-podcasting/pull/322)). - Bump WordPress "tested up to" version to 6.7 (props [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@sonali886](https://github.com/sonali886), [@godleman](https://github.com/godleman), [@mehul0810](https://github.com/mehul0810) via [#291](https://github.com/10up/simple-podcasting/pull/291), [#307](https://github.com/10up/simple-podcasting/pull/307), [#325](https://github.com/10up/simple-podcasting/pull/325), [#326](https://github.com/10up/simple-podcasting/pull/326)). - Bump WordPress minimum from 5.7 to 6.5 (props [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@sonali886](https://github.com/sonali886), [@godleman](https://github.com/godleman), [@mehul0810](https://github.com/mehul0810) via [#291](https://github.com/10up/simple-podcasting/pull/291), [#307](https://github.com/10up/simple-podcasting/pull/307), [#325](https://github.com/10up/simple-podcasting/pull/325), [#326](https://github.com/10up/simple-podcasting/pull/326)). - Update how we import the `PluginDocumentSettingPanel` component to use the new `@wordpress/editor` package if it exists (props [@gabriel-glo](https://github.com/gabriel-glo), [@dkotter](https://github.com/dkotter) via [#309](https://github.com/10up/simple-podcasting/pull/309)). ### Security - Bump `express` from 4.18.2 to 4.19.2, `follow-redirects` from 1.15.4 to 1.15.6, and `webpack-dev-middleware` from 5.3.3 to 5.3.4 (props [@dependabot](https://github.com/apps/dependabot), [@iamdharmesh](https://github.com/iamdharmesh) via [#290](https://github.com/10up/simple-podcasting/pull/290)). - Bump `braces` from 3.0.2 to 3.0.3, `pac-resolver` from 7.0.0 to 7.0.1, `socks` from 2.7.1 to 2.8.3, `ws` from 7.5.9 to 7.5.10 and removes `ip` (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#297](https://github.com/10up/simple-podcasting/pull/297), [#306](https://github.com/10up/simple-podcasting/pull/306)). - Bump `axios` from 1.7.2 to 1.7.4 (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#312](https://github.com/10up/simple-podcasting/pull/312)). - Bump `webpack` from 5.91.0 to 5.94.0 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#315](https://github.com/10up/simple-podcasting/pull/315)). - Bump `ws` from 7.5.10 to 8.18.0, `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), [@Sidsector9](https://github.com/Sidsector9) via [#319](https://github.com/10up/simple-podcasting/pull/319)). ### Developer - Clean up NPM dependencies and update node to v20 (props [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#275](https://github.com/10up/simple-podcasting/pull/275)). - Add "Testing" section to the `CONTRIBUTING.md` file (props [@kmgalanakis](https://github.com/kmgalanakis), [@jeffpaul](https://github.com/jeffpaul), [@iamdharmesh](https://github.com/iamdharmesh) via [#294](https://github.com/10up/simple-podcasting/pull/294)). - Change support level from Active to Stable (props [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul), [@cadic](https://github.com/cadic) via [#217](https://github.com/10up/simple-podcasting/pull/217)). - Switch from using `actions/upload-release-asset` to `softprops/action-gh-release` GitHub action (props [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul) via [#308](https://github.com/10up/simple-podcasting/pull/308)). - Update repo badges, add WordPress Playground badge (props [@jeffpaul](https://github.com/jeffpaul), [@faisal-alvi](https://github.com/faisal-alvi), [@dkotter](https://github.com/dkotter) via [#311](https://github.com/10up/simple-podcasting/pull/311), [#317](https://github.com/10up/simple-podcasting/pull/317), [#321](https://github.com/10up/simple-podcasting/pull/321)). ## [1.8.0] - 2024-04-03 ### Added - "Latest Podcast Episode" query block variation (props [@jeffpaul](https://github.com/jeffpaul), [@cadic](https://github.com/cadic), [@barneyjeffries](https://github.com/barneyjeffries), [@faisal-alvi](https://github.com/faisal-alvi) via [#266](https://github.com/10up/simple-podcasting/pull/266)). - Ability to add Unique Cover Art for Episodes (props [@jamesburgos](https://github.com/jamesburgos), [@jeffpaul](https://github.com/jeffpaul), [@zamanq](https://github.com/zamanq), [@iamdharmesh](https://github.com/iamdharmesh) via [#273](https://github.com/10up/simple-podcasting/pull/273)). - `simple_podcasting_feed_title` filter hook to modify feed title (props [@martinburch](https://github.com/martinburch), [@psorensen](https://github.com/psorensen), [@dkotter](https://github.com/dkotter) via [#279](https://github.com/10up/simple-podcasting/pull/279)). ### Fixed - Incorrect feed title (props [@martinburch](https://github.com/martinburch), [@psorensen](https://github.com/psorensen), [@dkotter](https://github.com/dkotter) via [#279](https://github.com/10up/simple-podcasting/pull/279)). - Fatal error in WordPress 5.8 and earlier (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@Sidsector9](https://github.com/Sidsector9) via [#277](https://github.com/10up/simple-podcasting/pull/277)). ### Changed - Disabled auto sync pull requests with target branch (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#281](https://github.com/10up/simple-podcasting/pull/281)). - Removed `PULL_REQUEST_TEMPLATE.md` template (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#286](https://github.com/10up/simple-podcasting/pull/286)). - 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 [#287](https://github.com/10up/simple-podcasting/pull/287)). - Upgrade the download-artifact from v3 to v4 (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#285](https://github.com/10up/simple-podcasting/pull/285)). ### Security - Bumps `ip` from `1.1.8` to `1.1.9` (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#278](https://github.com/10up/simple-podcasting/pull/278)). ## [1.7.0] - 2024-01-16 ### Added - Ability to add a transcript to a podcast episode by utilizing a new Podcast Transcript block. This block is added by clicking the `Add Transcript` button that will now show in the sidebar panel of the Podcast block (props [@nateconley](https://github.com/nateconley), [@peterwilsoncc](https://github.com/peterwilsoncc), [@sksaju](https://github.com/sksaju), [@kirtangajjar](https://github.com/kirtangajjar) via [#221](https://github.com/10up/simple-podcasting/pull/221)). - Support for the WordPress.org plugin preview (props [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul) via [#265](https://github.com/10up/simple-podcasting/pull/265)). ### Fixed - Ensure we show all Podcasting terms in the Block Editor sidebar (props [@dkotter](https://github.com/dkotter), [@channchetra](https://github.com/channchetra), [@Sidsector9](https://github.com/Sidsector9) via [#268](https://github.com/10up/simple-podcasting/pull/268)). ### Security - Bump `axios` from 0.25.0 to 1.6.2 and `@wordpress/scripts` from 26.9.0 to 26.18.0 (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#263](https://github.com/10up/simple-podcasting/pull/263)). - Bump `follow-redirects` from 1.15.3 to 1.15.4 (props [@dependabot](https://github.com/apps/dependabot), [@dkotter](https://github.com/dkotter) via [#269](https://github.com/10up/simple-podcasting/pull/269)). ## [1.6.1] - 2023-11-21 ### Added - Repo Automator GitHub Action (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#253](https://github.com/10up/simple-podcasting/pull/253)). ### Changed - Bump WordPress "tested up to" version to 6.4 (props [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@jeffpaul](https://github.com/jeffpaul) via [#259](https://github.com/10up/simple-podcasting/pull/259), [#260](https://github.com/10up/simple-podcasting/pull/260)). - Ensure end-to-end tests work on Cypress v13 and bump `cypress` from 11.2.0 to 13.2.0, `@10up/cypress-wp-utils` from 0.1.0 to 0.2.0, `@wordpress/env` from 5.4.0 to 8.7.0, `cypress-localstorage-commands` from 2.2.2 to 2.2.4 and `cypress-mochawesome-reporter` from 3.4.0 to 3.6.0 (props [@iamdharmesh](https://github.com/iamdharmesh), [@Sidsector9](https://github.com/Sidsector9) via [#254](https://github.com/10up/simple-podcasting/pull/254)). ### Security - Bump `postcss` from 8.4.27 to 8.4.31 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#256](https://github.com/10up/simple-podcasting/pull/256)). - Bump `@babel/traverse` from 7.22.8 to 7.23.2 (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#257](https://github.com/10up/simple-podcasting/pull/257)). ## [1.6.0] - 2023-08-31 ### Added - Ability to create a Podcast from within the Block Editor (props [@Sidsector9](https://github.com/Sidsector9), [@iamdharmesh](https://github.com/iamdharmesh) via [#232](https://github.com/10up/simple-podcasting/pull/232)). - New Podcast Platforms block that allows you to display icons and links to multiple podcast platforms (props [@Sidsector9](https://github.com/Sidsector9), [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#241](https://github.com/10up/simple-podcasting/pull/241)). - Check for minimum required PHP version before loading the plugin (props [@kmgalanakis](https://github.com/kmgalanakis), [@dkotter](https://github.com/dkotter) via [#248](https://github.com/10up/simple-podcasting/pull/248)). ### Changed - Rename `TAXONOMY_NAME` constant to `PODCASTING_TAXONOMY_NAME` (props [@jayedul](https://github.com/jayedul), [@peterwilsoncc](https://github.com/peterwilsoncc), [@dkotter](https://github.com/dkotter) via [#238](https://github.com/10up/simple-podcasting/pull/238)). - Bump WordPress "tested up to" version to 6.3 (props [@dkotter](https://github.com/dkotter) via [#248](https://github.com/10up/simple-podcasting/pull/248)). ### Fixed - Resolved a PHP warning when creating a new podcast (props [@kmgalanakis](https://github.com/kmgalanakis), [@iamdharmesh](https://github.com/iamdharmesh) via [#247](https://github.com/10up/simple-podcasting/pull/247)). ### Security - Bump `word-wrap` from 1.2.3 to 1.2.4 (props [@dependabot](https://github.com/apps/dependabot), [@iamdharmesh](https://github.com/iamdharmesh) via [#243](https://github.com/10up/simple-podcasting/pull/243)). ## [1.5.0] - 2023-06-29 ### Added - Post Grid Block to display a grid of episode posts (props [@mehul0810](https://github.com/mehul0810), [@cadic](https://github.com/cadic), [@nateconley](https://github.com/nateconley), [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul), [@ajmaurya99](https://github.com/ajmaurya99), [@nickolas-kola](https://github.com/nickolas-kola), [@achchu93](https://github.com/achchu93) via [#214](https://github.com/10up/simple-podcasting/pull/214)). - Mochawesome reporter added for Cypress end-to-end test report (props [@jayedul](https://github.com/jayedul), [@iamdharmesh](https://github.com/iamdharmesh) via [#236](https://github.com/10up/simple-podcasting/pull/236)). ### Changed - Mark any required fields when adding/editing a podcast feed (props [@mehul0810](https://github.com/mehul0810), [@cadic](https://github.com/cadic), [@nateconley](https://github.com/nateconley), [@jeffpaul](https://github.com/jeffpaul), [@Spoygg](https://github.com/Spoygg), [@ggutenberg](https://github.com/ggutenberg), [@peterwilsoncc](https://github.com/peterwilsoncc), [@Sidsector9](https://github.com/Sidsector9), [@ravinderk](https://github.com/ravinderk), [@faisal-alvi](https://github.com/faisal-alvi), [@helen](https://github.com/helen) via [#216](https://github.com/10up/simple-podcasting/pull/216)). - Bumped WordPress "tested up to" version 6.2 (props [@jayedul](https://github.com/jayedul), [@peterwilsoncc](https://github.com/peterwilsoncc), [@jeffpaul](https://github.com/jeffpaul) via [#230](https://github.com/10up/simple-podcasting/pull/230)). - Run end-to-end tests on the zip generated by the "Build Release ZIP" GitHub Action (props [@jayedul](https://github.com/jayedul), [@Sidsector9](https://github.com/Sidsector9), [@iamdharmesh](https://github.com/iamdharmesh) via [#227](https://github.com/10up/simple-podcasting/pull/227)). - GitHub Action `uses` updates (props [@Sidsector9](https://github.com/Sidsector9), [@iamdharmesh](https://github.com/iamdharmesh) via [#234](https://github.com/10up/simple-podcasting/pull/234)). - Updated Dependency Review GitHub Action (props [@jeffpaul](https://github.com/jeffpaul), [@Sidsector9](https://github.com/Sidsector9) via [#237](https://github.com/10up/simple-podcasting/pull/237)). ### Removed - Deprecated `` tag (props [@ggutenberg](https://github.com/ggutenberg), [@Sidsector9](https://github.com/Sidsector9), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul) via [#223](https://github.com/10up/simple-podcasting/pull/223)). - Unnecessary term meta registration on "init" (props [@kmgalanakis](https://github.com/kmgalanakis), [@faisal-alvi](https://github.com/faisal-alvi), [@cadic](https://github.com/cadic) via [#225](https://github.com/10up/simple-podcasting/pull/225)). ### Fixed - Deprecation notices for `strpos` and `str_replace` on PHP >= 8.1 (props [@bmarshall511](https://github.com/bmarshall511), [@Sidsector9](https://github.com/Sidsector9), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#239](https://github.com/10up/simple-podcasting/pull/239)). ### Security - Bump `simple-git` from 3.15.1 to 3.16.0 (props [@dependabot](https://github.com/apps/dependabot), [@cadic](https://github.com/cadic) via [#215](https://github.com/10up/simple-podcasting/pull/215)). - Bump `http-cache-semantics` from 4.1.0 to 4.1.1 (props [@dependabot](https://github.com/apps/dependabot), [@cadic](https://github.com/cadic) via [#219](https://github.com/10up/simple-podcasting/pull/219)). - Bump `@sideway/formula` from 3.0.0 to 3.0.1 (props [@dependabot](https://github.com/apps/dependabot), [@cadic](https://github.com/cadic) via [#220](https://github.com/10up/simple-podcasting/pull/220)). - Bump `webpack` from 5.75.0 to 5.76.1 (props [@dependabot](https://github.com/apps/dependabot), [@faisal-alvi](https://github.com/faisal-alvi) via [#222](https://github.com/10up/simple-podcasting/pull/222)). ## [1.4.0] - 2023-01-23 ### Added - New podcast onboarding flow (props [@Sidsector9](https://github.com/Sidsector9), [@cadic](https://github.com/cadic), [@iamdharmesh](https://github.com/iamdharmesh), [@helen](https://github.com/helen), [@jeffpaul](https://github.com/jeffpaul), [@Nicolas-knight](https://github.com/Nicolas-knight), [@jnetek](https://github.com/jnetek) via [#193](https://github.com/10up/simple-podcasting/pull/193)). - Description field to RSS feed (props [@supersmo](https://github.com/supersmo), [@cadic](https://github.com/cadic) via [#204](https://github.com/10up/simple-podcasting/pull/204)). - Build pre-release zip GitHub Action (props [@Sidsector9](https://github.com/Sidsector9), [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@faisal-alvi](https://github.com/faisal-alvi), [@vikrampm1](https://github.com/vikrampm1) via [#199](https://github.com/10up/simple-podcasting/pull/199)). ### Changed - Bump Wordpress "tested up to" to 6.1 (props [@jayedul](https://github.com/jayedul), [@dkotter](https://github.com/dkotter) via [#201](https://github.com/10up/simple-podcasting/pull/201)). - Cypress integration migrated to 11+ (props [@jayedul](https://github.com/jayedul), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul) via [#205](https://github.com/10up/simple-podcasting/pull/205)). - Updated docs to add podcast feed to Pocket Casts (props [@jeffpaul](https://github.com/jeffpaul), [@Sidsector9](https://github.com/Sidsector9), [@cadic](https://github.com/cadic) via [#192](https://github.com/10up/simple-podcasting/pull/192)). ### Fixed - Spotify not accepting feeds with empty `` field (props [@supersmo](https://github.com/supersmo), [@cadic](https://github.com/cadic) via [#204](https://github.com/10up/simple-podcasting/pull/204)). ### Security - Bump `json5` from 1.0.1 to 1.0.2 (props [@dependabot[bot]](https://github.com/apps/dependabot), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul) via [#212](https://github.com/10up/simple-podcasting/pull/212)). - Bump `loader-utils` from 2.0.2 to 2.0.4 (props [@dependabot[bot]](https://github.com/apps/dependabot), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul) via [#195](https://github.com/10up/simple-podcasting/pull/195), [#198](https://github.com/10up/simple-podcasting/pull/198)). - Bump `simple-git` from 3.14.1 to 3.15.1 (props [@dependabot[bot]](https://github.com/apps/dependabot), [@jeffpaul](https://github.com/jeffpaul) via [#202](https://github.com/10up/simple-podcasting/pull/202)). ## [1.3.0] - 2022-10-18 **Note that this version bumps the minimum PHP version from 7.0 to 7.4 and the minimum WordPress version from 4.6 to 5.7.** ### Added - Podcasts Taxonomy term(s) added in block settings (props [@helen](https://github.com/helen), [@jeffpaul](https://github.com/jeffpaul), [@faisal-alvi](https://github.com/faisal-alvi), [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic) via [#183](https://github.com/10up/simple-podcasting/pull/183)). - Type of show setting for the podcast (props [@cadic](https://github.com/cadic), [@faisal-alvi](https://github.com/faisal-alvi), [@jeffpaul](https://github.com/jeffpaul) via [#188](https://github.com/10up/simple-podcasting/pull/188)). ### Changed - Podcasting Categories and Sub-Categories (props [@zamanq](https://github.com/zamanq), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@cadic](https://github.com/cadic), [@dchucks](https://github.com/dchucks) via [#179](https://github.com/10up/simple-podcasting/pull/179)). - Bumped minimum PHP version required from 7.0 to 7.4 (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul), [@vikrampm1](https://github.com/vikrampm1) via [#184](https://github.com/10up/simple-podcasting/pull/184)). - Bumped minimum WordPress version required from 4.6 to 5.7 (props [@peterwilsoncc](https://github.com/peterwilsoncc), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul), [@vikrampm1](https://github.com/vikrampm1) via [#184](https://github.com/10up/simple-podcasting/pull/184)). - Upgrade dependencies (props [@cadic](https://github.com/cadic), [@faisal-alvi](https://github.com/faisal-alvi) via [#187](https://github.com/10up/simple-podcasting/pull/187)). ### Fixed - Saving podcast enclosure with Classic Editor (props [@cadic](https://github.com/cadic), [@faisal-alvi](https://github.com/faisal-alvi) via [#186](https://github.com/10up/simple-podcasting/pull/186)). ### Security - Bump `got` from 10.7.0 to 11.8.5 (props [@faisal-alvi](https://github.com/faisal-alvi), [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#185](https://github.com/10up/simple-podcasting/pull/185)). - Bump `@wordpress/env` from 4.5.0 to 5.2.0 (props [@faisal-alvi](https://github.com/faisal-alvi), [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#185](https://github.com/10up/simple-podcasting/pull/185)). ## [1.2.4] - 2022-07-27 ### Added - Season number, episode number and episode type attributes can now be stored with a Podcast (props [@zamanq](https://github.com/zamanq), [@dchucks](https://github.com/dchucks), [@cadic](https://github.com/cadic) via [#175](https://github.com/10up/simple-podcasting/pull/175)). ### Changed - Bump WordPress version "tested up to" 6.0 (props [@cadic](https://github.com/cadic) via [#171](https://github.com/10up/simple-podcasting/issues/171)). ### Fixed - Incorrect Language value in the Feed (props [@zamanq](https://github.com/zamanq), [@dchucks](https://github.com/dchucks), [@cadic](https://github.com/cadic) via [#176](https://github.com/10up/simple-podcasting/pull/176)). ### Security - Bump `terser` from 5.12.1 to 5.14.2 (props [@dependabot](https://github.com/apps/dependabot) via [#180](https://github.com/10up/simple-podcasting/pull/180)). ## [1.2.3] - 2022-04-28 ### Added - Compatibility tests against PHP 7 and 8 (props [@cadic](https://github.com/cadic), [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul) via [#150](https://github.com/10up/simple-podcasting/pull/150)). - Default Pull Request Reviewers via CODEOWNERS file (props [@jeffpaul](https://github.com/jeffpaul), [@cadic](https://github.com/cadic) via [#156](https://github.com/10up/simple-podcasting/pull/156)). - Dependency security scanning (props [@jeffpaul](https://github.com/jeffpaul) via [#168](https://github.com/10up/simple-podcasting/pull/168)). ### Changed - Unit tests against PHP 8 (props [@cadic](https://github.com/cadic), [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul) via [#150](https://github.com/10up/simple-podcasting/pull/150)). - Bump required PHP 7.0 (props [@cadic](https://github.com/cadic), [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul) via [#150](https://github.com/10up/simple-podcasting/pull/150)). - Replaced custom commands with @10up/cypress-wp-utils in end-to-end tests (props [@dinhtungdu](https://github.com/dinhtungdu), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul) via [#162](https://github.com/10up/simple-podcasting/pull/162)). ### Fixed - Missing `` in feed item (props [@davexpression](https://github.com/davexpression), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul) via [#147](https://github.com/10up/simple-podcasting/pull/147)). - Failing Cypress test on WP Minimum (props [@dinhtungdu](https://github.com/dinhtungdu), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul) via [#164](https://github.com/10up/simple-podcasting/pull/164)). - Updated badges in readme (props [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul) via [#167](https://github.com/10up/simple-podcasting/pull/167)). ### Security - Upgraded node dependencies (props [@cadic](https://github.com/cadic), [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#158](https://github.com/10up/simple-podcasting/pull/158) and [#163](https://github.com/10up/simple-podcasting/pull/163)). - Bump async from 2.6.3 to 2.6.4 (props [@dependabot](https://github.com/apps/dependabot) via [#166](https://github.com/10up/simple-podcasting/pull/166)). - Bump node-forge from 1.2.1 to 1.3.0 (props [@dependabot](https://github.com/apps/dependabot) via [#160](https://github.com/10up/simple-podcasting/pull/160)). - Bump minimist from 1.2.5 to 1.2.6 (props [@dependabot](https://github.com/apps/dependabot) via [#159](https://github.com/10up/simple-podcasting/pull/159)). ## [1.2.2] - 2022-03-01 ### Added - Filter `simple_podcasting_feed_item` to modify RSS feed item data before output (props [@cadic](https://github.com/cadic), [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul) via [#144](https://github.com/10up/simple-podcasting/pull/144)). - Unit tests (props [@cadic](https://github.com/cadic) via [#142](https://github.com/10up/simple-podcasting/pull/142), [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul)). - GitHub action job to run PHPCS (props [@cadic](https://github.com/cadic), [@dkotter](https://github.com/dkotter) via [#136](https://github.com/10up/simple-podcasting/pull/136)). - Auto-create pot file in languages folder during the build process (props [@dkotter](https://github.com/dkotter), [@cadic](https://github.com/cadic) via [#131](https://github.com/10up/simple-podcasting/pull/131)). ### Changed - Bump WordPress "tested up to" version 5.9 (props [@sudip-10up](https://github.com/sudip-10up), [@cadic](https://github.com/cadic), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#140](https://github.com/10up/simple-podcasting/pull/140)). ### Fixed - End-to-end tests with WordPress 5.9 element IDs (props[@cadic](https://github.com/cadic), [@felipeelia](https://github.com/felipeelia), [@dinhtungdu](https://github.com/dinhtungdu) via [#146](https://github.com/10up/simple-podcasting/pull/146)). - Podcast feed link output on Edit Podcast screen (props [@mehidi258](https://github.com/mehidi258), [@jeffpaul](https://github.com/jeffpaul), [@cadic](https://github.com/cadic) via [#139](https://github.com/10up/simple-podcasting/pull/139)). - Bug fix for `is_feed` being called too early (props [@tomjn](https://github.com/tomjn), [@jeffpaul](https://github.com/jeffpaul) via [#135](https://github.com/10up/simple-podcasting/pull/135)). - Missing and incorrect text-domain (props [@dkotter](https://github.com/dkotter), [@cadic](https://github.com/cadic) via [#131](https://github.com/10up/simple-podcasting/pull/131)). ### Security - Bump `nanoid` from 3.1.25 to 3.2.0 (props [@dependabot](https://github.com/apps/dependabot) via [#143](https://github.com/10up/simple-podcasting/pull/143)). ## [1.2.1] - 2021-12-16 ### Added - Filter `simple_podcasting_episodes_per_page` to override default of 250 episodes per podcast feed (props [@pabamato](https://github.com/pabamato), [@dinhtungdu](https://github.com/dinhtungdu), [@monomo111](https://github.com/monomo111), [@jeffpaul](https://github.com/jeffpaul), [@jakemgold](https://github.com/jakemgold) via [#109](https://github.com/10up/simple-podcasting/pull/109)). - End-to-end testing using Cypress and `wp-env` (props [@dinhtungdu](https://github.com/dinhtungdu), [@markjaquith](https://github.com/markjaquith), [@youknowriad](https://github.com/youknowriad), [@helen](https://github.com/helen) via [#115](https://github.com/10up/simple-podcasting/pull/115), [#117](https://github.com/10up/simple-podcasting/pull/117)). - Issue management automation via GitHub Actions (props [@jeffpaul](https://github.com/jeffpaul) via [#119](https://github.com/10up/simple-podcasting/pull/119)). - Pull request template (props [@jeffpaul](https://github.com/jeffpaul), [@dinhtungdu](https://github.com/dinhtungdu) via [#125](https://github.com/10up/simple-podcasting/pull/125)). ### Changed - Default number of episodes in RSS feeds increased from 10 to 250 (props [@pabamato](https://github.com/pabamato), [@dinhtungdu](https://github.com/dinhtungdu), [@monomo111](https://github.com/monomo111), [@jeffpaul](https://github.com/jeffpaul), [@jakemgold](https://github.com/jakemgold) via [#109](https://github.com/10up/simple-podcasting/pull/109)). - Use `@wordpress/scripts` as the build tool (props [@dinhtungdu](https://github.com/dinhtungdu) via [#114](https://github.com/10up/simple-podcasting/pull/114)). - Bump WordPress version “tested up to” 5.8.1 (props [David Chabbi](https://www.linkedin.com/in/david-chabbi-985719b4/), [@jeffpaul](https://github.com/jeffpaul), [@pabamato](https://github.com/pabamato) via [#106](https://github.com/10up/simple-podcasting/pull/106), [#110](https://github.com/10up/simple-podcasting/pull/110), [#124](https://github.com/10up/simple-podcasting/pull/124)). - Documentation updates (props [@meszarosrob](https://github.com/meszarosrob), [@dinhtungdu](https://github.com/dinhtungdu) via [#101](https://github.com/10up/simple-podcasting/pull/101)). ### Fixed - 'podcast' block core dependency (props [@pabamato](https://github.com/pabamato), [@dinhtungdu](https://github.com/dinhtungdu), [@monomo111](https://github.com/monomo111), [@jeffpaul](https://github.com/jeffpaul), [@jakemgold](https://github.com/jakemgold) via [#109](https://github.com/10up/simple-podcasting/pull/109)). - Minimum WordPress version used by `wp-env` (props [@dinhtungdu](https://github.com/dinhtungdu) via [#122](https://github.com/10up/simple-podcasting/pull/122)). ## [1.2.0] - 2020-07-10 ### Added - Podcast image in the taxonomy list table view (props [@Firestorm980](https://github.com/Firestorm980), [@helen](https://github.com/helen) via [#87](https://github.com/10up/simple-podcasting/pull/87)). - Ability for user to transform to/from the podcast and audio blocks (props [@Firestorm980](https://github.com/Firestorm980), [@helen](https://github.com/helen) via [#85](https://github.com/10up/simple-podcasting/pull/85)). - Core `MediaReplaceFlow` to edit the podcast media (props [@Firestorm980](https://github.com/Firestorm980), [@helen](https://github.com/helen) via [#86](https://github.com/10up/simple-podcasting/pull/86)). ### Changed - GitHub Actions from HCL to YAML workflow syntax (props [@helen](https://github.com/helen) via [#78](https://github.com/10up/simple-podcasting/pull/78)). - Stop committing built files (props [@helen](https://github.com/helen) via [#95](https://github.com/10up/simple-podcasting/pull/95)). - Documentation updates (props [@jeffpaul](https://github.com/jeffpaul), [@nhalstead](https://github.com/nhalstead) via [#76](https://github.com/10up/simple-podcasting/pull/76), [#79](https://github.com/10up/simple-podcasting/pull/79)). ### Fixed - Using the upload or drag and drop instead of media library populates duration and mimetype (props [@Firestorm980](https://github.com/Firestorm980), [@helen](https://github.com/helen) via [#82](https://github.com/10up/simple-podcasting/pull/82)). - Issue where it is possible to add non-audio files to the Podcast block (props [@mattheu](https://github.com/mattheu) via [#77](https://github.com/10up/simple-podcasting/pull/77)). - Issue where React would throw an error relating to keys for list items (props [@Firestorm980](https://github.com/Firestorm980), [@helen](https://github.com/helen) via [#85](https://github.com/10up/simple-podcasting/pull/85)). - Ensure podcast-related meta is deleted after block is removed. (props [@dinhtungdu](https://github.com/dinhtungdu) via [#96](https://github.com/10up/simple-podcasting/pull/96)). ## [1.1.1] - 2019-08-02 ### Added - GitHub Actions for WordPress.org plugin deploy (props [@helen](https://github.com/helen) via [#75](https://github.com/10up/simple-podcasting/pull/75)). ### Fixed - Compatibility with WordPress 5.2 (props [@adamsilverstein](https://github.com/adamsilverstein) via [#68](https://github.com/10up/simple-podcasting/pull/68), [#70](https://github.com/10up/simple-podcasting/pull/70)). - Corrected `10up/wp_mock` reference for Composer (props [@oscarssanchez](https://github.com/oscarssanchez) via [#69](https://github.com/10up/simple-podcasting/pull/69)). ## [1.1.0] - 2018-12-04 ### Added - Retrieve metadata for externally hosted audio files in the block editor. - Specify email address for a given podcast. - Set language for a given podcast. - Developers: Add linting for coding standards. ### Changed - Clearer language on the add new podcast form. ### Fixed - Delete all associated meta when block is removed from a post. - Restore all block editor functionality to align with Gutenberg/block changes. - Fully clear add new form after creating a new podcast. ## [1.0.1] - 2018-07-02 ### Fixed - Properly output podcast categories and subcategories in the feed. - Avoid a minified JS error when selecting a podcast image. - Display podcast summary on edit form. ## [1.0.0] - 2018-06-29 - Initial plugin release. [Unreleased]: https://github.com/10up/simple-podcasting/compare/trunk...develop [1.9.1]: https://github.com/10up/simple-podcasting/compare/1.9.0...1.9.1 [1.9.0]: https://github.com/10up/simple-podcasting/compare/1.8.0...1.9.0 [1.8.0]: https://github.com/10up/simple-podcasting/compare/1.7.0...1.8.0 [1.7.0]: https://github.com/10up/simple-podcasting/compare/1.6.1...1.7.0 [1.6.1]: https://github.com/10up/simple-podcasting/compare/1.6.0...1.6.1 [1.6.0]: https://github.com/10up/simple-podcasting/compare/1.5.0...1.6.0 [1.5.0]: https://github.com/10up/simple-podcasting/compare/1.4.0...1.5.0 [1.4.0]: https://github.com/10up/simple-podcasting/compare/1.3.0...1.4.0 [1.3.0]: https://github.com/10up/simple-podcasting/compare/1.2.4...1.3.0 [1.2.4]: https://github.com/10up/simple-podcasting/compare/1.2.3-deploy...1.2.4 [1.2.3]: https://github.com/10up/simple-podcasting/compare/1.2.2...1.2.3-deploy [1.2.2]: https://github.com/10up/simple-podcasting/compare/1.2.1...1.2.2 [1.2.1]: https://github.com/10up/simple-podcasting/compare/1.2.0...1.2.1 [1.2.0]: https://github.com/10up/simple-podcasting/compare/1.1.1...1.2.0 [1.1.1]: https://github.com/10up/simple-podcasting/compare/f8a958c...1.1.1 [1.1.0]: https://github.com/10up/simple-podcasting/compare/1.0.1...f8a958c [1.0.1]: https://github.com/10up/simple-podcasting/compare/1.0.0...1.0.1 [1.0.0]: https://github.com/10up/simple-podcasting/releases/tag/1.0.0 ================================================ 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 Podcasting 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-podcasting/issues) and [open a new one](https://github.com/10up/simple-podcasting/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-podcasting/issues). As project owners, 10up sets the direction and roadmap and may not prioritize or decide to implement if outside of the main goals of the plugin. ### 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-podcasting/wiki/Critical-Flows-for-simple%E2%80%90podcasting) 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". 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`. ### Review against WordPress updates During weekly triage, the tested up to version should be compared against the latest versions of WordPress, both the new and classic editors, and the standalone Gutenberg plugin. If there's a newer version of either, 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. ### 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 `simple-podcasting.php`, `package-lock.json`, `package.json`, and `readme.txt` if it does not already reflect the version being released. Update both the plugin "Version:" property and the plugin `PODCASTING_VERSION` constant in `simple-podcasting.php`. 3. Changelog: Add/update the changelog in both `CHANGELOG.md` and `readme.txt`. 4. Props: update `CREDITS.md` 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 latest stable release. 8. Push: Push your `trunk` branch to GitHub (e.g. `git push origin trunk`). 9. [Compare](https://github.com/10up/simple-podcasting/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-podcasting/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. Release: Create a [new release](https://github.com/10up/simple-podcasting/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 milestone](https://github.com/10up/simple-podcasting/milestone/#?closed=1). 12. SVN: Wait for the [GitHub Action](https://github.com/10up/simple-podcasting/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. 13. Check WordPress.org: Ensure that the changes are live on [WordPress.org](https://wordpress.org/plugins/simple-podcasting/). This may take a few minutes. 14. Close the milestone: Edit the [milestone](https://github.com/10up/simple-podcasting/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close the milestone. 15. 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. [Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [Helen Hou-Sandi (@helen)](https://github.com/helen), [Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher), [David Chandra Purnama (@turtlepod)](https://github.com/turtlepod), [Oscar Sanchez S. (@oscarssanchez)](https://github.com/oscarssanchez), [Jon Christensen (@Firestorm980)](https://github.com/Firestorm980), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Noah Halstead (@nhalstead)](https://github.com/nhalstead), [Matthew Haines-Young (@mattheu)](https://github.com/mattheu), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [David Chabbi](https://www.linkedin.com/in/david-chabbi-985719b4/), [Pablo Amato (@pabamato)](https://github.com/pabamato), [(@monomo111)](https://github.com/monomo111), [Jake Goldman (@jakemgold)](https://github.com/jakemgold), [Mark Jaquith (@markjaquith)](https://github.com/markjaquith), [Riad Benguella (@youknowriad)](https://github.com/youknowriad), [Mészáros Róbert (@meszarosrob)](https://github.com/meszarosrob), [Max Lyuchin (@cadic)](https://github.com/cadic), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Felipe Elia (@felipeelia)](https://github.com/felipeelia), [Mehidi Hassan (@mehidi258)](https://github.com/mehidi258), [Tom J Nowell (@tomjn)](https://github.com/tomjn), [David Towoju (@davexpression)](https://github.com/davexpression), [Quamruz Zaman (@zamanq)](https://github.com/zamanq), [Debashish (@dchucks)](https://github.com/dchucks), [(@supersmo)](https://github.com/supersmo), [Jayedul Kabir (@jayedul)](https://github.com/jayedul), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Vikram Mopharty (@vikrampm1)](https://github.com/vikrampm1), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Nicolas Knight (@Nicolas-knight)](https://github.com/Nicolas-knight), [Jonathan Netek (@jnetek)](https://github.com/jnetek), [Mehul Gohil (@mehul0810)](https://github.com/mehul0810), [Nate Conley (@nateconley)](https://github.com/nateconley), [Ajay Maurya (@ajmaurya99)](https://github.com/ajmaurya99), [Nickolas Kola (@nickolas-kola)](https://github.com/nickolas-kola), [Ahamed Arshad Azmi (@achchu93)](https://github.com/achchu93), [Ivan Ivanić (@Spoygg)](https://github.com/Spoygg), [Garth Gutenberg (@ggutenberg)](https://github.com/ggutenberg), [Ravinder Kumar (@ravinderk)](https://github.com/ravinderk), [Konstantinos Galanakis (@kmgalanakis)](https://github.com/kmgalanakis), [Dependabot (@dependabot)](https://github.com/apps/dependabot), [Sumit Bagthariya (@qasumitbagthariya)](https://github.com/qasumitbagthariya), [Shazahan Kabir Saju (@sksaju)](https://github.com/sksaju), [Kirtan Gajjar (@kirtangajjar)](https://github.com/kirtangajjar), [Chetra Chann (@channchetra)](https://github.com/channchetra), [James Burgos (@jamesburgos)](https://github.com/jamesburgos), [Martin Burch (@martinburch)](https://github.com/martinburch), [Peter Sorensen (@psorensen)](https://github.com/psorensen), [Barney Jeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Gus Austin (@gusaus)](https://github.com/gusaus), [Sonali Desai (@sonali886)](https://github.com/sonali886), [Gabriel Glogoški (@gabriel-glo)](https://github.com/gabriel-glo), [David Godleman (@godleman)](https://github.com/godleman), [Sudar Muthu (@sudar)](https://github.com/sudar), [David Bowman (@dabowman)](https://github.com/dabowman). ## 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 Podcasting for WordPress ![Simple Podcasting](https://github.com/10up/simple-podcasting/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-podcasting?label=Requires%20PHP) ![Required WP Version](https://img.shields.io/wordpress/plugin/wp-version/simple-podcasting?label=Requires%20WordPress) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/simple-podcasting?label=WordPress) [![GPLv2 License](https://img.shields.io/github/license/10up/simple-podcasting.svg)](https://github.com/10up/simple-podcasting/blob/develop/LICENSE.md) [![Dependency Review](https://github.com/10up/simple-podcasting/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/10up/simple-podcasting/actions/workflows/dependency-review.yml) [![E2E Test](https://github.com/10up/simple-podcasting/actions/workflows/cypress.yml/badge.svg)](https://github.com/10up/simple-podcasting/actions/workflows/cypress.yml) [![Unit Tests](https://github.com/10up/simple-podcasting/actions/workflows/phpunit.yml/badge.svg)](https://github.com/10up/simple-podcasting/actions/workflows/phpunit.yml) [![PHPCS](https://github.com/10up/simple-podcasting/actions/workflows/phpcs.yml/badge.svg)](https://github.com/10up/simple-podcasting/actions/workflows/phpcs.yml) [![PHP Compatibility](https://github.com/10up/simple-podcasting/actions/workflows/php-compatibility.yml/badge.svg)](https://github.com/10up/simple-podcasting/actions/workflows/php-compatibility.yml) [![CodeQL](https://github.com/10up/simple-podcasting/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/10up/simple-podcasting/actions/workflows/github-code-scanning/codeql) [![WordPress Playground Demo](https://img.shields.io/wordpress/plugin/v/simple-podcasting?logo=wordpress&logoColor=FFFFFF&label=Playground%20Demo&labelColor=3858E9&color=3858E9)](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/10up/simple-podcasting/add/playground/.wordpress-org/blueprints/blueprint.json) > Easily set up multiple podcast feeds using built-in WordPress posts. Includes a podcast block and podcast transcript block for the WordPress block editor (aka Gutenberg). ## Overview Podcasting is a method to distribute audio messages through a feed to which listeners can subscribe. You can publish podcasts on your WordPress site and make them available for listeners in Apple Podcasts and through direct feed links for other podcasting apps by following these steps: ![Screenshot of podcast block](.wordpress-org/screenshot-1.png "Example of a podcast block in the new WordPress editor") ## Requirements * PHP 7.4+ * [WordPress](http://wordpress.org) 6.6+ * RSS feeds must not be disabled ## Installation 1. Install the plugin via the plugin installer, either by searching for it or uploading a .zip file. 2. Activate the plugin. 3. Head to Posts → Podcasts and add at least one podcast. 4. Create a post and insert an audio embed (or a podcast block in the new WordPress editor) and select a Podcast feed to include it in. ## Create your podcast From the WordPress Admin, go to Podcasts. To create a podcast, complete all of the "Add New Podcast" fields and click "Add New Podcast". * Name: this title appears in Apple Podcasts and any other podcast apps. * Slug: this is the URL-friendly version of the Name field. * Subtitle: the subtitle also appears in Apple Podcasts and any other podcast apps. * Artist / Author name: the artist or producer of the work. * Podcast email: a contact email address for your podcast. * Summary: Apple Podcasts displays this summary when browsing through podcasts. * Copyright / License information: copyright information viewable in Apple Podcasts or other podcast apps. * Mark as explicit: mark Yes if podcast contains adult language or adult themes. * Language: the main language spoken in the podcast. * Cover image: add the URL for the cover art to appear in Apple Podcasts and other podcast apps. Click "Select Image" and choose an image from the Media Library. Note that podcast cover images must be between 1400 x 1400 and 3000 x 3000 pixels in JPG or PNG formats to work on Apple Podcasts. * Keywords: add terms to help your podcast show up in search results on Apple Podcasts and other podcast apps. * Categories: these allow your podcast to show up for those browsing Apple Podcasts or other podcast apps by category. Repeat for each podcast you would like to create. ## Add content to your podcast * Create a new post and assign it to one or more Podcasts using the panel labeled Podcasts. * Upload or embed an audio file into this post using any of the usual WordPress methods. If using the new block-based WordPress editor (sometimes referred to as Gutenberg), insert a Podcast block. Only one Podcast block can be inserted per post. * For more advanced settings, use the Podcasting meta box to mark explicit content or closed captioning available, season number, episode number, episode type, add a transcript and to optionally specify one media item in the post if you have more than one in your post. In the block-based editor, these are the block settings that appear in the sidebar when the podcast block is selected. * Transcript: If desired, an optional transcript can be added from the settings of the Podcast block. This will add a Podcast Transcript block, allowing you to add a transcript consisting of time codes, citations, and paragrah text that can be embedded in the post, linked to an external plain HTML file, or linked in a special `` XML element. ## Submit your podcast feed to Apple Podcasts * Each podcast has a unique feed URL you can find on the Podcasts page. This is the URL you will submit to Apple. * Ensure you test feeds before submitting them, see https://help.apple.com/itc/podcasts_connect/#/itcac471c970. * Once the validator passes, submit your podcast. Podcasts submitted to Apple Podcasts do not become immediately available for subscription by others. They are submitted for review by Apple staff, see https://help.apple.com/itc/podcasts_connect/#/itcd88ea40b9 Podcast setup | Podcast in block editor | Podcast feed ------------- | ----------------- | ------------ [![Podcast setup](.wordpress-org/screenshot-3.png)](.wordpress-org/screenshot-3.png) | [![Podcast in editor](.wordpress-org/screenshot-1.png)](.wordpress-org/screenshot-1.png) | [![Podcast feed](.wordpress-org/screenshot-4.png)](.wordpress-org/screenshot-4.png) Podcast Platforms block | Podcast Grid pattern | Podcast Transcript block ------------- | ----------------- | ------------ [![Podcast Platforms block](.wordpress-org/screenshot-2.png)](.wordpress-org/screenshot-2.png) | [![Podcast Grid pattern](.wordpress-org/screenshot-5.png)](.wordpress-org/screenshot-5.png) | [![Podcast Transcript block](.wordpress-org/screenshot-6.png)](.wordpress-org/screenshot-6.png) ## Submit your podcast feed to Pocket Casts * Validate your feeds at [Cast Feed Validator](https://www.castfeedvalidator.com/) before submitting them. * Submit the podcast feed to https://pocketcasts.com/submit/ ## Control how many episodes are listed on the feed If you want to adjust the default number of episodes included in a podcast RSS feed, then utilize the following to do so... ```php ` element of the RSS feed can be adjusted using the `simple_podcasting_feed_title` filter. ```php name; return '10up Presents: ' . $term_name; } ``` ## Customize RSS feed If you want to modify RSS feed items output, there is a filter for that: ```php Work with the 10up WordPress Practice at Fueled ================================================ FILE: assets/css/podcasting-edit-term.css ================================================ .taxonomy-podcasting_podcasts .term-parent-wrap { display: none; } .podcast-image-thumbnail { max-width: 300px; max-height: 200px; } .column-podcasting_image img { height: auto; max-width: 100%; width: 75px; } .simple_podcasting__platforms img { display: block; max-width: 42px; margin: 0 auto; height: auto; } .simple_podcasting__platforms th { padding: 15px 10px; text-align: center; } .simple_podcasting__platforms td { vertical-align: middle; padding: 15px 10px; } .simple_podcasting__platforms-url { min-width: 220px; } .simple_podcasting__platforms-icon { transition: background-color 0.2s ease-out; } .simple_podcasting__platforms-icon--darken-bg { background-color: rgb(28 52 59 / 22%); transition: background-color 0.2s ease-in; } ================================================ FILE: assets/css/podcasting-editor-screen.css ================================================ .components-input-control, .components-base-control { width: 100%; } .cover-art-container { display: flex; flex-direction: column; justify-content: center; align-items: center; } .cover-art-container button { margin: 10px 0; } ================================================ FILE: assets/css/podcasting-onboarding.scss ================================================ * { box-sizing: border-box; } .admin_page_simple-podcasting-onboarding #wpcontent { padding-left: 0; } #simple-podcasting { &__onboarding-header { width: 100%; height: 79px; padding: 0 1.75rem; display: flex; justify-content: space-between; align-items: center; background-color: #fff; border-bottom: 1px solid #c0c0c1; & > * { flex-grow: 1; flex-basis: 0; } } &__branding { display: flex; align-items: center; } &__header-title { text-align: center; font-family: 'Roboto'; font-style: normal; font-weight: 700; font-size: 17.8983px; } &__logo { max-width: 56px; height: auto; img { display: block; width: 100%; } } &__plugin-name { margin-left: 11px; font-family: 'Roboto'; font-style: normal; font-weight: 700; font-size: 17.8983px; line-height: 20px; } &__header-controls { .simple-podcasting__btn { float: right; } } &__page-title { margin-bottom: 30px; font-family: 'Roboto'; font-style: normal; font-weight: 700; font-size: 22px; line-height: 24px; } &__upload-cover-image { margin-top: 13px; margin-bottom: 14px; } &__create-a-new-post-button { padding: 10px 40px; width: 240px; display: block; text-align: center; text-decoration: none; color: #fff !important; } &__cover-image-preview { img { display: block; max-width: 256px; } } } .simple-podcasting { // Body. &__onboarding-body { margin: 0 auto; margin-top: 68px; padding: 0 1.75rem; &--step-1 { max-width: 524px; } &--step-2 { display: flex; max-width: 1038px; } } &__setting { margin-bottom: 30px; input, textarea { width: 100%; padding: 11px 7px 10px 13px; background: #FFFFFF; border: 1px solid #828282; border-radius: 5px; } select { padding: 11px 7px 10px 13px; width: 320px; background: #FFFFFF; border: 1px solid #828282; border-radius: 5px; } } &__setting-label { display: block; font-family: 'Roboto'; font-style: normal; font-weight: 700; font-size: 16px; line-height: 24px; margin-bottom: 4px; } &__setting-description { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-size: 14px; line-height: 24px; color: #828282; margin-top: 4px; } &__panel { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-size: 16px; line-height: 24px; flex-grow: 1; flex-basis: 0; p { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-size: 16px; line-height: 24px; } &--left { max-width: 483px; a { color: #000; font-weight: 700; } } } &__podcast-block-preview { width: 468px; float: right; box-shadow: 0px 0px 26px 8px rgba(0, 0, 0, 0.05); img { display: block; width: 100%; height: auto; } } &__step-2-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 64px; a { letter-spacing: 1px; text-decoration-line: underline; color: #4F4F4F !important; } } } .simple-podcasting__btn { box-shadow: none; border: 0; outline: 0; border-radius: 3px; padding: 12px 40px; font-family: 'Roboto'; font-style: normal; font-weight: 700; font-size: 14px; letter-spacing: 1px; text-decoration: none; cursor: pointer; &--ghost { border: 1px solid #000000; background-color: rgba(0, 0, 0, 0); color: #000; } &--black { background: #4F4F4F; border-radius: 3px; color: #FFFFFF; } } ================================================ FILE: assets/css/podcasting-transcript.css ================================================ .wp-block-podcasting-podcast-transcript cite, .wp-block-podcasting-podcast-transcript time { display: block; } ================================================ FILE: assets/js/blocks/latest-episode/index.js ================================================ import './index.scss'; ================================================ FILE: assets/js/blocks/latest-episode/index.scss ================================================ .podcasting-latest-episode { display: flex; flex-direction: column; justify-content: end; min-height: 20rem; overflow: hidden; position: relative; & .wp-block-post-featured-image { height: 100%; object-fit: fill; object-position: center; position: absolute; width: 100%; &::after { background-color: rgb(0 0 0 / 75%); content: ""; display: block; height: 100%; left: 0; position: absolute; top: 0; width: 100%; } } } .podcasting-latest-episode__content { color: #fff; padding: 3rem; position: relative; z-index: 1; @media (min-width: 768px) { padding: 3rem; } & .wp-block-post-excerpt, & .wp-block-post-excerpt__more-text { margin-top: 0.25rem; } & .wp-block-post-excerpt__more-link { color: #fff; } } .editor-styles-wrapper .wp-block-post-content .podcasting-latest-episode__content .wp-block-post-excerpt__more-link:where(:not(.wp-element-button)) { color: #fff; } ================================================ FILE: assets/js/blocks/podcast/index.js ================================================ import './index.scss'; ================================================ FILE: assets/js/blocks/podcast/index.scss ================================================ .wp-block-podcasting-podcast-outer { border: 1px solid #707070; border-radius: 4px; padding: 20px; } .wp-block-podcasting-podcast__container { margin-bottom: 10px; @media (min-width: 768px) { display: flex; } } .wp-block-podcasting-podcast__show-art { margin-bottom: 20px; @media (min-width: 768px) { flex-basis: 100px; margin-bottom: 0; margin-right: 20px; } } .wp-block-podcasting-podcast__image { aspect-ratio: 1/1; height: auto; position: relative; & img { display: block; height: 100%; object-fit: cover; width: 100%; } } .wp-block-podcasting-podcast__show-title { margin: 0; } .wp-block-podcasting-podcast__show-details { color: #575757; font-size: 0.875rem; text-transform: uppercase; & span { display: block; margin-right: 6px; @media (min-width: 768px) { display: inline; } &::after { @media (min-width: 768px) { content: '/'; margin-left: 6px; } } &:last-child { margin-right: 0; &::after { display: none; } } } } .wp-block-podcasting-podcast__caption { margin-bottom: 10px; } .wp-block-podcasting-podcast { margin: 0; & audio { display: block; width: 100%; } } ================================================ FILE: assets/js/blocks/podcast-platforms/edit.js ================================================ import { useBlockProps, InspectorControls } from '@wordpress/block-editor'; import { useState, useEffect } from '@wordpress/element'; import apiFetch from '@wordpress/api-fetch'; import { __ } from '@wordpress/i18n'; import { useDebounce } from 'use-debounce'; import { Panel, PanelBody, PanelRow, RangeControl, SearchControl, __experimentalItemGroup as ItemGroup, __experimentalItem as Item, BaseControl, Button, ButtonGroup, Icon } from '@wordpress/components'; function Edit( props ) { const { setAttributes, isSelected, attributes: { showId, iconSize, align, }, } = props; /** State for the search text for the show name. Defaults to empty string. */ const [ searchText, setSearchText ] = useState( '' ); /** Debounced search text so that we don't trigger useEffect() for every character change. */ const [ debouncedSearchText ] = useDebounce( searchText, 300 ); /** Indicates when the ajax search for podcasts is completed. */ const [ isSearchCompleted, setIsSearchCompleted ] = useState( false ); /** State for search results matched by the search text. Defaults to array. */ const [ searchResults, setSearchResults ] = useState( [] ); /** State for the icon theme. Defaults to `color`. */ const [ iconTheme, setIconTheme ] = useState( 'color' ); /** State for platforms returned for a specific show. Defaults to array. */ const [ platforms, setPlatforms ] = useState( [] ); /** * Hits the `/wp/v2/search` endpoint to search for * podcast show by name. */ useEffect( () => { const searchPodcastShow = async () => { setIsSearchCompleted( false ); if ( ! searchText.length ) { setSearchResults( [] ); return; } /** Query object required by `/wp/v2/search` to search for a term by name. */ const queryObject = { search: searchText, type: 'term', subtype: 'podcasting_podcasts' }; /** Converts an object to query-string. */ const queryString = new URLSearchParams( queryObject ).toString(); /** Returns the results of the search. */ const searchResults = await apiFetch( { path: `/wp/v2/search?${ queryString }`, } ); if ( ! searchResults.length ) { setIsSearchCompleted( true ); } setSearchResults( searchResults ); setIsSearchCompleted( true ); }; searchPodcastShow(); }, [ debouncedSearchText ] ); /** * Fetches the podcasting platforms for a show whenever * showId updates. */ useEffect( () => { if ( ! showId ) { return; } /** * Responsible to fetch platforms for a show by show ID. * @returns void */ const fetchPlatforms = async () => { const result = await apiFetch( { url: `${ ajaxurl }?show_id=${ showId }&action=get_podcast_platforms`, } ); if ( ! result.success ) { setPlatforms( [] ); return; } const { data: { platforms, theme } } = result; setPlatforms( platforms ); setIconTheme( theme ); }; fetchPlatforms(); }, [ showId ] ); /** * Handler to set the attribute showId. * * @param {Int} termId The show ID. * @returns void */ const onShowSelect = ( termId ) => { setAttributes( { showId: termId } ); setSearchResults( [] ); setIsSearchCompleted( false ); }; /** * Handler to set size of the icon. * * @param {Int} size The icon size in `px` */ const setIconSize = ( size ) => { setAttributes( { iconSize: size } ); }; /** * Sets the HTML attributes for the root element. */ const blockProps = useBlockProps( { className: isSelected ? 'simple-podcasting__podcast-platforms simple-podcasting__podcast-platforms--selected' : 'simple-podcasting__podcast-platforms', } ); const platformSlugs = Object.keys( platforms ); return ( <>

{__('Cover Image', 'simple-podcasting')}

{__('The featured image of the current post is used as the episode cover art. Please select a featured image to set it.', 'simple-podcasting')}

{featuredImageUrl && ( Cover Image )} ( )} value={featuredImageId} /> {featuredImageUrl && ( )}
{src ? ( <>
{displayArt && (featuredImageUrl || showImage) && (
{showName}
)}
{displayEpisodeTitle && postTitle && (

{displayEpisodeNumber && episodeNumber && ( {episodeNumber}. )} {postTitle}

)}
{displayShowTitle && ( {showName} )} {displaySeasonNumber && seasonNumber && ( {__( 'Season: ', 'simple-podcasting' )} {seasonNumber} )} {displayEpisodeNumber && episodeNumber && ( {__('Episode: ', 'simple-podcasting')} {episodeNumber} )}
{displayDuration && duration && ( {__('Listen Time: ', 'simple-podcasting')} {duration} )} {displayEpisodeType && (episodeType !== 'none') && ( {__( 'Episode type: ', 'simple-podcasting' )} {episodeType} )} {displayExplicitBadge && ( {__( 'Explicit: ', 'simple-podcasting' )} {explicit} )}
{((caption && caption.length) || !!isSelected) && ( setAttributes({ caption: value }) } isSelected={isSelected} /> )}
) : ( )}
); } function PodcastBlockWithHooks(props) { const featuredImageProp = useFeaturedImage(); return ; } export default PodcastBlockWithHooks; ================================================ FILE: assets/js/onboarding.js ================================================ import '../css/podcasting-onboarding.scss'; ( function( $ ) { $( function() { const selectImageBtn = $( '#simple-podcasting__upload-cover-image' ); const coverImage = $( 'input[name="podcast-cover-image-id"]' ); const coverImagePreview = $( '#simple-podcasting__cover-image-preview' ); let uploader_frame = null; /** Upload image button handler */ selectImageBtn.on( 'click', function() { uploader_frame = wp.media( { multiple: false, library: { type: 'image' } } ).on( 'select', function() { const { id, url } = uploader_frame.state().get( 'selection' ).first().toJSON(); coverImagePreview.html( `` ) coverImage.val( id ); } ); uploader_frame.open(); } ); } ) } )( jQuery ) ================================================ FILE: assets/js/podcasting-edit-post.js ================================================ /*global jQuery */ jQuery( document ).ready( function( $ ) { $( '#podcasting-enclosure-button' ).click( function( e ) { e.preventDefault(); var $this = $( this ), $input = $( 'input#podcasting-enclosure-url' ), mediaUploader; // If the uploader object has already been created, reopen the dialog. if ( mediaUploader ) { mediaUploader.open(); return; } // eslint-disable-next-line camelcase mediaUploader = wp.media.frames.file_frame = wp.media( { title: $this.data( 'modalTitle' ), button: { text: $this.data( 'modalButton' ) }, library: { type: 'audio' }, multiple: false }); mediaUploader.off( 'select' ); mediaUploader.on( 'select', function() { var attachment = mediaUploader.state().get('selection').first(); $input.val( attachment.get('url') ); }); mediaUploader.open(); } ); } ); ================================================ FILE: assets/js/podcasting-edit-term.js ================================================ /*global jQuery, validateForm*/ import '../css/podcasting-edit-term.css'; jQuery( document ).ready( function( $ ) { // Clear Image Field. function clearImageField( el ) { var $link = $( el ), $wrapper = $link.parents( '.media-wrapper' ), $button = $wrapper.find( '.podcasting-media-button' ), $hidden = $( document.getElementById( $button.data( 'slug' ) ) ), $existing = $wrapper.find( '.podasting-existing-image' ), $upload = $wrapper.find( '.podcasting-upload-image' ); // Update the display. $upload.removeClass('hidden'); $existing.addClass('hidden'); $hidden.val( '' ); } // When the term add button is clicked, reset the dropdown fields. $( '#submit' ).click( function() { var $form = $( 'form#addtag' ); if ( ! validateForm( $form ) ) { return; } // Add a brief delay to allow the form to submit. setTimeout( function() { $( '.fm-select select' ).val( 'None' ); clearImageField( '.podcast-media-remove' ); $( '#podcasting_category_1,#podcasting_category_2,#podcasting_category_3' ).val( '' ); window.scrollTo(0,0); }, 500 ); } ); var mediaUploader; // Handle media upload buttons. $( 'input.podcasting-media-button' ).on( 'click', function( e ) { e.preventDefault(); var $button = $( e.currentTarget ), $hidden = $( document.getElementById( $button.data( 'slug' ) ) ), $wrapper = $button.parents( '.media-wrapper' ), $image = $wrapper.find( 'img' ), $existing = $wrapper.find( '.podasting-existing-image' ), $upload = $wrapper.find( '.podcasting-upload-image' ); // If the uploader object has already been created, reopen the dialog. if (mediaUploader) { mediaUploader.open(); return; } // Extend the wp.media object. // eslint-disable-next-line camelcase mediaUploader = wp.media.frames.file_frame = wp.media( { title: $button.data( 'choose' ), button: { text: $button.data( 'update' ) }, multiple: false }); // When a file is selected, grab the URL and set it as the text field's value. mediaUploader.off( 'select' ); mediaUploader.on( 'select', function() { var attachment = mediaUploader.state().get('selection').first(); // Set the hidden field value. $hidden.val( attachment.get('id') ); // Update the display. $upload.addClass('hidden'); $existing.removeClass('hidden'); $image.attr( 'src', attachment.get('url') ); }); // Open the uploader dialog mediaUploader.open(); }); // Handle media remove buttons. $( '.podcast-media-remove' ).on( 'click', function( e ) { e.preventDefault(); clearImageField( e.currentTarget ); } ); const iconThemeRadioEl = $( 'input[name="podcasting_icon_theme"]' ); const iconWrappers = $( '.simple_podcasting__platforms-icon' ); iconThemeRadioEl.on( 'change', function() { const current = $( this ); const selected = current.val(); if ( 'white' === selected ) { iconWrappers.addClass( 'simple_podcasting__platforms-icon--darken-bg' ); } else { iconWrappers.removeClass( 'simple_podcasting__platforms-icon--darken-bg' ); } iconWrappers.each( ( index, icon ) => { const imgEl = $( icon ).find( 'img' ); const platform = imgEl.data( 'platform' ); imgEl.attr( 'src', `${ podcastingEditPostVars.iconUrl }/${ platform }/${ selected }-100.png` ); }); } ); } ); ================================================ FILE: assets/js/transforms.js ================================================ /** * WordPress dependencies */ const { select } = wp.data; const { createBlock } = wp.blocks; /** * Transforms */ const transforms = { from: [ { type: 'block', blocks: [ 'core/audio' ], transform: ( attributes ) => { return createBlock( 'podcasting/podcast', { id: attributes.id, src: attributes.src } ); }, }, ], to: [ { type: 'block', blocks: [ 'core/audio' ], isMatch: ( { id } ) => { if ( ! id ) { return false; } const { getMedia } = select( 'core' ); const media = getMedia( id ); return !! media && media.mime_type.includes( 'audio' ); }, transform: ( attributes ) => { return createBlock( 'core/audio', { src: attributes.src, id: attributes.id } ); }, }, ], }; export default transforms; ================================================ FILE: composer.json ================================================ { "name": "10up/simple-podcasting", "description": "A simple podcasting solution for WordPress. ", "homepage": "https://github.com/10up/simple-podcasting", "license": "GPL-2.0-or-later", "authors": [ { "name": "10up", "email": "opensource@10up.com", "homepage": "https://10up.com" } ], "support": { "issues": "https://github.com/10up/simple-podcasting/issues" }, "require": { "php": ">=7.3" }, "require-dev": { "10up/phpcs-composer": "^3.0", "10up/wp_mock": "^0.4.2", "phpunit/phpunit": "^9.5", "phpcompatibility/php-compatibility": "dev-develop as 9.99.99" }, "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true } } } ================================================ FILE: includes/admin/create-podcast-component.php ================================================ id ) ) { return; } wp_enqueue_script( 'podcasting_create_podcast_show_plugin', PODCASTING_URL . 'dist/create-podcast-show.js', array(), PODCASTING_VERSION, true ); wp_localize_script( 'podcasting_create_podcast_show_plugin', 'podcastingShowPluginVars', array( 'categories' => \tenup_podcasting\get_podcasting_categories_options(), ) ); } } new Create_Podcast_Component(); ================================================ FILE: includes/admin/onboarding.php ================================================ create_podcast = new \tenup_podcasting\Create_Podcast(); add_action( 'admin_menu', array( $this, 'register_onoarding_page' ) ); add_action( 'admin_init', array( $this, 'onboarding_action_handler' ) ); } /** * Registers a hidden sub menu page for the onboarding wizard. */ public function register_onoarding_page() { add_submenu_page( 'admin.php', esc_html__( 'Simple Podcasting Onboarding' ), '', 'manage_options', 'simple-podcasting-onboarding', array( $this, 'render_page_contents' ) ); if ( 'no' === get_option( 'simple_podcasting_onboarding', '' ) ) { update_option( 'simple_podcasting_onboarding', self::STATUS_IN_PROGRESS ); wp_safe_redirect( admin_url( 'admin.php?page=simple-podcasting-onboarding&step=1' ) ); die(); } } /** * Renders the page content for the onboarding wizard. */ public function render_page_contents() { $step = filter_input( INPUT_GET, 'step', FILTER_VALIDATE_INT ); if ( ! $step ) { $step = 1; } require_once 'views/onboarding-header.php'; switch ( $step ) { case 1: require_once 'views/onboarding-page-one.php'; break; case 2: require_once 'views/onboarding-page-two.php'; break; default: break; } } /** * Onboarding data saving handler. */ public function onboarding_action_handler() { if ( ! $this->create_podcast->verify_nonce() ) { return; } $this->create_podcast->sanitize_podcast_fields(); $is_sanitized = $this->create_podcast->save_podcast_fields(); if ( is_wp_error( $is_sanitized ) ) { $error_message = $is_sanitized->get_error_message(); add_action( 'admin_notices', function () use ( $error_message ) { if ( empty( $error_message ) ) { return; } ?>

================================================ FILE: includes/admin/views/onboarding-page-one.php ================================================
================================================ FILE: includes/admin/views/onboarding-page-two.php ================================================

here.', 'simple-podcasting' ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped esc_url( admin_url( 'edit-tags.php?taxonomy=podcasting_podcasts&podcasts=true' ) ) ); ?>

================================================ FILE: includes/block-patterns.php ================================================ PODCASTING_TAXONOMY_NAME, 'fields' => 'ids', ] ); if ( empty( $podcast_terms ) ) { return; } register_block_pattern( 'podcasting/podcast-grid', array( 'title' => __( 'Podcast Grid', 'simple-podcasting' ), 'description' => _x( 'Podcast Grid', 'This block pattern is used to display podcast in a grid structure.', 'simple-podcasting' ), 'categories' => [ 'query' ], 'content' => '
', ) ); } add_action( 'init', __NAMESPACE__ . '\init' ); ================================================ FILE: includes/blocks/podcast/markup.php ================================================ null, 'caption' => '', 'displayDuration' => false, 'displayShowTitle' => false, 'displayEpisodeTitle' => false, 'displayArt' => false, 'displayExplicitBadge' => false, 'displaySeasonNumber' => false, 'displayEpisodeNumber' => false, 'displayEpisodeType' => false, ] ); if ( ! $attributes['id'] ) { return; } $post_id = get_the_id(); $podcast_shows = get_the_terms( $post_id, 'podcasting_podcasts' ); $podcast_show = $podcast_shows ? $podcast_shows[0] : ''; $show_name = $podcast_show ? $podcast_show->name : ''; $src = get_post_meta( $post_id, 'src', true ); $duration = get_post_meta( $post_id, 'podcast_duration', true ); $explicit = get_post_meta( $post_id, 'podcast_explicit', true ); $episode_type = get_post_meta( $post_id, 'podcast_episode_type', true ); $episode_number = get_post_meta( $post_id, 'podcast_episode_number', true ); $season_number = get_post_meta( $post_id, 'podcast_season_number', true ); if ( is_a( $podcast_show, 'WP_Term' ) ) { $term_image_id = get_term_meta( $podcast_show->term_id, 'podcasting_image', true ); } else { $term_image_id = ''; } ?>

.

================================================ FILE: includes/blocks/podcast-transcript/cite.js ================================================ import { registerBlockType, createBlock } from '@wordpress/blocks'; import { useBlockProps, RichText } from '@wordpress/block-editor'; const Edit = ({ attributes, attributes: { text }, setAttributes, clientId, onReplace, }) => { const blockProps = useBlockProps(); return ( setAttributes({ text: content })} allowedFormats={[]} withoutInteractiveFormatting onSplit={(value, isOriginal) => { let block; if (isOriginal || value) { block = createBlock('podcasting/podcast-transcript-cite', { ...attributes, content: value, }); } else { block = createBlock('core/paragraph'); } if (isOriginal) { block.clientId = clientId; } return block; }} onReplace={onReplace} {...blockProps} /> ); }; registerBlockType('podcasting/podcast-transcript-cite', { edit: Edit, save: ({ attributes: { text } }) => {text}, }); ================================================ FILE: includes/blocks/podcast-transcript/edit.js ================================================ import { useBlockProps, RichText, InnerBlocks } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; import { RadioControl, Card, CardBody, Placeholder, } from '@wordpress/components'; import { useSelect, withSelect } from '@wordpress/data'; import { useEffect } from '@wordpress/element'; import { useEntityProp } from '@wordpress/core-data'; import { serialize } from '@wordpress/blocks'; const Edit = withSelect((select, { clientId }) => { return { innerBlocks: select('core/block-editor').getBlocksByClientId(clientId), }; })(({ attributes, setAttributes, isSelected, innerBlocks, clientId }) => { const blockProps = useBlockProps({}); const postType = useSelect( (select) => select('core/editor').getCurrentPostType(), [] ); const [meta, setMeta] = useEntityProp('postType', postType, 'meta'); useEffect(() => { if (innerBlocks.length) { setMeta({ ...meta, podcast_transcript: serialize(innerBlocks[0].innerBlocks), }); } }, [innerBlocks]); const isInnerBlockSelected = useSelect((select) => select('core/block-editor').hasSelectedInnerBlock(clientId) ); console.log(isInnerBlockSelected); const { display, linkText } = attributes; return (
{(isSelected || isInnerBlockSelected) && ( <> setAttributes({ display: value }) } />
)} {display === 'none' && !isSelected && ( )} {display === 'link' && ( setAttributes({ linkText: content })} placeholder={__('Transcript Link', 'simple-podcasting')} allowedFormats={[]} /> )} {(isSelected || isInnerBlockSelected || display === 'post') && ( <>
)}
); }); export default Edit; ================================================ FILE: includes/blocks/podcast-transcript/formats.js ================================================ import { registerFormatType, toggleFormat } from '@wordpress/rich-text'; import { BlockControls } from '@wordpress/block-editor'; import { ToolbarGroup, ToolbarButton } from '@wordpress/components'; import { useSelect } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; const Cite = ({ isActive, onChange, value }) => { const selectedBlock = useSelect((select) => { return select('core/block-editor').getSelectedBlock(); }, []); if ( selectedBlock && selectedBlock.name !== 'podcasting/podcast-transcript' ) { return null; } return ( { onChange( toggleFormat(value, { type: 'podcasting/transcript-cite', }) ); }} isActive={isActive} /> ); }; registerFormatType('podcasting/transcript-cite', { title: __('Cite', 'simple-podcasting'), tagName: 'cite', className: null, edit: Cite, }); const Time = ({ isActive, onChange, value }) => { const selectedBlock = useSelect((select) => { return select('core/block-editor').getSelectedBlock(); }, []); if ( selectedBlock && selectedBlock.name !== 'podcasting/podcast-transcript' ) { return null; } return ( { onChange( toggleFormat(value, { type: 'podcasting/transcript-time', }) ); }} isActive={isActive} /> ); }; registerFormatType('podcasting/transcript-time', { title: __('Time', 'simple-podcasting'), tagName: 'time', className: null, edit: Time, }); ================================================ FILE: includes/blocks/podcast-transcript/index.js ================================================ import { registerBlockType } from '@wordpress/blocks'; import { InnerBlocks } from '@wordpress/block-editor'; import './styles.css'; import Edit from './edit'; import './cite'; import './time'; registerBlockType('podcasting/podcast-transcript', { edit: Edit, save: () => , }); ================================================ FILE: includes/blocks/podcast-transcript/markup.php ================================================
> %s

', esc_url( get_transcript_link_from_post( get_post() ) ), esc_html( $attributes['linkText'] ) ); break; } ?>
================================================ FILE: includes/blocks/podcast-transcript/styles.css ================================================ .wp-block-podcasting-podcast-transcript cite, .wp-block-podcasting-podcast-transcript time { display: block; } ================================================ FILE: includes/blocks/podcast-transcript/time.js ================================================ import { registerBlockType, createBlock } from '@wordpress/blocks'; import { useBlockProps, RichText } from '@wordpress/block-editor'; const Edit = ({ attributes, attributes: { text }, setAttributes, clientId, onReplace, }) => { const blockProps = useBlockProps(); return ( setAttributes({ text: content })} allowedFormats={[]} withoutInteractiveFormatting onSplit={(value, isOriginal) => { let block; if (isOriginal || value) { block = createBlock('podcasting/podcast-transcript-time', { ...attributes, content: value, }); } else { block = createBlock('core/paragraph'); } if (isOriginal) { block.clientId = clientId; } return block; }} onReplace={onReplace} {...blockProps} /> ); }; registerBlockType('podcasting/podcast-transcript-time', { edit: Edit, save: ({ attributes: { text } }) => , }); ================================================ FILE: includes/blocks.php ================================================ 'podcasting-block-editor', 'editor_style' => 'podcasting-block-editor', 'render_callback' => __NAMESPACE__ . '\render', ) ); } add_action( 'init', __NAMESPACE__ . '\init' ); /** * Render the block. * * @param array $attributes Block attributes. * @param string $content Block content. * @param WP_Block $block Block instance. * @return string HTML output */ function render( $attributes, $content, $block ) { ob_start(); include PODCASTING_PATH . 'includes/blocks/podcast/markup.php'; return ob_get_clean(); } /** * Register block and its assets. */ function init_transcript() { $podcast_transcript_block_asset = require PODCASTING_PATH . 'dist/podcasting-transcript.asset.php'; wp_register_script( 'podcasting-transcript', PODCASTING_URL . 'dist/podcasting-transcript.js', $podcast_transcript_block_asset['dependencies'], $podcast_transcript_block_asset['version'], true ); wp_register_style( 'podcasting-transcript', PODCASTING_URL . 'dist/podcasting-transcript.css', array(), $podcast_transcript_block_asset['version'], 'all' ); $transcript_block_args = array( 'editor_script' => 'podcasting-transcript', 'style_handles' => array( 'podcasting-transcript' ), 'title' => __( 'Podcast Transcript', 'simple-podcasting' ), 'description' => '', 'textdomain' => 'simple-podcasting', 'name' => 'podcasting/podcast-transcript', 'icon' => 'format-quote', 'api_version' => 2, 'category' => 'common', 'attributes' => array( 'transcript' => array( 'type' => 'string', ), 'display' => array( 'type' => 'string', 'default' => 'post', ), 'linkText' => array( 'type' => 'string', 'default' => __( 'Transcript Link', 'simple-podcastin' ), ), ), 'example' => array(), 'supports' => array( 'multiple' => false, 'inserter' => false, ), ); $transcript_block_args['render_callback'] = function ( $attributes, $content, $block ) { ob_start(); include PODCASTING_PATH . 'includes/blocks/podcast-transcript/markup.php'; return ob_get_clean(); }; register_block_type( 'podcasting/podcast-transcript', $transcript_block_args ); /** * Simple cite block. */ register_block_type( 'podcasting/podcast-transcript-cite', array( 'editor_script' => 'podcasting-transcript', 'title' => __( 'Cite', 'simple-podcasting' ), 'description' => '', 'textdomain' => 'simple-podcasting', 'name' => 'podcasting/podcast-transcript-cite', 'icon' => 'admin-users', 'api_version' => 2, 'category' => 'text', 'attributes' => array( 'text' => array( 'type' => 'string', ), ), 'supports' => array( 'html' => false, 'reusable' => false, ), 'parent' => [ 'podcasting/podcast-transcript' ], ) ); /** * Simple time block. */ register_block_type( 'podcasting/podcast-transcript-time', array( 'editor_script' => 'podcasting-transcript', 'title' => __( 'Time', 'simple-podcasting' ), 'description' => '', 'textdomain' => 'simple-podcasting', 'name' => 'podcasting/podcast-transcript-time', 'icon' => 'clock', 'api_version' => 2, 'category' => 'text', 'attributes' => array( 'text' => array( 'type' => 'string', ), ), 'supports' => array( 'html' => false, 'reusable' => false, ), 'parent' => [ 'podcasting/podcast-transcript' ], ) ); } add_action( 'init', __NAMESPACE__ . '\init_transcript' ); /** * Registers block for Podcast Platforms. */ function register_podcast_platforms_block() { if ( ! file_exists( PODCASTING_PATH . 'dist/podcast-platforms-block.asset.php' ) ) { return; } $block_asset = require PODCASTING_PATH . 'dist/podcast-platforms-block.asset.php'; wp_register_script( 'podcast-platforms-block-editor', PODCASTING_URL . 'dist/podcast-platforms-block.js', $block_asset['dependencies'], $block_asset['version'], true ); wp_localize_script( 'podcast-platforms-block-editor', 'podcastingPlatformVars', array( 'podcastingUrl' => PODCASTING_URL, ) ); wp_register_style( 'podcast-platforms-block-editor', PODCASTING_URL . 'dist/podcast-platforms-block.css', array(), $block_asset['version'], 'all' ); register_block_type( 'podcasting/podcast-platforms', array( 'editor_script' => 'podcast-platforms-block-editor', 'editor_style' => 'podcast-platforms-block-editor', 'style' => 'podcast-platforms-block-editor', 'render_callback' => __NAMESPACE__ . '\render_podcasting_platforms', ) ); } add_action( 'init', __NAMESPACE__ . '\register_podcast_platforms_block' ); /** * Renders the block `podcasting/podcast-platforms`. * * @param array $attrs Block attributes. * @return string */ function render_podcasting_platforms( $attrs ) { if ( ! ( is_array( $attrs ) && isset( $attrs['showId'] ) ) ) { return ''; } $show_id = isset( $attrs['showId'] ) ? $attrs['showId'] : 0; $icon_size = isset( $attrs['iconSize'] ) ? $attrs['iconSize'] : 48; $align = isset( $attrs['align'] ) ? $attrs['align'] : 'center'; if ( 0 === $show_id ) { return ''; } $supported_platforms = \tenup_podcasting\get_supported_platforms(); $platforms = get_term_meta( $show_id, 'podcasting_platforms', true ); $theme = get_term_meta( $show_id, 'podcasting_icon_theme', true ); $theme = empty( $theme ) ? 'color' : $theme; if ( ! is_array( $platforms ) || empty( $platforms ) ) { return ''; } ob_start(); ?>
'> $url ) : ?>
ID ) ) { return; } \tenup_podcasting\helpers\delete_all_podcast_meta( $post->ID ); } add_action( 'rest_after_insert_post', __NAMESPACE__ . '\block_editor_meta_cleanup', 10, 3 ); /** * Returns podcast platforms meta. */ function ajax_get_podcast_platforms() { $term_id = filter_input( INPUT_GET, 'show_id', FILTER_VALIDATE_INT ); if ( ! $term_id ) { wp_send_json_error( esc_html__( 'Term ID not valid', 'simple-podcasting' ) ); } $platforms = get_term_meta( $term_id, 'podcasting_platforms', true ); if ( ! is_array( $platforms ) ) { wp_send_json_error( esc_html__( 'No shows found', 'simple-podcasting' ) ); } $platforms = array_filter( $platforms, function ( $platform ) { return ! empty( $platform ); } ); $theme = get_term_meta( $term_id, 'podcasting_icon_theme', true ); if ( empty( $theme ) ) { $theme = 'color'; } $result = array( 'platforms' => $platforms, 'theme' => $theme, ); wp_send_json_success( $result ); } add_action( 'wp_ajax_get_podcast_platforms', __NAMESPACE__ . '\ajax_get_podcast_platforms' ); /** * Latest podcast query for front-end. * * @param Object $query query object. */ function latest_episode_query_loop( $query ) { // update query to only return posts that have a podcast selected return [ 'post_type' => 'post', 'posts_per_page' => 1, 'orderby' => 'date', 'order' => 'DESC', 'tax_query' => [ [ 'taxonomy' => 'podcasting_podcasts', 'field' => 'term_id', 'operator' => 'EXISTS', ], ], ]; } /** * Latest podcast check. * * @param String $pre_render pre render object. * @param Array $parsed_block parsed block object. */ function latest_episode_check( $pre_render, $parsed_block ) { if ( isset( $parsed_block['attrs']['namespace'] ) && 'podcasting/latest-episode' === $parsed_block['attrs']['namespace'] ) { add_action( 'query_loop_block_query_vars', __NAMESPACE__ . '\latest_episode_query_loop' ); } } add_filter( 'pre_render_block', __NAMESPACE__ . '\latest_episode_check', 10, 2 ); /** * Latest podcast query in editor. * * @param Array $args query args. * @param WP_REST_Request $request request object. */ function latest_episode_query_api( $args, $request ) { $podcasting_podcasts = $request->get_param( 'podcastingQuery' ); if ( 'not_empty' === $podcasting_podcasts ) { $args = [ 'post_type' => 'post', 'posts_per_page' => 1, 'orderby' => 'date', 'order' => 'DESC', 'tax_query' => [ [ 'taxonomy' => 'podcasting_podcasts', 'field' => 'term_id', 'operator' => 'EXISTS', ], ], ]; } return $args; } add_filter( 'rest_post_query', __NAMESPACE__ . '\latest_episode_query_api', 10, 2 ); ================================================ FILE: includes/create-podcast.php ================================================ podcast_name = isset( $_POST['podcast-name'] ) ? sanitize_text_field( wp_unslash( $_POST['podcast-name'] ) ) : null; $this->podcast_talent_name = isset( $_POST['podcast-artist'] ) ? sanitize_text_field( wp_unslash( $_POST['podcast-artist'] ) ) : null; $this->podcast_description = isset( $_POST['podcast-description'] ) ? sanitize_text_field( wp_unslash( $_POST['podcast-description'] ) ) : null; $this->podcast_category = isset( $_POST['podcast-category'] ) ? sanitize_text_field( wp_unslash( $_POST['podcast-category'] ) ) : null; $this->podcast_cover_id = isset( $_POST['podcast-cover-image-id'] ) ? absint( wp_unslash( $_POST['podcast-cover-image-id'] ) ) : null; } /** * Create a podcast and saves its corressponding meta. * * @return boolean|WP_Error */ public function save_podcast_fields() { if ( empty( $this->podcast_name ) ) { return new \WP_Error( 'simple_podcasting_podcast_name_empty', esc_html__( 'A podcast name is required.' ) ); } if ( empty( $this->podcast_talent_name ) ) { return new \WP_Error( 'simple_podcasting_podcast_artist_name_empty', esc_html__( 'A podcast artist name is required.' ) ); } if ( empty( $this->podcast_description ) ) { return new \WP_Error( 'simple_podcasting_podcast_summary_empty', esc_html__( 'A podcast summary name is required.' ) ); } if ( empty( $this->podcast_category ) ) { return new \WP_Error( 'simple_podcasting_podcast_category_empty', esc_html__( 'A podcast category is required.' ) ); } if ( empty( $this->podcast_cover_id ) ) { return new \WP_Error( 'simple_podcasting_podcast_cover_image_empty', esc_html__( 'A podcast cover image is required.' ) ); } $result = wp_insert_term( $this->podcast_name, PODCASTING_TAXONOMY_NAME ); if ( is_wp_error( $result ) ) { return $result; } /** Add podcast talent name. */ if ( $this->podcast_talent_name ) { update_term_meta( $result['term_id'], 'podcasting_talent_name', $this->podcast_talent_name ); } /** Add podcast summary. */ if ( $this->podcast_description ) { update_term_meta( $result['term_id'], 'podcasting_summary', $this->podcast_description ); } /** Add podcast category. */ if ( $this->podcast_category ) { update_term_meta( $result['term_id'], 'podcasting_category_1', $this->podcast_category ); } /** Add podcast cover ID and URL. */ if ( $this->podcast_cover_id ) { $image_url = wp_get_attachment_url( (int) $this->podcast_cover_id ); update_term_meta( $result['term_id'], 'podcasting_image', $this->podcast_cover_id ); update_term_meta( $result['term_id'], 'podcasting_image_url', $image_url ); } return true; } } ================================================ FILE: includes/customize-feed.php ================================================ term_id ) { return false; } return $queried_object; } /** * Adjust the title for podcasting feeds. * * @param string $output The feed title. * * @return string The adjusted feed title. */ function bloginfo_rss_name( $output ) { $term = get_the_term(); if ( ! $term ) { return $output; } return apply_filters( 'simple_podcasting_feed_title', $output, $term ); } add_filter( 'wp_title_rss', __NAMESPACE__ . '\bloginfo_rss_name' ); // Don't show audio widgets in the feed. add_filter( 'wp_audio_shortcode', '__return_empty_string', 999 ); /** * Sets the podcast language and description in the feed to the values in the term edit screen. * * @param string $output The value being displayed. * @param string $requested The item that was requested. * * @return mixed */ function bloginfo_rss( $output, $requested ) { $term = get_the_term(); if ( ! $term ) { return $output; } if ( 'language' === $requested ) { $lang = get_term_meta( $term->term_id, 'podcasting_language', true ); if ( $lang ) { $lang = str_replace( '_', '-', $lang ); $output = $lang; } } if ( 'description' === $requested ) { $summary = get_term_meta( $term->term_id, 'podcasting_summary', true ); if ( empty( $summary ) ) { $summary = get_bloginfo( 'description' ); } if ( ! empty( $summary ) ) { $output = ''; } } return $output; } add_filter( 'bloginfo_rss', __NAMESPACE__ . '\bloginfo_rss', 10, 2 ); /** * Add podcasting details to the feed header. */ function feed_head() { $term = get_the_term(); if ( ! $term ) { return; } $subtitle = get_term_meta( $term->term_id, 'podcasting_subtitle', true ); if ( empty( $subtitle ) ) { $subtitle = get_bloginfo( 'description' ); } if ( ! empty( $subtitle ) ) { echo '' . esc_html( wp_strip_all_tags( $subtitle ) ) . "\n"; } $author = get_term_meta( $term->term_id, 'podcasting_talent_name', true ); if ( ! empty( $author ) ) { echo '' . esc_html( wp_strip_all_tags( $author ) ) . "\n"; } echo ''; if ( ! empty( $author ) ) { echo '' . esc_html( wp_strip_all_tags( $author ) ) . "\n"; } $podcasting_email = get_term_meta( $term->term_id, 'podcasting_email', true ); $email = ! empty( $podcasting_email ) ? $podcasting_email : get_bloginfo( 'admin_email' ); if ( ! empty( $email ) ) { echo '' . esc_html( wp_strip_all_tags( $email ) ) . "\n"; } echo ''; $copyright = get_term_meta( $term->term_id, 'podcasting_copyright', true ); if ( ! empty( $copyright ) ) { echo '' . esc_html( wp_strip_all_tags( $copyright ) ) . "\n"; } $explicit = get_term_meta( $term->term_id, 'podcasting_explicit', true ); echo ''; if ( empty( $explicit ) ) { echo 'no'; } else { echo esc_html( $explicit ); } echo "\n"; $image = get_term_meta( $term->term_id, 'podcasting_image', true ); if ( ! empty( $image ) ) { echo "\n"; } $keywords = get_term_meta( $term->term_id, 'podcasting_keywords', true ); if ( ! empty( $keywords ) ) { echo '' . esc_html( $keywords ) . "\n"; } $type_of_show = get_term_meta( $term->term_id, 'podcasting_type_of_show', true ); if ( $type_of_show && '0' !== $type_of_show ) { echo '' . esc_html( $type_of_show ) . "\n"; } generate_categories(); } add_action( 'rss2_head', __NAMESPACE__ . '\feed_head' ); /** * Output the feed for a single podcast. */ function feed_item() { global $post; $term = get_the_term(); if ( ! $term ) { return false; } $feed_item = array( 'author' => get_option( 'podcasting_talent_name' ), 'explicit' => get_post_meta( $post->ID, 'podcast_explicit', true ), 'captioned' => get_post_meta( $post->ID, 'podcast_captioned', true ), 'keywords' => '', 'image' => '', 'summary' => '', 'subtitle' => '', 'duration' => get_post_meta( $post->ID, 'podcast_duration', true ), 'season' => get_post_meta( $post->ID, 'podcast_season_number', true ), 'episode' => get_post_meta( $post->ID, 'podcast_episode_number', true ), 'episodeType' => get_post_meta( $post->ID, 'podcast_episode_type', true ), 'transcript' => get_post_meta( $post->ID, 'podcast_transcript', true ), ); if ( empty( $feed_item['author'] ) ) { $feed_item['author'] = get_the_author(); } // fall back to the podcast setting. if ( empty( $feed_item['explicit'] ) ) { $feed_item['explicit'] = get_term_meta( $term->term_id, 'podcasting_explicit', true ); } // "no" explicit by default if ( empty( $feed_item['explicit'] ) ) { $feed_item['explicit'] = 'no'; } // Add the featured image if available. if ( has_post_thumbnail( $post->ID ) ) { $feed_item['image'] = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ); if ( ! empty( $feed_item['image'] ) && is_array( $feed_item['image'] ) ) { $feed_item['image'] = $feed_item['image'][0]; } } if ( has_excerpt() ) { $feed_item['summary'] = get_the_excerpt(); } else { $feed_item['summary'] = get_term_meta( $term->term_id, 'podcasting_summary', true ); } $feed_item['summary'] = apply_filters( 'the_excerpt_rss', $feed_item['summary'] ); $feed_item['subtitle'] = wp_trim_words( $feed_item['summary'], 10, '…' ); /** * Filter podcasting feed item data * * @since 1.3.0 * * @param array $feed_item { * Item data to filter. * * @type string $author Podcast author. * @type string $explicit Explicit content (yes|no|clean). * @type string $captioned Closed Captioned ("1"|"0"). Optional. * @type string $keywords Episode keywords. Optional. * @type string $image Episode image. Optional. * @type string $summary Episode summary. * @type string $subtitle Episode subtitle. * @type string $duration Episode duration (HH:MM). Optional. * @type string $season Season number Optional. * @type string $episode Episode number Optional. * @type string $episodeType Episode type Optional. * } * @param int $post->ID Podcast episode post ID. * @param int $term->term_id Podcast term ID. */ $feed_item = apply_filters( 'simple_podcasting_feed_item', $feed_item, $post->ID, $term->term_id ); // Output enclosure if it's not present in the post $enclosure = get_post_meta( $post->ID, 'enclosure', true ); if ( empty( $enclosure ) ) { display_rss_enclosure( $post ); } // Output all custom RSS tags. echo '' . esc_html( $feed_item['author'] ) . "\n"; echo '' . esc_html( $feed_item['explicit'] ) . "\n"; if ( $feed_item['captioned'] ) { echo "Yes\n"; } if ( ! empty( $feed_item['image'] ) ) { echo "\n"; } if ( ! empty( $feed_item['keywords'] ) ) { echo '' . esc_html( $feed_item['keywords'] ) . "\n"; } echo '' . esc_html( $feed_item['subtitle'] ) . "\n"; if ( ! empty( $feed_item['duration'] ) ) { echo '' . esc_html( $feed_item['duration'] ) . "\n"; } if ( ! empty( $feed_item['season'] ) ) { echo '' . esc_html( $feed_item['season'] ) . "\n"; } if ( ! empty( $feed_item['episode'] ) ) { echo '' . esc_html( $feed_item['episode'] ) . "\n"; } if ( ! empty( $feed_item['episodeType'] ) && 'none' !== $feed_item['episodeType'] ) { echo '' . esc_html( $feed_item['episodeType'] ) . "\n"; } if ( ! empty( $feed_item['transcript'] ) && '' !== $feed_item['transcript'] ) { echo '' . esc_url( get_transcript_link_from_post( $post ) ) . "\n"; } } add_action( 'rss2_item', __NAMESPACE__ . '\feed_item' ); /** * Displays the enclosure feed for podcasts. * * @param WP_Post $post The post object. * * @return void */ function display_rss_enclosure( $post ) { $podcast_url = get_post_meta( $post->ID, 'podcast_url', true ); $podcast_filesize = get_post_meta( $post->ID, 'podcast_filesize', true ); $podcast_mime = get_post_meta( $post->ID, 'podcast_mime', true ); if ( ! empty( $podcast_url ) ) { $enclosure = "\n"; echo wp_kses( $enclosure, array( 'enclosure' => array( 'url' => array(), 'length' => array(), 'type' => array(), ), ) ); } } /** * Generate the category elements from the given option (e.g. podcasting_category_1). */ function generate_categories() { $term = get_the_term(); if ( ! $term ) { return false; } $categories[] = get_term_meta( $term->term_id, 'podcasting_category_1', true ); $categories[] = get_term_meta( $term->term_id, 'podcasting_category_2', true ); $categories[] = get_term_meta( $term->term_id, 'podcasting_category_3', true ); $categories = array_filter( $categories ); $reduced_categories = array(); foreach ( $categories as $category ) { $category = explode( ':', $category ); if ( ! isset( $reduced_categories[ $category[0] ] ) ) { $reduced_categories[ $category[0] ] = array(); } if ( ! empty( $category[1] ) ) { $reduced_categories[ $category[0] ][] = $category[1]; } } $categories = get_podcasting_categories(); foreach ( $reduced_categories as $parent => $subs ) { if ( ! isset( $categories[ $parent ] ) ) { continue; } if ( empty( $subs ) ) { echo '\n"; } else { echo '\n"; foreach ( $subs as $sub ) { if ( ! isset( $categories[ $parent ]['subcategories'][ $sub ] ) ) { continue; } echo "\t\n"; } echo "\n"; } } } /** * Ensure the excerpt is actually used for the excerpt. * * @param string $output The excerpt. * * @return string The filtered excerpt. */ function empty_rss_excerpt( $output ) { $excerpt = get_the_excerpt(); if ( empty( $excerpt ) ) { return ''; } return $output; } // Run it super late after any other filters may have inserted something. add_filter( 'the_excerpt_rss', __NAMESPACE__ . '\empty_rss_excerpt', 1000 ); /** * Filter the feed query. * - Default items listed on the feed to 250. * * @param WP_Query $query The WP_Query instance. * @return void */ function pre_get_posts( $query ) { // do nothing if not the feed query. if ( ! $query->is_feed() ) { return; } $per_page = apply_filters( 'simple_podcasting_episodes_per_page', PODCASTING_ITEMS_PER_PAGE ); $query->set( 'posts_per_rss', $per_page ); } // Filter the feed query. add_action( 'pre_get_posts', __NAMESPACE__ . '\pre_get_posts', 10, 1 ); ================================================ FILE: includes/datatypes.php ================================================ true, 'type' => 'string', 'single' => true, ) ); \register_meta( 'post', 'podcast_explicit', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, 'default' => 'no', ) ); \register_meta( 'post', 'podcast_captioned', array( 'show_in_rest' => true, 'type' => 'boolean', 'single' => true, ) ); \register_meta( 'post', 'podcast_duration', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, ) ); \register_meta( 'post', 'podcast_filesize', array( 'show_in_rest' => true, 'type' => 'number', 'single' => true, ) ); \register_meta( 'post', 'podcast_mime', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, ) ); \register_meta( 'post', 'enclosure', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, ) ); \register_meta( 'post', 'podcast_season_number', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, ) ); \register_meta( 'post', 'podcast_episode_number', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, ) ); \register_meta( 'post', 'podcast_episode_type', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, 'default' => 'none', ) ); \register_meta( 'post', 'podcast_transcript', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, 'sanitize_callback' => function ( $val ) { return wp_kses_post( $val ); }, ) ); \register_term_meta( 'podcasting_podcasts', 'podcasting_talent_name', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, 'auth_callback' => 'podcasting_term_auth_callback', 'sanitize_callback' => function ( $val ) { return sanitize_text_field( wp_unslash( $val ) ); }, ) ); \register_term_meta( 'podcasting_podcasts', 'podcasting_summary', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, 'auth_callback' => 'podcasting_term_auth_callback', 'sanitize_callback' => function ( $val ) { return sanitize_text_field( wp_unslash( $val ) ); }, ) ); \register_term_meta( 'podcasting_podcasts', 'podcasting_category_1', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, 'auth_callback' => 'podcasting_term_auth_callback', 'sanitize_callback' => function ( $val ) { return sanitize_text_field( wp_unslash( $val ) ); }, ) ); \register_term_meta( 'podcasting_podcasts', 'podcasting_image', array( 'show_in_rest' => true, 'type' => 'number', 'single' => true, 'auth_callback' => 'podcasting_term_auth_callback', 'sanitize_callback' => function ( $val ) { return absint( wp_unslash( $val ) ); }, ) ); \register_term_meta( 'podcasting_podcasts', 'podcasting_image_url', array( 'show_in_rest' => true, 'type' => 'string', 'single' => true, 'auth_callback' => 'podcasting_term_auth_callback', 'sanitize_callback' => function ( $val ) { return filter_var( $val, FILTER_VALIDATE_URL ); }, ) ); } add_action( 'init', __NAMESPACE__ . '\register_meta' ); /** * Podcasting term meta generic auth callback. * * @return boolean */ function podcasting_term_auth_callback() { if ( current_user_can( 'manage_categories' ) ) { return true; } return false; } /** * Add a custom podcasts taxonomy. */ function create_podcasts_taxonomy() { register_taxonomy( PODCASTING_TAXONOMY_NAME, 'post', array( 'labels' => array( 'name' => __( 'Podcasts', 'simple-podcasting' ), 'singular_name' => __( 'Podcast', 'simple-podcasting' ), 'search_items' => __( 'Search Podcasts', 'simple-podcasting' ), 'all_items' => __( 'All Podcasts', 'simple-podcasting' ), 'parent_item' => __( 'Parent Podcast', 'simple-podcasting' ), 'parent_item_colon' => __( 'Parent Podcast:', 'simple-podcasting' ), 'edit_item' => __( 'Edit Podcast', 'simple-podcasting' ), 'view_item' => __( 'View Podcast', 'simple-podcasting' ), 'update_item' => __( 'Update Podcast', 'simple-podcasting' ), 'add_new_item' => __( 'Add New Podcast', 'simple-podcasting' ), 'new_item_name' => __( 'New Podcast Name', 'simple-podcasting' ), 'add_or_remove_items' => __( 'Add or remove podcasts', 'simple-podcasting' ), 'not_found' => __( 'No podcasts found', 'simple-podcasting' ), 'no_terms' => __( 'No podcasts', 'simple-podcasting' ), 'items_list_navigation' => __( 'Podcasts list navigation', 'simple-podcasting' ), 'items_list' => __( 'Podcasts list', 'simple-podcasting' ), 'back_to_items' => __( '← Back to Podcasts', 'simple-podcasting' ), ), 'hierarchical' => true, 'show_tagcloud' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => false, 'show_in_rest' => true, 'show_in_nav_menus' => false, 'show_admin_column' => true, 'rewrite' => array( 'slug' => 'podcasts' ), ) ); } add_action( 'init', __NAMESPACE__ . '\create_podcasts_taxonomy' ); /** * Filter the menu so podcasts are parent-less. * * @param string $file Url to the parent page. * * @return string */ function filter_parent_file( $file ) { $screen = get_current_screen(); if ( ( 'edit-tags' === $screen->base || 'term' === $screen->base ) && 'podcasting_podcasts' === $screen->taxonomy ) { return 'edit-tags.php?taxonomy=podcasting_podcasts&podcasts=true'; } return $file; } add_filter( 'parent_file', __NAMESPACE__ . '\filter_parent_file' ); /** * Add "Podcasts" as its own top level menu item. */ function add_top_level_menu() { remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=podcasting_podcasts' ); add_menu_page( __( 'Podcasts', 'simple-podcasting' ), __( 'Podcasts', 'simple-podcasting' ), 'manage_options', 'edit-tags.php?taxonomy=podcasting_podcasts&podcasts=true', null, 'dashicons-microphone', 13 ); } add_action( 'admin_menu', __NAMESPACE__ . '\add_top_level_menu' ); /** * Display some help for next steps on the podcast taxonomy screen. */ function add_podcasting_taxonomy_help_text() { echo '

'; esc_html_e( 'Once at least one podcast exists, you can add episodes by creating a post, assigning it to the appropriate podcast, and inserting an audio player or podcast block into the content of the post. You can then submit the feed URL to podcast directories.', 'simple-podcasting' ); echo '

'; } add_action( 'after-podcasting_podcasts-table', __NAMESPACE__ . '\add_podcasting_taxonomy_help_text' ); /** * Returns array of supported podcast platforms. * * @return array */ function get_supported_platforms() { $platforms = array( 'pocket-casts' => array( 'slug' => 'pocket-casts', 'title' => esc_html__( 'Pocket Casts', 'simple-podcasting' ), ), 'apple-podcasts' => array( 'slug' => 'apple-podcasts', 'title' => esc_html__( 'Apple Podcasts', 'simple-podcasting' ), ), 'google-podcasts' => array( 'slug' => 'google-podcasts', 'title' => esc_html__( 'Google Podcasts', 'simple-podcasting' ), ), 'stitcher' => array( 'slug' => 'stitcher', 'title' => esc_html__( 'Stitcher', 'simple-podcasting' ), ), 'playerfm' => array( 'slug' => 'playerfm', 'title' => esc_html__( 'PlayerFM', 'simple-podcasting' ), ), 'overcast' => array( 'slug' => 'overcast', 'title' => esc_html__( 'Overcast', 'simple-podcasting' ), ), 'pandora' => array( 'slug' => 'pandora', 'title' => esc_html__( 'Pandora', 'simple-podcasting' ), ), 'castro' => array( 'slug' => 'castro', 'title' => esc_html__( 'Castro', 'simple-podcasting' ), ), 'tunein' => array( 'slug' => 'tunein', 'title' => esc_html__( 'TuneIn', 'simple-podcasting' ), ), 'spotify' => array( 'slug' => 'spotify', 'title' => esc_html__( 'Spotify', 'simple-podcasting' ), ), ); return apply_filters( 'simple_podcasting_get_supported_platforms', $platforms ); } /** * Renders the terms fields for platforms * * @param array $field The field data. * @param string $value The existing field value. * @param boolean $term_id The term id, or false for the new term form. */ function render_platform_fields( $field, $value, $term_id ) { $theme = get_term_meta( $term_id, 'podcasting_icon_theme', true ); if ( empty( $theme ) ) { $theme = 'color'; } $platforms = get_supported_platforms(); ?> $platform ) : ?>
array( 'name' => array(), 'id' => array(), ), 'optgroup' => array( 'label' => array(), ), 'option' => array( 'value' => array(), 'lang' => array(), 'data-installed' => array(), 'selected' => array(), ), ) ); break; case 'textfield': ?>

cap->edit_terms ) ) { return; } if ( empty( $_POST['podcasting_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['podcasting_nonce'] ) ), 'podcasting_edit' ) ) { return; } $podcasting_meta_fields = get_meta_fields(); foreach ( $podcasting_meta_fields as $field ) { $slug = $field['slug']; if ( isset( $_POST[ $slug ] ) ) { if ( is_array( $_POST[ $slug ] ) ) { $sanitized_value = filter_var_array( $_POST[ $slug ], // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash array( 'pocket-casts' => FILTER_SANITIZE_URL, 'apple-podcasts' => FILTER_SANITIZE_URL, 'google-podcasts' => FILTER_VALIDATE_URL, 'stitcher' => FILTER_VALIDATE_URL, 'playerfm' => FILTER_VALIDATE_URL, 'overcast' => FILTER_VALIDATE_URL, 'pandora' => FILTER_VALIDATE_URL, 'castro' => FILTER_VALIDATE_URL, 'tunein' => FILTER_VALIDATE_URL, 'spotify' => FILTER_VALIDATE_URL, ) ); } else { $sanitized_value = sanitize_text_field( wp_unslash( $_POST[ $slug ] ) ); } // If the field is an image field, store the image URL along with the slug. if ( strpos( $slug, '_image' ) ) { $image_url = wp_get_attachment_url( (int) $sanitized_value ); update_term_meta( $term_id, $slug . '_url', $image_url ); } update_term_meta( $term_id, $slug, $sanitized_value ); } } } add_action( 'edited_' . PODCASTING_TAXONOMY_NAME, __NAMESPACE__ . '\save_podcasting_term_meta' ); add_action( 'created_' . PODCASTING_TAXONOMY_NAME, __NAMESPACE__ . '\save_podcasting_term_meta' ); /** * Add podcasting fields to the term screen. * * @param \WP_Term $term The term object. */ function add_podcasting_term_edit_meta_fields( $term ) { $podcasting_meta_fields = get_meta_fields(); ?> term_id, $field['slug'], true ); $value = $value ? $value : ''; ?>
term_id ); ?>
.term-description-wrap{ display: none; } '; wp_nonce_field( 'podcasting_edit', 'podcasting_nonce' ); wp_enqueue_media(); if ( $taxonomy ) { $url = get_term_feed_link( $term->term_id, PODCASTING_TAXONOMY_NAME ); esc_html_e( 'Your Podcast Feed: ', 'simple-podcasting' ); echo '' . esc_url( $url ) . '
'; esc_html_e( 'This is the URL you submit to iTunes or podcasting service.', 'simple-podcasting' ); } } add_action( PODCASTING_TAXONOMY_NAME . '_add_form_fields', __NAMESPACE__ . '\add_podcasting_term_meta_nonce' ); add_action( PODCASTING_TAXONOMY_NAME . '_edit_form_fields', __NAMESPACE__ . '\add_podcasting_term_meta_nonce', 99, 2 ); add_action( PODCASTING_TAXONOMY_NAME . '_edit_form', __NAMESPACE__ . '\add_podcasting_term_edit_meta_fields' ); add_action( PODCASTING_TAXONOMY_NAME . '_add_form_fields', __NAMESPACE__ . '\add_podcasting_term_add_meta_fields' ); /** * Add a feed link to the podcasting term table. * * @param string $content Blank string. * @param string $column_name Name of the column. * @param int $term_id Term ID. * * @return string */ function add_podcasting_term_feed_link_column( $content, $column_name, $term_id ) { if ( 'feedurl' === $column_name ) { $url = get_term_feed_link( $term_id, PODCASTING_TAXONOMY_NAME ); echo '' . esc_url( $url ) . ''; } return $content; } add_filter( 'manage_' . PODCASTING_TAXONOMY_NAME . '_custom_column', __NAMESPACE__ . '\add_podcasting_term_feed_link_column', 10, 3 ); /** * Add a podcasting image to the podcasting term table. * * @param string $content Blank string. * @param string $column_name Name of the column. * @param int $term_id Term ID. * * @return string */ function add_podcasting_term_podcasting_image_column( $content, $column_name, $term_id ) { if ( 'podcasting_image' === $column_name ) { $image = get_term_meta( $term_id, 'podcasting_image', true ); echo wp_get_attachment_image( $image, 'thumbnail' ); } return $content; } add_filter( 'manage_' . PODCASTING_TAXONOMY_NAME . '_custom_column', __NAMESPACE__ . '\add_podcasting_term_podcasting_image_column', 10, 3 ); /** * Add a custom column for the podcast feed link. * * @param array $columns An array of columns * * @return array */ function add_custom_term_columns( $columns ) { $columns = array_merge( array( 'podcasting_image' => __( 'Podcast Cover', 'simple-podcasting' ), ), $columns, array( 'feedurl' => __( 'Feed URL', 'simple-podcasting' ), ) ); unset( $columns['description'] ); unset( $columns['author'] ); return $columns; } add_filter( 'manage_edit-' . PODCASTING_TAXONOMY_NAME . '_columns', __NAMESPACE__ . '\add_custom_term_columns', 99 ); /** * Get the meta fields used for podcasts. */ function get_meta_fields() { return array( array( 'slug' => 'podcasting_subtitle', 'title' => __( 'Subtitle', 'simple-podcasting' ), 'type' => 'textfield', ), array( 'slug' => 'podcasting_talent_name', 'title' => __( 'Artist / Author name (required)', 'simple-podcasting' ), 'type' => 'textfield', ), array( 'slug' => 'podcasting_email', 'title' => __( 'Podcast email', 'simple-podcasting' ), 'type' => 'textfield', ), array( 'slug' => 'podcasting_summary', 'title' => __( 'Summary (required)', 'simple-podcasting' ), 'type' => 'textarea', ), array( 'slug' => 'podcasting_copyright', 'title' => __( 'Copyright / License information', 'simple-podcasting' ), 'type' => 'textfield', ), array( 'slug' => 'podcasting_explicit', 'title' => __( 'Mark as explicit', 'simple-podcasting' ), 'type' => 'select', 'options' => array( 'No', 'Yes', 'Clean', ), ), array( 'slug' => 'podcasting_language', 'title' => __( 'Language', 'simple-podcasting' ), 'type' => 'language', 'data' => get_podcasting_language_options(), ), array( 'slug' => 'podcasting_image', 'title' => __( 'Cover image (required)', 'simple-podcasting' ), 'type' => 'image', 'description' => __( 'Minimum size: 1400px x 1400 px — maximum size: 2048px x 2048px', 'simple-podcasting' ), ), array( 'slug' => 'podcasting_keywords', 'title' => __( 'Keywords', 'simple-podcasting' ), 'type' => 'textfield', 'description' => __( 'Comma-separated keywords to help people find your podcast.', 'simple-podcasting' ), ), array( 'slug' => 'podcasting_type_of_show', 'title' => __( 'Type of show', 'simple-podcasting' ), 'type' => 'select', 'options' => array( 0 => __( 'n/a', 'simple-podcasting' ), 'episodic' => __( 'Episodic', 'simple-podcasting' ), 'serial' => __( 'Serial', 'simple-podcasting' ), ), ), array( 'slug' => 'podcasting_category_1', 'title' => __( 'Category 1 (required)', 'simple-podcasting' ), 'type' => 'select', 'options' => get_podcasting_categories_options(), ), array( 'slug' => 'podcasting_category_2', 'title' => __( 'Category 2', 'simple-podcasting' ), 'type' => 'select', 'options' => get_podcasting_categories_options(), ), array( 'slug' => 'podcasting_category_3', 'title' => __( 'Category 3', 'simple-podcasting' ), 'type' => 'select', 'options' => get_podcasting_categories_options(), ), array( 'slug' => 'podcasting_platforms', 'title' => __( 'Podcasting Platforms', 'simple-podcasting' ), 'type' => 'platform_fields', ), array( 'slug' => 'podcasting_icon_theme', 'title' => __( 'Podcasting Platforms icon theme', 'simple-podcasting' ), 'type' => 'radio', 'options' => array( array( 'label' => 'Color', 'value' => 'color', ), array( 'label' => 'Black', 'value' => 'black', ), array( 'label' => 'White', 'value' => 'white', ), ), ), ); } /** * Get array of podcasting categories. * * Podcasting category names are not translated because they need to be provided in English. * * @return array Array of podcasting categories. */ function get_podcasting_categories() { // phpcs:disable WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned -- keep nested array readable return array( 'arts' => array( 'name' => 'Arts', 'subcategories' => array( 'design' => 'Design', 'fashion-beauty' => 'Fashion & Beauty', 'food' => 'Food', 'books' => 'Books', 'performing-arts' => 'Performing Arts', 'visual-arts' => 'Visual Arts', ), ), 'business' => array( 'name' => 'Business', 'subcategories' => array( 'careers' => 'Careers', 'entrepreneurship' => 'Entrepreneurship', 'investing' => 'Investing', 'management' => 'Management', 'marketing' => 'Marketing', 'non-profit' => 'Non-Profit', ), ), 'comedy' => array( 'name' => 'Comedy', 'subcategories' => array( 'comedy-interviews' => 'Comedy Interviews', 'improv' => 'Improv', 'stand-up' => 'Stand-Up', ), ), 'education' => array( 'name' => 'Education', 'subcategories' => array( 'courses' => 'Courses', 'how-to' => 'How-To', 'language-learning' => 'Language Learning', 'self-improvment' => 'Self-Improvement', ), ), 'fiction' => array( 'name' => 'Fiction', 'subcategories' => array( 'comedy-fiction' => 'Comedy Fiction', 'drama' => 'Drama', 'science-fiction' => 'Science Fiction', ), ), 'leisure' => array( 'name' => 'Leisure', 'subcategories' => array( 'animation-manga' => 'Animation & Manga', 'automotive' => 'Automotive', 'aviation' => 'Aviation', 'crafts' => 'Crafts', 'hobbies' => 'Hobbies', 'home-garden' => 'Home & Garden', 'games' => 'Games', 'video-games' => 'Video Games', ), ), 'government' => array( 'name' => 'Government', 'subcategories' => array( 'local' => 'Local', 'national' => 'National', 'regional' => 'Regional', ), ), 'health-fitness' => array( 'name' => 'Health & Fitness', 'subcategories' => array( 'alternative-health' => 'Alternative Health', 'fitness' => 'Fitness', 'medicine' => 'Medicine', 'mental-health' => 'Mental Health', 'nutrition' => 'Nutrition', 'sexuality' => 'Sexuality', ), ), 'history' => array( 'name' => 'History', ), 'kids-family' => array( 'name' => 'Kids & Family', 'subcategories' => array( 'education-for-kids' => 'Education for Kids', 'parenting' => 'Parenting', 'pets-animals' => 'Pets & Animals', 'stories-for-kids' => 'Stories for Kids', ), ), 'music' => array( 'name' => 'Music', 'subcategories' => array( 'music-commentary' => 'Music Commentary', 'music-history' => 'Music History', 'music-interviews' => 'Music Interviews', ), ), 'news' => array( 'name' => 'News', 'subcategories' => array( 'business-news' => 'Business News', 'daily-news' => 'Daily News', 'entertainment-news' => 'Entertainment News', 'news-commentary' => 'News Commentary', 'politics' => 'Politics', 'sports-news' => 'Sports News', 'tech-news' => 'Tech News', ), ), 'religion-spirituality' => array( 'name' => 'Religion & Spirituality', 'subcategories' => array( 'buddhism' => 'Buddhism', 'christianity' => 'Christianity', 'hinduism' => 'Hinduism', 'islam' => 'Islam', 'judaism' => 'Judaism', 'religion' => 'Religion', 'spirituality' => 'Spirituality', ), ), 'science' => array( 'name' => 'Science', 'subcategories' => array( 'astronomy' => 'Astronomy', 'chemistry' => 'Chemistry', 'earth-sciences' => 'Earth Sciences', 'life-sciences' => 'Life Sciences', 'mathematics' => 'Mathematics', 'nature' => 'Nature', 'natural-sciences' => 'Natural Sciences', 'physics' => 'Physics', 'social-sciences' => 'Social Sciences', ), ), 'society-culture' => array( 'name' => 'Society & Culture', 'subcategories' => array( 'documentary' => 'Documentary', 'personal-journals' => 'Personal Journals', 'philosophy' => 'Philosophy', 'places-travel' => 'Places & Travel', 'relationships' => 'Relationships', ), ), 'sports' => array( 'name' => 'Sports', 'subcategories' => array( 'baseball' => 'Baseball', 'basketball' => 'Basketball', 'cricket' => 'Cricket', 'fantasy-sports' => 'Fantasy Sports', 'football' => 'Football', 'golf' => 'Golf', 'hockey' => 'Hockey', 'rugby' => 'Rugby', 'soccer' => 'Soccer', 'swimming' => 'Swimming', 'tennis' => 'Tennis', 'volleyball' => 'Volleyball', 'wilderness' => 'Wilderness', 'wrestling' => 'Wrestling', ), ), 'technology' => array( 'name' => 'Technology', 'subcategories' => array( 'education' => 'Education', 'gadgets' => 'Gadgets', 'podcasting' => 'Podcasting', 'software-how-to' => 'Software How-To', ), ), 'true-crime' => array( 'name' => 'True Crime', ), 'tv-film' => array( 'name' => 'TV & Film', 'subcategories' => array( 'after-shows' => 'After Shows', 'film-history' => 'Film History', 'film-interviews' => 'Film Interviews', 'film-reviews' => 'Film Reviews', 'tv-reviews' => 'TV Reviews', ), ), ); // phpcs:enable WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned } /** * Transform podcasting categories into dropdown options */ function get_podcasting_categories_options() { $to_return = array( '' => __( 'None', 'simple-podcasting' ) ); $categories = get_podcasting_categories(); foreach ( $categories as $key => $category ) { $to_return[ $key ] = $category['name']; if ( ! empty( $category['subcategories'] ) ) { foreach ( $category['subcategories'] as $subkey => $subcategory ) { $to_return[ "$key:$subkey" ] = '— ' . $subcategory; } } } return $to_return; } /** * Return the list of available languages. * * @see wp_dropdown_languages() * * @return string */ function get_podcasting_language_options() { $lang = ''; if ( is_admin() ) { global $tag_ID; // WPCS: @codingStandardsIgnoreLine - we can't control WP global names. // Are we on the term edit screen? $term_id = $tag_ID; // WPCS: @codingStandardsIgnoreLine - we can't control WP global names. if ( $term_id ) { $lang = get_term_meta( $term_id, 'podcasting_language', true ); } } return \wp_dropdown_languages( array( 'echo' => false, 'name' => 'podcasting_language', 'selected' => $lang, ) ); } ================================================ FILE: includes/helpers.php ================================================ $mime ) { if ( preg_match( '!^(' . $exts . ')$!i', $extension ) ) { $type = $mime; break; } } } } if ( in_array( substr( $type, 0, strpos( $type, '/' ) ), $allowed_types, true ) ) { $podcast_meta['url'] = esc_url_raw( $url ); $podcast_meta['mime'] = $type; $podcast_meta['duration'] = $duration; $podcast_meta['filesize'] = $len; } return $podcast_meta; } } /** * Delete all podcast meta for a post. * * @param int $post_id Post ID. */ function delete_all_podcast_meta( $post_id ) { if ( metadata_exists( 'post', $post_id, 'podcast_url' ) ) { delete_post_meta( $post_id, 'podcast_url' ); delete_post_meta( $post_id, 'podcast_filesize' ); delete_post_meta( $post_id, 'podcast_duration' ); delete_post_meta( $post_id, 'podcast_mime' ); delete_post_meta( $post_id, 'podcast_captioned' ); delete_post_meta( $post_id, 'podcast_explicit' ); delete_post_meta( $post_id, 'enclosure' ); delete_post_meta( $post_id, 'podcast_season_number' ); delete_post_meta( $post_id, 'podcast_episode_number' ); delete_post_meta( $post_id, 'podcast_episode_type' ); } } ================================================ FILE: includes/post-meta-box.php ================================================ true, ) ); } add_action( 'add_meta_boxes', __NAMESPACE__ . '\add_podcasting_meta_box' ); /** * Output the Podcasting meta box. * * @param object WP_Post $post The current post. */ function meta_box_html( $post ) { $podcast_url = get_post_meta( $post->ID, 'podcast_url', true ); $podcast_explicit = get_post_meta( $post->ID, 'podcast_explicit', true ); $podcast_captioned = get_post_meta( $post->ID, 'podcast_captioned', true ); $season_number = get_post_meta( $post->ID, 'podcast_season_number', true ); $episode_number = get_post_meta( $post->ID, 'podcast_episode_number', true ); $episode_type = get_post_meta( $post->ID, 'podcast_episode_type', true ); $episode_cover = has_post_thumbnail( $post->ID ) ? get_the_post_thumbnail_url( $post->ID, 'thumbnail' ) : ''; wp_nonce_field( plugin_basename( __FILE__ ), 'simple-podcasting' ); ?>

>
>
>
>

<?php esc_attr_e( 'Cover Art', 'simple-podcasting' ); ?>

post_content, $matches ) && array_key_exists( 2, $matches ) && in_array( 'audio', $matches[2], true ) ) { preg_match( '/.*mp3=\\"(.*)\\".*/', $matches[0][0], $matches2 ); if ( isset( $matches2[1] ) ) { $url = $matches2[1]; } } } /** * Retrieve the enclosure and store its metadata in post meta. * * @todo only retrieve enclosure metadata when a podcasting term id is selected and the url has changed. */ if ( $url ) { $podcast_meta = \tenup_podcasting\helpers\get_podcast_meta_from_url( $url ); if ( ! empty( $podcast_meta ) ) { update_post_meta( $post_id, 'podcast_url', $podcast_meta['url'] ); update_post_meta( $post_id, 'podcast_filesize', $podcast_meta['filesize'] ); update_post_meta( $post_id, 'podcast_duration', $podcast_meta['duration'] ); update_post_meta( $post_id, 'podcast_mime', $podcast_meta['mime'] ); // Add enclosure meta data $enclosure = $podcast_meta['url'] . "\n" . $podcast_meta['filesize'] . "\n" . $podcast_meta['mime']; update_post_meta( $post_id, 'enclosure', $enclosure ); } } update_post_meta( $post_id, 'podcast_explicit', $podcast_explicit ); update_post_meta( $post_id, 'podcast_captioned', $podcast_captioned ); update_post_meta( $post_id, 'podcast_season_number', $season_number ); update_post_meta( $post_id, 'podcast_episode_number', $episode_number ); update_post_meta( $post_id, 'podcast_episode_type', $episode_type ); } add_action( 'save_post_post', __NAMESPACE__ . '\save_meta_box' ); /** * Enqueue helper script for the post edit and new post screens. * * @param string $hook_suffix The current admin page. */ function edit_post_enqueues( $hook_suffix ) { $screens = array( 'post.php', 'post-new.php', ); if ( ! in_array( $hook_suffix, $screens, true ) ) { return; } wp_enqueue_script( 'podcasting_edit_post_screen', PODCASTING_URL . 'dist/podcasting-edit-post.js', array( 'jquery' ), PODCASTING_VERSION, true ); } add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\edit_post_enqueues' ); ================================================ FILE: includes/rest-external-url.php ================================================ \WP_REST_Server::READABLE, 'callback' => __NAMESPACE__ . '\handle_request', 'permission_callback' => function () { return true; }, 'args' => array( 'url' => array( 'required' => true, 'sanitize_callback' => 'sanitize_text_field', ), ), ) ); } /** * Callbakc for the external-url endpoint. * * @param \WP_REST_Request $request The API request * * @return mixed|\WP_REST_Response */ function handle_request( \WP_REST_Request $request ) { $url = $request['url']; $cache_key = 'spc_external_url_' . $url; $podcast_meta = get_transient( $cache_key ); if ( false === $podcast_meta ) { if ( filter_var( $url, FILTER_VALIDATE_URL ) ) { $podcast_meta = \tenup_podcasting\helpers\get_podcast_meta_from_url( $url ); if ( $podcast_meta ) { $response = array( 'success' => true, 'data' => $podcast_meta, ); set_transient( $cache_key, $podcast_meta, MONTH_IN_SECONDS ); // We add the long expiry so we don't autoload the option in a non-object-cached env. } } else { $response = array( 'success' => false, 'message' => 'Invalid URL parameter passed', ); } } else { $response = array( 'success' => true, 'data' => $podcast_meta, ); } return rest_ensure_response( $response ); } ================================================ FILE: includes/transcripts.php ================================================ term_id ) ) . $post->post_name . '/transcript/'; } /** * Adds