Linux 软件免费装
Banner图

Inject Query Posts

开发者 coffee2code
更新时间 2024年8月11日 13:20
捐献地址: 去捐款
PHP版本: 3.6 及以上
WordPress版本: 6.6
版权: GPLv2 or later
版权网址: 版权信息

标签

posts query loop template tags wp_query

下载

3.0.3 3.0.4 2.0.3 2.0.4 2.0.5 2.1 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.7 2.2.8 2.2.9 3.0 2.0.1 2.2.6 3.0.1 3.0.2 2.0 2.0.2

详情介绍:

This plugin provides a function for use by developers who have their own code for fetching posts according to a given criteria and now want to make use of loop-aware template tags to display those posts. WordPress's template tags are intended to be used within 'the loop'. The loop is managed by a WP_Query object which sets up various global variables and its own object variables for use by the various template tags. The primary purpose of a WP_Query object is to actually query the database for the posts that match the currently specified criteria. However, if you don't need to query for posts since you already have them by some other means, you can still take advantage of the template tags by injecting those posts into the WP_Query via this plugin. Depending on the template tags you are looking to use, or the logic you are hoping to employ within a loop, you may need to manually configure some of the query object's variables. 如: `
  • ` Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

    安装:

    1. Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically /wp-content/plugins/).
    2. Activate the plugin through the 'Plugins' admin menu in WordPress
    3. Use the c2c_inject_query_posts() function to inject an array of posts into a WP query object. Specify the posts array as the first argument. Configure the query object by passing an array as the second argument. If specifying a WP query object, pass it as the third object; if not specified then the global wp_query object will be assumed.

    升级注意事项:

    3.0.4 Trivial update: noted compatibility through WP 6.6+, removed unit tests from release packaging, and updated copyright date (2024) 3.0.3 Trivial update: noted compatibility through WP 6.3+, made minor documentation tweaks, and updated copyright date (2023) 3.0.2 Trivial update: added DEVELOPER-DOCS.md, noted compatibility through WP 5.8+, and minor reorganization and tweaks to unit tests 3.0.1 Trivial update: noted compatibility through WP 5.7+ and updated copyright date (2021) 3.0 Notable update: Changed argument handling, removed long-deprecated inject_query_posts(), changed unit test file structure, improved inline documentation, added TODO.md file, and noted compatibility through WP 5.5+. 2.2.9 Trivial update: Updated a few URLs to be HTTPS and noted compatibility through WP 5.4+. 2.2.8 Trivial update: noted compatibility through WP 5.3+ and updated copyright date (2020). 2.2.7 Trivial update: created CHANGELOG.md to store historical changelog outside of readme.txt, updated unit test initialization, noted compatibility through WP 5.1+, and updated copyright date (2019) 2.2.6 Trivial update: fixed broken unit test, added README.md, noted compatibility through WP 4.9+, and updated copyright date (2018) 2.2.5 Trivial update: noted compatibility through WP 4.7+, updated unit test bootstrap, minor documentation tweaks, updated copyright date 2.2.4 Trivial update: minor unit test tweaks; verified compatibility through WP 4.4+; and updated copyright date (2016) 2.2.3 Trivial update: bugfix for very rare usage technique; noted compatibility through WP 4.3+ 2.2.2 Trivial update: noted compatibility through WP 4.1+ and updated copyright date 2.2.1 Trivial update: noted compatibility through WP 4.0+; added plugin icon. 2.2 Moderate update: changed default value of $preserve_query_obj arg to false; added unit tests; noted compatibility through WP 3.8+; dropped compatibility with WP older than 3.6 2.1 Recommended major update: added argument and better handling for post caching; added filter; added arguments to existing filter; renamed and deprecated all existing functions; noted compatibility through WP 3.5+; and more. 2.0.5 Trivial update: noted compatibility through WP 3.4+; explicitly stated license 2.0.4 Trivial update: noted compatibility through WP 3.3+ and minor readme.txt tweaks 2.0.3 Trivial update: removed unnecessary resetting of query object variables 2.0.2 Trivial update: noted compatibility through WP 3.2+ 2.0.1 Trivial update: noted compatibility with WP 3.1+ and updated copyright date. 2.0 Recommended major update! Highlights: now use global WP_Query object by default; added ability to preserve state of existing query object; misc non-functionality changes; expanded readme.txt text; verified WP 3.0 compatibility.

    更新日志:

    3.0.4 (2024-08-02) 3.0.3 (2023-05-18) 3.0.2 (2021-10-01)