Complete reference for all WordPress Multisite API functions. Site Retrieval Functions get_site() Retrieves site data given a site ID or site object. get_site( $site = null ): WP_Site|null Parameters: $site...
Comprehensive system for managing media files including image manipulation, upload handling, and attachment management. Source: wp-includes/media.php, wp-includes/class-wp-image-editor.php, wp-includes/media-template.php Components Component Description functions.md Attachment retrieval, image sizing, shortcodes class-wp-image-editor.md Image manipulation...
Lazy-loads object metadata for improved performance. Since: 4.5.0 Source: wp-includes/class-wp-metadata-lazyloader.php Description When loading many objects of a given type (e.g., posts in a WP_Query loop), priming metadata caches at the...
Core functions for metadata CRUD operations and registration. Source: wp-includes/meta.php CRUD Functions add_metadata() Adds metadata for the specified object. add_metadata( string $meta_type, int $object_id, string $meta_key, mixed $meta_value, bool $unique...
Actions and filters for the Metadata API. All hooks use dynamic names where {$meta_type} is replaced with the object type (post, user, comment, term, blog, etc.). Short-Circuit Filters These filters...
Framework for storing and retrieving key-value metadata for WordPress objects. Since: 2.9.0 Source: wp-includes/meta.php, wp-includes/class-wp-metadata-lazyloader.php Components Component Description functions.md Core CRUD and registration functions class-wp-metadata-lazyloader.md Lazy-loading metadata queue hooks.md Actions...
Site URL Filters home_url Filters the home URL. add_filter( 'home_url', function( $url, $path, $orig_scheme, $blog_id ) { return $url; }, 10, 4 ); Parameters: $url (string) - Complete home URL...
WordPress provides a comprehensive URL generation system that handles permalinks, site URLs, admin URLs, and canonical URL management. The system is flexible, supporting both "pretty permalinks" and query-string-based URLs. Core...
Abstract base class and implementations for image manipulation in WordPress. Source: wp-includes/class-wp-image-editor.php, wp-includes/class-wp-image-editor-gd.php, wp-includes/class-wp-image-editor-imagick.php Class Hierarchy WP_Image_Editor (abstract) ├── WP_Image_Editor_GD (GD library implementation) └── WP_Image_Editor_Imagick (ImageMagick implementation) Getting an Editor...
Core functions for attachment retrieval, image sizing, and media output. Source: wp-includes/media.php Attachment Retrieval wp_get_attachment_image() Returns an HTML <img> element for an attachment. wp_get_attachment_image( int $attachment_id, string|int[] $size = 'thumbnail',...