# Actions The following [action hooks](https://developer.wordpress.org/reference/functions/do_action/) can be used to customize templates without the need to duplicate template files, greatly reducing the risk of them becoming outdated due to updates in the future. Actions can be easily added or overwritten in child themes or plugins. This list is probably incomplete. See `includes/functions/hooks/`. ### Example: Add Discord invite link to chapter top actions This is an example of how to add a Discord invite link to the chapter top actions via the the `fictioneer_chapter_actions_top_center` hook. The link will feature a [Font Awesome Discord icon](https://fontawesome.com/icons/discord?f=brands) and be located between the formatting modal toggle (priority: 10) and fullscreen buttons (priority: 20). Note that no arguments of the hook are used because we do not need any of them here. ```php // Add this to your child theme's functions.php function child_theme_discord_invite_link() { // Start HTML ---> ?> ` content section in the `user-profile.php` template. Normal page content is not rendered in the template, only what is hooked into this action. This is the frontend user profile, after all. **$args:** * $user (WP_User) – The current user object. * $is_admin (boolean) – True if the user is an administrator. * $is_author (boolean) – True if the user is an author (by capabilities). * $is_moderator (boolean) – True if the user is a moderator (by capabilities). * $is_editor (boolean) – True if the user is an editor. **Hooked Actions:** * `fictioneer_account_moderation_message( $args )` – Moderation message section. Priority 5. * `fictioneer_account_profile( $args )` – Account profile section. Priority 10. * `fictioneer_account_oauth( $args )` – OAuth 2.0 account bindings section. Priority 20. * `fictioneer_account_data( $args )` – Account data section. Priority 30. * `fictioneer_account_discussions( $args )` – Account discussions section. Priority 40. * `fictioneer_account_danger_zone( $args )` – Account termination section. Priority 100. --- ### `do_action( 'fictioneer_account_data_nodes', $user, $args )` Fires after the last list card in the `partials/account/_data.php` partial, added via the `'fictioneer_account_content'` action. Normally contains data nodes for comments, comment subscriptions, Follows, Reminders, Checkmarks, and bookmarks. **Parameters:** * $user (WP_User) – The profile user object. **$args:** * $is_admin (boolean) – True if the profile user is an administrator. * $is_author (boolean) – True if the profile user is an author (by capabilities). * $is_moderator (boolean) – True if the profile user is a moderator (by capabilities). * $is_editor (boolean) – True if the profile user is an editor. * $follows (array) – Collection of current follows from `fictioneer_load_follows( $user )`. * $reminders (array) – Collection of current follows from `fictioneer_load_reminders( $user )`. * $checkmarks (array) – Collection of current follows from `fictioneer_load_checkmarks( $user )`. * $comments_count (int) – Total count of the profile user’s comments. * $timezone (string) – Server’s timezone string. --- ### `do_action( 'fictioneer_admin_settings_connections' )` Fires after the last card in the `_settings_page_connections.php` partial. You can use this hook to add additional options to the Connections tab in the Fictioneer settings menu, belonging to the `fictioneer-settings-connections-group` group. --- ### `do_action( 'fictioneer_admin_settings_general' )` Fires before the last card (Deactivation) in the `_settings_page_general.php` partial. You can use this hook to add additional options to the General tab in the Fictioneer settings menu, belonging to the `fictioneer-settings-general-group` group. --- ### `do_action( 'fictioneer_admin_settings_phrases' )` Fires after the last card in the `_settings_page_phrases.php` partial. You can use this hook to add additional options to the Phrases tab in the Fictioneer settings menu, belonging to the `fictioneer-settings-phrases-group` group. --- ### `do_action( 'fictioneer_admin_settings_tools' )` Fires after the last card in the `_settings_page_tools.php` partial. You can use this hook to add additional tools to the Tools tab in the Fictioneer settings menu. There is no default settings form group here. --- ### `do_action( 'fictioneer_admin_user_sections', $profile_user )` Fires within the Fictioneer user profile section in the WordPress `wp-admin/profile.php` template, which is added to both the `'show_user_profile'` (Priority 20) and `'edit_user_profile'` (Priority 20) actions. The default hooked actions are restricted to administrators, moderators, and the profile user. **Parameters:** * $profile_user (WP_User) – The owner of the currently edited profile. **Hooked Actions:** * `fictioneer_admin_profile_fields_fingerprint( $profile_user )` – User fingerprint field. Priority 5. * `fictioneer_admin_profile_fields_flags( $profile_user )` – User flags. Priority 6. * `fictioneer_admin_profile_fields_oauth( $profile_user )` – User OAuth connections. Priority 7. * `fictioneer_admin_profile_fields_skins( $profile_user )` – Local custom CSS skins. Priority 7. * `fictioneer_admin_profile_fields_data_nodes( $profile_user )` – User data nodes. Priority 8. * `fictioneer_admin_profile_post_unlocks( $profile_user )` - Unlock password-protected posts. Priority 9. * `fictioneer_admin_profile_patreon( $profile_user )` – User Patreon membership data (if any). Priority 10. * `fictioneer_admin_profile_moderation( $profile_user )` – Moderation flags and message. Priority 10. * `fictioneer_admin_profile_author( $profile_user )` – Author page select, support message, and support links. Priority 20. * `fictioneer_admin_profile_oauth( $profile_user )` – OAuth 2.0 account binding IDs. Priority 30. * `fictioneer_admin_profile_badge( $profile_user )` – Override badge. Priority 40. * `fictioneer_admin_profile_external_avatar( $profile_user )` – External avatar URL. Priority 50. --- ### `do_action( 'fictioneer_after_main', $args )` Fires between the site’s `
` and `