This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Can be called whenever. | |
function add_admin_notice( $code, $message, $type = 'error' ) { | |
global $wp_admin_notices; | |
if ( ! isset( $wp_admin_notices ) ) | |
$wp_admin_notices = array(); | |
$wp_admin_notices[] = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Return a "front page's" real permalink | |
* | |
* @param string $link The page permalink. | |
* @param int $page_id The page id. | |
* @param bool $sample Whether to return a sample permalink. | |
* | |
* @return string The filtered permalink. | |
*/ |