PHP Class Inpsyde\MultilingualPress\Common\Admin\SitesListTableColumn

Since: 3.0.0
Afficher le fichier Open project: inpsyde/multilingual-press

Méthodes publiques

Méthode Description
__construct ( string $id, string $name, callable $render_callback, callable $add_callback = null ) Constructor. Sets up the properties.
add ( array $columns ) : array Adds the column.
register ( ) : void Registers the column methods by using the appropriate WordPress hooks.
render_content ( string $id, integer $site_id ) : boolean Renders the column content.

Method Details

__construct() public méthode

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( string $id, string $name, callable $render_callback, callable $add_callback = null )
$id string Column ID.
$name string Column name.
$render_callback callable Callback for rendering the column content.
$add_callback callable Optional. Callback to handle adding the column. Defaults to null.

add() public méthode

Adds the column.
Since: 3.0.0
public add ( array $columns ) : array
$columns array The current columns.
Résultat array All columns.

register() public méthode

Registers the column methods by using the appropriate WordPress hooks.
Since: 3.0.0
public register ( ) : void
Résultat void

render_content() public méthode

Renders the column content.
Since: 3.0.0
public render_content ( string $id, integer $site_id ) : boolean
$id string Column ID.
$site_id integer Site ID.
Résultat boolean Whether or not the content was rendered successfully.