BuddyDev

Search

Editing Mediapress theme template for admin/templates/gallery files

  • Participant
    Level: Initiated
    Posts: 13
    Christian W Zagarskas on #25273

    We are familiar with how to edit the templates in the following way:
    adding – mediapress/default/gallery/manage/edit-media.php

    However, in the situation where the ADMIN panel also needs to be modified
    how can we override these: admin/templates/gallery/edit-media.php

    Simply adding those folders into the theme is not enough.

    Are we to assume there is no way to modify the admin/templates/gallery PHP files?
    If so, are the only options available to use the template hooks?

  • Participant
    Level: Initiated
    Posts: 13
    Christian W Zagarskas on #25274

    I was looking around in class-mpp-admin-post-helper.php and found this:

      class MPP_Admin_Post_Helper
       private function __construct ()
       $this->template_dir = mediapress()->get_path() . 'admin/templates/';
    

    So, seems there is no way to set this directory to use the theme…

    Can we have a future release where we define a constant, like this?

    For example:

     define( 'MPP_GALLERY_SLUG', 'my_custom_slug'); // works great 
      define( 'MPP_ADMIN_TEMPLATE_DIR', '/mytheme/mediapress/admin'); // new feature
    

    (Unless there is a way to modify the admin/templates/gallery PHP files that I can not see here)

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #25280

    Hi Christian,

    Thank you for the suggestion.
    Sure, we can make it overridable in future release.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved