Changeset 5603
- Timestamp:
- 06/29/2017 07:13:33 PM (8 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page
- Files:
-
- 4 edited
-
classes/wccsp-customizer.php (modified) (1 diff)
-
classes/wccsp-settings.php (modified) (1 diff)
-
classes/wordcamp-coming-soon-page.php (modified) (2 diffs)
-
views/template-coming-soon.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wccsp-customizer.php
r3784 r5603 128 128 ) 129 129 ); 130 131 $wp_customize->add_setting( 132 'wccsp_settings[introduction]', 133 array( 134 'default' => '', 135 'type' => 'option', 136 'capability' => $GLOBALS['WCCSP_Settings']::REQUIRED_CAPABILITY, 137 'sanitize_callback' => array( $this, 'sanitize_introduction' ), 138 ) 139 ); 140 141 $wp_customize->add_control( 142 'wccsp_settings[introduction]', 143 array( 144 'label' => __( 'Custom Message', 'wordcamporg' ), 145 'description' => __( 'This will replace the default message shown beneath the header.', 'wordcamporg' ), 146 'section' => 'wccsp_live_preview', 147 'type' => 'textarea', 148 ) 149 ); 150 } 151 152 /** 153 * Sanitize the contents of the Custom Message textarea before storing in the database. 154 * 155 * This uses the same sanitization strategy as menu item descriptions and post content in wp_insert_post. 156 * 157 * @param string $value The unsanitized introduction string. 158 * 159 * @return string The sanitized introduction string. 160 */ 161 public function sanitize_introduction( $value ) { 162 return wp_unslash( apply_filters( 'content_save_pre', wp_slash( $value ) ) ); 130 163 } 131 164 -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wccsp-settings.php
r3837 r5603 40 40 'container_background_color' => '#FFFFFF', // deprecated 41 41 'text_color' => '#000000', // deprecated 42 'introduction' => '', 42 43 ); 43 44 -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wordcamp-coming-soon-page.php
r4591 r5603 119 119 'contact_form_shortcode' => $this->get_contact_form_shortcode(), 120 120 'colors' => $this->get_colors(), 121 'introduction' => $this->get_introduction(), 121 122 ); 122 123 … … 272 273 return $contact_form_shortcode; 273 274 } 275 276 /** 277 * Retrieve the optional introduction overwriting the default string. 278 * 279 * @return string 280 */ 281 public function get_introduction() { 282 $settings = $GLOBALS['WCCSP_Settings']->get_settings(); 283 284 return $settings['introduction']; 285 } 274 286 } // end WordCamp_Coming_Soon_Page -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/views/template-coming-soon.php
r5534 r5603 42 42 <div class="wccsp-introduction"> 43 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. In the meantime, you can subscribe to updates above, or contact the organizers below to get involved.', 48 'wordcamporg' 49 ), 50 esc_html( get_bloginfo( 'name' ) ) 51 ); ?> 44 <?php if ( ! empty( $introduction ) ) : ?> 45 <?php echo wp_kses_post( $introduction ); ?> 46 <?php else : ?> 47 <?php printf( 48 /* translators: %s is the name of the blog. */ 49 __( 50 '%s is in the early planning stages. In the meantime, you can subscribe to updates above, or contact the organizers below to get involved.', 51 'wordcamporg' 52 ), 53 esc_html( get_bloginfo( 'name' ) ) 54 ); ?> 55 <?php endif; ?> 52 56 </p> 53 57 </div><!-- .wccsp-introduction -->
Note: See TracChangeset
for help on using the changeset viewer.