diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9e5db0b..bbc0f2b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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 diff --git a/integrate-rybbit/integrate-rybbit.php b/integrate-rybbit/integrate-rybbit.php index 2ac1cb1..6517f27 100644 --- a/integrate-rybbit/integrate-rybbit.php +++ b/integrate-rybbit/integrate-rybbit.php @@ -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();