定制 shortlist-digital/agreable-quiz-plugin 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

shortlist-digital/agreable-quiz-plugin

Composer 安装命令:

composer require shortlist-digital/agreable-quiz-plugin

包简介

Wordpress plugin for Shortlist Media.

README 文档

README

Wordpress Plugin built for Croissant stack using Herbert plugin framework.

Dependencies

  • Timber
  • Advanced Custom Fields

Create custom post type

  • /app/customPostType.php

Plugin degines an widget using ACF available to articles

  • /widget-loader-acf.php
    A Croissant theme (e.g. Troisieme) will traverse plugins directory for 'slm' prefixed sub directories which contain widget-loader-acf.php at their root. This ACF definition is added to list of widgets available in theme.

Add plugin view path to Timber's paths for rendering

  • /app/hooks/timber_loader_paths.php
    Parent theme will include the plugin Twig templates and render using Timber (see lab-troisieme-2015/src/views/partials/widget-container.twig). Therefore we add our plugin paths to Timber's internal array of paths using this filter called by Timber: 'timber/loader/paths.

Fire plugin specific action whilst rendering (to enqueue styles/scripts within plugin)

  • /app/hooks/slm_plugin_enqueue.php
    Just before rendering the plugin template, the parent theme calls Wordpress do_action('acf_{{name}}_enqueue'). e.g. (using Timber):
    {% do action('slm_'~widget.acf_fc_layout~'_enqueue', widget) %}
    The hook name is constructed from the ACF Field Group 'name' in widget-loader-acf.php. e.g. 'acf_quiz_plugin_enqueue'

Configurable plugin options for Wordpress installation

  • app/panels.php
    Adds Settings panel for installation specific configuration. Uses ACF definitions.
Using ACF to create panels in Post Type menu
acf_add_options_sub_page(array(
  'page_title'  => 'Quiz Style Settings',
  'menu_title'  => 'Quiz Settings',
  'parent_slug' => 'edit.php?post_type=quiz',
));
Add Custom Fields to menu

Specify custom fields using register_field_group($options). Best to create in Worpdress Admin and use export function. $options['location'] will be an array specifying where to display the Custom Fields:

array (
  array (
    array (
      'param' => 'options_page',
      'operator' => '==',
      'value' => 'acf-options-quiz-settings',
    ),
  ),
),

Note: If acf_add_options_sub_page is given 'menu_title' of 'Quiz Settings', the location 'value' is 'acf-options-quiz-settings' (as above).

Deploying to Packaginst

git tag to see the latest tag version (pull first. git tag 0.x.x to bump the version git push origin master --tags to push to GitHub with your latest tag - Packagist will recieve a webhook and update accordingly

shortlist-digital/agreable-quiz-plugin 适用场景与选型建议

shortlist-digital/agreable-quiz-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 532 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 10 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 shortlist-digital/agreable-quiz-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 shortlist-digital/agreable-quiz-plugin 我们能提供哪些服务?
定制开发 / 二次开发

基于 shortlist-digital/agreable-quiz-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-07