Heartbeat: improve setting the errorstate, add ajaxurl to the settings object when loading on the front-end, some code cleanup, see #23216
git-svn-id: http://core.svn.wordpress.org/trunk@23882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2333,6 +2333,9 @@ function __checked_selected_helper( $helper, $current, $echo, $type ) {
|
||||
* @return array $settings
|
||||
*/
|
||||
function wp_heartbeat_settings( $settings ) {
|
||||
if ( ! is_admin() )
|
||||
$settings['ajaxurl'] = admin_url( 'admin-ajax.php', 'relative' );
|
||||
|
||||
if ( is_user_logged_in() )
|
||||
$settings['nonce'] = wp_create_nonce( 'heartbeat-nonce' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user