Download the PHP package dekodeinteraktiv/hogan-core without Composer
On this page you can find all versions of the php package dekodeinteraktiv/hogan-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dekodeinteraktiv/hogan-core
More information about dekodeinteraktiv/hogan-core
Files in dekodeinteraktiv/hogan-core
Package hogan-core
Short Description Modular Flexible Content System for ACF Pro
License GPL-3.0-or-later
Homepage https://github.com/DekodeInteraktiv/hogan-core
Informations about the package hogan-core
Hogan
Modular Flexible Content System for ACF Pro
Installation
Install Hogan WordPress plugin using Composer by requiring any of the modules listed below or just the core framework using:
Each module and the core framework itself will be installed as seperate WordPress plugins in the wp-content/plugin
folder.
Core Framework Modules
Module | Installation |
---|---|
Text | composer require dekodeinteraktiv/hogan-text |
Forms | composer require dekodeinteraktiv/hogan-form |
Embed | composer require dekodeinteraktiv/hogan-embed |
Gallery | composer require dekodeinteraktiv/hogan-gallery |
Grid | composer require dekodeinteraktiv/hogan-grid |
Content Grid | composer require dekodeinteraktiv/hogan-content-grid |
Link list | composer require dekodeinteraktiv/hogan-linklist |
Links | composer require dekodeinteraktiv/hogan-links |
Banner | composer require dekodeinteraktiv/hogan-banner |
Image | composer require dekodeinteraktiv/hogan-image |
Expandable list | composer require dekodeinteraktiv/hogan-expandable-list |
Table | composer require dekodeinteraktiv/hogan-table |
Parallax Image | composer require dekodeinteraktiv/hogan-parallax-image |
Simple Posts | composer require dekodeinteraktiv/hogan-simple-posts |
Reusable Modules | composer require dekodeinteraktiv/hogan-reusable-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:
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.
Hogan is by default added to pages. Use the filter hogan/field_group/default/supported_post_types
to declare support to other post types.
Customizing the default field group
All field groups, including the default one, can be filtered using the hogan/field_group/<name>/args
filter. The default args are:
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.
Adding custom field groups
Use the core function register_field_group()
in action hogan/include_field_groups
to register custom field groups.
See Customizing the default field group above for possible arguments.
Example:
This example demonstrates how to add a custom field group with just the text module for post type post
.
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:
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
:
If you don't want the stylesheet in your theme you can deregister it.
Search
Modules content is by default indexed as Content by SearchWP. This can be disabled using:
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
-
Initialize the testing environment locally:
cd
into the plugin directory and run the install script (you will need to havewget
installed).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 toinstall-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 passwordlocalhost
is the MySQL server hostlatest
is the WordPress version; could also be 3.7, 3.6.2 etc.
- Run the plugin tests:
For more info see https://make.wordpress.org/cli/handbook/plugin-unit-tests/#running-tests-locally
Changelog
See CHANGELOG.md.