lyfter/wp-query-builder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lyfter/wp-query-builder

最新稳定版本:1.0.0

Composer 安装命令:

composer require lyfter/wp-query-builder

包简介

README 文档

README

A package that allows you to create WP_Queries in a more elegant while offering you autocompletion in you IDE. Heavily inspired by Laravel Elequent and query builder.

Replace

$query = new WP_Query([
    'posts_per_page' => 5,
    'post_type' => 'page'
]);

$query->get_posts();

With

WpQuery::build()
    ->type('page')
    ->limit(5)
    ->get();

Installation

Install with composer

Run the following in your terminal to install the package with Composer.

$ composer require lyfter/wp-query-builder

The package uses PSR-4 autoloading and can be used with the Composer's autoloader. Below is a basic example of getting started, though your setup may be different depending on how you are using Composer.

require __DIR__ . '/vendor/autoload.php'; // Not required when using bedrock

use Lyfter\QueryBuilder\WpQuery;

$posts = WpQuery::build()
    ->type(['post', 'page'])
    ->limit(5)
    ->get();

See Composer's basic usage guide for details on working with Composer and autoloading. basic usage guide for details on working with Composer and autoloading.

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-04-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固