Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component refactor and loading indicator stub #11

Merged
merged 18 commits into from
Jun 13, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion includes/page-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function enqueue_assets() {
return;
}

wp_enqueue_script(
wp_register_script(
'wordcamp-pwa-page',
WCPWAP_PLUGIN_URL . '/dist/pwa-page.js',
file_exists( WCPWAP_PLUGIN_PATH . '/dist/pwa-page.deps.json' ) ?
Expand All @@ -71,6 +71,15 @@ function enqueue_assets() {
true
);

wp_localize_script( 'wordcamp-pwa-page', 'WCPWAP', [
vdwijngaert marked this conversation as resolved.
Show resolved Hide resolved
'urls' => [
'schedule' => esc_url( site_url( __( 'schedule', 'wordcamp-pwa-page' ) ) ),
'posts' => esc_url( get_post_type_archive_link( 'post' ) ),
]
] );

wp_enqueue_script( 'wordcamp-pwa-page' );
vdwijngaert marked this conversation as resolved.
Show resolved Hide resolved

wp_enqueue_style(
'wordcamp-pwa-page',
WCPWAP_PLUGIN_URL . '/templates/assets/pwa-page.css',
Expand Down