Esempio n. 1
0
 /**
  * Function that removes yoast json ld script
  * that stops page transition to work on home page
  * Hooks to wpseo_json_ld_output in order to disable json ld script
  * @return bool
  *
  * @param $data array json ld data that is being passed to filter
  *
  * @version 0.2
  */
 function qode_remove_yoast_json_on_ajax($data)
 {
     //is current request made through ajax?
     if (qode_is_ajax()) {
         //disable json ld script
         return array();
     }
     return $data;
 }
 /**
  * Function that removes yoast json ld script
  * that stops page transition to work on home page
  * Hooks to disable_wpseo_json_ld_search in order to disable json ld script
  * @return bool
  *
  * @version 0.1
  */
 function qode_remove_yoast_json_on_ajax()
 {
     //is yoast installed and is current request made through ajax?
     if (qode_is_ajax()) {
         //disable json ld script
         return true;
     }
     return false;
 }