Viewing 1 replies (of 1 total)
  • Plugin Author Eyal Fitoussi

    (@ninjew)

    HI Martin,
    I added a new function to the latest version of GEO my WP 2.2 that checked if users has a location and displays it. Otherwise it will display a message:

    <?php gmw_fl_get_member_location( $args=false ); ?>

    the parameters it accepts are below:

    $args  = array(
                'location' => array('formatted_address'),
                'member_id' => false,
                'message' => 'No location exists'
            );

    the location parameter can take an array of any of the address component below:

    formatted_address,
    street,
    apt,
    city,
    state,
    state_long,
    zipcode,
    country,
    country_long

    with the member_id you can pass a user ID of a specific user. Otherwise the location of the displayed user will be displayed.

    and if no location found the function will display the message you enter using the message parameter.

Viewing 1 replies (of 1 total)
  • The topic ‘If location not set’ is closed to new replies.