WP Manifestindependent plugin directory
manifest / content / agreable-longform-plugin

Agreable Longform Plugin WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

A very agréable Longform plugin for Croissant

★ 0stars
1.5kcomposer installs
3.0.4latest · 9 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/shortlist-digital/agreable-longform-plugin/archive/refs/heads/master.zip

On Packagist as shortlist-digital/agreable-longform-plugin:

composer require shortlist-digital/agreable-longform-plugin
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Shortlist Media Wordpress Longform Plugin

Wordpress Plugin built for Croissant stack using Herbert plugin framework.


Dependencies

  • Timber
  • Advanced Custom Fields

Create custom post type

  • /app/customPostType.php

Plugin degines an widget using ACF available to articles

  • /widget-loader-acf.php
    A Croissant theme (e.g. Troisieme) will traverse plugins directory for 'slm' prefixed sub directories which contain widget-loader-acf.php at their root. This ACF definition is added to list of widgets available in theme.

Add plugin view path to Timber's paths for rendering

  • /app/hooks/timber_loader_paths.php
    Parent theme will include the plugin Twig templates and render using Timber (see lab-troisieme-2015/src/views/partials/widget-container.twig). Therefore we add our plugin paths to Timber's internal array of paths using this filter called by Timber: 'timber/loader/paths.

Fire plugin specific action whilst rendering (to enqueue styles/scripts within plugin)

  • /app/hooks/slm_plugin_enqueue.php
    Just before rendering the plugin template, the parent theme calls Wordpress do_action('acf_{{name}}_enqueue'). e.g. (using Timber):
    {% do action('slm_'~widget.acf_fc_layout~'_enqueue', widget) %}
    The hook name is constructed from the ACF Field Group 'name' in widget-loader-acf.php. e.g. 'acf_longform_plugin_enqueue'

Configurable plugin options for Wordpress installation

  • app/panels.php
    Adds Settings panel for installation specific configuration. Uses ACF definitions.
Using ACF to create panels in Post Type menu
acf_add_options_sub_page(array(
  'page_title'  => 'Longform Style Settings',
  'menu_title'  => 'Longform Settings',
  'parent_slug' => 'edit.php?post_type=longform',
));
Add Custom Fields to menu

Specify custom fields using register_field_group($options). Best to create in Worpdress Admin and use export function. $options['location'] will be an array specifying where to display the Custom Fields:

array (
  array (
    array (
      'param' => 'options_page',
      'operator' => '==',
      'value' => 'acf-options-longform-settings',
    ),
  ),
),

Note: If acf_add_options_sub_page is given 'menu_title' of 'Longform Settings', the location 'value' is 'acf-options-longform-settings' (as above).

Deploy to packagist

Check the current latest tag git fetch && git tag

Bump the version appropriately and tag git tag x.x.x

Push to Github. Packagist will receive a hook and update the file git push origin master --tags

Releases

2 releases.

Tag
Published
3.0.4 latest
Jun 27, 2017 9 years ago
Jun 27, 2017 9 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

Agreable Longform Plugin 0.1.0 · audited by WP Registry

No security issues found.

Audited release
0.1.0
Findings
none
Worst severity
—
Content hash
d20d9afcf4483e54fa3824fc…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.