| @@ 288-294 (lines=7) @@ | ||
| 285 | * Options to be added to the discussion page (see also admin_settings_init, etc below for Sharing settings page) |
|
| 286 | */ |
|
| 287 | ||
| 288 | function admin_discussion_likes_settings_init() { |
|
| 289 | // Add a temporary section, until we can move the setting out of there and with the rest of the email notification settings |
|
| 290 | add_settings_section( 'likes-notifications', __( 'Likes Notifications', 'jetpack' ), array( $this, 'admin_discussion_likes_settings_section' ), 'discussion' ); |
|
| 291 | add_settings_field( 'social-notifications', __( 'Email me whenever', 'jetpack' ), array( $this, 'admin_discussion_likes_settings_field' ), 'discussion', 'likes-notifications' ); |
|
| 292 | // Register the setting |
|
| 293 | register_setting( 'discussion', 'social_notifications_like', array( $this, 'admin_discussion_likes_settings_validate' ) ); |
|
| 294 | } |
|
| 295 | ||
| 296 | function admin_discussion_likes_settings_section() { |
|
| 297 | // Atypical usage here. We emit jquery to move likes notification checkbox to be with the rest of the email notification settings |
|
| @@ 68-74 (lines=7) @@ | ||
| 65 | return $types; |
|
| 66 | } |
|
| 67 | ||
| 68 | function register_settings() { |
|
| 69 | add_settings_section( 'slideshow_section', __( 'Image Gallery Slideshow', 'jetpack' ), '__return_empty_string', 'media' ); |
|
| 70 | ||
| 71 | add_settings_field( 'jetpack_slideshow_background_color', __( 'Background color', 'jetpack' ), array( $this, 'slideshow_background_color_callback' ), 'media', 'slideshow_section' ); |
|
| 72 | ||
| 73 | register_setting( 'media', 'jetpack_slideshow_background_color', array( $this, 'slideshow_background_color_sanitize' ) ); |
|
| 74 | } |
|
| 75 | ||
| 76 | function slideshow_background_color_callback() { |
|
| 77 | $options = array( |
|