Advertisement
verygoodplugins

Untitled

Dec 9th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.15 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * Output settings page
  5.  *
  6.  * @access public
  7.  * @return mixed HTML Output
  8.  */
  9.  
  10. public function render_admin_menu() {
  11.  
  12.     // Save settings
  13.  
  14.     if (isset($_POST['ss_settings_nonce']) && wp_verify_nonce($_POST['ss_settings_nonce'], 'ss_settings')) {
  15.         update_option('ss_settings', $_POST['ss_settings']);
  16.         echo '<div id="message" class="updated fade"><p><strong>Settings saved.</strong></p></div>';
  17.     }
  18.  
  19.     ?>
  20.  
  21.     <div class="wrap">
  22.         <h2>Slide Sync Options</h2>
  23.  
  24.         <form id="ss-settings" action="" method="post">
  25.             <?php wp_nonce_field('ss_settings', 'ss_settings_nonce'); ?>
  26.             <?php $settings = get_option( 'ss_settings', array() ); ?>
  27.  
  28.             <input type="hidden" name="action" value="update">
  29.  
  30.             <h4>Display Settings</h4>
  31.  
  32.             <table class="form-table">
  33.                 <tbody>
  34.                    
  35.                     <tr valign="top">
  36.                         <th scope="row">
  37.                             Show slider ribbon
  38.                         </th>
  39.                         <td>
  40.                             <input type="checkbox" id="show_ribbon" class="form-control" name="ss_settings[show_ribbon]" value="1" <?php checked($settings['show_ribbon']); ?>>
  41.                             <label for="show_ribbon">Show a ribbon of slide thumbnails beneath the slider</label>
  42.                         </td>
  43.                     </tr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement