Created
November 27, 2010 02:59
-
-
Save mikeschinkel/717515 to your computer and use it in GitHub Desktop.
Using the Admin Parse Output plugin for WordPress
This file contains 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
/* | |
functions.php - Plugin that this example uses: https://gist.github.com/717514 | |
*/ | |
add_action('admin_parse_output', 'yoursite_admin_parse_output'); | |
function yoursite_admin_parse_output($html) { | |
global $pagenow; | |
if ($pagenow=='themes.php' && isset($_GET['page']) && $_GET['page']=='custom-header') { | |
$msg = '<p>' . __( 'If you don‘t want to upload your own image, you can use one of these cool headers.' ) . '</p>'; | |
$html = str_replace($msg,'',$html); | |
$html = str_replace(__( 'Default Images' ),__( 'Available Images' ),$html); | |
$html = preg_replace('#<tr valign="top">\s*<th scope="row">'.__('Upload Image').'</th>(.*)?</td>\s*</tr>#Us','',$html); | |
} | |
return $html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment