承接 arcath/post-formats 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

arcath/post-formats

Composer 安装命令:

composer require arcath/post-formats

包简介

Post Format meta boxes for WordPress

README 文档

README

Provides meta boxes and all required code to get the WordPress post formats working in the admin panel.

Does not provide any helpers for displaying in your theme.

Install

You can install through composer using the command:

composer require arcath/post-formats

Usage

Requiring composer autoload will add the PostFormats class.

functions.php

require_once('vendor/autoload.php');

$formats = array('gallery', 'video');
asort($formats);
$post_formats = new PostFormats($formats, array('post', 'page'));

new PostFormats takes 2 arguments, an arry of formats to enable (which I have sorted alphabetically above) and an array of post types to enable them for.

In your theme

The contents of the meta box is stored in _post_format_{POST_FORMAT} in the post meta.

For example to get the array of gallery IDs you would look at _post_format_gallery.

More info can be found in this post.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-10-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固