| 1 |
<?php |
| 2 |
/** |
| 3 |
* Server side implementation of localized dates handling. |
| 4 |
* |
| 5 |
* @package categoryposts. |
| 6 |
* |
| 7 |
* @since 4.9 |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace categoryPosts; |
| 11 |
|
| 12 |
// Don't call the file directly. |
| 13 |
if ( ! defined( 'ABSPATH' ) ) { |
| 14 |
exit; |
| 15 |
} |
| 16 |
|
| 17 |
/** |
| 18 |
* Embed the front end JS for load more. |
| 19 |
* |
| 20 |
* @since 4.9 |
| 21 |
*/ |
| 22 |
function embed_date_scripts() { |
| 23 |
echo '<script>{'; |
| 24 |
$suffix = 'min.js'; |
| 25 |
if ( defined( 'WP_DEBUG' ) && WP_DEBUG === true ) { |
| 26 |
$suffix = 'js'; |
| 27 |
} |
| 28 |
include __DIR__ . '/js/frontend/date.' . $suffix; |
| 29 |
echo '}</script>'; |
| 30 |
} |
| 31 |
|