{"id":18798977,"url":"https://github.com/cncf/china-video-block","last_synced_at":"2025-04-13T17:22:35.701Z","repository":{"id":34870649,"uuid":"185022989","full_name":"cncf/china-video-block","owner":"cncf","description":"🇨🇳🎬🧱Wordpress Gutenberg plugin to offer the same video via qq or YouTube depending on browser IP address","archived":false,"fork":false,"pushed_at":"2025-03-29T04:08:24.000Z","size":658,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-10T18:42:50.799Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://wordpress.org/plugins/china-video-block/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cncf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-05T11:36:03.000Z","updated_at":"2025-02-23T03:27:47.000Z","dependencies_parsed_at":"2023-01-15T09:46:11.185Z","dependency_job_id":null,"html_url":"https://github.com/cncf/china-video-block","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cncf%2Fchina-video-block","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cncf%2Fchina-video-block/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cncf%2Fchina-video-block/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cncf%2Fchina-video-block/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cncf","download_url":"https://codeload.github.com/cncf/china-video-block/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248750869,"owners_count":21155797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T22:13:37.595Z","updated_at":"2025-04-13T17:22:35.696Z","avatar_url":"https://github.com/cncf.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![WordPress Plugin: Required WP Version](https://img.shields.io/wordpress/plugin/wp-version/china-video-block)\n\n# China Video Block\nThis is a WordPress plugin which contains a Gutenberg block.  The block allows for embedding a video in a WordPress post or page.  If the user who views the page is in China, a different video will show from users in the rest of the world.  This is to appropriately deal with China's Internet wall which blocks YouTube and other video platforms.\n\n# Plugin Development Environment\n\nThis repo ships with its own wp-env ready to fire up a local development environment.\n\nMake sure you have node installed. Go to command line and check your version to confirm. We recommend nodejs 20.16.0.\n\n```\nnode -v\n```\n\nInstall wp-env package as a global node package.\n\n```\nnpm -g i @wordpress/env\n```\n\nThe -g flag means global so you can then run wp-env commands from anywhere on your system.\n\nAfter installation, at your command line check your version to confirm.\n\n```\nwp-env --version\n```\n\nGo to your working directory where the plugin code lives. Then start the env:\n\n```\nwp-env start\n```\n\nIf changing the wp-env.json file or encountering problems, run:\n\n```\nwp-env start --update\n```\n\nYou can also run the start command again for the environment to reload:\n\n```\nwp-env start\n```\n\nIf you want to get more details about what the wp-env command is doing, add `--debug` after the command, i.e.\n\n```\nwp-env start --debug\n```\n\n## NPM\n\nTo install npm packages:\n\n```\nnpm install\n```\n\nTo start development:\n\n```\nnpm start\n```\n\nThis will compile and run the block in development mode. Watches for any changes and reports back any errors in your code.\n\nTo build your code:\n\n```\nnpm run build\n```\n\nUse to build production code for your block inside `build` folder. Runs once. Run this before releasing a new version.\n\nYou also have access to other wp-scripts commands, run `npm run` to see them.\n\n## Composer\n\nTo install composer packages:\n\n```\nwp-env run cli --env-cwd=wp-content/plugins/china-video-block composer install\n```\n\nOnce installed, you can then multiple commands. To run sniffs:\n\n```\nwp-env run cli --env-cwd=wp-content/plugins/china-video-block composer run-script sniff\n```\n\nTo fix sniffs:\n\n```\nwp-env run cli --env-cwd=wp-content/plugins/china-video-block composer run-script fix\n```\n\nTo check PHP Compatibility:\n\n```\nwp-env run cli --env-cwd=wp-content/plugins/china-video-block composer run-script version-checks\n```\n\n## WP CLI Commands\n\nYou can run WP-CLI commands by prefixing the wp command like so:\n\n```\nwp-env run cli wp\n```\n\n## Logging in to the WordPress ENV\n\nTo login to the WordPress, use:\n\n```\nlocalhost:8828/wp-admin\n```\n\nUsername: admin\nPassword: password\n\nDon't upgrade plugins and WordPress core inside WordPress, make any updates in the `.wp-env.json` file and then run `wp env start` or `wp-env start --update`. This will download and install the updates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcncf%2Fchina-video-block","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcncf%2Fchina-video-block","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcncf%2Fchina-video-block/lists"}