PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 4.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v4.2
6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 5.2.2 5.3 All 153 releases
← All changes | widgets/widget-mainwp-notes.php +20 -21 5.04.2 View file →
@@ -46,9 +46,9 @@
46 46 $website = MainWP_DB::instance()->get_website_by_id( $current_wpid, true );
47 47 $note = html_entity_decode( $website->note );
48 48 $esc_note = MainWP_Utility::esc_content( $note );
49 49 ?>
50 - <div class="mainwp-widget-header">
50 +
51 51 <h3 class="ui header handle-drag">
52 52 <?php
53 53 /**
54 54 * Filter: mainwp_notes_widget_title
@@ -58,15 +58,15 @@
58 58 * @param object $website Object containing the child site info.
59 59 *
60 60 * @since 4.1
61 61 */
62 - echo esc_html( apply_filters( 'mainwp_notes_widget_title', esc_html__( 'Notes', 'mainwp' ), $website ) );
62 + echo esc_html( apply_filters( 'mainwp_notes_widget_title', __( 'Notes', 'mainwp' ), $website ) );
63 63 ?>
64 64 <div class="sub header"><?php esc_html_e( 'Child site notes', 'mainwp' ); ?></div>
65 65 </h3>
66 - </div>
67 66
68 - <div class="mainwp-scrolly-overflow">
67 + <div class="ui section hidden divider"></div>
68 +
69 69 <?php
70 70 /**
71 71 * Action: mainwp_notes_widget_top
72 72 *
@@ -77,21 +77,31 @@
77 77 * @since 4.1
78 78 */
79 79 do_action( 'mainwp_notes_widget_top', $website );
80 80
81 - if ( empty( $website->note ) ) {
82 - MainWP_UI::render_empty_element_placeholder();
81 + if ( '' == $website->note ) {
82 + ?>
83 + <h2 class="ui icon header">
84 + <i class="info circle icon"></i>
85 + <div class="content">
86 + <?php esc_html_e( 'No saved notes!', 'mainwp' ); ?>
87 + <div class="sub header"><?php esc_html_e( 'No saved notes for the child site. ', 'mainwp' ); ?><?php echo '<a href="javascript:void(0)" class="mainwp-edit-site-note" id="mainwp-notes-' . intval( $website->id ) . '">' . __( 'Click here to add a note.', 'mainwp' ) . '</a>'; ?></div>
88 + </div>
89 + </h2>
90 + <?php
83 91 } else {
84 92 ?>
85 93 <div class="content">
86 94 <?php
87 - echo wp_unslash( $esc_note ); // phpcs:ignore WordPress.Security.EscapeOutput
95 + echo wp_unslash( $esc_note );
88 96 ?>
89 97 </div>
98 + <div class="ui section hidden divider"></div>
99 + <a href="javascript:void(0)" class="ui button green mainwp-edit-site-note" id="mainwp-notes-<?php echo intval( $website->id ); ?>"><?php esc_html_e( 'Edit Notes', 'mainwp' ); ?></a>
90 100 <?php
91 101 }
92 102 ?>
93 - <span style="display: none" id="mainwp-notes-<?php echo intval( $current_wpid ); ?>-note"><?php echo wp_unslash( $esc_note ); // phpcs:ignore WordPress.Security.EscapeOutput ?></span>
103 + <span style="display: none" id="mainwp-notes-<?php echo intval( $current_wpid ); ?>-note"><?php echo wp_unslash( $esc_note ); ?></span>
94 104 <?php
95 105 /**
96 106 * Action: mainwp_notes_widget_bottom
97 107 *
@@ -101,20 +111,9 @@
101 111 *
102 112 * @since 4.1
103 113 */
104 114 do_action( 'mainwp_notes_widget_bottom', $website );
105 - ?>
106 - </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 115
114 - </div>
115 - </div>
116 - <?php endif; ?>
117 - <?php
118 - MainWP_UI::render_modal_edit_notes();
116 + MainWP_UI::render_modal_edit_notes();
119 117 }
118 +
120 119 }