2017 © Pedro Peláez
 

olympus-field olympus-textarea-field

[READ-ONLY] Textarea field, this component is a part of the Olympus Zeus Core framework.

image

getolympus/olympus-textarea-field

[READ-ONLY] Textarea field, this component is a part of the Olympus Zeus Core framework.

  • Saturday, March 17, 2018
  • by crewstyle
  • Repository
  • 1 Watchers
  • 0 Stars
  • 176 Installations
  • JavaScript
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

, (*1)

Dionysos Textarea Field

Olympus Component ![CodeFactor Grade][codefactor-image] Packagist Version ![MIT][license-image], (*2)

This component is a part of the Olympus Dionysos fields for WordPress.
Adds a counter JS component on textarea., (*3)

composer require getolympus/olympus-dionysos-field-textarea

Table of contents

Field initializationVariables definitionTexts definitionRetrive dataRelease HistoryContributing, (*4)


Field initialization

Use the following lines to add a textarea field in your WordPress admin pages or custom post type meta fields:, (*5)

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.',
]);

Variables definitions

Variable Type Default value Accepted value Description
title String 'Textarea' empty
default String empty empty Sets default value if none found
description String empty empty
counter Boolean true true or false Defines whether or not to display the counter widget
placeholder String empty empty For default mode only
readonly Boolean false true or false Defines whether or not to allow modification
rows Integer 8 > 1

Texts definition

Code Default value Definition
t_length_label characters. Used to display characters counter as %d characters.

Retrive data

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

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

// Display textarea in HTML tag
echo '

'.htmlspecialchars($textarea).'
';

Release History

Version Note
0.0.18 Fix jQuery integration on domReady
0.0.17 Change id on twig template
0.0.16 Remove RTE mode from package

Contributing

  1. Fork it (https://github.com/GetOlympus/olympus-dionysos-field-textarea/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., (*7)

The Versions

17/03 2018

dev-master

9999999-dev https://github.com/GetOlympus/olympus-textarea-field

[READ-ONLY] Textarea field, this component is a part of the Olympus Zeus Core framework.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework php textarea field olympus zeus hera

17/03 2018

v0.0.7

0.0.7.0 https://github.com/GetOlympus/olympus-textarea-field

[READ-ONLY] Textarea field, this component is a part of the Olympus Zeus Core framework.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework php textarea field olympus zeus

08/10 2016

v0.0.6

0.0.6.0 https://github.com/GetOlympus/olympus-textarea-field

[READ-ONLY] Textarea field, this component is a part of the Olympus Hera WordPress library.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework php textarea field olympus hera

23/08 2016

v0.0.5

0.0.5.0 https://github.com/GetOlympus/olympus-textarea-field

[READ-ONLY] Textarea field, this component is a part of the Olympus Hera WordPress library.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework php textarea field olympus hera

26/06 2016

v0.0.4

0.0.4.0 https://github.com/GetOlympus/olympus-textarea-field

[READ-ONLY] Textarea field, this component is a part of the Olympus Hera WordPress library.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework php textarea field olympus hera

10/05 2016

v0.0.3

0.0.3.0 https://github.com/GetOlympus/olympus-textarea-field

[READ-ONLY] Textarea field, this component is a part of the Olympus Hera WordPress library.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework php textarea field olympus hera

05/05 2016

v0.0.2

0.0.2.0 https://github.com/GetOlympus/olympus-textarea-field

[READ-ONLY] Textarea field, this component is a part of the Olympus Hera WordPress library.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework php textarea field olympus hera

29/04 2016

v0.0.1

0.0.1.0 https://github.com/GetOlympus/olympus-textarea-field

[READ-ONLY] Textarea field, this component is a part of the Olympus Hera WordPress library.

  Sources   Download

MIT

The Requires

 

The Development Requires

framework php textarea field olympus hera