WordPress.org

Ready to get started?Download WordPress

Forums

Modifying the content of an admin page (3 posts)

  1. mferris77
    Member
    Posted 4 years ago #

    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.

  2. s_ha_dum
    Member
    Posted 4 years ago #

    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.

  3. mferris77
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic