PHP Class Admin_Apple_Notice, apple-news

Since: 0.6.0
Mostrar archivo Open project: alleyinteractive/apple-news Class Usage Examples

Public Methods

Method Description
__construct ( $settings ) Constructor.
error ( string $message, integer $user_id = null ) Add an error message.
has_notice ( ) Check if a notice exists.
info ( string $message, integer $user_id = null ) Add an info message.
message ( string $message, string $type, integer $user_id = null ) Add a notice message to be displayed.
show ( ) Show the admin notice.
success ( string $message, integer $user_id = null ) Add a success message.

Private Methods

Method Description
add_user_meta ( integer $user_id, string $key, mixed $value ) Handle adding user meta across potential hosting platforms.
delete_user_meta ( integer $user_id, string $key ) Handle deleting user meta across potential hosting platforms.
get_user_meta ( integer $user_id, string $key ) : mixed Handle getting user meta across potential hosting platforms.
show_notice ( string $message, string $type ) Display the admin notice template.

Method Details

__construct() public method

Constructor.
public __construct ( $settings )

error() public static method

Add an error message.
public static error ( string $message, integer $user_id = null )
$message string
$user_id integer

has_notice() public static method

Check if a notice exists.
public static has_notice ( )

info() public static method

Add an info message.
public static info ( string $message, integer $user_id = null )
$message string
$user_id integer

message() public static method

Add a notice message to be displayed.
public static message ( string $message, string $type, integer $user_id = null )
$message string
$type string
$user_id integer

show() public static method

Show the admin notice.
public static show ( )

success() public static method

Add a success message.
public static success ( string $message, integer $user_id = null )
$message string
$user_id integer