$val) { $$key = $val; } $parts = explode(' ', $content); $yt = ""; $n = 0; foreach($parts as $p) { if(str_contains($p, 'youtu')) { $n++; if($n == 1) { $autoplay = 1; } else { $autoplay = 0; } $id = end(explode('/', $p)); if(str_contains($id, '?')) { $id = explode('?', $id)[0]; } if(str_contains($id, '&')) { $id = explode('&', $id)[0]; } ob_start(); echo '
'; //print_r(file_get_contents("https://www.youtube.com/watch?v=$id")); //echo explode('bottom-actions', explode('description-inner', file_get_contents("https://www.youtube.com/watch?v=$id"))[1])[0]; ?>
"Green", "blue" => "Blue", "yellow" => "yellow", "green" => "yellow", "gray" => "gray", "orange" => "orange", "pink" => "pink", "violet" => "violet", ]; } function newmarker_form(){ if ( ! wp_verify_nonce( $_POST['nonce'], 'ajax-nonce' ) ) { die ( 'Onjuiste rechten'); } foreach($_POST as $key => $val) { $$key = $val; } $cats = get_cats(); ?>
$val) { $$key = $val; } parse_str($_POST['formcontents'], $arr); foreach($arr as $key => $val) { $$key = $val; } $file = plugin_dir_url(__FILE__) . 'js/files/new_file.json'; $new_str = file_get_contents($file); $new_arr = json_decode($new_str, true); $to_add = [ "original_color" => $original_color, "original_content"=> $original_content, "original_address"=> $address??"", "lat" => $lat, "lon" => $lon, ]; $new_arr[] = $to_add; $newfile = dirname( __FILE__ ). '/js/files/new_file.json'; file_put_contents($newfile, json_encode($new_arr)); sleep(1); blend_files(); die(); } add_action( 'wp_ajax_nopriv_add_new_marker', 'add_new_marker' ); add_action( 'wp_ajax_add_new_marker', 'add_new_marker'); function blend_files(){ $org = file_get_contents(plugin_dir_url(__FILE__) . 'js/files/v1.json'); $new = file_get_contents(plugin_dir_url(__FILE__) . 'js/files/new_file.json'); $org_arr = json_decode($org, true); $new_arr = json_decode($new, true); print_r($org_arr); echo "New"; print_r($new_arr); $combined = array_merge($org_arr, $new_arr); $newfile = dirname( __FILE__ ). '/js/files/combined.json'; file_put_contents($newfile, json_encode($combined)); echo "Combined"; } add_action('blend_files', 'blend_files'); ?> https://dialektkartor.se/wp-sitemap-posts-post-1.xmlhttps://dialektkartor.se/wp-sitemap-posts-page-1.xmlhttps://dialektkartor.se/wp-sitemap-taxonomies-category-1.xml