Co-Authors Plus icon
Membership & Users

Co-Authors Plus hooks reference

  • By Automattic
  • v4.2.2 New
  • Updated

Co-Authors Plus 4.2.2 has 3 actions and 53 filters, read directly from its source code on Nov 17, 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 Co-Authors Plus fires an action
add_action( 'cap_guest_author_create', function() {
	// Your code runs here.
}, 10, 1 );

// Change a value Co-Authors Plus is about to use
add_filter( 'coauthors_ajax_suggest_author_data', function( $result, $author ) {
	// Change $result here.
	return $result;
}, 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

  • php/class-coauthors-plus.php line 2539
    /**
     * Filters one author result in the classic editor search-as-you-type list.
     */
    apply_filters( 'coauthors_ajax_suggest_author_data', $result, $author );
  • php/class-coauthors-plus.php line 262
    /**
     * Filter whether co-author bylines are applied to feeds.
     */
    apply_filters( 'coauthors_filter_feed_authors', true );
  • php/class-coauthors-guest-authors.php line 1931
    /**
     * Filters extra data to allow plugins add data related to guest author
     */
    apply_filters( 'coauthors_guest_author_personal_export_extra_data', array(), $author->ID, $email_address );
  • php/class-coauthors-plus.php line 2327
    /**
     * Filters whether the current user can set co-authors.
     */
    apply_filters( 'coauthors_plus_edit_authors', $can_set_authors, $post_type );
  • php/class-coauthors-plus.php line 1127
    /**
     * Allow callers to opt a specific query out of Co-Authors Plus' author SQL
     * rewrite.
     */
    apply_filters( 'coauthors_plus_is_author_query', $is_author, $query );
  • php/class-coauthors-endpoint.php line 345
    /**
     * Filters the author data the block editor gets for search results and
     * selected co-authors.
     */
    apply_filters( 'coauthors_rest_author_data', $data, $author );
  • php/class-coauthors-plus.php line 486
    /**
     * Filter the list of supported post types.
     */
    apply_filters( 'coauthors_supported_post_types', $post_types );
  • co-authors-plus.php line 214
    /**
     * Filters the comment notification email headers.
     */
    apply_filters( 'comment_notification_headers', $message_headers, $comment->comment_ID );
  • co-authors-plus.php line 140
    /**
     * Filters whether to notify comment authors of their comments on their own
     * posts.
     */
    apply_filters( 'comment_notification_notify_author', false, $comment->comment_ID );
  • co-authors-plus.php line 123
    /**
     * Filters the list of email addresses to receive a comment notification.
     */
    apply_filters( 'comment_notification_recipients', $emails, $comment->comment_ID );
  • co-authors-plus.php line 303
    /**
     * Filters the comment notification email subject.
     */
    apply_filters( 'comment_notification_subject', $subject, $comment->comment_ID );
  • co-authors-plus.php line 295
    /**
     * Filters the comment notification email text.
     */
    apply_filters( 'comment_notification_text', $notify_message, $comment->comment_ID );
  • php/api/endpoints/class-coauthors-controller.php line 328
    /**
     * Filters the resolved co-authors before they are formatted for the REST
     * response.
     */
    apply_filters( 'rest_coauthors_prepare_items', $coauthors, (int) $request->get_param( 'post_id' ), $request );
  • php/api/endpoints/class-coauthors-controller.php line 544
    /**
     * Filters the co-author data for a REST API response.
     */
    apply_filters( 'rest_prepare_coauthor', $response, $author, $request );
  • php/class-coauthors-plus.php line 404 · used in 4 places
    apply_filters( 'coauthors_plus_should_query_post_author', true );
  • php/class-coauthors-guest-authors.php line 841 · used in 3 places
    apply_filters( 'coauthors_edit_author_cap', 'edit_posts' );
  • php/class-coauthors-plus.php line 1066 · used in 2 places
    apply_filters( 'coauthors_count_published_post_types', array( 'post' ) );
  • php/blocks/block-coauthors/class-block-coauthors.php line 79 · used in 2 places
    apply_filters( 'coauthors_default_after', '' );
  • php/blocks/block-coauthors/class-block-coauthors.php line 67 · used in 2 places
    apply_filters( 'coauthors_default_before', __( 'By ', 'co-authors-plus' ) );
  • php/blocks/block-coauthors/class-block-coauthors.php line 71 · used in 2 places
    apply_filters( 'coauthors_default_between', ', ' );
  • php/blocks/block-coauthors/class-block-coauthors.php line 75 · used in 2 places
    apply_filters( 'coauthors_default_between_last', __( ' and ', 'co-authors-plus' ) );
  • php/class-coauthors-guest-authors.php line 888 · used in 2 places
    apply_filters( "coauthors_name_field_type_{$pm_key}", $field['input'] );
  • php/class-coauthors-guest-authors.php line 279
    do_action( 'cap_guest_author_create' );
  • php/class-coauthors-guest-authors.php line 358
    do_action( 'cap_guest_author_del' );
  • php/class-coauthors-plus.php line 235
    apply_filters( 'coauthors_auto_apply_template_tags', false );
  • php/blocks/class-blocks.php line 146
    apply_filters( 'coauthors_blocks_store_data', array( 'authorPlaceholder' => array( 'id' => 0, 'display_name' => __( 'FirstName LastName', 'co-authors-plus' ), 'description' => array( 'raw' => __( 'Placeholder description from Co-Authors block.', 'co-authors-plus' ), 'rendered' => '<p>' . __( 'Placeholder description from Co-Authors block.', 'co-authors-plus' ) . '</p>', ), 'link' => '#', 'featured_media' => 0, 'avatar_urls' => array_map( '... );
  • php/class-coauthors-plus.php line 720
    apply_filters( 'coauthors_default_author', wp_get_current_user() );
  • php/class-coauthors-plus.php line 2606
    apply_filters( 'coauthors_edit_ignored_authors', $ignored_authors );
  • php/class-coauthors-wp-list-table.php line 215
    do_action( 'coauthors_guest_author_custom_columns', $column_name, $item->ID );
  • php/class-coauthors-guest-authors.php line 1357
    apply_filters( 'coauthors_guest_author_fields', $fields_to_return, $groups );
  • php/class-coauthors-guest-authors.php line 102
    apply_filters( 'coauthors_guest_author_labels', array( 'singular' => __( 'Guest Author', 'co-authors-plus' ), 'plural' => __( 'Guest Authors', 'co-authors-plus' ), 'all_items' => __( 'All Guest Authors', 'co-authors-plus' ), 'add_new_item' => __( 'Add New Guest Author', 'co-authors-plus' ), 'edit_item' => __( 'Edit Guest Author', 'co-authors-plus' ), 'new_item' => __( 'New Guest Author', 'co-authors-plus' ), 'view_item' => __( 'View Guest Au... );
  • php/class-coauthors-guest-authors.php line 826
    apply_filters( 'coauthors_guest_author_linked_account_args', array( 'show_option_none' => __( '-- Not mapped --', 'co-authors-plus' ), 'name' => esc_attr( $this->get_post_meta_key( 'linked_account' ) ), 'selected' => $linked_account_id, 'exclude' => $linked_account_user_ids, 'capability' => array( apply_filters( 'coauthors_edit_author_cap', 'edit_posts' ) ), 'include_selected' => true, ) );
  • php/class-coauthors-guest-authors.php line 99
    apply_filters( 'coauthors_guest_author_manage_cap', $this->list_guest_authors_cap );
  • php/class-coauthors-wp-list-table.php line 185
    apply_filters( 'coauthors_guest_author_manage_columns', $columns );
  • php/class-coauthors-guest-authors.php line 96
    apply_filters( 'coauthors_guest_author_parent_page', $this->parent_page );
  • php/class-coauthors-wp-list-table.php line 74
    apply_filters( 'coauthors_guest_author_query_args', $args );
  • php/class-coauthors-wp-list-table.php line 250
    apply_filters( 'coauthors_guest_author_row_actions', $actions, $item );
  • php/class-coauthors-wp-list-table.php line 45
    apply_filters( 'coauthors_guest_author_sortable_columns', $this->get_sortable_columns() );
  • php/class-coauthors-plus.php line 514
    apply_filters( 'coauthors_guest_authors_enabled', true );
  • php/class-coauthors-plus.php line 229
    apply_filters( 'coauthors_guest_authors_force', false );
  • php/class-coauthors-plus.php line 707
    apply_filters( 'coauthors_meta_box_context', 'side' );
  • php/class-coauthors-plus.php line 707
    apply_filters( 'coauthors_meta_box_priority', 'high' );
  • php/class-coauthors-plus.php line 707
    apply_filters( 'coauthors_meta_box_title', __( 'Authors', 'co-authors-plus' ) );
  • php/class-coauthors-plus.php line 3174
    apply_filters( 'coauthors_open_graph_tags', $og_tags );
  • php/blocks/class-blocks.php line 36
    apply_filters( 'coauthors_plus_support_blocks', true );
  • php/class-coauthors-plus.php line 1638
    apply_filters( 'coauthors_post_author_value', $data['post_author'], $postarr['ID'] );
  • php/class-coauthors-plus.php line 1972
    apply_filters( 'coauthors_post_get_coauthor_by_field', $query_type, $author_name );
  • php/class-coauthors-plus.php line 1944
    apply_filters( 'coauthors_post_list_pluck_field', 'user_login' );
  • php/class-coauthors-plus.php line 3379
    apply_filters( 'coauthors_rest_view_description_cap', 'list_users' );
  • php/class-coauthors-plus.php line 2587
    apply_filters( 'coauthors_search_authors_get_terms_args', $args );
  • template-tags.php line 642
    apply_filters( 'coauthors_wp_list_authors_array', $authors );
  • get_coauthors

    filter
    template-tags.php line 54
    apply_filters( 'get_coauthors', $coauthors, $post_id );
  • php/api/endpoints/class-coauthors-controller.php line 437
    apply_filters( 'rest_coauthors_item_schema', $schema );
  • the_author

    filter
    template-tags.php line 290
    apply_filters( 'the_author', $author->display_name );

Generated from Co-Authors Plus's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: