這篇是針對使用 WordPress.org 作為 Quick Deploy Solution,快速製作 POC (Proof of Concept) 時前台該如何開發的介紹。由於牽涉到各團隊的組成,有的團隊有 RD,有的團隊沒有,因此這套 Solution 必須要能滿足不同使用情境。
| 術語 Terminology | 概念 Concept |
|---|---|
| Theme | 佈景主題,也就是網站的外觀 |
| #!/usr/bin/env bash | |
| clear | |
| # Take User Inputs | |
| read -p "Site URL: " url | |
| read -p "Site title: " title | |
| read -p "Site Slug: " sslug | |
| read -p "DB Name: " db | |
| read -p "DB Pass: " dbpass | |
| read -p "WP Prefix: " pf | |
| pass=$(date +%s | sha256sum | base64 | head -c 32 ; echo) |
| ################################################################################################### | |
| # Rocket-Nginx | |
| # | |
| # Rocket-Nginx is a NGINX configuration to speedup your WordPress | |
| # website with the cache plugin WP-Rocket (http://wp-rocket.me) | |
| # | |
| # Author: Maxime Jobin | |
| # URL: https://github.com/maximejobin/rocket-nginx | |
| # | |
| # Tested with WP-Rocket version: 2.8.11 |
| <?php | |
| add_action('customize_register', 'my_customize_register'); | |
| function my_customize_register($wp_customize){ | |
| require_once(TEMPLATEPATH . '/class/wp_customizer_taxonomy_dropdown.php'); | |
| $wp_customize->add_section('my_theme_blog_featured_categories', array( | |
| 'title' => __('Blog: Featured Categories'), | |
| 'priority' => 36, | |
| )); |