impress-org / google-maps-builder

One Google Maps plugin to rule them all. Google Maps Builder is intuitive, sleek, powerful and easy to use. Forget the rest, use the best.
https://wordpress.org/plugins/google-maps-builder/
32 stars 9 forks source link

get_mashup_markers_callback() loads posts with status of draft, future and pending #261

Closed MALIK-0 closed 6 years ago

MALIK-0 commented 6 years ago

Hi there, I want to report an bug regarding get_mashup_markers_callback() also loading posts with the status of draft, future and pending.

Reason: As you can see in the WordPress Codex if queries run in an admin context (administration area or AJAX call), protected statuses are added to the query. By default protected statuses are 'future', 'draft' and 'pending'.

Solution:

// class-gmb-mashups-builder.php on line 517
$args = array(
    'post_type' => $post_type,
    'posts_per_page' => - 1,
    'post_status' => 'publish' // add this line to make sure only published posts are queried
);

Can you please look into this and add the fix to the core?

Thank you,

Tobias

nishitlangaliya commented 6 years ago

Issue moved to WordImpress/Maps-Builder-Pro #106 via ZenHub