I'd like to modify a plugin's php file that has only a bunch of if/else and echo statements. I can do it by copying the file into the child theme folder and changing the one little thing, but if the theme gets updated, these updates won't get into the copied file, will they?
Here is part of the file:
<a class="logout with-icon" href="<?php echo wp_logout_url( get_permalinks() ) ?>" data-icon=""><?php _e('Log out', 'franklin') ?></a> <?php elseif ( $crowdfunding_enabled && ! is_user_logged_in() ) : ?> <a class="user-login button with-icon button-alt button-small" href="#" data-reveal-id="login-form" data-icon=""><?php _e('Login / Register', 'franklin') ?></a> <?php endif ?>
I want to change
wp_logout_url( get_permalinks() )
wp_logout_url( home_url() )
There are no actions or filters in this file to add/remove. I've seen other answers that say to fork the plugin first. But then the forked version doesn't get any updates. Is there any other way to make this small modification?
The reason I wanted to do this in the first place was to have the user go to the home page after logging out. After some research (an some more learning), I found out that all that was needed was this line in the child-theme's function file: