Changeset 3784
- Timestamp:
- 08/09/2016 02:53:51 PM (8 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page
- Files:
-
- 3 added
- 5 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/bootstrap.php
r381 r3784 14 14 require_once( __DIR__ . '/classes/wordcamp-coming-soon-page.php' ); 15 15 require_once( __DIR__ . '/classes/wccsp-settings.php' ); 16 require_once( __DIR__ . '/classes/wccsp-customizer.php' ); 16 17 17 18 $GLOBALS['WordCamp_Coming_Soon_Page'] = new WordCamp_Coming_Soon_Page(); 19 $GLOBALS['WCCSP_Customizer'] = new WCCSP_Customizer(); 18 20 $GLOBALS['WCCSP_Settings'] = new WCCSP_Settings(); -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wccsp-settings.php
r3780 r3784 1 1 <?php 2 3 /* 4 * todo 5 * Now that using Customizer, this class isn't really needed and doesn't make sense. Its functions can be moved 6 * into wordcamp-coming-soon-page.php and wccsp-customizer.php 7 */ 2 8 3 9 class WCCSP_Settings { … … 11 17 add_action( 'admin_menu', array( $this, 'register_settings_pages' ) ); 12 18 add_action( 'init', array( $this, 'init' ) ); 13 add_action( 'admin_init', array( $this, 'register_settings' ) );14 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );15 add_action( 'admin_notices', array( $this, 'render_admin_notices' ) );16 19 add_action( 'update_option_wccsp_settings', array( $this, 'clear_static_page_cache' ) ); 17 20 } … … 32 35 $defaults = array( 33 36 'enabled' => 'off', // so that sites created before the plugin was deployed won't display the home page when the plugin is activated 34 'body_background_color' => '#666666', 35 'container_background_color' => '#FFFFFF', 36 'text_color' => '#000000', 37 'body_background_color' => '#0073aa', 37 38 'image_id' => 0, 39 'background_id' => 0, 40 'container_background_color' => '#FFFFFF', // deprecated 41 'text_color' => '#000000', // deprecated 38 42 ); 39 43 … … 47 51 48 52 /** 49 * Register and enqueue the JavaScript we need for the Settings screen53 * Get the URL for the Coming Soon section in the Customizer 50 54 * 51 * @ param string $screen55 * @return string 52 56 */ 53 public function enqueue_scripts( $hook_suffix ) { 54 if ( 'settings_page_wccsp_settings' != $hook_suffix ) { 55 return; 56 } 57 58 wp_register_script( 59 'wccsp-settings', 60 plugins_url( '/javascript/wccsp-settings.js', __DIR__ ), 61 array( 'jquery', 'media-upload', 'media-views' ), 62 WordCamp_Coming_Soon_Page::VERSION 57 public function get_customizer_section_url() { 58 $url = add_query_arg( 59 array( 60 'autofocus[section]' => 'wccsp_live_preview', 61 'url' => rawurlencode( add_query_arg( 'wccsp-preview', '', site_url() ) ), 62 ), 63 admin_url( 'customize.php' ) 63 64 ); 64 65 65 wp_enqueue_media(); 66 wp_enqueue_script( 'wccsp-settings' ); 66 return $url; 67 67 } 68 68 69 69 /** 70 * Adds pages to the Admin Panel menu 70 * Add a link to the Settings menu 71 * 72 * Even though this lives in the Customizer, having a link in the regular admin menus helps with 73 * discoverability. 71 74 */ 72 75 public function register_settings_pages() { … … 76 79 __( 'Coming Soon', 'wordcamporg' ), 77 80 self::REQUIRED_CAPABILITY, 78 'wccsp_settings', 79 array( $this, 'markup_settings_page' ) 81 $this->get_customizer_section_url() 80 82 ); 81 }82 83 /**84 * Creates the markup for the Settings page85 */86 public function markup_settings_page() {87 if ( current_user_can( self::REQUIRED_CAPABILITY ) ) {88 require_once( dirname( __DIR__ ) . '/views/settings-screen.php' );89 } else {90 wp_die( __( 'Access denied.', 'wordcamporg' ) );91 }92 }93 94 /**95 * Registers settings sections, fields and settings96 */97 public function register_settings() {98 add_settings_section(99 'wccsp_default',100 '',101 array( $this, 'markup_section_headers' ),102 'wccsp_settings'103 );104 105 106 add_settings_field(107 'wccsp_enabled',108 __( 'Enabled', 'wordcamporg' ),109 array( $this, 'markup_fields' ),110 'wccsp_settings',111 'wccsp_default',112 array( 'label_for' => 'wccsp_enabled_true' )113 );114 115 add_settings_field(116 'wccsp_body_background_color',117 __( 'Body Background Color', 'wordcamporg' ),118 array( $this, 'markup_fields' ),119 'wccsp_settings',120 'wccsp_default',121 array( 'label_for' => 'wccsp_body_background_color' )122 );123 124 add_settings_field(125 'wccsp_container_background_color',126 __( 'Container Background Color', 'wordcamporg' ),127 array( $this, 'markup_fields' ),128 'wccsp_settings',129 'wccsp_default',130 array( 'label_for' => 'wccsp_container_background_color' )131 );132 133 add_settings_field(134 'wccsp_text_color',135 __( 'Text Color', 'wordcamporg' ),136 array( $this, 'markup_fields' ),137 'wccsp_settings',138 'wccsp_default',139 array( 'label_for' => 'wccsp_text_color' )140 );141 142 add_settings_field(143 'wccsp_image_id',144 __( 'Image', 'wordcamporg' ),145 array( $this, 'markup_fields' ),146 'wccsp_settings',147 'wccsp_default',148 array( 'label_for' => 'wccsp_image_id' )149 );150 151 152 register_setting(153 'wccsp_settings',154 'wccsp_settings',155 array( $this, 'validate_settings' )156 );157 }158 159 /**160 * Adds the section introduction text to the Settings page161 *162 * @param array $section163 */164 public function markup_section_headers( $section ) {165 require( dirname( __DIR__ ) . '/views/settings-section-headers.php' );166 }167 168 /**169 * Delivers the markup for settings fields170 *171 * @param array $field172 */173 public function markup_fields( $field ) {174 switch ( $field['label_for'] ) {175 case 'wccsp_image_id':176 $image = wp_get_attachment_image_src( $this->settings['image_id'], 'medium' );177 break;178 }179 180 require( dirname( __DIR__ ) . '/views/settings-fields.php' );181 }182 183 /**184 * Validates submitted setting values before they get saved to the database.185 *186 * @param array $new_settings187 * @return array188 */189 public function validate_settings( $new_settings ) {190 $new_settings = shortcode_atts( $this->settings, $new_settings );191 192 if ( 'on' != $new_settings['enabled'] ) {193 $new_settings['enabled'] = 'off';194 }195 196 $new_settings['body_background_color'] = sanitize_text_field( $new_settings['body_background_color'] );197 $new_settings['container_background_color'] = sanitize_text_field( $new_settings['container_background_color'] );198 $new_settings['text_color'] = sanitize_text_field( $new_settings['text_color'] );199 200 $new_settings['image_id'] = absint( $new_settings['image_id'] );201 202 return $new_settings;203 83 } 204 84 … … 217 97 */ 218 98 public function render_admin_notices() { 219 $current_screen = get_current_screen();220 221 if ( 'settings_page_wccsp_settings' != $current_screen->id ) {222 return;223 }224 225 99 $active_modules = Jetpack::$instance->get_active_modules(); 226 100 $inactive_required_modules = array(); … … 236 110 } 237 111 112 ob_start(); 113 238 114 if ( $inactive_required_modules ) { 239 115 require_once( dirname( __DIR__ ) . '/views/settings-admin-notices.php' ); 240 116 } 117 118 return ob_get_clean(); 241 119 } 242 120 } // end WCCSP_Settings -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wordcamp-coming-soon-page.php
r3780 r3784 3 3 class WordCamp_Coming_Soon_Page { 4 4 protected $override_theme_template; 5 const VERSION = '0. 1';5 const VERSION = '0.2'; 6 6 7 7 /** … … 22 22 public function init() { 23 23 $settings = $GLOBALS['WCCSP_Settings']->get_settings(); 24 $this->override_theme_template = 'on' == $settings['enabled'] && ! current_user_can( 'edit_posts' ); 24 $show_page = 'on' == $settings['enabled'] && ! current_user_can( 'edit_posts' ); 25 $this->override_theme_template = $show_page || $this->is_coming_soon_preview(); 26 } 27 28 /** 29 * Check if the current page is our section of the Previewer 30 * 31 * @return bool 32 */ 33 public function is_coming_soon_preview() { 34 global $wp_customize; 35 36 return isset( $_GET['wccsp-preview'] ) && $wp_customize->is_preview(); 25 37 } 26 38 27 39 /** 28 40 * Ensure the template has a consistent base of CSS rules, regardless of the current theme or Custom CSS 29 * Dequeue irrelevant stylesheets and use TwentyThirteen as the base style30 41 */ 31 42 public function manage_plugin_theme_stylesheets() { … … 35 46 36 47 $this->dequeue_all_stylesheets(); 37 $this->register_twentythirteen_styles();38 48 39 49 wp_enqueue_style( 40 50 'wccsp-template', 41 51 plugins_url( '/css/template-coming-soon.css', __DIR__ ), 42 array( 'twentythirteen-fonts', 'genericons', 'twentythirteen-style', 'admin-bar'),43 self::VERSION52 array(), 53 1 44 54 ); 45 55 } … … 57 67 58 68 /** 59 * Register TwentyThirteen's base styles60 */61 protected function register_twentythirteen_styles() {62 $twentythirteen_uri = get_theme_root_uri( 'twentythirteen' ) . '/twentythirteen';63 64 if ( ! wp_style_is( 'twentythirteen-fonts', 'registered' ) ) {65 wp_register_style( 'twentythirteen-fonts', '//fonts.googleapis.com/css?family=Source+Sans+Pro%3A300%2C400%2C700%2C300italic%2C400italic%2C700italic%7CBitter%3A400%2C700&subset=latin%2Clatin-ext', array(), null );66 }67 68 if ( ! wp_style_is( 'genericons', 'registered' ) ) {69 wp_register_style( 'genericons', $twentythirteen_uri . '/fonts/genericons.css' );70 }71 72 if ( ! wp_style_is( 'twentythirteen-style', 'registered' ) ) {73 wp_register_style( 'twentythirteen-style', $twentythirteen_uri . '/style.css' );74 }75 }76 77 /**78 69 * Render dynamic CSS styles 79 70 */ … … 83 74 } 84 75 85 $settings = $GLOBALS['WCCSP_Settings']->get_settings(); 86 ?> 87 88 <!-- BEGIN wordcamp-coming-soon-page --> 89 <style type="text/css"> 90 html, body { 91 color: <?php echo esc_html( $settings['text_color'] ); ?>; 92 } 93 94 #wccsp-container, 95 .widget { 96 background-color: <?php echo esc_html( $settings['container_background_color'] ); ?>; 97 } 98 99 @media all and ( min-width: 800px ) { 100 html, body { 101 background-color: <?php echo esc_html( $settings['body_background_color'] ); ?>; 102 } 103 } 104 </style> 105 <!-- END wordcamp-coming-soon-page --> 106 107 <?php 76 extract( $GLOBALS['WordCamp_Coming_Soon_Page']->get_template_variables() ); 77 78 require_once( dirname( __DIR__ ) . '/css/template-coming-soon-dynamic.php' ); 108 79 } 109 80 … … 131 102 $variables = array( 132 103 'image_url' => $this->get_image_url(), 104 'background_url' => $this->get_bg_image_url(), 133 105 'dates' => $this->get_dates(), 134 106 'active_modules' => Jetpack::$instance->get_active_modules(), 135 107 'contact_form_shortcode' => $this->get_contact_form_shortcode(), 108 'colors' => $this->get_colors(), 136 109 ); 137 110 … … 140 113 141 114 /** 142 * Retrieve the URL of the image displayed in the template 115 * Retrieve the colors for the template 116 * 117 * @return array 118 */ 119 public function get_colors() { 120 $settings = $GLOBALS['WCCSP_Settings']->get_settings(); 121 122 if ( ! class_exists( 'Jetpack_Color' ) && function_exists( 'jetpack_require_lib' ) ) { 123 jetpack_require_lib( 'class.color' ); 124 } 125 126 // If they never changed from the old default background color, then use the new default 127 $background = $settings['body_background_color']; 128 if ( '#666666' === $background ) { 129 $background = '#0073aa'; 130 } 131 132 // Just in case we can't find Jetpack_Color 133 if ( class_exists( 'Jetpack_Color' ) ) { 134 $color = new Jetpack_Color( $background, 'hex' ); 135 $color_hsl = $color->toHsl(); 136 137 $lighter_color = new Jetpack_Color( array( 138 $color_hsl['h'], 139 $color_hsl['s'], 140 ( $color_hsl['l'] >= 85 ) ? 100 : $color_hsl['l'] + 15 141 ), 'hsl' ); 142 143 $darker_color = new Jetpack_Color( array( 144 $color_hsl['h'], 145 $color_hsl['s'], 146 ( $color_hsl['l'] < 10 ) ? 0 : $color_hsl['l'] - 10 147 ), 'hsl' ); 148 149 $background_lighter = '#' . $lighter_color->toHex(); 150 $background_darker = '#' . $darker_color->toHex(); 151 } else { 152 $background_lighter = $background; 153 $background_darker = $background; 154 } 155 156 $colors['main'] = $background; 157 $colors['lighter'] = $background_lighter; 158 $colors['darker'] = $background_darker; 159 160 // Not currently customizable 161 $colors['text'] = '#32373c'; 162 $colors['light-text'] = '#b4b9be'; 163 $colors['border'] = '#00669b'; 164 165 return $colors; 166 } 167 168 /** 169 * Retrieve the URL of the logo image displayed in the template 143 170 * 144 171 * @return string|false … … 154 181 155 182 /** 183 * Retrieve the URL of the background image displayed in the template 184 * 185 * @return string|false 186 */ 187 public function get_bg_image_url() { 188 $settings = $GLOBALS['WCCSP_Settings']->get_settings(); 189 $image_meta = wp_get_attachment_metadata( $settings['background_id'] ); 190 $image = wp_get_attachment_image_src( $settings['background_id'], 'full' ); 191 192 return empty( $image[0] ) ? false : $image[0]; 193 } 194 195 /** 156 196 * Retrieve the dates of the WordCamp 157 197 * … … 165 205 if ( ! empty( $wordcamp_post->meta['Start Date (YYYY-mm-dd)'][0] ) ) { 166 206 // translators: date format, see https://php.net/date 167 $dates = date_i18n( __( ' l,F jS Y' , 'wordcamporg' ), $wordcamp_post->meta['Start Date (YYYY-mm-dd)'][0] );207 $dates = date_i18n( __( 'F jS Y' , 'wordcamporg' ), $wordcamp_post->meta['Start Date (YYYY-mm-dd)'][0] ); 168 208 169 209 if ( ! empty( $wordcamp_post->meta['End Date (YYYY-mm-dd)'][0] ) ) { 170 210 if ( $wordcamp_post->meta['Start Date (YYYY-mm-dd)'][0] !== $wordcamp_post->meta['End Date (YYYY-mm-dd)'][0] ) { 171 211 // translators: date format, see https://php.net/date 172 $dates .= ' - ' . date_i18n( __( ' l,F jS Y' , 'wordcamporg' ), $wordcamp_post->meta['End Date (YYYY-mm-dd)'][0] );212 $dates .= ' - ' . date_i18n( __( 'F jS Y' , 'wordcamporg' ), $wordcamp_post->meta['End Date (YYYY-mm-dd)'][0] ); 173 213 } 174 214 } -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/css/template-coming-soon.css
r3780 r3784 1 h1, h2 { 2 margin-top: 0; 3 margin-bottom: 1em; 4 text-align: center; 5 } 6 7 #wccsp-container { 8 max-width: 700px; 9 margin-left: auto; 10 margin-right: auto; 11 padding: 40px; 12 overflow: auto; 13 } 14 15 #wccsp-image { 16 display: block; 1 body { 2 margin: 0; 3 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; 4 font-size: 24px; 5 -webkit-font-smoothing: antialiased; 6 -moz-osx-font-smoothing: grayscale; 7 background-color: white; 8 } 9 10 .wccsp-background { 11 position: absolute; 12 top: 0; 13 left: 0; 14 right: 0; 15 z-index: -1; 16 } 17 18 .wccsp-container { 19 margin: 0 auto; 20 padding: 0 20px; 21 max-width: 730px; 22 } 23 24 .wccsp-header { 25 position: relative; 26 color: white; 27 overflow: hidden; 28 padding: 120px 0; 29 } 30 31 .wccsp-header.overlay::after { 32 content: ' '; 33 position: absolute; 34 z-index: 0; 35 background: rgba( 0, 0, 0, 0.3 ); 36 top: 0; 37 left: 0; 38 right: 0; 39 bottom: 0; 40 } 41 42 .wccsp-header.overlay * { 43 position: relative; 44 z-index: 1; 45 } 46 47 .wccsp-image { 48 text-align: center; 49 } 50 51 .wccsp-image img { 17 52 max-width: 100%; 18 margin: 0 auto 40px auto; 19 } 20 21 #wccsp-introduction { 22 margin-bottom: 0; 23 } 24 25 .wccsp-box { 26 width: 100%; 27 min-height: 150px; 28 overflow: auto; 29 margin: 40px 40px 0 0; 30 padding: 15px; 31 32 border: 1px solid black; /* todo box shadow */ 33 } 34 35 #wccsp-container .wccsp-box:last-child { 36 margin-right: 0; 53 } 54 55 h1 { 56 margin: 0; 57 margin-bottom: 10px; 58 font-size: 62px; 59 font-weight: 300; 60 text-align: center; 61 } 62 63 @media screen and ( max-width: 400px ) { 64 h1 { 65 font-size: 48px; 66 } 67 } 68 69 h2 { 70 font-size: 28px; 71 font-weight: 600; 72 } 73 74 h2.wccsp-dates { 75 margin: 0; 76 margin-bottom: 50px; 77 font-size: 30px; 78 font-weight: 300; 79 text-align: center; 80 color: rgba( 255, 255, 255, 0.8 ); 81 } 82 83 button, 84 input, 85 optgroup, 86 select, 87 textarea { 88 color: inherit; 89 font: inherit; 90 margin: 0; 91 } 92 93 button, 94 input[type="text"], 95 input[type="email"], 96 input[type="submit"], 97 textarea { 98 box-sizing: border-box; 99 padding: 5px; 100 width: 100%; 101 border: none; 102 font-size: 18px; 103 line-height: normal; 104 } 105 106 input[type="text"], 107 input[type="email"] { 108 height: 40px; 109 } 110 111 textarea { 112 height: 200px; 113 resize: vertical; 114 } 115 116 button, 117 input[type="submit"] { 118 -webkit-appearance: button; 119 cursor: pointer; 120 height: 40px; 121 font-size: 14px; 122 color: white; 123 text-shadow: 0 0 5px rgba( 0, 0, 0, 0.5 ); 124 border-width: 1px 1px 2px; 125 border-style: solid; 126 border-radius: 3px; 127 } 128 129 label { 130 display: block; 131 } 132 133 label span { 134 margin-left: 8px; 135 text-transform: uppercase; 136 font-size: 16px; 137 } 138 139 .jetpack_subscription_widget { 140 } 141 142 .jetpack_subscription_widget form { 143 display: flex; 144 padding: 5px; 145 background: white; 146 } 147 148 .jetpack_subscription_widget p { 149 margin: 0; 150 } 151 152 .jetpack_subscription_widget p.error { 153 margin-bottom: 5px; 154 font-size: 16px; 37 155 } 38 156 39 .wccsp-box .widget { 40 margin: 0; 41 padding: 0; 157 #subscribe-email { 158 flex: 3; 159 } 160 161 #subscribe-email input[type="submit"] { 162 padding: 5px 30px; 42 163 } 43 164 44 .wccsp-box h2 { 45 margin-top: 0; 46 } 47 48 .wccsp-box p:last-child { 49 margin-bottom: 0; 50 } 51 52 .wccsp-box input[type="text"], 53 .wccsp-box input[type="email"], 54 .wccsp-box textarea { 55 width: 100%; 56 margin-bottom: 1em; 57 padding: 2px 3px; 58 59 /* todo not working */ 60 } 61 62 .wccsp-box input[type="text"]:last-child { 63 margin-bottom: 0; 64 } 65 66 .wccsp-box input[type="submit"] { 67 margin: 0 auto; /*todo not working */ 68 text-align: center; 69 } 70 71 .wccsp-box textarea { 72 height: 8em; 73 } 74 75 .grunion-field-label span { 76 padding-left: 5px; 77 } 78 79 @media all and ( min-width: 800px ) { 80 #wccsp-container { 81 margin-top: 50px; 82 margin-bottom: 50px; 83 border: 1px solid black; /* todo box shadow */ 84 } 85 86 .wccsp-box { 87 float: left; 88 width: 46%; /* todo temp workaround */ 89 } 90 } 165 #subscribe-submit { 166 flex: 1; 167 } 168 169 .wccsp-introduction { 170 margin-bottom: 75px; 171 padding: 75px 0; 172 border-bottom: 2px solid #f0f2f3; 173 } 174 175 .wccsp-introduction p { 176 margin: 0; 177 } 178 179 .wccsp-contact { 180 margin-bottom: 75px; 181 } 182 183 .wccsp-contact h2 { 184 margin: 0 0 50px; 185 } 186 187 .wccsp-contact input[type="text"], 188 .wccsp-contact input[type="email"], 189 .wccsp-contact textarea { 190 border: 1px solid #cbcdce; 191 } 192 193 .wccsp-contact form > div { 194 margin-bottom: 40px; 195 } 196 197 .wccsp-contact label { 198 margin-bottom: 10px; 199 } 200 201 .wccsp-contact input[type="submit"] { 202 padding: 5px 30px; 203 width: auto; 204 } 205 206 .wccsp-footer { 207 background: #32373c; 208 text-align: center; 209 padding: 20px 0; 210 font-size: 16px; 211 font-weight: 400; 212 } 213 214 .wccsp-footer a:link, 215 .wccsp-footer a:visited, 216 .wccsp-footer a:hover, 217 .wccsp-footer a:active { 218 color: white; 219 text-decoration: none; 220 } 221 222 .wccsp-footer a:hover, 223 .wccsp-footer a:focus { 224 text-decoration: underline; 225 } -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/settings-admin-notices.php
r2186 r3784 1 <div class=" error">1 <div class="notice notice-error notice-large"> 2 2 <ul> 3 3 <?php foreach ( $inactive_required_modules as $module ) : ?> -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/template-coming-soon.php
r3780 r3784 6 6 <title><?php echo esc_html( get_bloginfo( 'name' ) ); ?></title> 7 7 8 <?php extract( $GLOBALS['WordCamp_Coming_Soon_Page']->get_template_variables() ); ?> 8 9 <?php wp_head(); ?> 9 <?php extract( $GLOBALS['WordCamp_Coming_Soon_Page']->get_template_variables() ); ?>10 10 </head> 11 11 12 12 <body <?php body_class(); ?>> 13 13 <div id="wccsp-container"> 14 <div class="wccsp-header <?php echo $background_url ? 'overlay' : ''; ?>"> 15 <div class="wccsp-container"> 16 <?php if ( $image_url ) : ?> 17 <div class="wccsp-image"> 18 <img id="wccsp-image" src="<?php echo esc_attr( $image_url ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" /> 19 </div> 20 <?php endif; ?> 14 21 15 <h1><?php echo esc_attr( get_bloginfo( 'name' ) ); ?></h1>22 <h1><?php echo esc_html( get_bloginfo( 'name' ) ); ?></h1> 16 23 17 <?php if ( $image_url ) : ?> 18 <img id="wccsp-image" src="<?php echo esc_attr( $image_url ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" /> 19 <?php endif; ?> 24 <?php if ( $dates ) : ?> 25 <h2 class="wccsp-dates"> 26 <?php echo esc_html( $dates ); ?> 27 </h2> 28 <?php endif; ?> 20 29 21 <?php if ( $dates ) : ?> 22 <h2><?php echo esc_html( $dates ); ?></h2> 23 <?php endif; ?> 30 <?php if ( in_array( 'subscriptions', $active_modules ) ) : ?> 31 <div class="wccsp-subscription"> 32 <?php echo do_shortcode( sprintf( 33 '[jetpack_subscription_form subscribe_text="" title="" subscribe_button="%s"]', 34 esc_html__( 'Send me updates!', 'wordcamporg' ) 35 ) ); ?> 36 </div> 37 <?php endif; ?> 38 </div><!-- .wccsp-container --> 39 </div><!-- .wccsp-header --> 24 40 25 <p id="wccsp-introduction"> 26 <?php printf( 27 // translators: %s is the name of the blog 28 __( '%s is in the early planning stages. In the meantime, you can subscribe to be notified when the site goes live, or contact the organizers to get involved.', 'wordcamporg' ), 29 esc_html( get_bloginfo( 'name' ) ) 30 ); ?> 31 </p> 41 <div class="wccsp-container"> 42 <div class="wccsp-introduction"> 43 <p id="wccsp-introduction"> 44 <?php printf( 45 // translators: %s is the name of the blog 46 __( 47 '%s is in the early planning stages. 48 In the meantime, you can subscribe to be notified when the site goes live, or contact the organizers to get involved.', 49 'wordcamporg' 50 ), 51 esc_html( get_bloginfo( 'name' ) ) 52 ); ?> 53 </p> 54 </div><!-- .wccsp-introduction --> 32 55 33 <?php if ( in_array( 'subscriptions', $active_modules ) ) : ?> 34 <div class="wccsp-box"> 35 <?php echo do_shortcode( sprintf( 36 '[jetpack_subscription_form title="%s"]', 37 __( 'Subscribe for Updates', 'wordcamporg' ) 38 ) ); ?> 39 </div> 40 <?php endif; ?> 56 <?php if ( in_array( 'contact-form', $active_modules ) && $contact_form_shortcode ) : ?> 57 <div class="wccsp-contact"> 58 <h2><?php esc_html_e( 'Contact the Organizers' , 'wordcamporg' ); ?></h2> 41 59 42 <?php if ( in_array( 'contact-form', $active_modules ) && $contact_form_shortcode ) : ?> 43 <div class="wccsp-box"> 44 <h2><?php _e( 'Contact the Organizers' , 'wordcamporg' ); ?></h2> 45 46 <?php echo $contact_form_shortcode; // intentionally not escaping because it's the output of do_shortcode() ?> 47 </div> 48 <?php endif; ?> 60 <?php echo $contact_form_shortcode; // intentionally not escaping because it's the output of do_shortcode() ?> 61 </div> 62 <?php endif; ?> 63 </div><!-- .wccsp-container --> 49 64 50 65 </div><!-- #wccsp_container --> 66 67 <div class="wccsp-footer"> 68 <p> 69 <a href="https://central.wordcamp.org/schedule/"> 70 <?php esc_html_e( 'See all upcoming events at WordCamp Central', 'wordcamporg' ); ?> 71 </a> 72 </p> 73 </div> 51 74 52 75 <?php wp_footer(); ?>
Note: See TracChangeset
for help on using the changeset viewer.