| 1 |
<?php |
| 2 |
// @codingStandardsIgnoreFile |
| 3 |
/** |
| 4 |
* Toolbox for Menu Pages. |
| 5 |
* |
| 6 |
* Copyright: © 2009-2011 |
| 7 |
* {@link http://websharks-inc.com/ WebSharks, Inc.} |
| 8 |
* (coded in the USA) |
| 9 |
* |
| 10 |
* Released under the terms of the GNU General Public License. |
| 11 |
* You should have received a copy of the GNU General Public License, |
| 12 |
* along with this software. In the main directory, see: /licensing/ |
| 13 |
* If not, see: {@link http://www.gnu.org/licenses/}. |
| 14 |
* |
| 15 |
* @package s2Member\Menu_Pages |
| 16 |
* @since 131108 |
| 17 |
*/ |
| 18 |
if(!defined('WPINC')) // MUST have WordPress. |
| 19 |
exit('Do not access this file directly.'); |
| 20 |
|
| 21 |
if(!class_exists('c_ws_plugin__s2member_menu_pages_tb')) |
| 22 |
{ |
| 23 |
/** |
| 24 |
* Toolbox for Menu Pages. |
| 25 |
* |
| 26 |
* @package s2Member\Menu_Pages |
| 27 |
* @since 131108 |
| 28 |
*/ |
| 29 |
class c_ws_plugin__s2member_menu_pages_tb |
| 30 |
{ |
| 31 |
/** |
| 32 |
* Toolbox for Menu Pages. |
| 33 |
* |
| 34 |
* @package s2Member\Menu_Pages |
| 35 |
* @since 131108 |
| 36 |
* |
| 37 |
* @return null |
| 38 |
*/ |
| 39 |
public static function display() |
| 40 |
{ |
| 41 |
do_action('ws_plugin__s2member_during_menu_pages_before_toolbox_sections', get_defined_vars()); |
| 42 |
|
| 43 |
ob_start(); // output buffer these so we can display a toggler conditionally. |
| 44 |
|
| 45 |
if($GLOBALS['WS_PLUGIN__']['s2member']['c']['menu_pages']['updates']) |
| 46 |
{ |
| 47 |
echo '<a href="'.esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value('Newsletter')).'" target="_blank"><i class="fa fa-envelope"></i> s2 Updates (via Email)</a>'; |
| 48 |
} |
| 49 |
if($GLOBALS['WS_PLUGIN__']['s2member']['c']['menu_pages']['upsell-pro']) |
| 50 |
{ |
| 51 |
echo '<a href="http://s2member.com/prices/" target="_blank" style="font-size:120%; font-weight:bold;"><i class="fa fa-money"></i> s2Member® Pro (Upgrade)</a>'."\n"; |
| 52 |
} |
| 53 |
if($GLOBALS['WS_PLUGIN__']['s2member']['c']['menu_pages']['kb']) |
| 54 |
{ |
| 55 |
echo '<a href="'.esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value('Knowledge Base')).'" target="_blank"><i class="fa fa-lightbulb-o"></i> Knowledge Base</a>'."\n"; |
| 56 |
} |
| 57 |
if($GLOBALS['WS_PLUGIN__']['s2member']['c']['menu_pages']['videos']) |
| 58 |
{ |
| 59 |
echo '<a href="'.esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value('Video Tutorials')).'" target="_blank"><i class="fa fa-film"></i> Video Tutorials</a>'."\n"; |
| 60 |
} |
| 61 |
if($GLOBALS['WS_PLUGIN__']['s2member']['c']['menu_pages']['support']) |
| 62 |
{ |
| 63 |
echo '<a href="'.esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value('Forum URI')).'" target="_blank"><i class="fa fa-comments-o"></i> Community</a>'."\n"; |
| 64 |
} |
| 65 |
if($GLOBALS['WS_PLUGIN__']['s2member']['c']['menu_pages']['donations']) |
| 66 |
{ |
| 67 |
echo '<a href="'.esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value('Donate link')).'" target="_blank"><i class="fa fa-heart-o"></i> Contribute</a>'."\n"; |
| 68 |
} |
| 69 |
if($GLOBALS['WS_PLUGIN__']['s2member']['c']['menu_pages']['beta']) |
| 70 |
{ |
| 71 |
echo '<a href="'.esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value('Beta link')).'" target="_blank"><i class="fa fa-flask"></i> Beta Testers</a>'."\n"; |
| 72 |
} |
| 73 |
if(($links = ob_get_clean())) |
| 74 |
{ |
| 75 |
$links = '<div class="links">'.$links.'</div>'; |
| 76 |
echo $links; // output content now; w/ possible toggler. |
| 77 |
} |
| 78 |
do_action('ws_plugin__s2member_during_menu_pages_after_toolbox_sections', get_defined_vars()); |
| 79 |
} |
| 80 |
} |
| 81 |
} |
| 82 |
|