PHPackages                             dekodeinteraktiv/hogan-core - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. dekodeinteraktiv/hogan-core

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

dekodeinteraktiv/hogan-core
===========================

Modular Flexible Content System for ACF Pro

1.4.3(7y ago)818.4k↑50%[11 issues](https://github.com/DekodeInteraktiv/hogan-core/issues)16GPL-3.0-or-laterPHPPHP &gt;=7.0

Since Nov 22Pushed 7y ago7 watchersCompare

[ Source](https://github.com/DekodeInteraktiv/hogan-core)[ Packagist](https://packagist.org/packages/dekodeinteraktiv/hogan-core)[ Docs](https://github.com/DekodeInteraktiv/hogan-core)[ RSS](/packages/dekodeinteraktiv-hogan-core/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (37)Used By (16)

Hogan [![Build Status](https://camo.githubusercontent.com/2369b52e174dac59bbbf791c1fe517b709bac0b7e98a5ce9eff6498ed2d1eefd/68747470733a2f2f7472617669732d63692e6f72672f44656b6f6465496e746572616b7469762f686f67616e2d636f72652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DekodeInteraktiv/hogan-core)
======================================================================================================================================================================================================================================================================================================================

[](#hogan-)

Modular Flexible Content System for ACF Pro

Installation
------------

[](#installation)

Install Hogan WordPress plugin using [Composer](https://getcomposer.org/) by requiring any of the modules listed below or just the core framework using:

```
$ composer require dekodeinteraktiv/hogan-core
```

Each module and the core framework itself will be installed as seperate WordPress plugins in the `wp-content/plugin` folder.

Core Framework Modules
----------------------

[](#core-framework-modules)

ModuleInstallation[Text](https://github.com/DekodeInteraktiv/hogan-text)`composer require dekodeinteraktiv/hogan-text`[Forms](https://github.com/DekodeInteraktiv/hogan-form)`composer require dekodeinteraktiv/hogan-form`[Embed](https://github.com/DekodeInteraktiv/hogan-embed)`composer require dekodeinteraktiv/hogan-embed`[Gallery](https://github.com/DekodeInteraktiv/hogan-gallery)`composer require dekodeinteraktiv/hogan-gallery`[Grid](https://github.com/DekodeInteraktiv/hogan-grid)`composer require dekodeinteraktiv/hogan-grid`[Content Grid](https://github.com/DekodeInteraktiv/hogan-content-grid)`composer require dekodeinteraktiv/hogan-content-grid`[Link list](https://github.com/DekodeInteraktiv/hogan-linklist)`composer require dekodeinteraktiv/hogan-linklist`[Links](https://github.com/DekodeInteraktiv/hogan-links)`composer require dekodeinteraktiv/hogan-links`[Banner](https://github.com/DekodeInteraktiv/hogan-banner)`composer require dekodeinteraktiv/hogan-banner`[Image](https://github.com/DekodeInteraktiv/hogan-image)`composer require dekodeinteraktiv/hogan-image`[Expandable list](https://github.com/DekodeInteraktiv/hogan-expandable-list)`composer require dekodeinteraktiv/hogan-expandable-list`[Table](https://github.com/DekodeInteraktiv/hogan-table)`composer require dekodeinteraktiv/hogan-table`[Parallax Image](https://github.com/DekodeInteraktiv/hogan-parallax-image)`composer require dekodeinteraktiv/hogan-parallax-image`[Simple Posts](https://github.com/DekodeInteraktiv/hogan-simple-posts)`composer require dekodeinteraktiv/hogan-simple-posts`[Reusable Modules](https://github.com/DekodeInteraktiv/hogan-reusable-modules)`composer require dekodeinteraktiv/hogan-reusable-modules`Adding modules
--------------

[](#adding-modules)

Adding custom modules can be done using the `register_module()` function in Core. Create a new module that extends the `\Dekode\Hogan\Module` class and add it to the Hogan repository like this:

```
class DemoModule extends extends \Dekode\Hogan\Module {
  …
}

add_action( 'hogan/include_modules', function( \Dekode\Hogan\Core $core ) {
  require_once 'class-demomodule.php';
  $core->register_module( new DemoModule() );
}, 10, 1 );
```

Usage
-----

[](#usage)

By default you will get a ACF Flexible Content group with all activated modules for post type `page` only. The built in wysiwyg editor will be removed.

### Adding Hogan to other post types.

[](#adding-hogan-to-other-post-types)

Hogan is by default added to pages. Use the filter `hogan/field_group/default/supported_post_types` to declare support to other post types.

```
add_filter( 'hogan/field_group/default/supported_post_types', function( array $post_types ) : array {
	$post_types[] = 'post'; // Add Hogan support for posts.
	return $post_types;
}, 10, 2 );
```

### Customizing the default field group

[](#customizing-the-default-field-group)

All field groups, including the default one, can be filtered using the `hogan/field_group//args` filter. The default args are:

```
'name'                           => 'default',
'title'                          => __( 'Content Modules', 'hogan-core' ),
'modules'                        => [], // All modules.
'location'                       => [],
'hide_on_screen'                 => [],
'fields_before_flexible_content' => [],
'fields_after_flexible_content'  => [],
```

### Disable default field group

[](#disable-default-field-group)

If you don't want to use the default field group, or for some other reason want to setup a customized field group yourself, field groups can be disabled with a filter.

```
add_filter( 'hogan/field_group/default/enabled', '__return_false' );
```

### Adding custom field groups

[](#adding-custom-field-groups)

Use the core function `register_field_group()` in action `hogan/include_field_groups` to register custom field groups.

```
add_action( 'hogan/include_field_groups', function( \Dekode\Hogan\Core $core ) {
  $args = []; // Your field group args.
  $core->register_field_group( $args );
}, 10, 1 );
```

See Customizing the default field group above for possible arguments.

#### Example:

[](#example)

This example demonstrates how to add a custom field group with just the text module for post type `post`.

```
add_action( 'hogan/include_field_groups', function( \Dekode\Hogan\Core $core ) {
  $core->register_field_group( [
    'name' => 'field_group_1',
    'title' => __( 'Field group title', 'text-domain' ),
    'modules' => [ 'text' ],
    'location' => [
      [
        [
		  'param' => 'post_type',
		  'operator' => '==',
          'value' => 'post',
        ],
      ],
    ],
  ] );
}, 10, 1);
```

Adding header and lead to modules
---------------------------------

[](#adding-header-and-lead-to-modules)

You can turn on a heading and/or lead field for every single module. Default is no heading or lead. The heading and lead will be included before module specific fields. E.g. to enable heading and lead for Hogan Grid use:

```
add_filter( 'hogan/module/text/heading/enabled', '__return_true' );
add_filter( 'hogan/module/text/lead/enabled', '__return_true' );

```

Style
-----

[](#style)

Hogan core comes with a minimal stylesheet.

The width of hogan modules is by default set to 1360px. This can be changed using the filter `hogan/frontend/content_width`:

```
add_filter( 'hogan/frontend/content_width', function( int $content_width ) {
	return 1920;
}
```

If you don't want the stylesheet in your theme you can deregister it.

```
wp_deregister_style( 'hogan-core' );
```

Search
------

[](#search)

Modules content is by default indexed as *Content* by [SearchWP](https://searchwp.com/). This can be disabled using:

```
add_filter( 'hogan/searchwp/index_modules_as_post_content', '__return_false' );
```

Running tests locally
---------------------

[](#running-tests-locally)

Running tests locally can be beneficial during development as it is quicker than committing changes and waiting for Travis CI to run the tests.

We’re going to assume that you have installed `git`, `svn`, `php`, `apache` and `PHPUnit`

1. Initialize the testing environment locally: `cd` into the plugin directory and run the install script (you will need to have `wget` installed).

    ```
    bin/install-wp-tests.sh wordpress_test root '' localhost latest
    ```

    The install script first it installs a copy of WordPress in the `/tmp` directory (by default) as well as the WordPress unit testing tools. Then it creates a database to be used while running tests. The parameters that are passed to `install-wp-tests.sh` setup the test database.

    - `wordpress_test` is the name of the test database (all data will be deleted!)
    - `root` is the MySQL user name
    - `''` is the MySQL user password
    - `localhost` is the MySQL server host
    - `latest` is the WordPress version; could also be 3.7, 3.6.2 etc.
2. Run the plugin tests:

    ```
    phpunit
    ```

For more info see

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 70.1% 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 ~15 days

Recently: every ~84 days

Total

35

Last Release

2570d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.5

1.0.3PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f76ecc64244478f171da2d68e1d8faf4f8ad7975c7a7264e06d004c6e7e8105?d=identicon)[dekode](/maintainers/dekode)

![](https://www.gravatar.com/avatar/6056c018706ea80db21298e723755cf4e9c4cae89dab37618d13afa42292011d?d=identicon)[stian-overasen](/maintainers/stian-overasen)

---

Top Contributors

[![stian-overasen](https://avatars.githubusercontent.com/u/16900754?v=4)](https://github.com/stian-overasen "stian-overasen (108 commits)")[![pederan](https://avatars.githubusercontent.com/u/527656?v=4)](https://github.com/pederan "pederan (35 commits)")[![olethomas](https://avatars.githubusercontent.com/u/3436672?v=4)](https://github.com/olethomas "olethomas (11 commits)")

---

Tags

acfdekode-hoganhoganphpwordpress-plugin

### Embed Badge

![Health badge](/badges/dekodeinteraktiv-hogan-core/health.svg)

```
[![Health](https://phpackages.com/badges/dekodeinteraktiv-hogan-core/health.svg)](https://phpackages.com/packages/dekodeinteraktiv-hogan-core)
```

###  Alternatives

[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/builder-plugin

Builder plugin for October CMS

17147.2k1](/packages/rainlab-builder-plugin)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5671.4k1](/packages/pfefferle-wordpress-activitypub)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

18238.1k2](/packages/civicrm-civicrm-drupal-8)[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)[humanmade/lottie-lite

A lightweight Lottie Animations Extension for WordPress

374.3k](/packages/humanmade-lottie-lite)

PHPackages © 2026

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