{"id":150532,"date":"2021-12-01T12:40:23","date_gmt":"2021-12-01T12:40:23","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/postmoon\/"},"modified":"2021-12-01T12:40:11","modified_gmt":"2021-12-01T12:40:11","slug":"postmoon","status":"closed","type":"plugin","link":"https:\/\/de-ch.wordpress.org\/plugins\/postmoon\/","author":18622811,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"5.8.13","requires":"5.1","requires_php":"","requires_plugins":"","header_name":"PostMoon","header_author":"Kirill Shur(SureCode Marketing)","header_description":"Plugin for testing your actions in WordPress by AJAX  requests.","assets_banners_color":"312e5c","last_updated":"2021-12-01 12:40:11","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/surecode.me\/","header_plugin_uri":"https:\/\/surecode.me","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":794,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"sunukunsinje","date":"2021-12-01 12:40:11"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2638049,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2638049,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500-rtl.png":{"filename":"banner-1544x500-rtl.png","revision":2638049,"resolution":"1544x500","location":"assets","locale":""},"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2638049,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250-rtl.png":{"filename":"banner-772x250-rtl.png","revision":2638049,"resolution":"772x250","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2638049,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":2662319,"resolution":"1","location":"plugin"}},"screenshots":{"1":"The view of the results after AJAX request."}},"plugin_section":[],"plugin_tags":[221,2679,205529,286],"plugin_category":[45,59],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-150532","plugin","type-plugin","status-closed","hentry","plugin_tags-ajax","plugin_tags-debugging","plugin_tags-postmoon","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_category-utilities-and-tools","plugin_committers-sunukunsinje"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/postmoon_312e5c.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/postmoon\/trunk\/screenshot-1.jpg?rev=2662319","caption":"The view of the results after AJAX request."}],"raw_content":"<!--section=description-->\n<p>This plugin lets you debugging your AJAX actions to your WordPress site.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download the plugin.<\/li>\n<li>Activate the plugin in the WordPress Admin Panel.<\/li>\n<li><p>Usage of the plugin:\nShortcode: \"[moon selector=\"my_products\" category=\"laptops\" method=\"post\" action=\"postmoon\" post_type=\"product\" ppp=\"5\" order=\"DESC\"]\nor in php place do_shortcode('[moon selector=\"my_products\" category=\"laptops\" method=\"post\" action=\"postmoon\" post_type=\"product\" ppp=\"5\" order=\"DESC\"]')\".<\/p>\n\n<p>The \"selector\" is ID of the your DOM element.<\/p>\n\n<p>function.php very basic example of the code:<\/p><\/li>\n<\/ol>\n\n<p>\"function postmoon_action_method(){\n  if(isset($_POST[\"post_type\"])){\n  $args = array(\n  'posts_per_page' =&gt; sanitize_text_field($_POST[\"ppp\"]),\n  'post_type' =&gt; sanitize_text_field($_POST[\"post_type\"]),\n  'product_cat' =&gt; sanitize_text_field($_POST[\"category\"]),\n  'order' =&gt; sanitize_text_field($_POST[\"order\"])\n );\n $query = new WP_Query( $args );\n      if ( $query-&gt;have_posts() ) {\n      echo '<\/p>\n\n<ul>';\n      while ( $query-&gt;have_posts() ) : $query-&gt;the_post();\n      global $product;\n      $product_output = '<li>';\n      $product_output .= ''.$product-&gt;get_title().'';\n      $image_links[0] = get_post_thumbnail_id( $product-&gt;id );\n      $gallery = wp_get_attachment_image_src($image_links[0], 'full' );\n      $product_output .=  \"\";\n      $product_output .=  ''.$product-&gt;get_price_html().'';\n      $product_output .=  '<\/li>';\n      echo $product_output;\n      endwhile;\n      echo '<\/ul>\n\n<p>';\n      wp_reset_postdata();\n      }\n  }\ndie();\n}\".\n \"add_action(\"wp_ajax_postmoon\",\"postmoon_action_method\");\".<\/p>\n\n<p>\"add_action(\"wp_ajax_nopriv_postmoon\",\"postmoon_action_method\");\".<\/p>\n\n<p>The results you will see in the your browser only if you are administrator.<\/p>\n\n<!--section=faq-->\n<p>There are currently no FAQs at this time.<\/p>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>First version of the plugin.<\/li>\n<\/ul>","raw_excerpt":"Debugging your WordPress AJAX actions easily!","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/de-ch.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/150532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/de-ch.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/de-ch.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/de-ch.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=150532"}],"author":[{"embeddable":true,"href":"https:\/\/de-ch.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sunukunsinje"}],"wp:attachment":[{"href":"https:\/\/de-ch.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=150532"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/de-ch.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=150532"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/de-ch.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=150532"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/de-ch.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=150532"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/de-ch.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=150532"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/de-ch.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=150532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}