| 1 |
<?php |
| 2 |
|
| 3 |
// +----------------------------------------------------------------------+ |
| 4 |
// | Copyright 2013 Madpixels (email : visualizer@madpixels.net) | |
| 5 |
// +----------------------------------------------------------------------+ |
| 6 |
// | This program is free software; you can redistribute it and/or modify | |
| 7 |
// | it under the terms of the GNU General Public License, version 2, as | |
| 8 |
// | published by the Free Software Foundation. | |
| 9 |
// | | |
| 10 |
// | This program is distributed in the hope that it will be useful, | |
| 11 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 |
// | GNU General Public License for more details. | |
| 14 |
// | | |
| 15 |
// | You should have received a copy of the GNU General Public License | |
| 16 |
// | along with this program; if not, write to the Free Software | |
| 17 |
// | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, | |
| 18 |
// | MA 02110-1301 USA | |
| 19 |
// +----------------------------------------------------------------------+ |
| 20 |
// | Author: Eugene Manuilov <eugene@manuilov.org> | |
| 21 |
// +----------------------------------------------------------------------+ |
| 22 |
/** |
| 23 |
* Base class for all chart builder pages. |
| 24 |
* |
| 25 |
* @category Visualizer |
| 26 |
* @package Render |
| 27 |
* |
| 28 |
* @since 1.0.0 |
| 29 |
*/ |
| 30 |
class Visualizer_Render_Page extends Visualizer_Render { |
| 31 |
|
| 32 |
/** |
| 33 |
* Renders the page. |
| 34 |
* |
| 35 |
* @since 1.0.0 |
| 36 |
* |
| 37 |
* @access protected |
| 38 |
*/ |
| 39 |
protected function _toHTML() { |
| 40 |
echo '<div id="content">'; |
| 41 |
$this->_renderContent(); |
| 42 |
echo '</div>'; |
| 43 |
$this->_renderSidebar(); |
| 44 |
echo '<div id="toolbar">'; |
| 45 |
$this->_renderToolbar(); |
| 46 |
echo '</div>'; |
| 47 |
} |
| 48 |
|
| 49 |
/** |
| 50 |
* Renders page content. |
| 51 |
* |
| 52 |
* @since 1.0.0 |
| 53 |
* |
| 54 |
* @access protected |
| 55 |
*/ |
| 56 |
protected function _renderContent() {} |
| 57 |
|
| 58 |
/** |
| 59 |
* Renders page sidebar. |
| 60 |
* |
| 61 |
* @since 1.0.0 |
| 62 |
* |
| 63 |
* @access protected |
| 64 |
*/ |
| 65 |
protected function _renderSidebar() { |
| 66 |
echo '<div id="sidebar">'; |
| 67 |
echo '<ul class="group-wrapper">'; |
| 68 |
$this->_renderSidebarContent(); |
| 69 |
echo '</ul>'; |
| 70 |
|
| 71 |
echo '<div id="rate-the-plugin">'; |
| 72 |
echo '<div><b>', esc_html__( 'Like the plugin? Show us your love!', 'visualizer' ), '</b></div>'; |
| 73 |
echo '<div id="rate-stars"> </div>'; |
| 74 |
echo '<a id="rate-link" href="http://wordpress.org/support/view/plugin-reviews/visualizer" target="_blank">'; |
| 75 |
esc_html_e( 'Rate it on WordPress.org', 'visualizer' ); |
| 76 |
echo '</a>'; |
| 77 |
echo '</div>'; |
| 78 |
echo '</div>'; |
| 79 |
} |
| 80 |
|
| 81 |
/** |
| 82 |
* Renders sidebar content. |
| 83 |
* |
| 84 |
* @since 1.0.0 |
| 85 |
* |
| 86 |
* @access protected |
| 87 |
*/ |
| 88 |
protected function _renderSidebarContent() {} |
| 89 |
|
| 90 |
/** |
| 91 |
* Renders toolbar content. |
| 92 |
* |
| 93 |
* @since 1.0.0 |
| 94 |
* |
| 95 |
* @access protected |
| 96 |
*/ |
| 97 |
protected function _renderToolbar() {} |
| 98 |
|
| 99 |
} |
| 100 |
|