map here'; return $mp_api_script; } //function print_content($content){ // // // print only on the page 'map', and other conditions // // https://developer.wordpress.org/reference/hooks/the_content/ // if (!( is_page('map_prof') && in_the_loop() && is_main_query() )) // return $content; // // // https://developer.wordpress.org/reference/functions/get_posts/ // $get_posts_args = array( // 'numberposts' => -1, // 'post_status' => 'publish', // ); // // $posts_list = get_posts($get_posts_args); // $content .= "

"; // $content .= "nb posts published : "; // $content .= count($posts_list); // $content .= "

"; // foreach ($posts_list as $post_value) { // $content .= "
"; // $content .= "- post title: ["; // $content .= $post_value->post_title; // $content .= "] - content: ["; // $content .= $post_value->post_content; // $content .= "]"; // $content .= "
"; // } // // // TESTS : print posts full content // // // //$posts_list = get_posts($args); // //$content .= "

"; // //$content .= "nb posts published : "; // //$content .= count($posts_list); // //$content .= "

"; // //foreach ($posts_list as $post_key => $post_value) { // // $content .= "

"; // // $content .= "post content : "; // // $content .= $post_key; // // $content .= " : "; // // $content .= "
"; // // foreach ($post_value as $key => $value) { // // $content .= "- ["; // // $content .= $key; // // $content .= "]: ["; // // $content .= $value; // // $content .= "]
"; // // } // // $content .= "

"; // //} // // $content .= '
'; // $content .= ''; // $content .= ''; // // return $content; //}; //add_action('the_content', 'print_content', 1); ?>