pkj/pkj-page-source 问题修复 & 功能扩展

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

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

pkj/pkj-page-source

Composer 安装命令:

composer require pkj/pkj-page-source

包简介

Wordpress plugin that lets you show custom post-types as rows or blocks in the content, to avoid manual duplication of content.

README 文档

README

Wordpress plugin that lets you add a source to page, to list custom post-types (forexample a list of the "service" content type below the main content on your /services "page").

Installation

Install with composer. Add this to your composer file:

"require": {
    "pkj/pkj-page-source": "dev-master"
}

Hooks

Changing the generated grid class definitions.

By default this plugin uses boostrap 3 column classes, (col-sm-X, col-md-X, col-lg-X), you can change this by adding this code in your functions.php file:

    add_filter('pkj-page-source_blocksizemap', 'my_theme_blocksizemap_hook');
    // Customize this function for your needs:
    public function my_theme_blocksizemap_hook ($blocksizemap) {
        $class = '';
        foreach($blocksizemap as $context => $perRow) {
            $bit = '';
            switch($context) {
                case 'l': $bit = 'lg'; break;
                case 'm': $bit = 'md'; break;
                case 's': $bit = 'sm'; break;
            }
            $gridSize = 12 / $perRow;
            $class .= "col-$bit-$gridSize ";
        }
        return $class;
    }

Changing the "row" class to theme specific.

    add_filter('pkj-page-source_rowclass', function () {
        return 'row'; // Change to your class.
    });

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPLv2
  • 更新时间: 2014-08-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固