| @@ -8,8 +8,13 @@ | ||
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | namespace MainWP\Dashboard; |
| 11 | 11 | |
| 12 | +// Exit if accessed directly. | |
| 13 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 14 | + exit; | |
| 15 | +} | |
| 16 | + | |
| 12 | 17 | /** |
| 13 | 18 | * Class MainWP_Notes |
| 14 | 19 | * |
| 15 | 20 | * Grab Child Site Notes & Build Notes Widget. |
| @@ -47,23 +52,23 @@ | ||
| 47 | 52 | $note = html_entity_decode( $website->note ); |
| 48 | 53 | $esc_note = MainWP_Utility::esc_content( $note ); |
| 49 | 54 | ?> |
| 50 | 55 | <div class="mainwp-widget-header"> |
| 51 | - <h3 class="ui header handle-drag"> | |
| 52 | - <?php | |
| 53 | - /** | |
| 54 | - * Filter: mainwp_notes_widget_title | |
| 55 | - * | |
| 56 | - * Filters the Notes widget title text. | |
| 57 | - * | |
| 58 | - * @param object $website Object containing the child site info. | |
| 59 | - * | |
| 60 | - * @since 4.1 | |
| 61 | - */ | |
| 62 | - echo esc_html( apply_filters( 'mainwp_notes_widget_title', esc_html__( 'Notes', 'mainwp' ), $website ) ); | |
| 63 | - ?> | |
| 64 | - <div class="sub header"><?php esc_html_e( 'Child site notes', 'mainwp' ); ?></div> | |
| 65 | - </h3> | |
| 56 | + <h2 class="ui header handle-drag"> | |
| 57 | + <?php | |
| 58 | + /** | |
| 59 | + * Filter: mainwp_notes_widget_title | |
| 60 | + * | |
| 61 | + * Filters the Notes widget title text. | |
| 62 | + * | |
| 63 | + * @param object $website Object containing the child site info. | |
| 64 | + * | |
| 65 | + * @since 4.1 | |
| 66 | + */ | |
| 67 | + echo esc_html( apply_filters( 'mainwp_notes_widget_title', esc_html__( 'Notes', 'mainwp' ), $website ) ); | |
| 68 | + ?> | |
| 69 | + <div class="sub header"><?php esc_html_e( 'Child site notes', 'mainwp' ); ?></div> | |
| 70 | + </h2> | |
| 66 | 71 | </div> |
| 67 | 72 | |
| 68 | 73 | <div class="mainwp-scrolly-overflow"> |
| 69 | 74 | <?php |
| @@ -78,9 +83,9 @@ | ||
| 78 | 83 | */ |
| 79 | 84 | do_action( 'mainwp_notes_widget_top', $website ); |
| 80 | 85 | |
| 81 | 86 | if ( empty( $website->note ) ) { |
| 82 | - MainWP_UI::render_empty_element_placeholder(); | |
| 87 | + MainWP_UI::render_empty_element_placeholder( __( 'Add your first note', 'mainwp' ), __( 'Create a website note for updates, reminders, or anything you want to track.', 'mainwp' ), '<em data-emoji=":pencil2:" class="medium"></em>' ); | |
| 83 | 88 | } else { |
| 84 | 89 | ?> |
| 85 | 90 | <div class="content"> |
| 86 | 91 | <?php |
| @@ -102,19 +107,14 @@ | ||
| 102 | 107 | * @since 4.1 |
| 103 | 108 | */ |
| 104 | 109 | do_action( 'mainwp_notes_widget_bottom', $website ); |
| 105 | 110 | ?> |
| 111 | + </div> | |
| 112 | + <div class="ui one column grid mainwp-widget-footer"> | |
| 113 | + <div class="column"> | |
| 114 | + <a href="javascript:void(0)" class="ui basic mini button mainwp-edit-site-note" id="mainwp-notes-<?php echo intval( $website->id ); ?>" <?php echo '' !== $website->note ? '' : 'add-new="1"'; ?>><?php echo '' !== $website->note ? esc_html__( 'Edit Notes', 'mainwp' ) : esc_html__( 'Add Notes', 'mainwp' ); ?></a> | |
| 115 | + <?php MainWP_UI::render_modal_edit_notes(); ?> | |
| 106 | 116 | </div> |
| 107 | - <?php if ( '' !== $website->note ) : ?> | |
| 108 | - <div class="ui two columns grid mainwp-widget-footer"> | |
| 109 | - <div class="column"> | |
| 110 | - <a href="javascript:void(0)" class="ui button mini fluid green mainwp-edit-site-note" id="mainwp-notes-<?php echo intval( $website->id ); ?>"><?php esc_html_e( 'Edit Notes', 'mainwp' ); ?></a> | |
| 111 | - </div> | |
| 112 | - <div class="column"> | |
| 113 | - | |
| 114 | - </div> | |
| 115 | - </div> | |
| 116 | - <?php endif; ?> | |
| 117 | - <?php | |
| 118 | - MainWP_UI::render_modal_edit_notes(); | |
| 117 | + </div> | |
| 118 | + <?php | |
| 119 | 119 | } |
| 120 | 120 | } |