getolympus/olympus-dionysos-field-textarea

文本区域字段,此组件是 Olympus Dionysos 字段的一部分。

安装: 191

依赖: 2

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

语言:JavaScript

类型:olympus-field

v0.0.18 2023-12-20 22:17 UTC

README

Dionysos 文本区域字段

Olympus Component CodeFactor Grade Packagist Version MIT

此组件是 WordPressOlympus Dionysos 字段 的一部分。
在文本区域添加一个计数器 JS 组件。

composer require getolympus/olympus-dionysos-field-textarea

目录

字段初始化变量定义文本定义检索数据发布历史贡献

字段初始化

使用以下行在您的 WordPress 管理页面或自定义文章类型元字段中添加 textarea field

return \GetOlympus\Dionysos\Field\Textarea::build('my_textarea_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.',
    'counter'     => true,
    'placeholder' => 'Tell us how?',
    'readonly'    => false,
    'rows'        => 8,

    /**
     * Texts definition
     * @see the `Texts definition` section below
     */
    't_length_label' => 'characters.',
]);

变量定义

文本定义

检索数据

使用简单的 get_option('my_textarea_field_id', '') 从数据库检索您的值(见 WordPress 参考

// Get textarea from Database
$textarea = get_option('my_textarea_field_id', '');

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

发布历史

贡献

  1. 分支它 (https://github.com/GetOlympus/olympus-dionysos-field-textarea/fork)
  2. 创建您的功能分支 (git checkout -b feature/fooBar)
  3. 提交您的更改 (git commit -am 'Add some fooBar')
  4. 推送到分支 (git push origin feature/fooBar)
  5. 创建一个新的 Pull Request

Achraf Chouk 用♥构建 ~ (c) 很久以前。