Admin Page Framework Documentation

Packages

  • AdminPageFramework
    • Common
      • Factory
      • Form
        • FieldType
      • Utility
    • Factory
      • AdminPage
      • MetaBox
      • NetworkAdmin
      • PageMetaBox
      • PostType
      • TaxonomyField
      • TermMeta
      • UserMeta
      • Widget
    • Utility

Classes

  • AdminPageFramework_AdminNotice
  • AdminPageFramework_ArrayHandler
  • AdminPageFramework_Debug
  • AdminPageFramework_Debug_Base
  • AdminPageFramework_Debug_Log
  • AdminPageFramework_Debug_Utility
  • AdminPageFramework_RegisterClasses

Resources

  • Tutorials
  • Support
  • Reporting Issues

Class AdminPageFramework_AdminNotice

Displays notification in the administration area.

Usage

new AdminPageFramework_AdminNotice( 'There was an error while doing something...' );

Example

new AdminPageFramework_AdminNotice( 'Error occurred', array( 'class' => 'error' ) );
new AdminPageFramework_AdminNotice( 'Setting Updated', array( 'class' => 'updated' ) );

For details of arguments, see the __construct() method below.

Package: AdminPageFramework\Common\Utility
Copyright: Copyright (c) 2013-2022, Michael Uno
Author: Michael Uno
Since: 3.5.0
Extends: AdminPageFramework_FrameworkUtility
Image: http://admin-page-framework.michaeluno.jp/image/common/utility/admin_notice.png
Located at factory/_common/utility/admin_notice/AdminPageFramework_AdminNotice.php

Methods summary

public
# __construct( string $sNotice, array $aAttributes = array( 'class' => 'error' ), array $aCallbacks = array() )

Sets up hooks and properties.

Parameters

$sNotice
string
$sNotice The message to display.
$aAttributes
array
$aAttributes An attribute array. Set 'updated' to the 'class' element to display it in a green box.
$aCallbacks
array
$aCallbacks [3.7.0+] An array storing callbacks.

Arguments

  • should_show - (callable) Determines whether the admin notice should be displayed or not.

Since

3.5.0

Magic methods summary

Related

If you find undocumented functionality, please report it here.

Admin Page Framework