Slide 30
Slide 30 text
WordPress͔ΒJSʹΛ͢
wp_localize_script Λ͑ग़དྷΔɻʢຊདྷͷ༻๏ͱͣ
ΕΔؾ͢Δ͚Ͳʣ
wp_localize_script(
'vuepress-script',
'WPSettings',
[
'root' => esc_url_raw( rest_url() ),
'nonce' => wp_create_nonce( 'wp_rest' ),
'date_permastruct' => $wp_rewrite->get_date_permastruct(),
'page_on_front' => get_option('page_on_front'),
'page_for_posts' => get_option('page_for_posts'),
'category_base' => get_option('category_base') ? get_option('category_base') : 'category',
'tag_base' => get_option('tag_base') ? get_option('tag_base') : 'tag'
]
);
30