How to make a permanent change in plugin ?

This topic contains 3 replies, has 4 voices, and was last updated by  Stiofan O’Connor 7 years, 5 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #400541

    mah1973
    Expired Member
    Post count: 5

    Hello,
    each time the plugin is updated the change I made is gone. How can I preserve the changes made in the core plugin even after updates ?

    can you please provide some code to use it in “Code Snippets” plugin ?

    I only want to change the url in geodirectory/geodirectory-functions/custom_fields_predefined.php
    from
    maps.apple.com
    to
    maps.google.com

    because apple link is not working with my android app at all. ( I know the apple redirects to google but it’s not working in the app )

    Can this small edit be done with code snippets to avoid upgrade issues ? please help

    #400582

    Guust
    Moderator
    Post count: 29970

    I’ll get a developer to have a closer look for you.
    Thanks

    #400615

    Alex Rollin
    Moderator
    Post count: 27815

    Hello!

    You can use a child theme to preserve changes. You can read up about how to use a child theme here:

    https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/

    A search through the forum found this, where a user wanted to have a button to open the directions in Google Maps.

    https://wpgeodirectory.com/support/topic/show-button-open-in-google-maps/

    #400635

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Yes please use the code snippets plugin and use the following snippet.

    
    
    
    add_filter('geodir_custom_field_output_text_key_get_directions','_my_change_map_link',11,3);
    function _my_change_map_link($html,$location,$cf){
      
      $html = str_replace("maps.apple.com","maps.google.com",$html);
      
      return $html;
    }

    Thanks,

    Stiofan

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount