• Is there a way to get geolocation to default to “off”? I use it occasionally, usually on my android phone. I installed the plugin to make the geolocation visible. I don’t need it on most of my posts though and now I have to disable it everytime.

    Thanks, keep up the good work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • +1

    Would be nice to have that option in the settings page.

    Regards

    jopher91

    (@jopher91)

    Not sure if this is a feature or a bug, but the fix is easy enough if you’re willing to edit the code of geolocation.php

    I think the problem is that when ‘public’ and ‘geolocation-on’ are unset (as they are for new posts) the code that checks their values returns an empty string: but we’re only setting posts to be non-public and off if the value is explicitly ‘0’.

    In the code for the function admin_head(), look for the line:

    if(public == ‘0’)

    and change it to

    if((public == ‘0’) || (public == ”))

    Then make a similar change five lines down:

    if((on == ‘0’) || (on == ”))

    (I guess changing the ‘public’ default is optional; I did, but you might not want to.) I agree, I hope a ‘default off’ becomes available on the settings page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get default "off" to geolocation when creating a new post’ is closed to new replies.