{"id":2396,"date":"2020-11-12T02:34:12","date_gmt":"2020-11-12T02:34:12","guid":{"rendered":"https:\/\/tschaki.com\/?p=2396"},"modified":"2021-11-20T15:15:31","modified_gmt":"2021-11-20T15:15:31","slug":"wordpress-call-php-function-with-javascript","status":"publish","type":"post","link":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/","title":{"rendered":"WordPress: Call PHP function with Javascript"},"content":{"rendered":"<h2 id=\"h-connection-between-php-and-javascript\">Connection between PHP and Javascript<\/h2>\n\n\n\n<p>To establish the connection between Javascript and PHP, basically three code blocks are needed. This is used to call PHP via Javascript<\/p>\n\n\n\n<p>The first part defines that we include a new Javascript file and localize it immediately. This javascript file can later contain the jQuery script. Primarily, this allows to translate Javascript content correctly with PHP and at the same time functions can be queried via AJAX.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-text-align-center\">Paste this function into the <strong>main file<\/strong> of your <strong>active theme<\/strong> or <strong>plugin<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;PHP&quot;,&quot;modeName&quot;:&quot;php&quot;}\">function hook_tschaki_ajax( ){\n    wp_enqueue_script( 'script-checker', plugin_dir_url( __FILE__ ) . 'js\/script-checker.js' );\n    wp_localize_script( 'script-checker', 'account_script_checker', array(\n            'ajaxurl' =&gt; admin_url( 'admin-ajax.php' ),\n            'fail_message' =&gt; __('Connection to server failed. Check the mail credentials.', 'script-checker'),\n            'success_message' =&gt; __('Connection successful. ', 'script-checker')\n        )\n    );\n}\nadd_action( 'enqueue_scripts', 'hook_tschaki_ajax' );\nadd_action( 'admin_enqueue_scripts', 'hook_tschaki_ajax' );<\/pre><\/div>\n\n\n\n<h3 id=\"h-code-definition\">Code Definition<\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>Row<\/td><td>Description<\/td><\/tr><tr><td>1. <\/td><td>Function &#8216;hook_tschaki_ajax()&#8217; is created.<\/td><\/tr><tr><td>2.<\/td><td><code>script-checker.js<\/code> is mounted as (empty) file.<\/td><\/tr><tr><td>3. <\/td><td>AJAX URL is declared with function for JS (<code>account_script_checker<\/code>). Handle &#8220;<code>script-checker<\/code>&#8221; must be present on line 2 and 3.<\/td><\/tr><tr><td>4.<\/td><td>Contains the standard AJAX URL of WordPress <code>admin-ajax.php<\/code>.<\/td><\/tr><tr><td>5.\/6.<\/td><td>Translatable strings or values for Javascript execution.<\/td><\/tr><tr><td>10.<\/td><td>Mount the function into the WordPress frontend as Javascript. (Using Ajax in the frontend)<\/td><\/tr><tr><td>11.<\/td><td>Mount the function into the WordPress backend as Javascript. (Using Ajax in the backend)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 id=\"h-php-function-to-be-executed\">PHP function to be executed<\/h2>\n\n\n\n<p>Right below the new code, the function to be called by Javascript can now be declared in PHP. Two actions are connected to the function:<\/p>\n\n\n\n<ul><li><code>wp_ajax_nopriv_<em><strong>check_tschaki_ajax<\/strong><\/em><\/code><\/li><li><code>wp_ajax_<em><strong>check_tschaki_ajax<\/strong><\/em><\/code><\/li><\/ul>\n\n\n\n<p><code><a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/wp_ajax_nopriv_action\/\" target=\"_blank\" rel=\"noreferrer noopener\">nopriv<\/a><\/code> means that this function may also be executed by not logged in WordPress users.<\/p>\n\n\n\n<p>The second hook is only used if the user is logged in, so <code><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/is_user_logged_in\/\">is_user_logged_in()<\/a> ==<\/code> returns <code>true<\/code> . Would be useful for example for functions that visitors should not execute.<\/p>\n\n\n\n<p class=\"has-text-align-center\">Paste this function into the <strong>main file<\/strong> of your active <strong>theme<\/strong> or <strong>plugin<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;PHP&quot;,&quot;modeName&quot;:&quot;php&quot;}\">function check_tschaki_ajax( ) {\n    \/\/ entry here your function for ajax request\n  \techo 'failed_connection';\n}\nadd_action( 'wp_ajax_nopriv_check_tschaki_ajax', 'check_tschaki_ajax' );\nadd_action( 'wp_ajax_check_tschaki_ajax', 'check_tschaki_ajax' );<\/pre><\/div>\n\n\n\n<h2 id=\"h-javascript-integration\">Javascript integration<\/h2>\n\n\n\n<p>With the following code the previously declared PHP function is executed by Javascript. The function is called on line 5 (&#8216;<code>check_tschaki_ajax<\/code>&#8216;).<\/p>\n\n\n\n<p class=\"has-text-align-center\">Paste the code in Javascript of the active <strong>theme <\/strong>or <strong>plugin<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;javascript&quot;,&quot;mime&quot;:&quot;text\/javascript&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;JavaScript&quot;,&quot;modeName&quot;:&quot;js&quot;}\">jQuery.ajax({\n        type: 'POST',\n        url: account_script_checker.ajaxurl,\n        data: {\n            action: 'check_tschaki_ajax',\n            fail_message: account_script_checker.fail_message,\n            success_message: account_script_checker.success_message\n        },\n        beforeSend: function ( ) {\n            jQuery( 'body' ).html( account_script_checker.loading_message );\n        },\n        success: function ( data, textStatus, XMLHttpRequest ) {\n            if( data === 'failed_connection0' ) {\n                jQuery( '.checkmailstatus td' ).html( '&lt;div class=&quot;error notice&quot;&gt;&lt;p&gt;' + account_script_checker.fail_message + '&lt;\/p&gt;&lt;\/div&gt;' );\n            } else {\n                jQuery( '.checkmailstatus td' ).html( '&lt;div class=&quot;success notice notice-success&quot;&gt;&lt;p&gt;' + account_script_checker.success_message + data + '&lt;\/p&gt;&lt;\/div&gt;' );\n            }\n        },\n        error: function ( XMLHttpRequest, textStatus, errorThrown ) {\n            alert( errorThrown );\n        }\n    });<\/pre><\/div>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Wordpress makes it possible: With Wordpress it is possible to execute PHP functions via Javascript or jQuery. If used correctly, all parameters and variables are transmitted and translateable.<\/p>","protected":false},"author":1,"featured_media":2398,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[60,99],"tags":[103,106,105,104,102,101,100],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v16.6 (Yoast SEO v17.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Wordpress: Call PHP function with Javascript &bull; tschaki<\/title>\n<meta name=\"description\" content=\"Call PHP functions with Javascript or jQuery. If used correctly, all parameters are transferred and are translatable.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Wordpress: Call PHP function with Javascript\" \/>\n<meta property=\"og:description\" content=\"Call PHP functions with Javascript or jQuery. If used correctly, all parameters are transferred and are translatable.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"tschaki\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-12T02:34:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-11-20T15:15:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1580\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Trent Bojett\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/tschaki.com\/#organization\",\"name\":\"Tschaki.com\",\"url\":\"https:\/\/tschaki.com\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/tschaki.com\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/12\/tschaki-logo-1.png\",\"contentUrl\":\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/12\/tschaki-logo-1.png\",\"width\":1022,\"height\":273,\"caption\":\"Tschaki.com\"},\"image\":{\"@id\":\"https:\/\/tschaki.com\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tschaki.com\/#website\",\"url\":\"https:\/\/tschaki.com\/\",\"name\":\"tschaki\",\"description\":\"Codesupport and alternatives\",\"publisher\":{\"@id\":\"https:\/\/tschaki.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tschaki.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg\",\"contentUrl\":\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg\",\"width\":1580,\"height\":500,\"caption\":\"create wordpress plugin\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#webpage\",\"url\":\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/\",\"name\":\"Wordpress: Call PHP function with Javascript &bull; tschaki\",\"isPartOf\":{\"@id\":\"https:\/\/tschaki.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#primaryimage\"},\"datePublished\":\"2020-11-12T02:34:12+00:00\",\"dateModified\":\"2021-11-20T15:15:31+00:00\",\"description\":\"Call PHP functions with Javascript or jQuery. If used correctly, all parameters are transferred and are translatable.\",\"breadcrumb\":{\"@id\":\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tschaki.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress: Call PHP function with Javascript\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#webpage\"},\"author\":{\"@id\":\"https:\/\/tschaki.com\/#\/schema\/person\/b4bf4286ba196fcd756146568acb3219\"},\"headline\":\"WordPress: Call PHP function with Javascript\",\"datePublished\":\"2020-11-12T02:34:12+00:00\",\"dateModified\":\"2021-11-20T15:15:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#webpage\"},\"wordCount\":279,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/tschaki.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg\",\"keywords\":[\"ajax\",\"async\",\"function\",\"php\",\"plugin\",\"themes\",\"wordpress\"],\"articleSection\":[\"Technology\",\"Wordpress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/tschaki.com\/#\/schema\/person\/b4bf4286ba196fcd756146568acb3219\",\"name\":\"Trent Bojett\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/tschaki.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7344f00aff4a7391a8f499ff58fc7275?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7344f00aff4a7391a8f499ff58fc7275?s=96&d=mm&r=g\",\"caption\":\"Trent Bojett\"},\"description\":\"My name is Trent Bojett, I am 28 years old and I live in Switzerland. Because of my enthusiasm for writing and the logical world (= software development) I started this blog in early 2020.\",\"sameAs\":[\"https:\/\/tschaki.com\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Wordpress: Call PHP function with Javascript &bull; tschaki","description":"Call PHP functions with Javascript or jQuery. If used correctly, all parameters are transferred and are translatable.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/","og_locale":"en_US","og_type":"article","og_title":"Wordpress: Call PHP function with Javascript","og_description":"Call PHP functions with Javascript or jQuery. If used correctly, all parameters are transferred and are translatable.","og_url":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/","og_site_name":"tschaki","article_published_time":"2020-11-12T02:34:12+00:00","article_modified_time":"2021-11-20T15:15:31+00:00","og_image":[{"width":1580,"height":500,"url":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Trent Bojett","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/tschaki.com\/#organization","name":"Tschaki.com","url":"https:\/\/tschaki.com\/","sameAs":[],"logo":{"@type":"ImageObject","@id":"https:\/\/tschaki.com\/#logo","inLanguage":"en-US","url":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/12\/tschaki-logo-1.png","contentUrl":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/12\/tschaki-logo-1.png","width":1022,"height":273,"caption":"Tschaki.com"},"image":{"@id":"https:\/\/tschaki.com\/#logo"}},{"@type":"WebSite","@id":"https:\/\/tschaki.com\/#website","url":"https:\/\/tschaki.com\/","name":"tschaki","description":"Codesupport and alternatives","publisher":{"@id":"https:\/\/tschaki.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tschaki.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#primaryimage","inLanguage":"en-US","url":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg","contentUrl":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg","width":1580,"height":500,"caption":"create wordpress plugin"},{"@type":"WebPage","@id":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#webpage","url":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/","name":"Wordpress: Call PHP function with Javascript &bull; tschaki","isPartOf":{"@id":"https:\/\/tschaki.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#primaryimage"},"datePublished":"2020-11-12T02:34:12+00:00","dateModified":"2021-11-20T15:15:31+00:00","description":"Call PHP functions with Javascript or jQuery. If used correctly, all parameters are transferred and are translatable.","breadcrumb":{"@id":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tschaki.com\/en\/"},{"@type":"ListItem","position":2,"name":"WordPress: Call PHP function with Javascript"}]},{"@type":"Article","@id":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#article","isPartOf":{"@id":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#webpage"},"author":{"@id":"https:\/\/tschaki.com\/#\/schema\/person\/b4bf4286ba196fcd756146568acb3219"},"headline":"WordPress: Call PHP function with Javascript","datePublished":"2020-11-12T02:34:12+00:00","dateModified":"2021-11-20T15:15:31+00:00","mainEntityOfPage":{"@id":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#webpage"},"wordCount":279,"commentCount":1,"publisher":{"@id":"https:\/\/tschaki.com\/#organization"},"image":{"@id":"https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg","keywords":["ajax","async","function","php","plugin","themes","wordpress"],"articleSection":["Technology","Wordpress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/tschaki.com\/en\/wordpress-call-php-function-with-javascript\/#respond"]}]},{"@type":"Person","@id":"https:\/\/tschaki.com\/#\/schema\/person\/b4bf4286ba196fcd756146568acb3219","name":"Trent Bojett","image":{"@type":"ImageObject","@id":"https:\/\/tschaki.com\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/7344f00aff4a7391a8f499ff58fc7275?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7344f00aff4a7391a8f499ff58fc7275?s=96&d=mm&r=g","caption":"Trent Bojett"},"description":"My name is Trent Bojett, I am 28 years old and I live in Switzerland. Because of my enthusiasm for writing and the logical world (= software development) I started this blog in early 2020.","sameAs":["https:\/\/tschaki.com"]}]}},"_links":{"self":[{"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/posts\/2396"}],"collection":[{"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/comments?post=2396"}],"version-history":[{"count":45,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/posts\/2396\/revisions"}],"predecessor-version":[{"id":3047,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/posts\/2396\/revisions\/3047"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/media\/2398"}],"wp:attachment":[{"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/media?parent=2396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/categories?post=2396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/tags?post=2396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}