wp-admin/includes/class-wp-site-health.php:
WP_Site_Health::__construct()
|
WP_Site_Health constructor.
|
wp-includes/formatting.php:
wp_init_targeted_link_rel_filters()
|
Adds all filters modifying the rel attribute of targeted links.
|
wp-includes/load.php:
wp_get_active_and_valid_themes()
|
Retrieves an array of active and valid themes.
|
wp-includes/ms-site.php:
update_sitemeta_cache()
|
Updates metadata cache for list of site IDs.
|
wp-includes/rest-api/search/class-wp-rest-post-search-handler.php:
WP_REST_Post_Search_Handler::prepare_item()
|
Prepares the search result for a given ID.
|
wp-includes/blocks.php:
do_blocks()
|
Parses dynamic blocks out of post_content and re-renders them.
|
wp-includes/blocks.php:
_restore_wpautop_hook()
|
If do_blocks() needs to remove wpautop() from the the_content filter, this re-adds it afterwards, for subsequent the_content usage.
|
wp-includes/wp-db.php:
wpdb::placeholder_escape()
|
Generates and returns a placeholder escape string for use in queries returned by ::prepare().
|
wp-includes/widgets/class-wp-widget-custom-html.php:
WP_Widget_Custom_HTML::widget()
|
Outputs the content for the current Custom HTML widget instance.
|
wp-includes/widgets/class-wp-widget-media.php:
WP_Widget_Media::_register_one()
|
Add hooks while registering all widget instances of this widget class.
|
wp-includes/widgets/class-wp-widget-media-video.php:
WP_Widget_Media_Video::render_media()
|
Render the media on the frontend.
|
wp-includes/class-wp-customize-manager.php:
WP_Customize_Manager::save_changeset_post()
|
Save the post for the loaded changeset.
|
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php:
WP_REST_Attachments_Controller::prepare_items_query()
|
Determines the allowed query_vars for a get_items() response and prepares for WP_Query.
|
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:
WP_REST_Posts_Controller::prepare_item_for_response()
|
Prepares a single post output for response.
|
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:
WP_REST_Posts_Controller::get_item_permissions_check()
|
Checks if a given request has access to read a post.
|
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:
WP_REST_Posts_Controller::get_items()
|
Retrieves a collection of posts.
|
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php:
WP_REST_Comments_Controller::check_read_post_permission()
|
Checks if the post can be read.
|
wp-includes/class-wp-locale-switcher.php:
WP_Locale_Switcher::init()
|
Initializes the locale switcher.
|
wp-includes/class-wp-taxonomy.php:
WP_Taxonomy::add_hooks()
|
Registers the ajax callback for the meta box.
|
wp-includes/class-wp-customize-nav-menus.php:
WP_Customize_Nav_Menus::insert_auto_draft_post()
|
Add a new auto-draft post.
|
wp-includes/customize/class-wp-customize-custom-css-setting.php:
WP_Customize_Custom_CSS_Setting::preview()
|
Add filter to preview post value.
|
wp-includes/class-wp-metadata-lazyloader.php:
WP_Metadata_Lazyloader::queue_objects()
|
Adds objects to the metadata lazy-load queue.
|
wp-includes/class-wp-customize-widgets.php:
WP_Customize_Widgets::render_widget_partial()
|
Renders a specific widget using the supplied sidebar arguments.
|
wp-includes/class-wp-customize-widgets.php:
WP_Customize_Widgets::selective_refresh_init()
|
Adds hooks for selective refresh.
|
wp-includes/rest-api.php:
rest_api_default_filters()
|
Registers the default REST API filters.
|
wp-includes/comment.php:
wp_handle_comment_submission()
|
Handles the submission of a comment, usually posted to wp-comments-post.php via a comment form.
|
wp-admin/includes/class-wp-screen.php:
WP_Screen::render_view_mode()
|
Render the list table view mode preferences.
|
wp-includes/customize/class-wp-customize-nav-menu-setting.php:
WP_Customize_Nav_Menu_Setting::update()
|
Create/update the nav_menu term for this setting.
|
wp-includes/customize/class-wp-customize-nav-menu-setting.php:
WP_Customize_Nav_Menu_Setting::preview()
|
Handle previewing the setting.
|
wp-includes/customize/class-wp-customize-nav-menu-item-setting.php:
WP_Customize_Nav_Menu_Item_Setting::update()
|
Creates/updates the nav_menu_item post for this setting.
|
wp-includes/customize/class-wp-customize-nav-menu-item-setting.php:
WP_Customize_Nav_Menu_Item_Setting::preview()
|
Handle previewing the setting.
|
wp-includes/customize/class-wp-customize-nav-menus-panel.php:
WP_Customize_Nav_Menus_Panel::render_screen_options()
|
Render screen options for Menus.
|
wp-includes/class-wp-customize-nav-menus.php:
WP_Customize_Nav_Menus::customize_preview_init()
|
Add hooks for the Customizer preview.
|
wp-includes/class-wp-customize-nav-menus.php:
WP_Customize_Nav_Menus::customize_register()
|
Add the customizer settings and controls.
|
wp-includes/class-wp-customize-nav-menus.php:
WP_Customize_Nav_Menus::__construct()
|
Constructor.
|
wp-admin/includes/class-wp-site-icon.php:
WP_Site_Icon::get_post_metadata()
|
Adds custom image sizes when meta data for an image is requested, that happens to be used as Site Icon.
|
wp-admin/includes/class-wp-site-icon.php:
WP_Site_Icon::__construct()
|
Registers actions and filters.
|
wp-admin/includes/ajax-actions.php:
wp_ajax_crop_image()
|
Ajax handler for cropping an image.
|
wp-admin/includes/post.php:
wp_edit_attachments_query_vars()
|
Get the query variables for the current attachments request.
|
wp-admin/includes/class-wp-list-table-compat.php:
_WP_List_Table_Compat::__construct()
|
|
wp-admin/includes/class-wp-automatic-updater.php:
WP_Automatic_Updater::update()
|
Update an item, if appropriate.
|
wp-admin/includes/class-language-pack-upgrader.php:
Language_Pack_Upgrader::bulk_upgrade()
|
Bulk upgrade language packs.
|
wp-admin/includes/class-theme-upgrader.php:
Theme_Upgrader::check_parent_theme_filter()
|
Check if a child theme is being installed and we need to install its parent.
|
wp-admin/includes/class-theme-upgrader.php:
Theme_Upgrader::install()
|
Install a theme package.
|
wp-admin/includes/class-theme-upgrader.php:
Theme_Upgrader::upgrade()
|
Upgrade a theme.
|
wp-admin/includes/class-theme-upgrader.php:
Theme_Upgrader::bulk_upgrade()
|
Upgrade several themes at once.
|
wp-admin/includes/class-plugin-upgrader.php:
Plugin_Upgrader::bulk_upgrade()
|
Bulk upgrade several plugins at once.
|
wp-admin/includes/class-plugin-upgrader.php:
Plugin_Upgrader::install()
|
Install a plugin package.
|
wp-admin/includes/class-plugin-upgrader.php:
Plugin_Upgrader::upgrade()
|
Upgrade a plugin.
|
wp-admin/includes/class-wp-screen.php:
WP_Screen::render_per_page_options()
|
Render the items per page option
|
wp-admin/includes/export.php:
export_wp()
|
Generates the WXR export file for download.
|
wp-admin/includes/deprecated.php:
wp_update_core()
|
This was once used to kick-off the Core Updater.
|
wp-admin/includes/deprecated.php:
wp_update_plugin()
|
This was once used to kick-off the Plugin Updater.
|
wp-admin/includes/deprecated.php:
wp_update_theme()
|
This was once used to kick-off the Theme Updater.
|
wp-admin/includes/class-wp-list-table.php:
WP_List_Table::__construct()
|
Constructor.
|
wp-admin/includes/dashboard.php:
wp_dashboard_setup()
|
Registers dashboard widgets.
|
wp-includes/option.php:
register_setting()
|
Register a setting and its data.
|
wp-admin/includes/media.php:
media_upload_type_form()
|
Outputs the legacy media upload form for a given media type.
|
wp-admin/includes/media.php:
media_upload_gallery_form()
|
Adds gallery form to upload iframe
|
wp-admin/includes/media.php:
media_upload_library_form()
|
Outputs the legacy media upload form for the media library.
|
wp-admin/includes/ajax-actions.php:
wp_ajax_query_attachments()
|
Ajax handler for querying attachments.
|
wp-admin/includes/ajax-actions.php:
wp_ajax_replyto_comment()
|
Ajax handler for replying to a comment.
|
wp-admin/includes/bookmark.php:
wp_link_manager_disabled_message()
|
Outputs the ‘disabled’ message for the WordPress Link Manager.
|
wp-admin/includes/class-wp-media-list-table.php:
WP_Media_List_Table::display_rows()
|
|
wp-admin/includes/class-wp-importer.php:
WP_Importer::get_page()
|
GET URL
|
wp-admin/includes/class-wp-comments-list-table.php:
WP_Comments_List_Table::__construct()
|
Constructor.
|
wp-admin/includes/nav-menu.php:
wp_nav_menu_setup()
|
Register nav menu meta boxes and advanced menu items.
|
wp-admin/includes/widgets.php:
wp_list_widget_controls()
|
Show the widgets and their settings for a sidebar.
|
wp-admin/includes/class-wp-posts-list-table.php:
WP_Posts_List_Table::display_rows()
|
|
wp-admin/update-core.php:
do_core_upgrade()
|
Upgrade WordPress core display.
|
wp-includes/class-wp-customize-manager.php:
WP_Customize_Manager::customize_preview_init()
|
Print JavaScript settings.
|
wp-includes/class-wp-customize-manager.php:
WP_Customize_Manager::start_previewing_theme()
|
If the theme to be previewed isn’t the active theme, add filter callbacks to swap it out at runtime.
|
wp-includes/class-wp-customize-manager.php:
WP_Customize_Manager::__construct()
|
Constructor.
|
wp-includes/kses.php:
kses_init_filters()
|
Adds all KSES input form content filters.
|
wp-includes/widgets/class-wp-widget-text.php:
WP_Widget_Text::widget()
|
Outputs the content for the current Text widget instance.
|
wp-includes/widgets/class-wp-widget-text.php:
WP_Widget_Text::form()
|
Outputs the Text widget settings form.
|
wp-includes/class-wp-embed.php:
WP_Embed::__construct()
|
Constructor
|
wp-includes/class-wp-oembed.php:
WP_oEmbed::__construct()
|
Constructor.
|
wp-includes/plugin.php:
add_action()
|
Hooks a function on to a specific action.
|
wp-includes/class-wp-customize-setting.php:
WP_Customize_Setting::__construct()
|
Constructor.
|
wp-includes/class-wp-customize-setting.php:
WP_Customize_Setting::preview()
|
Add filters to supply the setting’s value when accessed.
|
wp-includes/user.php:
wp_signon()
|
Authenticates and logs a user in with ‘remember’ capability.
|
wp-includes/revision.php:
_set_preview()
|
Sets up the post object for preview based on the post autosave.
|
wp-includes/revision.php:
_show_post_preview()
|
Filters the latest content for preview from the post autosave.
|
wp-includes/ms-default-constants.php:
ms_upload_constants()
|
Defines Multisite upload constants.
|
wp-includes/class-wp-customize-widgets.php:
WP_Customize_Widgets::start_capturing_option_updates()
|
Begins keeping track of changes to widget options, caching new values.
|
wp-includes/class-wp-customize-widgets.php:
WP_Customize_Widgets::capture_filter_pre_update_option()
|
Pre-filters captured option values before updating.
|
wp-includes/class-wp-customize-widgets.php:
WP_Customize_Widgets::__construct()
|
Initial loader.
|
wp-includes/class-wp-customize-widgets.php:
WP_Customize_Widgets::override_sidebars_widgets_for_theme_switch()
|
Override sidebars_widgets for theme switch.
|
wp-includes/class-wp-customize-widgets.php:
WP_Customize_Widgets::customize_register()
|
Registers Customizer settings and controls for all sidebars and widgets.
|
wp-includes/comment.php:
check_comment_flood_db()
|
Hooks WP’s native database-based comment-flood check.
|
wp-includes/meta.php:
register_meta()
|
Registers a meta key.
|
wp-includes/class-wp-editor.php:
_WP_Editors::editor()
|
Outputs the HTML for a single instance of the editor.
|
Example: Let’s add extra sections to TwentySeventeen Front page.
By default, TwentySeventeen theme has 4 sections for the front page. This example will make them 6
Example: Let display custom length of post excerpt.
By default, WordPress display 57 character. you can set custom length using above code. this time except length will be 40. it is a nice and easiest use of add_filter.
Example
The filter
img_caption_shortcode
is applied inmedia.php
using the following call:The target filter function will be called with three arguments:
” <= This is normally the value the filter will be modifying
$attr
$content
In order for the filter function to actually receive the full argument list, the call to
add_filter()
must be modified to specify there are 3 arguments on the parameter list.Expand full source codeCollapse full source code