Linux 软件免费装
Banner图

All Inclusive

开发者 stur
Y.Stepanov
Yuriy Stepanov (stur)
更新时间 2022年1月9日 15:38
WordPress版本: 5.8
版权: GPLv2 or later

标签

Post posts meta theme integration image images optimization themes thumbnail picture pictures accelerator

下载

详情介绍:

The pluginplug-in, with two additional SQL queries, joins the original data sample $wp_query->posts all meta fields, all files and images, for each image the direct url to small, medium, and large image is formed. There’s no need to use functions the_post_thumbnail and get_post_meta. How it works So let’s say we go to the home page of our blog, WordPress gives us a list of the latest 10 records. Let me remind you these are already in the global object in the array $wp_query-> posts. Let’s begin from creating a list of ID (number of records to which they are stored in the database). Form the first SQL query: Again we form a list of ID: the first 10 ID entries and add the ID of files (attachments). Attachments as ordinary records are stored in one table – wp_posts. Now we use the function update_meta_cache: So everything just gets in the cache and subsequent calls get_post_meta will derive value from the cache. The rest is a matter of technique – the data must be carefully arranged, not mixing anything up. All meta fields are added to the $post->meta array, and files into an $post->files array and files are immediately sorted by number order (when downloading it, you can specify the sort order). In addition, for each file, if it is an image, the full path to the thumbnails is calculated: small (thumbnail), average (medium) and the complete picture (full). WordPres 4: The default filter is only connected to the main query using is_main_query(). Does not work in is_admin() or is_page(). Home page Русская страница

安装:

  1. Upload all-inclusive.php to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
Access to metadata fields recording Get files Get images and thumbnail

更新日志:

1.0 1.0.1 1.0.2 metadata fields are available as object properties $post, for example: $post->meta_name 1.0.3 fixed bug when creating icons for files: archives, programs, music, videos ... removed error message when an empty result 1.0.4 Fixed bug when using external plug-in cache 1.0.5 Fixed bug when using external plug-in cache 1.0.6 Works with Wordpress 3.5 1.0.7 Works with Wordpress 5. The default filter is only connected to the main query using is_main_query().