Support » Plugins » Modifying the content of an admin page

  • Hi all – hoping someone could point me in the right direction. I’ve been searching everywhere for info on this but while I think I’m going in the right direction, I can’t seem to get it to work.

    My ultimate goal is to completely remove the concept of “Trackback/pingback” from my install – which is being used as a CMS. I have disabled the pingback features under Admin options, but what I am trying to do is remove the trackback/pingback checkbox and text that shows under the ‘Discussion’ meta-box on the page/post write pages. I really don’t want to explain why it’s there or what it does or why they’re seeing it, so I’d much prefer to remove it completely. That’s where I’m stuck. I haven’t found any plugins that do this so I’m attempting to create my own.

    I was thinking I could just create a filter and/or action which could do a replace or regex search for the input/text, but I’m not finding any function or feature that will let me access the page content prior to displaying on the screen. From what little documentation I’ve found on admin_init or init, these hooks do not pass any arguments (including anything like ‘the_content’).

    So – does anyone know how I can do this via a ‘plugin’ method, using filters/actions and hooks? I know I could simply remove the code from the ‘post_comment_status_meta_box’ function in includes\meta-boxes.php, but if I can get away with not editing the core I’d like to take that route.

Viewing 2 replies - 1 through 2 (of 2 total)
  • So – does anyone know how I can do this via a ‘plugin’ method, using filters/actions and hooks?

    As far as I know, you can’t edit the content of those boxes with a plugin. You might be able to remove the box entirely and replace it with a near duplicate though. Look into remove_meta_box() and add_meta_box() in wp-admin/includes/template.php.

    Interesting… that’s kind of what I thought but I was holding out hope that I could somehow modify the page’s content before it went to the screen. I guess not.

    Thanks.. I might actually go with some jQuery to remove just that line from the metabox.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Modifying the content of an admin page’ is closed to new replies.