pfeifferNet

Member
in package

Provides member information and functionality.

A member is a user who has author or higher role. Does not include administrator.

Tags
since
1.0.0
since
5.5.0

Inherit standard singleton class.

since
5.11.0

Deprecate global singleton.

since
6.0.0

Refactor for new UI.

Table of Contents

Constants

ABOUT_IMAGE_KEY  = 'psite_about_image'
Define about image key name.
ABOUT_IMAGE_SIZE  = 'medium'
Define about image display size.
CARD_DEFAULTS  = array('card_level' => 2, 'description' => '', 'image_id' => 0, 'itemprop' => '', 'itemtype' => 'https://schema.org/Person', 'metadata' => array(), 'name' => '', 'new_tab' => false, 'url' => '')
The default grid card display attributes.
CONTAINER_DEFAULTS  = array('itemprop' => '', 'itemtype' => '', 'metadata' => array())
The default grid container display attributes.
USER_ROLES  = array('author', 'editor')
User roles to determine member status.

Properties

$grid  : Grid
The instance of the Grid class.
$instances  : array<string|int, object>
The array of instances of this class and sub-classes.
$link_list  : Link_List
The instance of the Link_List class.

Methods

__construct()  : void
Initialise the class and set its properties.
get_instance()  : object
Creates and/or returns the instance of this class.
render_grid()  : void
Render list of members as a grid of cards.
render_links()  : void
Render list of members as links to home pages.
get_cards()  : string
Return member cards.
get_members()  : array<string|int, WP_User>
Get the array of members.

Constants

ABOUT_IMAGE_KEY

Define about image key name.

protected string ABOUT_IMAGE_KEY = 'psite_about_image'
Tags
since
5.3.0

ABOUT_IMAGE_SIZE

Define about image display size.

protected string ABOUT_IMAGE_SIZE = 'medium'
Tags
since
5.3.0

CARD_DEFAULTS

The default grid card display attributes.

protected array<string|int, mixed> CARD_DEFAULTS = array('card_level' => 2, 'description' => '', 'image_id' => 0, 'itemprop' => '', 'itemtype' => 'https://schema.org/Person', 'metadata' => array(), 'name' => '', 'new_tab' => false, 'url' => '')

CARD_DEFAULTS { Default values for grid card. @type int $card_level Heading level to apply to card name (defaults to paragraph if not set). @type string $description Short description of the member. @type int $image_id The attachment ID of the image. @type string $itemprop Schema.org itemprop value for the card. @type string $itemtype URL of schema.org itemtype definition. @type array $metadata Array of itemprop key/value pairs for the card @type string $name Name of member. Used for title. @type bool $new_tab Open URL in new tab flag. @type string $url The URL the card points to. }

Tags
since
5.3.0
see
Grid::CARD_DEFAULTS

CONTAINER_DEFAULTS

The default grid container display attributes.

protected array<string|int, mixed> CONTAINER_DEFAULTS = array('itemprop' => '', 'itemtype' => '', 'metadata' => array())

CONTAINER_DEFAULTS { Default values for card grid container. @type string $itemprop Schema.org itemprop value for the container. @type string $itemtype URL of schema.org itemtype definition. @type array $metatdata Array of itemprop key/value pairs for the container. }

Tags
since
5.3.0
see
Grid::CONTAINER_DEFAULTS

USER_ROLES

User roles to determine member status.

protected string USER_ROLES = array('author', 'editor')
Tags
since
5.3.0

Properties

$grid

The instance of the Grid class.

protected Grid $grid
Tags
since
5.8.0

$instances

The array of instances of this class and sub-classes.

protected static array<string|int, object> $instances = array()
Tags
since
5.11.0

Methods

__construct()

Initialise the class and set its properties.

public __construct() : void
Tags
since
5.8.0
uses
Grid
uses
Link_List

get_instance()

Creates and/or returns the instance of this class.

public static get_instance() : object
Tags
since
5.11.0
Return values
object

The instance of this class.

get_cards()

Return member cards.

protected get_cards([array<string|int, mixed> $args = array() ]) : string
Parameters
$args : array<string|int, mixed> = array()

The display attributes.

Tags
since
5.4.0
uses
Grid::get_card()
see
Member::CARD_DEFAULTS
Return values
string

get_members()

Get the array of members.

protected get_members() : array<string|int, WP_User>
Tags
since
1.0.0
Return values
array<string|int, WP_User>

An array of WP_User objects


        
On this page

Search results