Site icon Hip-Hop Website Design and Development

Modify php code from plugin

I might like to change a plugin’s php file that has solely a bunch of if/else and echo statements. I can do it by copying the file into the kid theme folder and altering the one little factor, but when the theme will get up to date, these updates will not get into the copied file, will they?

Right here is a part of the file:

<a category="logout with-icon" href="<?php echo wp_logout_url( get_permalinks() ) ?>" data-icon=""><?php _e('Log off', 'franklin') ?></a>

<?php elseif ( $crowdfunding_enabled && ! is_user_logged_in() ) : ?>

    <a category="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 wish to change

wp_logout_url( get_permalinks() )

to

wp_logout_url( home_url() )

There aren’t any actions or filters on this file so as to add/take away. I’ve seen different solutions that say to fork the plugin first. However then the forked model does not get any updates. Is there another approach to make this small modification?

Replace:

The rationale I needed to do that within the first place was to have the person go to the house web page after logging out. After some analysis (an some extra studying), I discovered that every one that was wanted was this line within the child-theme’s perform file:

add_action('wp_logout',create_function('','wp_redirect(home_url());exit();'));