PublishPress Shortlinks 1.11.0 has 27 actions and 93 filters, read directly from its source code on Nov 18, 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 PublishPress Shortlinks fires an action
add_action( 'media_buttons', function() {
// Your code runs here.
}, 10, 1 );
// Change a value PublishPress Shortlinks is about to use
add_filter( 'tinypress_redirect_destination', function( $route, $link_id, $visitor_context ) {
// Change $route here.
return $route;
}, 10, 3 );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 the destination selected for a shortlink request. */ apply_filters( 'tinypress_redirect_destination', $route, $link_id, $visitor_context ); -
apply_filters( "pb_settings_{$this->unique}_args", wp_parse_args($params['args'], $this->args), $this ); -
do_action( "pb_settings_{$this->unique}_save_before", $data, $this ); -
apply_filters( "pb_settings_{$this->unique}_sections", $params['sections'], $this ); -
apply_filters( "pb_settings_{$this->unique}_save", $data, $this ); -
do_action( "pb_settings_{$this->unique}_save_after", $data, $this ); -
do_action( "pb_settings_{$this->unique}_saved", $data, $this ); -
apply_filters( 'pb_settings_fa4', false ); -
apply_filters( 'tinypress_autolink_excluded_post_types', $excluded_post_types ); -
do_action( 'media_buttons' ); -
do_action( 'pb_sdk_init_tinypress', $tinypress_wpdk ); -
apply_filters( "pb_settings_{$this->unique}_control_ops", $control_ops, $this ); -
apply_filters( "pb_settings_{$this->unique}_output_css", WPDK_Settings::$css, $this ); -
apply_filters( "pb_settings_{$this->unique}_widget_ops", $widget_ops, $this ); -
apply_filters( 'pb_settings_chosen_ajax_capability', 'manage_options' ); -
apply_filters( 'pb_settings_color_palette', array() ); -
apply_filters( 'pb_settings_customize_complex_fields', array( 'accordion', 'background', 'border', 'button_set', 'checkbox', 'color_group', 'date', 'dimensions', 'fieldset', 'group', 'image_select', 'image_select_sortable', 'link', 'link_color', 'media', 'palette', 'repeater', 'sortable', 'sorter', 'spacing', 'switcher', 'tabbed', 'typography', ) ); -
do_action( 'pb_settings_enqueue' ); -
apply_filters( 'pb_settings_enqueue_assets', self::$enqueue ); -
apply_filters( 'pb_settings_field_icon_add_icons', pb_settings_get_default_icons() ); -
apply_filters( 'pb_settings_field_typography_backup_font_family', array( 'Arial, Helvetica, sans-serif', "'Arial Black', Gadget, sans-serif", "'Comic Sans MS', cursive, sans-serif", 'Impact, Charcoal, sans-serif', "'Lucida Sans Unicode', 'Lucida Grande', sans-serif", 'Tahoma, Geneva, sans-serif', "'Trebuchet MS', Helvetica, sans-serif'", 'Verdana, Geneva, sans-serif', "'Courier New', Courier, monospace", "'Lucida Console', Monaco, monospace", 'Georgia, serif'... ); -
apply_filters( 'pb_settings_field_typography_customwebfonts', array() ); -
apply_filters( 'pb_settings_field_typography_defaultstyles', array( 'normal', 'italic', '700', '700italic' ) ); -
apply_filters( 'pb_settings_field_typography_googlestyles', array( '100' => 'Thin 100', '100italic' => 'Thin 100 Italic', '200' => 'Extra-Light 200', '200italic' => 'Extra-Light 200 Italic', '300' => 'Light 300', '300italic' => 'Light 300 Italic', 'normal' => 'Normal 400', 'italic' => 'Normal 400 Italic', '500' => 'Medium 500', '500italic' => 'Medium 500 Italic', '600' => 'Semi-Bold 600', '600italic' => 'Semi-Bold 600 Italic', '700' => 'Bold 700', '700i... ); -
apply_filters( 'pb_settings_field_typography_googlewebfonts', pb_settings_get_google_fonts() ); -
apply_filters( 'pb_settings_field_typography_safewebfonts', array( 'Arial', 'Arial Black', 'Helvetica', 'Times New Roman', 'Courier New', 'Tahoma', 'Verdana', 'Impact', 'Trebuchet MS', 'Comic Sans MS', 'Lucida Console', 'Lucida Sans Unicode', 'Georgia, serif', 'Palatino Linotype' ) ); -
apply_filters( 'pb_settings_field_typography_webfonts', $webfonts ); -
apply_filters( 'pb_settings_fields', array( 'accordion', 'background', 'backup', 'border', 'button_set', 'callback', 'checkbox', 'code_editor', 'color', 'color_group', 'content', 'date', 'datetime', 'dimensions', 'fieldset', 'gallery', 'group', 'heading', 'icon', 'image_select', 'image_select_sortable', 'link', 'link_color', 'map', 'media', 'notice', 'number', 'palette', 'radio', 'repeater', 'select', 'slider', 'sortable', 'sorter... ); -
do_action( 'pb_settings_init' ); -
do_action( 'pb_settings_loaded' ); -
do_action( 'pb_settings_options_after' ); -
do_action( 'pb_settings_options_before' ); -
apply_filters( 'pb_settings_override', 'wpdk_settings-override' ); -
apply_filters( 'pb_settings_tinypress_meta_main_save', array_merge($existing, $clean), $id, null ); -
apply_filters( 'pb_settings_tinypress_settings_save', $clean, null ); -
apply_filters( 'pb_settings_wp_editor', array( 'tinymce' => array( 'wp_skip_init' => true ), ) ); -
do_action( 'tinypress_admin_class_after_styles_enqueue' ); -
do_action( 'tinypress_admin_class_before_assets_register' ); -
do_action( 'tinypress_after_redirect_headers', $link_id, $target_url, $redirection_method ); -
do_action( 'tinypress_after_redirect_track', $link_id, $route, $context ); -
do_action( 'tinypress_analytics_after_chart', $post_id ); -
apply_filters( 'tinypress_analytics_localized_data', $analytics_data, $post_id ); -
apply_filters( 'tinypress_autolink_after_process', $processed, $content, $post, $rules ); -
apply_filters( 'tinypress_autolink_allowed_statuses', $allowed ); -
apply_filters( 'tinypress_autolink_before_process', $content, $post, $rules ); -
do_action( 'tinypress_autolink_cache_invalidated', $post_id ); -
do_action( 'tinypress_autolink_error', $e->getMessage(), $html ); -
apply_filters( 'tinypress_autolink_exceptions_fields', array() ); -
apply_filters( 'tinypress_autolink_excluded_elements', array( 'a', 'script', 'style', 'code', 'pre', 'textarea', 'button', 'select', 'option' ) ); -
apply_filters( 'tinypress_autolink_is_enabled', $is_enabled ); -
apply_filters( 'tinypress_autolink_metabox_fields', $autolink_fields ); -
apply_filters( 'tinypress_autolink_parsed_keywords', $keywords, $raw ); -
apply_filters( 'tinypress_autolink_rule', $rule, $link_id ); -
apply_filters( 'tinypress_autolink_rules', $rules ); -
apply_filters( 'tinypress_autolink_rules_for_post', $filtered, $post, $all_rules ); -
apply_filters( 'tinypress_autolink_should_process', true, $content ); -
do_action( 'tinypress_before_redirect_track', $link_id ); -
apply_filters( 'tinypress_copy_excluded_meta_keys', $keys ); -
apply_filters( 'tinypress_dynamic_redirect_metabox_fields', array() ); -
apply_filters( 'tinypress_export_csv_headers', $base_headers ); -
apply_filters( 'tinypress_export_csv_row', $ordered_row, $link->ID, $headers, $base_headers ); -
apply_filters( 'tinypress_export_csv_values', $values, $link->ID, $headers, $base_headers ); -
apply_filters( 'tinypress_failed_shortlink_rate_limit', 30 ); -
apply_filters( 'tinypress_failed_shortlink_rate_limit_window', 10 * MINUTE_IN_SECONDS ); -
apply_filters( 'tinypress_filters_is_pro', class_exists('TINYPRESS_PRO_Main') ); -
apply_filters( 'tinypress_geolocation_cache_ttl', 12 * HOUR_IN_SECONDS, $ip, $location ); -
apply_filters( 'tinypress_geolocation_timeout', 2.0, $ip ); -
apply_filters( 'tinypress_global_autolink_fields', array( array( 'id' => 'tinypress_autolink_enabled', 'type' => 'switcher', 'title' => esc_html__('Enable Auto-Linking', 'tinypress'), 'label' => esc_html__('Automatically convert keywords to shortlinks in post content.', 'tinypress'), 'desc' => esc_html__('When enabled, keywords configured in shortlink settings will be automatically linked in your content.', 'tinypress'), 'default' => true, ), a... ); -
apply_filters( 'tinypress_global_scheduling_fields', array( array( 'id' => 'tinypress_global_enable_expiration', 'type' => 'switcher', 'title' => esc_html__('Enable Expiration', 'tinypress'), 'subtitle' => esc_html__('Set an expiration date and time for shortlinks', 'tinypress'), 'label' => esc_html__('After the expiration date and time pass, visitors will no longer be able to access the shortlink.', 'tinypress'), 'default' => false, ), array( 'i... ); -
apply_filters( 'tinypress_global_security_fields', array( array( 'id' => 'tinypress_global_password_protection', 'type' => 'switcher', 'title' => esc_html__('Password Protection', 'tinypress'), 'subtitle' => esc_html__('Secure your shortlinks', 'tinypress'), 'label' => esc_html__('Users must enter a password to redirect to the target link.', 'tinypress'), 'default' => false, ), array( 'id' => 'tinypress_global_link_password', 'type' => 'text', ... ); -
do_action( 'tinypress_import_after_shortlink_meta', $link_id, $data ); -
apply_filters( 'tinypress_import_column_aliases', $column_aliases ); -
apply_filters( 'tinypress_import_csv_allowed_mime_types', array( 'text/csv', 'text/plain', 'application/csv', 'application/vnd.ms-excel', ) ); -
apply_filters( 'tinypress_import_supported_columns', array( 'label', 'target_url', 'short_slug', 'post_status', 'link_status', 'redirect_method_mode', 'redirect_method', 'nofollow_mode', 'nofollow', 'sponsored_mode', 'sponsored', 'parameter_forwarding_mode', 'parameter_forwarding', 'expiration_mode', 'expiration_enabled', 'expiration_date', 'expiration_time', 'expired_redirect_url', 'notes', 'autolink_keywords', ) ); -
apply_filters( 'tinypress_import_supported_field_labels', array( 'label' => esc_html__('Link Label', 'tinypress'), 'target_url' => esc_html__('Target URL', 'tinypress'), 'short_slug' => esc_html__('Short Slug', 'tinypress'), 'post_status' => esc_html__('Post Status', 'tinypress'), 'link_status' => esc_html__('Link Status', 'tinypress'), 'redirect_method' => esc_html__('Redirect Method', 'tinypress'), 'nofollow' => esc_html__('NoFollow', 'tinypress'), ... ); -
apply_filters( 'tinypress_import_supported_fields', array( 'label', 'target_url', 'short_slug', 'post_status', 'link_status', 'redirect_method', 'nofollow', 'sponsored', 'parameter_forwarding', 'expiration_enabled', 'expiration_date', 'expiration_time', 'expired_redirect_url', 'notes', 'autolink_keywords', ) ); -
apply_filters( 'tinypress_link_access_status', array( 'allowed' => true, 'reason' => '', 'message' => '', ), $link_id, $context ); -
apply_filters( 'tinypress_link_expired_notice_cta_text', '', $link_id ); -
apply_filters( 'tinypress_link_expired_notice_message', '', $link_id ); -
apply_filters( 'tinypress_link_expired_notice_title', '', $link_id ); -
apply_filters( 'tinypress_link_expired_redirect', '', $link_id ); -
apply_filters( 'tinypress_link_expired_show_notice', false, $link_id ); -
do_action( 'tinypress_metabox_after_shortlink_field', $post ); -
do_action( 'tinypress_metabox_before_shortlink_field', $post ); -
apply_filters( 'tinypress_non_public_notice_color', $color, $status, $this->non_public_notice_post ); -
apply_filters( 'tinypress_non_public_notice_default_messages', $messages ); -
apply_filters( 'tinypress_non_public_notice_default_statuses', array_keys(tinypress_get_supported_post_status_options(false)) ); -
apply_filters( 'tinypress_non_public_notice_message', $message, $post, $status ); -
apply_filters( 'tinypress_non_public_shortlink_slug_length', 12, $post_id, $post ); -
apply_filters( 'tinypress_random_slug_length', 5 ); -
apply_filters( 'tinypress_random_string_length', $length ); -
apply_filters( 'tinypress_redirect_visitor_context', $context, absint($link_id) ); -
apply_filters( 'tinypress_role_management_fields', array( array( 'id' => 'tinypress_role_view', 'type' => 'checkbox', 'title' => esc_html__('Who Can View The All Shortlinks Screen', 'tinypress'), 'desc' => esc_html__('Only selected user roles can view the complete list of Shortlinks.', 'tinypress'), 'inline' => true, 'options' => $user_roles, 'default' => array( 'administrator', 'editor', 'author', 'contributor', 'subscriber', 'revisor' ), ), a... ); -
apply_filters( 'tinypress_scheduling_metabox_fields', $scheduling_fields ); -
apply_filters( 'tinypress_security_metabox_fields', $security_fields ); -
apply_filters( 'tinypress_settings_after_general', array() ); -
apply_filters( 'tinypress_settings_after_post_status', array() ); -
apply_filters( 'tinypress_settings_tabs', $field_sections ); -
apply_filters( 'tinypress_supported_post_status_options', $options, $include_publish ); -
do_action( 'TINYPRESS/Actions/link_title_actions', $post_id ); -
apply_filters( 'TINYPRESS/Filters/get_tinyurl', implode('/', $tinyurl_parts), $tinypress_link_id, $tinyurl_parts ); -
apply_filters( 'TINYPRESS/Filters/link_actions', '', $post_id ); -
apply_filters( 'TINYPRESS/Filters/link_cat_args', array( 'singular' => esc_html__('Category', 'tinypress'), 'plural' => esc_html__('Categories', 'tinypress'), 'hierarchical' => true, 'show_in_quick_edit' => true, ) ); -
apply_filters( 'TINYPRESS/Filters/link_columns', $new_columns, $columns ); -
apply_filters( 'tinypress/filters/localize_scripts', array( 'ajax_url' => admin_url('admin-ajax.php'), 'copy_text' => esc_html__('Copied.', 'tinypress'), 'analytics_label' => esc_html__('Analytics', 'tinypress'), 'inherited_notice' => esc_html__('This setting is inherited from global settings. Choose another option to override it for this shortlink.', 'tinypress'), 'working_text' => esc_html__('Working...', 'tinypress'), 'plugin_title' => esc_htm... ); -
apply_filters( 'TINYPRESS/Filters/settings_pages', $field_sections ); -
do_action( "WPDK_Settings/after_field/field_{($field['id']??'')}" ); -
apply_filters( 'WPDK_Settings/Filters/field_value', $value, ($field['id'] ?? ''), $field['type'] ); -
WPDK_Settings/Filters/integration_server_{$this->plugin_unique_id}
filter Copy link Customise this hookapply_filters( "WPDK_Settings/Filters/integration_server_{$this->plugin_unique_id}", '' ); -
WPDK_Settings/Filters/license_secret_key_{$this->plugin_unique_id}
filter Copy link Customise this hookapply_filters( "WPDK_Settings/Filters/license_secret_key_{$this->plugin_unique_id}", '' ); -
do_action( "WPDK_Settings/meta_section/{$section['id']}", $section ); -
do_action( "WPDK_Settings/section/{$section['id']}", $section ); -
apply_filters( 'WPDK/Utils/get_meta', $meta_value, $meta_key, $post_id, $default ); -
apply_filters( "WPDK/Utils/get_option{$option_key}", $option_value ); -
apply_filters( "WPDK/Utils/register_post_type{$post_type}", $args ); -
apply_filters( "WPDK/Utils/register_taxonomy_{$tax_name}", $args, $obj_type ); -
apply_filters( 'WPDK/Utils/update_option', $all_options, $option_key, $new_value );
Generated from PublishPress Shortlinks'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: