{"id":16173359,"url":"https://github.com/rarst/update-blocker","last_synced_at":"2025-03-16T10:30:57.432Z","repository":{"id":18031202,"uuid":"21069437","full_name":"Rarst/update-blocker","owner":"Rarst","description":"Lightweight generic blocker of updates from official WordPress repositories.","archived":false,"fork":false,"pushed_at":"2016-09-03T18:25:09.000Z","size":11,"stargazers_count":53,"open_issues_count":0,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-17T08:50:34.272Z","etag":null,"topics":["wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mtoyoda/sl","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rarst.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-21T13:45:42.000Z","updated_at":"2024-08-30T01:04:12.000Z","dependencies_parsed_at":"2022-08-26T10:11:55.634Z","dependency_job_id":null,"html_url":"https://github.com/Rarst/update-blocker","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rarst%2Fupdate-blocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rarst%2Fupdate-blocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rarst%2Fupdate-blocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rarst%2Fupdate-blocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rarst","download_url":"https://codeload.github.com/Rarst/update-blocker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221662696,"owners_count":16859732,"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":["wordpress","wordpress-plugin"],"created_at":"2024-10-10T04:08:30.303Z","updated_at":"2024-10-27T10:25:14.354Z","avatar_url":"https://github.com/Rarst.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Update Blocker — for WP repositories\n\nUpdate Blocker is a lightweight generic blocker of plugin, theme, and core updates from official WordPress repositories.\n\nIt was created as shared reusable plugin for the sake of no longer reinventing that particular wheel.\n\n### Goals\n\n - single main file\n - `mu-plugins`–friendly\n - no hard dependencies\n\n### Not goals\n\n - interface\n - elaborate API\n - as–library use\n - unreasonable compat\n\n## Installation\n\n### Plugin\n\n1. [Download ZIP](https://github.com/Rarst/update-blocker/archive/master.zip).\n2. Unpack files from inside into `wp-content/plugins/update-blocker`.\n\n### MU-plugin\n\n1. [Download `update-blocker.php`](https://raw.githubusercontent.com/Rarst/update-blocker/master/update-blocker.php).\n2. Place into `wp-content/mu-plugins`.\n3. Edit settings for blocks in the file.\n\n### Composer\n\nCreate project in the `wp-content/plugins`:\n\n```\ncomposer create-project rarst/update-blocker:~1.0\n```\n\nOr require in `composer.json` of site project:\n\n```json\n{\n\t\"require\": {\n\t\t\"rarst/update-blocker\": \"~1.0\"\n\t}\n}\n```\n\nRequiring on plugin/theme level is not implemented, use `suggest`:\n\n```json\n{\n\t\"suggest\": {\n\t\t\"rarst/update-blocker\": \"Prevents invalid updates from official repositories\"\n\t}\n}\n```\n\n## Configuration\n\nPlugin's settings have following structure:\n\n```php\narray(\n\t'all'     =\u003e false,\n\t'files'   =\u003e array( '.git', '.svn', '.hg' ),\n\t'plugins' =\u003e array( 'update-blocker/update-blocker.php' ),\n\t'themes'  =\u003e array(),\n\t'core'    =\u003e false,\n)\n```\n\n - `all` — boolean, disables updates completely\n - `files` — array of plugin/theme root–relative files to detect for block\n - `plugins` — array of plugin base names (`folder-name/plugin-name.php`) to block\n - `themes` — array of theme slugs (`theme-name`) to block\n - `core` — boolean, disables core updates\n\nSettings pass through `update_blocker_blocked` filter.\n\nProcessed data passes through `update_blocker_plugins` and `update_blocker_themes` filters during update checks.\n\n### Plugin opt–in\n\n```php\nadd_filter( 'update_blocker_blocked', function( $blocked ) {\n\t$blocked['plugins'][] = plugin_basename( __FILE__ ); // or just folder-name/plugin-name.php string\n\treturn $blocked;\n} );\n```\n\n### Theme opt–in\n\n```php\nadd_filter( 'update_blocker_blocked', function( $blocked ) {\n\t$blocked['themes'][] = 'theme-name';\n\treturn $blocked;\n} );\n```\n\n### Core opt–in\n\n```php\nadd_filter( 'update_blocker_blocked', function ( $blocked ) {\n\t$blocked['core'] = true;\n\treturn $blocked;\n} );\n```\n\n## License\n\n - MIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frarst%2Fupdate-blocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frarst%2Fupdate-blocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frarst%2Fupdate-blocker/lists"}