{"id":19439783,"url":"https://github.com/disqus/disqus-wordpress-plugin","last_synced_at":"2025-05-12T03:32:18.146Z","repository":{"id":14299705,"uuid":"76284289","full_name":"disqus/disqus-wordpress-plugin","owner":"disqus","description":"WordPress plugin for Disqus (Latest version)","archived":false,"fork":false,"pushed_at":"2024-10-30T20:19:41.000Z","size":4207,"stargazers_count":34,"open_issues_count":34,"forks_count":22,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-31T23:51:10.771Z","etag":null,"topics":["php","react","typescript","wordpress"],"latest_commit_sha":null,"homepage":"https://disqus.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/disqus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-12T18:34:22.000Z","updated_at":"2025-01-08T22:01:01.000Z","dependencies_parsed_at":"2024-02-16T00:34:17.616Z","dependency_job_id":"45dcad9f-c5fe-477d-a7c7-35ea45a69601","html_url":"https://github.com/disqus/disqus-wordpress-plugin","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disqus%2Fdisqus-wordpress-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disqus%2Fdisqus-wordpress-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disqus%2Fdisqus-wordpress-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/disqus%2Fdisqus-wordpress-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/disqus","download_url":"https://codeload.github.com/disqus/disqus-wordpress-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253668125,"owners_count":21944986,"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":["php","react","typescript","wordpress"],"created_at":"2024-11-10T15:26:43.251Z","updated_at":"2025-05-12T03:32:17.462Z","avatar_url":"https://github.com/disqus.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Disqus WordPress Plugin\n\n## Local Testing\n\nThere's a Docker configuration to bootstrap a local WordPress installation. To start it:\n\n- You'll need both [Docker](https://docs.docker.com/install/) and [yarn](https://yarnpkg.com/) installed on your local machine.\n- From the root directory, run `$ yarn` to install the frontend dependencies.\n- Once that's done, run `$ make run` to build the docker image.\n- Install wordpress with the default values by running `$ make install`.\n- Activate the Disqus plugin using `$ make activate`.\n- Alternatively you can now complete configuration by going to: http://localhost:8888/wp-admin/install.php\n- Otherwise you can continue to: http://localhost:8888/\n\n### Unit tests\n\nTo run unit tests locally:\n\n- Run `$ make docker-test`.\n\nThis will run all frontend (Jest) and backend (PHPUnit) tests.\n\n## Installing to existing WordPress site\n\nTo install the plugin on an existing WordPress site, you'll need to build the frontend and create a .zip file:\n\n- Make sure you have [yarn](https://yarnpkg.com/) installed on your local machine.\n- From the root directory, run `$ make dist`.\n- From your WordPress plugin page, select Plugins-\u003eAdd New-\u003eUpload Plugin and choose the `disqus.zip` file you created.\n- Activate the plugin and then install using the instructions in the plugin.\n\n## Custom Filters\n\n### dsq_can_load\n\nYou can override when Disqus loads on a certain page using the `dsq_can_load` filter. By default Disqus won't load scripts on:\n- On RSS feed pages\n- If the `shortname` is missing from the configuration\n\nAdditionally Disqus will not load the embed.js script:\n- On pages that are not 'post' or 'page' types\n- Posts or pages that have comment turned off\n- Draft posts\n\nThe filter will pass one argument, the `$script_name` enumeration, which can be:\n- `'count'` — The count.js script file for showing comment counts next to a link\n- `'embed'` — The commenting embed.js file\n\nIn this example, you can add a filter which disables the comment count script, while still allowing the comments embed to load:\n\n```php\nfunction filter_dsq_can_load( $script_name ) {\n    // $script_name is either 'count' or 'embed'.\n\tif ( 'count' === $script_name ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\nadd_filter( 'dsq_can_load', 'filter_dsq_can_load' );\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisqus%2Fdisqus-wordpress-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdisqus%2Fdisqus-wordpress-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdisqus%2Fdisqus-wordpress-plugin/lists"}