Title: All Inclusive
Author: Yuriy Stepanov
Published: <strong>نومبر 1, 2010</strong>
Last modified: جنوری 9, 2022

---

پلگ انز تلاش کریں

![](https://ps.w.org/all-inclusive/assets/banner-772x250.png?rev=1137844)

یہ پلگ ان **ورڈپریس کے تازہ ترین 3 ریلیزوں کے ساتھ ٹیسٹ نہیں کیا گیا ہے**۔ اب یہ
برقرار نہیں رکھا جا سکتا یا معاونت نہیں کی جا سکتی اور اس کو ورڈپریس کے تازہ ترین
ورژنز کے ساتھ استعمال کیے جانے پر مطابقت کے مسائل ہو سکتے ہیں۔

![](https://s.w.org/plugins/geopattern-icon/all-inclusive_bbbbbc.svg)

# All Inclusive

 منجانب [Yuriy Stepanov](https://profiles.wordpress.org/stur/)

[ڈاؤن لوڈ کریں](https://downloads.wordpress.org/plugin/all-inclusive.zip)

 * [تفصیلات](https://ur.wordpress.org/plugins/all-inclusive/#description)
 * [جائزے](https://ur.wordpress.org/plugins/all-inclusive/#reviews)
 *  [انسٹالیشن](https://ur.wordpress.org/plugins/all-inclusive/#installation)
 * [ڈیولپمنٹ](https://ur.wordpress.org/plugins/all-inclusive/#developers)

 [معاونت](https://wordpress.org/support/plugin/all-inclusive/)

## تفصیل

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:

 * $query = "SELECT $wpdb->posts.* FROM $wpdb->posts WHERE $wpdb->posts.post_parent
   IN(’21’,’29’,’30’,’35’,’38’,’42’,’46’,’48’,’49’,’55’) AND $wpdb->posts.post_parent
   
   AND $wpdb->posts.post_type = ‘attachment’”;

A normal translation is «find all the child entries for entries with the numbers(’
21 ‘, ’29?, ’30 ‘, ’35?, ’38 ‘, ’42?, ’46 ‘, ’48?, ’49 ‘, ’55 ‘)». And the type 
of records required to be «attachment». That is, in short, we find all the files(
attachment) which we downloaded for our 10 entries.

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:

 * $all_meta = update_meta_cache(‘post’, $ar_all_id);

$ar_all_id – here are the original recordings and attachments

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](http://bugacms.com/wpEn/all-inclusive/)
 [Русская страница](http://bugacms.com/wpRu/all-inclusive/)

### A brief Markdown Example

[More PHP code Examples](http://bugacms.com/wpEn/all-inclusive/)
 [Больше примеров](http://bugacms.com/wpRu/all-inclusive/)

## انسٹالیشن

 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

 * `$post->meta['meta_name']` or `$post->meta_name`

#### Get files

 * `$post->files[0]->attachment_url` Direct Link
 * `$post->files[0]->guid` the first file parameter guid is the same direct link

#### Get images and thumbnail

 * `$post->files[0]->thumbnail` First Image Thumbnail
 * `$post->files[1]->thumbnail` second file is a miniature
 * `$post->files[2]->medium` the third file is the average miniature
 * `$post->files[3]->full` fourth file is a complete picture

## جائزے

There are no reviews for this plugin.

## شراکت دار اور ڈیویلپرز

“All Inclusive” اوپن سورس سافٹ ویئر ہے۔ مندرجہ ذیل لوگوں نے اس پلگ ان میں حصہ لیا:

شراکت دار

 *   [ Yuriy Stepanov ](https://profiles.wordpress.org/stur/)

[“All Inclusive” کا اپنی زبان میں ترجمہ کریں۔](https://translate.wordpress.org/projects/wp-plugins/all-inclusive)

### ڈویلپمینٹ میں دلچسپی ہے؟

[کوڈ براؤز کریں](https://plugins.trac.wordpress.org/browser/all-inclusive/)، [ایس این وی ریپوزیٹری](https://plugins.svn.wordpress.org/all-inclusive/)
کو چیک کریں یا [ڈویلپمینٹ لاگ](https://plugins.trac.wordpress.org/log/all-inclusive/)
کو سبسکرائب کریں بذریعہ [آر ایس ایس](https://plugins.trac.wordpress.org/log/all-inclusive/?limit=100&mode=stop_on_copy&format=rss)۔

## چینج لاگ

#### 1.0

 * Initial version

#### 1.0.1

 * Meta field get through function update_meta_cache()

#### 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()**.

## میٹا

 *  Version **1.0.7**
 *  Last updated **4 سال پہلے**
 *  Active installations **10+**
 *  WordPress version ** 5.8 یا اس سے جدید **
 *  Tested up to **5.8.13**
 *  Language
 * [English (US)](https://wordpress.org/plugins/all-inclusive/)
 * Tags
 * [image](https://ur.wordpress.org/plugins/tags/image/)[meta](https://ur.wordpress.org/plugins/tags/meta/)
   [post](https://ur.wordpress.org/plugins/tags/post/)[posts](https://ur.wordpress.org/plugins/tags/posts/)
   [thumbnail](https://ur.wordpress.org/plugins/tags/thumbnail/)
 *  [اعلی درجے کا منظر](https://ur.wordpress.org/plugins/all-inclusive/advanced/)

## درجہ بندیاں

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/all-inclusive/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/all-inclusive/reviews/)

## شراکت دار

 *   [ Yuriy Stepanov ](https://profiles.wordpress.org/stur/)

## معاونت

کچھ کہنا ہے؟ مدد چاہیے؟

 [معاونتی فورم دیکھیں](https://wordpress.org/support/plugin/all-inclusive/)