Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

New answers tagged

0

Ended up with this as the function: // set up the settings for the theme.js function mb_scripts_settings() { // blanks $mb_ajax_form_type = $mb_get_page_slug = $mb_redirect = $mb_redirect_time = $mb_form_disable = $mb_array = ''; // get the form type $mb_ajax_form_type = ( is_front_page() ? 'change' : 'submit' ); // get the ...


0

While this isn't my finest work, this is another straight-forward way to accomplish putting data in the response: <?php /** * Add data to global context. * * @param string $name * @param mixed $value * @return mixed|array */ function global_js($name = null, $value = null) { static $attached = false; static $variables = []; if (! $...


Top 50 recent answers are included