Run PHP function in WordPress Admin Panel on all pages.
-
I am trying to run a function that will replace all instances of a word in an admin panel theme (not in the database) so that the theme’s original source is not changed (i.e theme options). I have been trying this from the themes child function file, nothing seems to work. Any help would be approached.
How can I execute a function to run on every WordPress admin page?
Thank you.
-
-
It’s a local port that I am testing this on. No public URL.
I tried a number of hooks but nothing works.
function custom_theme_copy( $content ) {
return $content = str_replace( __( ‘XXXXXXXXXXXXXXXXXX’ ), __( ‘XXXXXXXXXXXXXXX’ ), $content );
}add_filter( ‘admin_head’, ‘custom_theme_copy’ );
-
Ok, then that would be regarding a self-hosted WordPress.org site, which we really can’t help with here.
To clear up any confusion, WordPress.com and WordPress.org are two different entities: http://support.wordpress.com/com-vs-org/
WordPress.org has complete documentation for self-hosted/installed versions of WordPress.org at https://wordpress.org/support/ and support at https://wordpress.org/support/forums/
- The topic ‘Run PHP function in WordPress Admin Panel on all pages.’ is closed to new replies.