定制 getolympus/olympus-dionysos-field-rte 二次开发

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

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

getolympus/olympus-dionysos-field-rte

最新稳定版本:v0.0.1

Composer 安装命令:

composer require getolympus/olympus-dionysos-field-rte

包简介

RTE field, this component is a part of the Olympus Dionysos fields.

README 文档

README

Dionysos Rte Field

Olympus Component CodeFactor Grade Packagist Version MIT

This component is a part of the Olympus Dionysos fields for WordPress.
It uses the default WordPress RTE field.

composer require getolympus/olympus-dionysos-field-rte

Table of contents

Field initializationVariables definitionRetrive dataRelease historyContributing

Field initialization

Use the following lines to add a rte field in your WordPress admin pages or custom post type meta fields:

return \GetOlympus\Dionysos\Field\Rte::build('my_rte_field_id', [
    'title'       => 'How do Penguins drink their cola?',
    'default'     => 'On the rocks.',
    'description' => 'A simple question to know if you will be able to survive to the Penguin domination.',

    /**
     * RTE settings
     * @see https://codex.wordpress.org/Function_Reference/wp_editor
     */
    'settings' => [
        'teeny'         => false,
        'textarea_rows' => 8,
    ]
]);

Variables definition

Variable Type Default value Accepted value Description
title String 'Rte' empty
default String empty empty Sets default value if none found
description String empty empty
settings Array see Field initialization see WordPress reference For rte mode only

Retrive data

Retrieve your value from Database with a simple get_option('my_rte_field_id', '') (see WordPress reference):

// Get RTE from Database
$rte = get_option('my_rte_field_id', '');

// Display RTE in HTML tag
echo '<pre>'.htmlspecialchars($rte).'</pre>';

Release History

Version Note
0.0.1 Initial commit

Contributing

  1. Fork it (https://github.com/GetOlympus/olympus-dionysos-field-rte/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Built with ♥ by Achraf Chouk ~ (c) since a long time.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-17