Stop overriding files because of updates

WordPress Event Management, Calendars & Registration Forums General Question Stop overriding files because of updates

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 8 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23487

    Hi,
    I have made several changes to the plugin`s php files and stylesheet. The problem is: with every update there is an override of my changes. How can I solve this issue please?

    Marcus Müller
    #23491

    Hi Marcus,

    If it’s a template then you can simply copy it to your theme. The plugin will choose that template over the default ones, and your changes will remain when you update the plug-in.

    As for the stylesheet, I’d recommend you make the changes in your theme. If you need to edit the plug-in stylsesheet you can instead copy it to your theme (call it event-organiser.css for example) and add this snippet to your theme’s functions.php:

    add_filter( 'eventorganiser_stylesheet_src_eo_front', function( $src ) {
         //This will load the front end stylesheet from themes/your-theme/event-organiser.css
         //rather than use the stylesheet in plugins/event-organiser/css/eventorganiser-front-end.css
         return get_stylesheet_directory_uri() . 'event-organiser.css';
    } );
    

    For any other files it’s not possible, though generally the plug-in provides enough hooks to modify the behaviour of the plug-in.

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.