Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter JohnStaples

    (@johnstaples)

    Plugin Author Joe Dolson

    (@joedolson)

    Probably; although it would require some custom programming to do. Essentially, you’d need a custom function that took the data saved in one plug-in and copied it into the other plug-in. In My Calendar, you’d add that to the ‘mc_save_location’ action:

    add_action( 'mc_save_location', 'copy_my_location', 10, 2 );
    function copy_my_location( $location_ID, $data ) {
       // functio use new location data and copy into map plugin
    }

    I don’t know WP Google Maps to know what would need to be done past that point. The data array for My Calendar is pretty straightforward; just an associative array.

    Thread Starter JohnStaples

    (@johnstaples)

    Thanks Joe! I guess if I decide to tackle this I would prefer to have My Calendar simply use the location data rather than its own. That way there would never be any issues with keeping the two separate tables synchronized. I am a long-time programmer but fairly new to WordPress so I am not even sure yet whether a plugin could access another’s data.

    Thanks again for a great plugin and great support!

    Plugin Author Joe Dolson

    (@joedolson)

    That would be more difficult, but you’re welcome to explore finding a way to do that. You indicated that you’ve already tried adding a custom field – that might be your best path. You’d want to add a custom field that pulled from the Google Maps locations so you could link to that. You’d also have to write a custom way to display that data, of course, and wouldn’t have any access to the My Calendar location filters in shortcodes.

    Thread Starter JohnStaples

    (@johnstaples)

    Thanks for the tips Joe! I hope to have time to try this and if I get something figured out I’ll share it with you.

    Oh and regarding My Calendar custom fields…Brilliant!! The docs were crystal clear and even though I had never added a custom field to a plugin before within 30 minutes I had it working. Very happy with that!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can My Calendar Get Locations From Other Tables?’ is closed to new replies.