Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ jobs:
cp LICENSE integrate-rybbit/

- name: Deploy to WordPress.org
uses: 10up/action-wordpress-plugin-deploy@stable
uses: 10up/action-wordpress-plugin-deploy@2.3.0
id: deploy
with:
generate-zip: true
Expand Down
11 changes: 11 additions & 0 deletions integrate-rybbit/integrate-rybbit.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@
// Initialize main plugin class
new Integrate_Rybbit();

// Enable auto-updates toggle for WordPress.org plugins (WordPress 5.5+)
// This allows users to enable/disable automatic updates via the Plugins page
add_filter('auto_update_plugin', function($update, $item) {
if (isset($item->plugin) && $item->plugin === INTEGRATE_RYBBIT_PLUGIN_BASENAME) {
// Return true to enable auto-updates, false to disable
// null means let WordPress use the default/user preference
return $update;
}
return $update;
}, 10, 2);

// Initialize context-specific logic
if (is_admin()) {
new Integrate_Rybbit_Admin();
Expand Down