| 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 |
|
| 24 |
/** |
| 25 |
* Base class for all chart builder pages. |
| 26 |
* |
| 27 |
* @category Visualizer |
| 28 |
* @package Render |
| 29 |
* |
| 30 |
* @since 1.0.0 |
| 31 |
*/ |
| 32 |
class Visualizer_Render_Page extends Visualizer_Render { |
| 33 |
|
| 34 |
/** |
| 35 |
* Renders the page. |
| 36 |
* |
| 37 |
* @since 1.0.0 |
| 38 |
* |
| 39 |
* @access protected |
| 40 |
*/ |
| 41 |
protected function _toHTML() { |
| 42 |
echo '<div id="content">'; |
| 43 |
$this->_renderContent(); |
| 44 |
echo '</div>'; |
| 45 |
$this->_renderSidebar(); |
| 46 |
echo '<div id="toolbar">'; |
| 47 |
$this->_renderToolbar(); |
| 48 |
echo '</div>'; |
| 49 |
} |
| 50 |
|
| 51 |
/** |
| 52 |
* Renders page content. |
| 53 |
* |
| 54 |
* @since 1.0.0 |
| 55 |
* |
| 56 |
* @access protected |
| 57 |
*/ |
| 58 |
protected function _renderContent() {} |
| 59 |
|
| 60 |
/** |
| 61 |
* Renders page sidebar. |
| 62 |
* |
| 63 |
* @since 1.0.0 |
| 64 |
* |
| 65 |
* @access protected |
| 66 |
*/ |
| 67 |
protected function _renderSidebar() { |
| 68 |
echo '<div id="sidebar">'; |
| 69 |
echo '<ul class="group-wrapper">'; |
| 70 |
$this->_renderSidebarContent(); |
| 71 |
echo '</ul>'; |
| 72 |
|
| 73 |
echo '<div id="rate-the-plugin">'; |
| 74 |
echo '<div><b>', esc_html__( 'Like the plugin? Show us your love!', Visualizer_Plugin::NAME ), '</b></div>'; |
| 75 |
echo '<div id="rate-stars"> </div>'; |
| 76 |
echo '<a id="rate-link" href="http://wordpress.org/support/view/plugin-reviews/visualizer" target="_blank">'; |
| 77 |
esc_html_e( 'Rate it on WordPress.org', Visualizer_Plugin::NAME ); |
| 78 |
echo '</a>'; |
| 79 |
echo '<div id="flattr">'; |
| 80 |
echo '<a href="https://flattr.com/submit/auto?user_id=madpixels&url=http%3A%2F%2Fwordpress.org%2Fplugins%2Fvisualizer%2F&category=software&title=WordPress+Visualizer&description=', urlencode( 'WordPress Visualizer plugin is a simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages.' ), '" target="_blank">'; |
| 81 |
echo '<img src="//api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0">'; |
| 82 |
echo '</a>'; |
| 83 |
echo '</div>'; |
| 84 |
echo '</div>'; |
| 85 |
echo '</div>'; |
| 86 |
} |
| 87 |
|
| 88 |
/** |
| 89 |
* Renders sidebar content. |
| 90 |
* |
| 91 |
* @since 1.0.0 |
| 92 |
* |
| 93 |
* @access protected |
| 94 |
*/ |
| 95 |
protected function _renderSidebarContent() {} |
| 96 |
|
| 97 |
/** |
| 98 |
* Renders toolbar content. |
| 99 |
* |
| 100 |
* @since 1.0.0 |
| 101 |
* |
| 102 |
* @access protected |
| 103 |
*/ |
| 104 |
protected function _renderToolbar() {} |
| 105 |
|
| 106 |
} |