| 1 |
<?php |
| 2 |
|
| 3 |
class MainWP_Notes { |
| 4 |
public static function getClassName() { |
| 5 |
return __CLASS__; |
| 6 |
} |
| 7 |
|
| 8 |
public static function getName() { |
| 9 |
return '<i class="fa fa-file-text-o"></i> ' . __( 'Notes', 'mainwp' ); |
| 10 |
} |
| 11 |
|
| 12 |
public static function render() { |
| 13 |
$current_wpid = MainWP_Utility::get_current_wpid(); |
| 14 |
|
| 15 |
if ( ! MainWP_Utility::ctype_digit( $current_wpid ) ) { |
| 16 |
return; |
| 17 |
} |
| 18 |
|
| 19 |
$website = MainWP_DB::Instance()->getWebsiteById( $current_wpid, true ); |
| 20 |
|
| 21 |
MainWP_UI::renderBeginReadyPopup(); |
| 22 |
?> |
| 23 |
<div id="mainwp-notes-area"> |
| 24 |
<div style="padding-bottom: 1em;"> |
| 25 |
<?php |
| 26 |
if ( $website->note == '' ) { |
| 27 |
echo 'No Saved Notes'; |
| 28 |
} else { |
| 29 |
echo html_entity_decode($website->note); |
| 30 |
} |
| 31 |
?> |
| 32 |
</div> |
| 33 |
</div> |
| 34 |
<?php |
| 35 |
$actions = '<a href="#" class="mainwp_notes_show_all button button-primary" id="mainwp_notes_' . $website->id . '">' . __( 'Edit notes', 'mainwp' ). '</a>'; |
| 36 |
MainWP_UI::renderEndReadyPopup($actions, 'mainwp-postbox-actions-bottom'); |
| 37 |
} |
| 38 |
} |
| 39 |
|