PHPackages                             getolympus/olympus-content-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. getolympus/olympus-content-field

Abandoned → [getolympus/olympus-dionysos-field-content](/?search=getolympus%2Folympus-dionysos-field-content)Olympus-field[Framework](/categories/framework)

getolympus/olympus-content-field
================================

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

v0.0.12(6y ago)0149MITPHP

Since Apr 29Pushed 6y ago1 watchersCompare

[ Source](https://github.com/GetOlympus/olympus-dionysos-field-content)[ Packagist](https://packagist.org/packages/getolympus/olympus-content-field)[ Docs](https://github.com/GetOlympus/olympus-dionysos-field-content)[ RSS](/packages/getolympus-olympus-content-field/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (14)Used By (0)

Dionysos Content Field
======================

[](#dionysos-content-field)

> This component is a part of the **Olympus Dionysos fields** for **WordPress**.

```
composer require getolympus/olympus-dionysos-field-content
```

---

[![Olympus Component](https://camo.githubusercontent.com/f483886a465a9e44005a352c6c1ba6556689a579ecf0d8b984cf60becaaa878c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f666f722d4f6c796d7075732d3434636331312e7376673f7374796c653d666c61742d737175617265)](https://github.com/GetOlympus)[![CodeFactor Grade](https://camo.githubusercontent.com/fd609a578cb02febb9a5639b335ddf0c5f56770a2f1fb27446f45e9fd46ee46d/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f4765744f6c796d7075732f6f6c796d7075732d64696f6e79736f732d6669656c642d636f6e74656e742f62616467653f7374796c653d666c61742d737175617265)](https://www.codefactor.io/repository/github/getolympus/olympus-dionysos-field-content)[![Packagist Version](https://camo.githubusercontent.com/d180ef24a0b33447ec1474bb7db186ce0c7ce1601e9cf2640158ee22cd56eaab/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6765746f6c796d7075732f6f6c796d7075732d64696f6e79736f732d6669656c642d636f6e74656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/getolympus/olympus-dionysos-field-content)[![MIT](https://camo.githubusercontent.com/68035de4b7f69ada20e98e34172f47d361b83a017c8045200fc338660c467897/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49545f4c6963656e73652d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/GetOlympus/olympus-dionysos-field-content/blob/master/LICENSE)

---

 [![](https://github.com/GetOlympus/olympus-dionysos-field-content/raw/master/assets/field-content-64.png)](https://github.com/GetOlympus/olympus-dionysos-field-content/blob/master/assets/field-content-64.png)

---

Field initialization
--------------------

[](#field-initialization)

Use the following lines to add a `content field` in your **WordPress** admin pages or custom post type's meta fields:
*Note the `$identifier` (first `::build()` parameter) is set to `false` because no value is stored in database.*

```
return \GetOlympus\Dionysos\Field\Content::build(false, [
    'title'   => 'The Dark Knight',
    'content' => '',
    'debug'   => false,
    'file'    => 'im_the_batman.php',
    'vars'    => [
        'question' => 'Who\'s the Batman?',
        'answers'  => [
            'the-joker'    => 'The Joker',
            'harley-quinn' => 'Harley Quinn',
            'bruce-wayne'  => 'Bruce Wayne, don\'t tell anybody!',
            'gotham-city'  => 'Gotham City',
        ],
    ],
]);
```

Variables definitions
---------------------

[](#variables-definitions)

VariableTypeDefault value if not setAccepted values`title`String`'File contents'`*empty*`content`String*empty**empty*`debug`Bookean*empty**empty*`file`String`false``true` or `false``vars`Array*empty**empty*Notes:

- Set `content` to display HTML tags. It can be used as a fallback if file doesn't exist
- Set `debug` to `true` to enable the debug mode in case file inclusion fail
- Set `file` to define the PHP file path to include as `include_once` PHP function

Vars usage
----------

[](#vars-usage)

In the included file (`im_the_batman.php` in this example), you can use the `$v` variable as an array:

```
// Display question
echo ''.stripslashes($v['question']).'';
echo '';

// Display answers choices with radio button
foreach ($v['answers'] as $k => $answer) {
    echo ''.stripslashes($answer).'';
}

echo '';
```

Content display priority
------------------------

[](#content-display-priority)

The component will display, by priority:

1. included `file` path
2. everything in `content`

Note: do not forget to set `debug` to `true` to display an error in the case the `file` does not exist or is not readable.

Release History
---------------

[](#release-history)

0.0.12

- Remove useless description

0.0.11

- New Olympus components compatibility
- Change repository to be a part of Dionysos fields

0.0.10

- FIX: content raw display on twig file

Contributing
------------

[](#contributing)

1. Fork it ()
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](https://github.com/crewstyle "Achraf Chouk") ~ (c) since a long time.**

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~132 days

Recently: every ~70 days

Total

12

Last Release

2211d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c255b14ebf8b792ba8b0c9940bd13e899281fc1431f1088af9074acdaa191cef?d=identicon)[crewstyle](/maintainers/crewstyle)

---

Top Contributors

[![crewstyle](https://avatars.githubusercontent.com/u/1572149?v=4)](https://github.com/crewstyle "crewstyle (21 commits)")

---

Tags

contentcustomfieldframeworkolympus-zeusphptwigwordpressphpframeworkwordpresscontentfieldcustomolympusdionysos

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/getolympus-olympus-content-field/health.svg)

```
[![Health](https://phpackages.com/badges/getolympus-olympus-content-field/health.svg)](https://phpackages.com/packages/getolympus-olympus-content-field)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
