| @@ 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 |
|
| @@ 69-75 (lines=7) @@ | ||
| 66 | return $types; |
|
| 67 | } |
|
| 68 | ||
| 69 | function register_settings() { |
|
| 70 | add_settings_section( 'slideshow_section', __( 'Image Gallery Slideshow', 'jetpack' ), '__return_empty_string', 'media' ); |
|
| 71 | ||
| 72 | add_settings_field( 'jetpack_slideshow_background_color', __( 'Background color', 'jetpack' ), array( $this, 'slideshow_background_color_callback' ), 'media', 'slideshow_section' ); |
|
| 73 | ||
| 74 | register_setting( 'media', 'jetpack_slideshow_background_color', array( $this, 'slideshow_background_color_sanitize' ) ); |
|
| 75 | } |
|
| 76 | ||
| 77 | function slideshow_background_color_callback() { |
|
| 78 | $options = array( |
|