\com\bmj\jnp\plugins\jnp_widgets\articlesArticles_Widget

Base class for Article-style JNP widgets

Summary

Methods
Properties
Constants
__construct()
widget()
customize_register()
getExpandCollapse()
No public properties found
No constants found
openWidget()
closeWidget()
processUrl()
$defaults
N/A
No private methods found
No private properties found
N/A

Properties

$defaults

$defaults : array

Type

array — Default values for customizer controls

Methods

__construct()

__construct(string  $id_base, string  $name, array  $widget_options = array(), array  $control_options = array()) 

Constructor

Parameters

string $id_base
string $name

Name of widget. "[JNP]" is prepended.

array $widget_options
array $control_options

widget()

widget(array  $args, array  $instance) 

Render the widget

Parameters

array $args

Display arguments including 'before_title', 'after_title', 'before_widget', and 'after_widget'.

array $instance

The settings for the particular instance of the widget.

customize_register()

customize_register(\WP_Customize_Manager  $wp_customize, array  $params = array()) 

Register customizer controls

Parameters

\WP_Customize_Manager $wp_customize

Instance of WP_Customize_Manager passed to 'customize_register' action

array $params

Params for standard widget

getExpandCollapse()

getExpandCollapse(boolean  $collapse = true) 

Expand/Collapse SVGs

Parameters

boolean $collapse

openWidget()

openWidget(array  $instance, array|string  $classes = array(), string  $extra = '') 

Open standard widget

Parameters

array $instance
array|string $classes
string $extra

closeWidget()

closeWidget() 

Close standard widget

processUrl()

processUrl(string  $url) : string

Process the HighWire URL

Transform a link to the HighWire API to a link to the live article

Parameters

string $url

HighWire URL

Returns

string —

$url