WordPress Message Box Styles

Jun 18th, 2010 // In: Wordpress // By: Ryan BayneComments 0

I’ve been using two message box styles from WordPress for almost two weeks and suddenly remembered that I couldnt find them two months ago. I knew a red message box existed and I searched the CSS without any luck. I realised others might have the same issue, Google just wasnt bringing anything up for this basically. These boxes look really good with a header, using line break and even an icon. Please drop a comment on how you use these styles and if there are any I’m not aware about, thank you.

wordpress-message-box-styles

PHP Functions Example

$result = delete_option( eci_getprofilename( $eci['stats']['currentfile'] ) );

// delete csv profile
if( $result )
{
eci_message(‘<strong>Profile Deleted</strong><p>The plugin deleted the profile for your current csv file.</p>’);
}
else
{
eci_error(‘<strong>Profile Delete Failed</strong><p>The plugin could not delet the profile for the selected project, please try again.</p>’);
}

Functions

function eci_message( $message )
{
echo ‘<div id=”message”><p>’. $message .’</p></div>’;
}

function eci_error( $message )
{
echo ‘<div id=”error”><p>’. $message .’</p></div>’;
}

Leave a Reply