SourceCue Button for Google Preferred Sources 1.6.21 has 4 actions and 10 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when SourceCue Button for Google Preferred Sources fires an action
add_action( 'psbgs_purge_caches', function( $purged ) {
// Your code runs here.
}, 10, 1 );
// Change a value SourceCue Button for Google Preferred Sources is about to use
add_filter( 'psbgs_badge_asset_urls', function( $value, $theme, $language, $settings ) {
// Change $value here.
return $value;
}, 10, 4 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filter official Google badge asset URLs. */ apply_filters( 'psbgs_badge_asset_urls', array( '1x' => $src, '2x' => $src2x, ), $theme, $language, $settings ); -
/** * Filter the selected official Google badge language after auto-resolution. */ apply_filters( 'psbgs_badge_language', $language, $settings ); -
/** * Filter the Google Preferred Sources deeplink URL. */ apply_filters( 'psbgs_deeplink_url', $url, $domain, $settings ); -
/** * Allow integrations to purge additional caches. */ do_action( 'psbgs_purge_caches', $purged ); -
apply_filters( 'psbgs_should_auto_display', true, get_post_type(), $settings ); -
do_action( 'breeze_clear_all_cache' ); -
do_action( 'litespeed_purge_all' ); -
apply_filters( 'psbgs_analytics_retention_days', 90 ); -
apply_filters( 'psbgs_button_args', $args, $settings ); -
apply_filters( 'psbgs_button_html', $html, $args, $settings ); -
do_action( 'psbgs_debug_log', $line, $context ); -
apply_filters( 'psbgs_default_settings', $defaults ); -
apply_filters( 'psbgs_settings', $value ); -
apply_filters( 'psbgs_supported_post_types', $allowed, $settings );
Generated from SourceCue Button for Google Preferred Sources's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: