| @@ 306-312 (lines=7) @@ | ||
| 303 | * Options to be added to the discussion page (see also admin_settings_init, etc below for Sharing settings page) |
|
| 304 | */ |
|
| 305 | ||
| 306 | function admin_discussion_likes_settings_init() { |
|
| 307 | // Add a temporary section, until we can move the setting out of there and with the rest of the email notification settings |
|
| 308 | add_settings_section( 'likes-notifications', __( 'Likes Notifications', 'jetpack' ), array( $this, 'admin_discussion_likes_settings_section' ), 'discussion' ); |
|
| 309 | add_settings_field( 'social-notifications', __( 'Email me whenever', 'jetpack' ), array( $this, 'admin_discussion_likes_settings_field' ), 'discussion', 'likes-notifications' ); |
|
| 310 | // Register the setting |
|
| 311 | register_setting( 'discussion', 'social_notifications_like', array( $this, 'admin_discussion_likes_settings_validate' ) ); |
|
| 312 | } |
|
| 313 | ||
| 314 | function admin_discussion_likes_settings_section() { |
|
| 315 | // Atypical usage here. We emit jquery to move likes notification checkbox to be with the rest of the email notification settings |
|
| @@ 76-82 (lines=7) @@ | ||
| 73 | return $types; |
|
| 74 | } |
|
| 75 | ||
| 76 | function register_settings() { |
|
| 77 | add_settings_section( 'slideshow_section', __( 'Image Gallery Slideshow', 'jetpack' ), '__return_empty_string', 'media' ); |
|
| 78 | ||
| 79 | add_settings_field( 'jetpack_slideshow_background_color', __( 'Background color', 'jetpack' ), array( $this, 'slideshow_background_color_callback' ), 'media', 'slideshow_section' ); |
|
| 80 | ||
| 81 | register_setting( 'media', 'jetpack_slideshow_background_color', array( $this, 'slideshow_background_color_sanitize' ) ); |
|
| 82 | } |
|
| 83 | ||
| 84 | function slideshow_background_color_callback() { |
|
| 85 | $options = array( |
|