GuestDock icon
Content & Editing

GuestDock hooks reference

GuestDock 1.2.0 has 14 actions and 21 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.

functions.phpyour child theme
// Run your own code when GuestDock fires an action
add_action( 'guestdock_before_expire_logout', function( $user_id ) {
	// Your code runs here.
}, 10, 1 );

// Change a value GuestDock is about to use
add_filter( 'guestdock_restrict_categories', function( $restrict_cats, $current_user_id ) {
	// Change $restrict_cats here.
	return $restrict_cats;
}, 10, 2 );

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

  • includes/class-guestdock-sandbox.php line 155 · used in 2 places
    /**
     * Filters the restricted categories for guest users.
     */
    apply_filters( 'guestdock_restrict_categories', $restrict_cats, get_current_user_id() );
  • includes/class-guestdock-sandbox.php line 358
    /**
     * Filters the list of admin pages a guest user is allowed to access.
     */
    apply_filters( 'guestdock_allowed_admin_pages', self::$allowed_pages );
  • includes/class-guestdock-sandbox.php line 411
    /**
     * Filters the list of REST API route prefixes a guest user is allowed to
     * access.
     */
    apply_filters( 'guestdock_allowed_rest_prefixes', self::$allowed_rest_prefixes );
  • includes/class-guestdock-workflow.php line 126
    /**
     * Filters the admin notification email arguments before sending.
     */
    apply_filters( 'guestdock_before_admin_notification', array( 'to' => $admin_email, 'subject' => $mail['subject'], 'message' => $mail['message'], ), $post, $author );
  • includes/class-guestdock-access.php line 118
    /**
     * Fires just before an expired guest is logged out.
     */
    do_action( 'guestdock_before_expire_logout', $user_id );
  • includes/class-guestdock-workflow.php line 733
    /**
     * Filters the feedback notification email arguments before sending.
     */
    apply_filters( 'guestdock_before_feedback_notification', array( 'to' => $author->user_email, 'subject' => $mail['subject'], 'message' => $mail['message'], ), $post, $feedback );
  • includes/class-guestdock-workflow.php line 184
    /**
     * Filters the guest approval notification email arguments before sending.
     */
    apply_filters( 'guestdock_before_guest_notification', array( 'to' => $author->user_email, 'subject' => $mail['subject'], 'message' => $mail['message'], ), $post, $author );
  • includes/class-guestdock-forms.php line 1648
    /**
     * Fires before a guest user is removed.
     */
    do_action( 'guestdock_before_guest_removal', $user_id, $user->user_email );
  • includes/class-guestdock-forms.php line 1493
    /**
     * Filters the invite email arguments before sending.
     */
    apply_filters( 'guestdock_before_invite_email', array( 'to' => $email, 'subject' => $mail['subject'], 'message' => $mail['message'], ), $user_id, $is_new_user );
  • includes/class-guestdock-forms.php line 88
    /**
     * Filters the client IP used to rate limit the public request form.
     */
    apply_filters( 'guestdock_client_ip', $ip );
  • includes/class-guestdock-access.php line 354
    /**
     * Filters the list of Gutenberg block types denied for guest users.
     */
    apply_filters( 'guestdock_denied_block_types', array( 'core/html', 'core/shortcode', 'core/code', ) );
  • includes/class-guestdock-workflow.php line 749
    /**
     * Fires after admin sends feedback to a guest author.
     */
    do_action( 'guestdock_feedback_sent', $post_id, $feedback );
  • includes/class-guestdock-roles.php line 133
    /**
     * Filters the runtime capability whitelist for guest users.
     */
    apply_filters( 'guestdock_guest_capabilities', $allowed, $user );
  • includes/class-guestdock-forms.php line 1511
    /**
     * Fires after a guest user is created and the invite email is sent.
     */
    do_action( 'guestdock_guest_created', $user_id, $email, $is_new_user, $limit, $days );
  • includes/class-guestdock-access.php line 126
    /**
     * Fires when a guest's access is detected as expired.
     */
    do_action( 'guestdock_guest_expired', $user_id );
  • includes/class-guestdock-sandbox.php line 523
    /**
     * Filters the allowed MIME types for guest user uploads.
     */
    apply_filters( 'guestdock_guest_mime_types', $guest_mimes );
  • includes/class-guestdock-forms.php line 1680
    /**
     * Fires after a guest user has been removed.
     */
    do_action( 'guestdock_guest_removed', $user_id, $guest_email, $admin_id );
  • includes/class-guestdock-forms.php line 1582
    /**
     * Fires after a guest user's access settings are updated.
     */
    do_action( 'guestdock_guest_updated', $user_id, $limit, $expiry_time );
  • includes/class-guestdock-sandbox.php line 323
    /**
     * Filters the list of admin menu page slugs to hide from guest users.
     */
    apply_filters( 'guestdock_hidden_admin_menus', array( 'tools.php', 'profile.php', 'options-general.php', 'plugins.php', 'themes.php', 'users.php', 'edit-comments.php', ) );
  • includes/class-guestdock-sandbox.php line 231
    /**
     * Filters whether the current user is considered a GuestDock guest.
     */
    apply_filters( 'guestdock_is_guest_user', $is_guest, get_current_user_id() );
  • guestdock.php line 83
    /**
     * Fires after all GuestDock classes have been instantiated.
     */
    do_action( 'guestdock_loaded' );
  • includes/class-guestdock-workflow.php line 499
    /**
     * Filters the rel attribute values injected on external links in guest posts.
     */
    apply_filters( 'guestdock_nofollow_attributes', array( 'nofollow', 'sponsored' ) );
  • includes/class-guestdock-workflow.php line 199
    /**
     * Fires after a guest post is published (approved by admin).
     */
    do_action( 'guestdock_post_approved', $post, $author );
  • includes/class-guestdock-access.php line 141
    /**
     * Fires when a guest hits their post submission limit.
     */
    do_action( 'guestdock_post_limit_reached', $user_id );
  • includes/class-guestdock-workflow.php line 141
    /**
     * Fires after a guest post is submitted for review.
     */
    do_action( 'guestdock_post_submitted', $post, $author );
  • includes/class-guestdock-ui.php line 247
    /**
     * Filters the QA requirements HTML displayed to guest users.
     */
    apply_filters( 'guestdock_qa_requirements', $html );
  • includes/class-guestdock-ui.php line 73
    /**
     * Filters the core dashboard widgets removed for guest users.
     */
    apply_filters( 'guestdock_removed_dashboard_widgets', array( array('dashboard_right_now', 'normal'), array('dashboard_activity', 'normal'), array('dashboard_site_health', 'normal'), array('dashboard_quick_press', 'side'), array('dashboard_primary', 'side'), ) );
  • includes/class-guestdock-forms.php line 147
    /**
     * Fires inside the guest request form, after the default fields.
     */
    do_action( 'guestdock_request_form_fields' );
  • includes/class-guestdock-forms.php line 243
    /**
     * Fires after a frontend guest access request is submitted.
     */
    do_action( 'guestdock_request_submitted', $name, $email, $reason );
  • includes/class-guestdock-roles.php line 44
    /**
     * Filters the capabilities assigned to the guestdock_guest role on activation.
     */
    apply_filters( 'guestdock_role_capabilities', array( 'read' => true, 'edit_posts' => true, 'upload_files' => true, 'publish_posts' => false, 'delete_posts' => false, 'delete_published_posts' => false, 'edit_published_posts' => false, 'edit_others_posts' => false, 'delete_others_posts' => false, 'read_private_posts' => false, 'manage_options' => false, 'manage_categories' => false, 'moderate_comments' => false, 'edit_pages' => false, 'edit_... );
  • includes/class-guestdock-forms.php line 592
    /**
     * Filters the query arguments for the Review Queue list.
     */
    apply_filters( 'guestdock_submitted_posts_query', $query_args, $guest_users );
  • includes/class-guestdock-sandbox.php line 643
    /**
     * Filters the total upload quota in bytes for a guest user.
     */
    apply_filters( 'guestdock_upload_quota_bytes', self::UPLOAD_QUOTA_BYTES, $user_id );
  • includes/class-guestdock-sandbox.php line 606
    /**
     * Filters the maximum number of attachments a guest can upload.
     */
    apply_filters( 'guestdock_upload_quota_count', self::UPLOAD_QUOTA_COUNT, $user_id );
  • includes/class-guestdock-workflow.php line 575
    /**
     * Filters the validation errors before blocking guest post submission.
     */
    apply_filters( 'guestdock_validation_errors', $errors, $data, $postarr );
  • includes/class-guestdock-ui.php line 168
    /**
     * Fires at the end of the guest welcome widget, after all default content.
     */
    do_action( 'guestdock_welcome_widget_content', $user_id );

Generated from GuestDock'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.

Plugin 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 this

Not 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: