{"id":19495,"date":"2012-08-16T19:40:34","date_gmt":"2012-08-16T19:40:34","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-geoposts\/"},"modified":"2012-08-20T20:32:48","modified_gmt":"2012-08-20T20:32:48","slug":"wp-geoposts","status":"publish","type":"plugin","link":"https:\/\/azb.wordpress.org\/plugins\/wp-geoposts\/","author":4270504,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0","stable_tag":"trunk","tested":"3.4.2","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"WP GeoPosts","header_author":"Francis Yaconiello","header_description":"","assets_banners_color":"","last_updated":"2012-08-20 20:32:48","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/fyaconiello.github.com\/wp-geo-posts\/","header_plugin_uri":"http:\/\/fyaconiello.github.com\/wp-geo-posts\/","header_author_uri":"http:\/\/www.yaconiello.com","rating":5,"author_block_rating":0,"active_installs":40,"downloads":2828,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.0":"<p>Feature release<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[5518,69094,2591,2215,2205],"plugin_category":[49],"plugin_contributors":[90352],"plugin_business_model":[],"class_list":["post-19495","plugin","type-plugin","status-publish","hentry","plugin_tags-distance","plugin_tags-distance-search","plugin_tags-geo","plugin_tags-location","plugin_tags-metabox","plugin_category-maps-and-location","plugin_contributors-fyaconiello","plugin_committers-fyaconiello"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-geoposts.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<h4>Features<\/h4>\n\n<ol>\n<li>Adds <code>location<\/code>, <code>latitude<\/code>, and <code>longitude<\/code> meta + metaboxes to any content type.<\/li>\n<li>Provides an easy to use interface for selecting which content types to apply the above meta values. <em>Note: this allows selection of built in types: page and post as well as any registered custom post types.<\/em><\/li>\n<li>Provides <code>WP_GeoQuery<\/code> an extended <code>WP_Query<\/code> class for doing distance based and geo-aware queries.<\/li>\n<\/ol>\n\nComing Soon!\n\n<ul>\n<li>Add support for <code>within radius<\/code> option to WP_GeoQuery<\/li>\n<li>HTML5 geolocation of visitors, with a fallback to <code>Change Location<\/code> (stored as COOKIE)<\/li>\n<li>Custom Markers by post type.<\/li>\n<li>Shortags for:\n\n<ul>\n<li><code>Get Directions<\/code> link (utilizing Google Maps)<\/li>\n<li>Static Map - show one or more posts on a static map<\/li>\n<li>Dynamic Map - show one or more posts on a dynamic map<\/li>\n<li>Option to show radius as overlay (for <code>within radius<\/code> calls)<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<!--section=installation-->\n<h4>Installation<\/h4>\n\n<ol>\n<li>Upload the entire <code>wp-geo-posts<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the <code>Plugins<\/code> menu in WordPress.<\/li>\n<\/ol>\n\n<h4>Setup<\/h4>\n\n<ol>\n<li>Click the <code>Settings<\/code> link on the plugin management page <strong>OR<\/strong> click the <code>WP GeoPosts<\/code> link from the Settings flyout menu.<\/li>\n<li>Generate a Google Maps API Key and enter it into the provided text input. <em>Note: this is optional and used for Google Maps API calls.<\/em><\/li>\n<li>Select all of the content types that you wish to attach georelated content from the leftmost bank of choices and move them to the rightmost column.<\/li>\n<li>Submit the Form by clicking <code>Save Changes<\/code>.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>What are the post meta keys that your metabox adds?<\/dt>\n<dd><p>For every post type selected on the plugin settings page. That type's add\/edit screens will have an additional metabox automatically added. Metadata that is added to each record:<\/p>\n\n<ul>\n<li><strong>Location<\/strong> via <code>wp_gp_location<\/code><\/li>\n<li><strong>Latitude<\/strong> via <code>wp_gp_latitude<\/code><\/li>\n<li><strong>Longitude<\/strong> via <code>wp_gp_longitude<\/code><\/li>\n<\/ul><\/dd>\n<dt>How do I use WP_GeoQuery? (What is it for?)<\/dt>\n<dd><p>Make a geo-aware query against the posts table. <code>WP_GeoQuery<\/code> accepts all arguments that <code>WP_Query<\/code> takes. <code>latitude<\/code> and <code>longitude<\/code> are optional parameters. If passed, <code>distance<\/code> is calculated and returned with each result. In addition to the regular fields, each result returns <code>latitude<\/code>, <code>longitude<\/code>, and <code>location<\/code>.<\/p>\n\n<pre><code>&lt;?php\n$query = new WP_GeoQuery(array(\n  'latitude' =&gt; '37.5160', \/\/ User's Latitude (optional)\n  'longitude' =&gt; '-77.5005', \/\/ User's Longitude (optional)\n  'posts_per_page' =&gt; 25, \/\/ Any regular options available via WP_Query\n));\nforeach($query-&gt;posts as $post)\n{\n    echo \" {$post-&gt;post_title}&lt;br \/&gt;\\n\";\n\n    \/\/ returned only if latitude and longitude are passed into WP_GeoQuery\n    echo \" {$post-&gt;distance}&lt;br \/&gt;\\n\";\n\n    \/\/ Always returned by WP_GeoQuery\n    echo \" {$post-&gt;location}&lt;br \/&gt;\\n\";\n    echo \" {$post-&gt;latitude}&lt;br \/&gt;\\n\";\n    echo \" {$post-&gt;longitude}&lt;br \/&gt;\\n\";\n    echo \"&lt;br \/&gt;\\n\";\n}\n?&gt;\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial Release<\/li>\n<\/ul>","raw_excerpt":"A simple Wordpress plugin for adding geographic data to posts.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/19495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=19495"}],"author":[{"embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/fyaconiello"}],"wp:attachment":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=19495"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=19495"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=19495"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=19495"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=19495"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=19495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}