New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filter for post meta / custom fields for the JSON output #220

Closed
michaeltorbert opened this Issue Mar 23, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@michaeltorbert
Copy link
Member

michaeltorbert commented Mar 23, 2017

We should add a custom field for the output at url.com/?sm-xml-search=1....... which is what our JavaScript (or someone else's JS or PHP potentially) can use to see the location data.

@michaeltorbert michaeltorbert added the API label Mar 23, 2017

@michaeltorbert michaeltorbert added this to the 2.5.1 milestone Mar 23, 2017

@michaeltorbert michaeltorbert self-assigned this Mar 23, 2017

michaeltorbert added a commit that referenced this issue Mar 23, 2017

@michaeltorbert

This comment has been minimized.

Copy link
Member Author

michaeltorbert commented Mar 23, 2017

sm_location_fields is the name of the filter hook
The code looks like this:

$location_fields = array(
'location_address' => 'address',
'location_address2' => 'address2',
'location_city' => 'city',
'location_state' => 'state',
'location_zip' => 'zip',
'location_country' => 'country',
'location_phone' => 'phone',
'location_fax' => 'fax',
'location_email' => 'email',
'location_url' => 'url',
'location_special' => 'special',
);

$location_field_map = apply_filters( 'sm_location_fields', $location_fields );

@michaeltorbert michaeltorbert removed their assignment Mar 23, 2017

@wpsmort wpsmort modified the milestones: 2.6, 2.5.1 Mar 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment