| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
// Welcome Message Page Content |
| 5 |
|
| 6 |
add_action( 'ucd_settings_content', 'ucd_welcome_message_page' ); |
| 7 |
function ucd_welcome_message_page() { |
| 8 |
global $ucd_active_tab; |
| 9 |
if ( 'welcome-message' != $ucd_active_tab ) |
| 10 |
return; |
| 11 |
?> |
| 12 |
|
| 13 |
<h3><?php _e( 'Welcome Message', 'ultimate-client-dash' ); ?></h3> |
| 14 |
|
| 15 |
<!-- Begin settings form --> |
| 16 |
<form action="options.php" method="post"> |
| 17 |
<?php |
| 18 |
settings_fields( 'ultimate-client-dash-message' ); |
| 19 |
do_settings_sections( 'ultimate-client-dash-message' ); |
| 20 |
$ucd_message_body = get_option( 'ucd_message_body' ); |
| 21 |
$ucd_widget_body = get_option( 'ucd_widget_body' ); |
| 22 |
?> |
| 23 |
|
| 24 |
<!-- Dashboard Styling Option Section --> |
| 25 |
|
| 26 |
<div class="ucd-inner-wrapper settings-welcome"> |
| 27 |
<p class="ucd-settings-desc">Create your own welcome message panel to display on the WordPress dashboard. It's a great way to say thank you or ask a client for a testimonial.</p> |
| 28 |
|
| 29 |
<div class="ucd-form-message"><?php settings_errors('ucd-notices'); ?></div> |
| 30 |
|
| 31 |
<table class="form-table"> |
| 32 |
<tbody> |
| 33 |
|
| 34 |
<!-- Welcome Message Option Section --> |
| 35 |
<tr class="ucd-title-holder"> |
| 36 |
<th><h2 class="ucd-inner-title"><?php _e( 'Status', 'ultimate-client-dash' ); ?></h2></th> |
| 37 |
</tr> |
| 38 |
|
| 39 |
<tr> |
| 40 |
<th>Welcome Panel<p>Replaces the default WordPress welcome panel.</p></th> |
| 41 |
<td><label class="ucd-switch"><input type="checkbox" name="ucd_message_disable" value=".ucd-client-welcome" <?php checked( '.ucd-client-welcome', get_option( 'ucd_message_disable' ) ); ?> /><span class="ucd-slider round"></span></label>Enable |
| 42 |
<p> |
| 43 |
Enable to display your welcome message on the WordPress dashboard. |
| 44 |
</p> |
| 45 |
</td> |
| 46 |
</tr> |
| 47 |
|
| 48 |
<tr class="ucd-title-holder"> |
| 49 |
<th><h2 class="ucd-inner-title"><?php _e( 'Content', 'ultimate-client-dash' ); ?></h2></th> |
| 50 |
</tr> |
| 51 |
|
| 52 |
<tr> |
| 53 |
<th><?php _e( 'Title', 'ultimate-client-dash' ); ?></th> |
| 54 |
<td><input type="text" placeholder="" name="ucd_message_title" value="<?php echo esc_attr( get_option('ucd_message_title') ?: 'Welcome to your new website.' ); ?>" size="70" /></td> |
| 55 |
</tr> |
| 56 |
|
| 57 |
<tr> |
| 58 |
<th> |
| 59 |
Content |
| 60 |
<p>Customize your welcome message. You can upload images and links using the content editor. HTML markup can be used.</p> |
| 61 |
</th> |
| 62 |
|
| 63 |
<td class="ucd-custom-content"> |
| 64 |
<?php |
| 65 |
wp_editor( $ucd_message_body , 'ucd_message_body', array( |
| 66 |
'wpautop' => false, |
| 67 |
'media_buttons' => true, |
| 68 |
'textarea_name' => 'ucd_message_body', |
| 69 |
'editor_class' => 'my_custom_class', |
| 70 |
'textarea_rows' => 15 |
| 71 |
) ); |
| 72 |
?> |
| 73 |
<p class="ucd-content-tip">Tip: If you would like to have an image be full width of the body. Click the "Text" tab on the top right corner and change the image width to 100% and the height to auto.</p> |
| 74 |
</td> |
| 75 |
</tr> |
| 76 |
|
| 77 |
<tr class="ucd-float-option"> |
| 78 |
<th class="ucd-save-section"> |
| 79 |
<?php submit_button(); ?> |
| 80 |
</th> |
| 81 |
</tr> |
| 82 |
|
| 83 |
</tbody> |
| 84 |
</table> |
| 85 |
</div> |
| 86 |
</form> |
| 87 |
<?php } |
| 88 |
|
| 89 |
|