Changeset 3780 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wccsp-settings.php
- Timestamp:
- 08/07/2016 12:11:37 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-coming-soon-page/classes/wccsp-settings.php
r2186 r3780 25 25 26 26 /** 27 * Retrieves all of the settings from the database 28 * 27 * Retrieves all of the settings from the database 28 * 29 29 * @return array 30 30 */ … … 37 37 'image_id' => 0, 38 38 ); 39 39 40 40 $settings = shortcode_atts( 41 41 $defaults, … … 48 48 /** 49 49 * Register and enqueue the JavaScript we need for the Settings screen 50 * 50 * 51 51 * @param string $screen 52 52 */ … … 55 55 return; 56 56 } 57 57 58 58 wp_register_script( 59 59 'wccsp-settings', … … 98 98 add_settings_section( 99 99 'wccsp_default', 100 '', 100 '', 101 101 array( $this, 'markup_section_headers' ), 102 102 'wccsp_settings' 103 103 ); 104 104 105 105 106 106 add_settings_field( … … 148 148 array( 'label_for' => 'wccsp_image_id' ) 149 149 ); 150 150 151 151 152 152 register_setting( … … 193 193 $new_settings['enabled'] = 'off'; 194 194 } 195 195 196 196 $new_settings['body_background_color'] = sanitize_text_field( $new_settings['body_background_color'] ); 197 197 $new_settings['container_background_color'] = sanitize_text_field( $new_settings['container_background_color'] ); 198 198 $new_settings['text_color'] = sanitize_text_field( $new_settings['text_color'] ); 199 199 200 200 $new_settings['image_id'] = absint( $new_settings['image_id'] ); 201 201 202 202 return $new_settings; 203 203 } … … 218 218 public function render_admin_notices() { 219 219 $current_screen = get_current_screen(); 220 220 221 221 if ( 'settings_page_wccsp_settings' != $current_screen->id ) { 222 222 return; … … 229 229 'contact-form' => __( 'Contact Form', 'wordcamporg' ), 230 230 ); 231 231 232 232 foreach ( $required_modules as $module_id => $module_name ) { 233 233 if ( ! in_array( $module_id, $active_modules ) ) {
Note: See TracChangeset
for help on using the changeset viewer.