Changeset 12264 for trunk/src/bp-core/bp-core-cssjs.php
- Timestamp:
- 10/26/2018 12:06:50 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-cssjs.php
r11447 r12264 537 537 if ( wp_script_is( 'bp-moment-locale', 'registered' ) ) { 538 538 wp_enqueue_script( 'bp-moment-locale' ); 539 540 if ( function_exists( 'wp_add_inline_script' ) ) { 541 wp_add_inline_script ( 'bp-livestamp', bp_core_moment_js_config() ); 542 } else { 543 add_action( 'wp_footer', '_bp_core_moment_js_config_footer', 20 ); 544 } 539 wp_add_inline_script ( 'bp-livestamp', bp_core_moment_js_config() ); 545 540 } 546 541 … … 569 564 return $inline_js; 570 565 } 571 572 /**573 * Print moment.js config in page footer.574 *575 * Will be removed once we set our minimum version of WP 4.5.576 *577 * @since 2.7.0578 *579 * @access private580 */581 function _bp_core_moment_js_config_footer() {582 if ( ! wp_script_is( 'bp-moment-locale' ) ) {583 return;584 }585 586 printf( '<script>%s</script>', bp_core_moment_js_config() );587 }
Note: See TracChangeset
for help on using the changeset viewer.