Download the PHP package helsingborg-stad/modularity without Composer

On this page you can find all versions of the php package helsingborg-stad/modularity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package modularity

Modularity

Modular component system plugin for WordPress. Drag and drop the bundled modules or your custom modules to your page layout.

Download plugin.

To download a complete out of the box working plugin without the need to compile or fetch dependencies.
Go here and download the full-release.zip from the latest version.

Creating modules

To create your very own Modularity module you simply create a plugin with a class that extends our Modularity\Module class.

A module actually is the same as a custom post type. However we've added a few details to enable you to use them as modules.

Use the $this->register() method to create a very basic module.

Here's a very basic example module for you:

Module templates

You can easily create your own module templates by placing them in: /wp-content/themes/[my-theme]/templates/module/.

Name your template file with the following pattern: modularity-[module-id].php. You can get your module's id from the Modularity options page.

Module boilerplate

You can download our module boilerplate. It will be a good starting point for any custom module that you would like to build.

Download it here (NOT AVAILABLE YET)

Action reference

Modularity

Runs when Modularity core is loaded. Typically used to add custom modules.

Example:

Modularity/Module/[MODULE SLUG]/enqueue

Enqueue js or css only for the add and edit page of the specified module.

Example:

Modularity/Options/Module

Action to use for adding option fields to modularity options page. Use "Modularity/Options/Save" action to handle save of the option field added

Example:

Modularity/save_block

Action triggered whenever a post or page is created or updated.

Example:

Filter reference

Modularity/Module/TemplateVersion3

Enable preview of the upcoming version 3 views with BEM formatting. This may be used already when progressing towards BEM.

Example:

Modularity/Editor/WidthOptions

Filter module width options

Params:

Example:


Modularity/Editor/SidebarIncompability

Enables the theme to add incompability indicators of specific module to an sidebar area. The user will not be able to drag and drop to unsupported areas. This filter may simplify the theme developers work by ruling out some cases.

Params:

Example:


Modularity/Display/BeforeModule

Filter module sidebar wrapper (before)

Params:

Example:


Modularity/Display/AfterModule

Filter module sidebar wrapper (after)

Params:

Example:


Modularity/Module/Container/Sidebars

Container wrapper: Filter what sidebars that should support a containing wrapper on some modules

Params:


Modularity/Module/Container/Modules

Container wrapper: Filter what modules that should support a containing wrapper

Params:


Modularity/Module/Container/Template

Container wrapper: Filter the template with html that should be wrapped around each module

Params:


Modularity/Module/TemplatePath & Modularity/Theme/TemplatePath

Modify (add/edit) paths where to look for module/theme templates Typically used for adding search path's for finding custom modules/theme templates.

Attention: Unsetting paths may cause issues displaying modules. Plase do not do this unless you know exacly what you are doing.

Params:

Example:

Modularity/Module/Classes

Modify the list of classes added to a module's main element

Params:

Example:

Modularity/Display/Markup

Module display markup

Params:

Example:

Modularity/Display/[MODULE SLUG]/Markup

Params:

Example:

Modularity/CoreTemplatesSearchTemplates

What template files to look for

Params:

Example:

Modularity/Module/Posts/Date

Modify the displayed publish date in Post Modules

Params:

Example:

Modularity/Module/Posts/Slider/Arguments

Modify the slider arguments in Post Modules

Params:

Example:

Modularity/Editor/ModuleCssScope

Allow editors to select a unique appeance (provided by a theme etc) for a module. Adds a single class to the module wrapper, to allow scoping of css styles.

Params:

Example:

Modularity/Display/viewData

Params:

Example:

Modularity/Display/{modulePostTypeSlug}/viewData

Params:

Example:

Module Attributes API

Some module features are available by setting certain attributes on the module's outmost element.

data-module-refresh-interval

Creates an interval on which the module is refreshed via XHR by calling the REST API. This attribute also requires that the data-module-id attribute is set on the same element.

The value of the attribute should be the number of seconds on which to run the refresh interval.

Example:

Rest API

The WordPress REST API is extended with the following endpoints.

modularity/v1/modules/{id}

This endpoint returns the markup for a specific module.

Constants

MODULARITY_DISABLE_FRAGMENT_CACHE

Disabling the built-in fragment cache means that each module's output will not be stored as an HTML cache. As a result, every time a visitor reloads the page, each module will have to be rendered again. However, it is important to consider this option only if you do not have any object cache enabled, such as Redis or Memcached. We strongly advise enabling the fragment cache feature in your application to enhance performance and caching efficiency, allowing modules to be rendered more quickly and reducing the need for repetitive rendering upon page reloads.

By defining this as true, cache will be turned off. Default: Undefined.

If enabled, each cached module will be rendered with a timestamp and cache ID in the following format:

Tested with support from BrowserStack

This software is tested with the awesome tools from Browserstack.


All versions of modularity with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
composer/installers Version ~1.0
helsingborg-stad/acf-export-manager Version >=1.0.0
johannheyne/advanced-custom-fields-table-field Version dev-master
clark-nikdel-powell/post-type-select-for-acf Version dev-master
jeradin/acf-website-field Version dev-master
ooksanen/acf-focuspoint Version dev-master
jeradin/acf-dynamic-table-field Version dev-master
enshrined/svg-sanitize Version dev-master
wpackagist-plugin/acf-extended Version 0.8.9.4
helsingborg-stad/acf-select-image-field Version ~1.4.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package helsingborg-stad/modularity contains the following files

Loading the files please wait ....