Plugin Directory

Changeset 2189952


Ignore:
Timestamp:
11/11/2019 05:31:18 PM (6 years ago)
Author:
webphone
Message:

Hide footer version for plugin pages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • webphone/trunk/webphone.php

    r2189900 r2189952  
    8888    $plugin->run();
    8989
     90  global $pagenow;
     91    if ($pagenow == 'admin.php' && stristr($_GET['page'], $plugin->get_plugin_name()) !== false) {
     92      // Remove 'thank you for creating with wordpress' and wordpress version in admin footer plugin pages only
     93    add_action( 'admin_init', 'WPHD_edit_footer' );
     94    add_action( 'admin_init', 'WPHD_edit_version_footer' );
     95  }
     96
    9097}
    9198WPHD_run_webphone_dynamics();
    9299
     100// Remove 'thank you for creating with wordpress' and wordpress version in admin footer plugin pages
     101function WPHD_edit_text($content) {
     102  return '';
     103}
     104function WPHD_edit_footer() {
     105  add_filter( 'admin_footer_text', 'wpse_edit_text', 10 );
     106}
     107function WPHD_edit_version_footer() {
     108  add_filter( 'update_footer', 'WPHD_edit_text', 10 );
     109}
Note: See TracChangeset for help on using the changeset viewer.