Skip to content

Instantly share code, notes, and snippets.

@mikeschinkel
Created November 27, 2010 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeschinkel/717515 to your computer and use it in GitHub Desktop.
Save mikeschinkel/717515 to your computer and use it in GitHub Desktop.
Using the Admin Parse Output plugin for WordPress
/*
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&lsquo;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