| 1 |
<?php |
| 2 |
// @codingStandardsIgnoreFile |
| 3 |
/** |
| 4 |
* Newsletter/Updates 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 111205 |
| 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_updates")) |
| 22 |
{ |
| 23 |
/** |
| 24 |
* Newsletter/Updates for Menu Pages. |
| 25 |
* |
| 26 |
* @package s2Member\Menu_Pages |
| 27 |
* @since 111205 |
| 28 |
*/ |
| 29 |
class c_ws_plugin__s2member_menu_pages_updates |
| 30 |
{ |
| 31 |
public function __construct() |
| 32 |
{ |
| 33 |
if(is_object($user = wp_get_current_user()) && ($user_id = $user->ID)) |
| 34 |
{ |
| 35 |
echo '<form id="ws-updates-form" action="http://websharks-inc.us1.list-manage1.com/subscribe/post?u=8f347da54d66b5298d13237d9&id=19e9d213bc" method="post" target="_blank" autocomplete="off">'."\n"; |
| 36 |
|
| 37 |
if(!is_ssl() && !c_ws_plugin__s2member_utils_conds::is_localhost()) |
| 38 |
{ |
| 39 |
echo '<div class="ws-menu-page-r-group-header open">'."\n"; |
| 40 |
echo ' <i class="fa fa-rss"></i> s2 News'."\n"; |
| 41 |
echo '</div>'."\n"; |
| 42 |
|
| 43 |
echo '<div class="ws-menu-page-r-group open">'."\n"; |
| 44 |
echo '<script type="text/javascript" src="http://feeds.feedburner.com/s2member?format=sigpro&nItems=5&openLinks=new&displayTitle=false&displayFeedIcon=false&displayExcerpts=false&displayAuthor=false&displayDate=false&displayEnclosures=false&displayLinkToFeed=false"></script>'."\n"; |
| 45 |
echo '➘ <a href="'.esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("More Updates")).'" target="_blank" rel="external">More updates...</a>'."\n"; |
| 46 |
echo '</div>'."\n"; |
| 47 |
} |
| 48 |
echo '<div class="ws-menu-page-r-group-header">'."\n"; |
| 49 |
echo ' <i class="fa fa-envelope"></i> s2 Updates'."\n"; |
| 50 |
echo '</div>'."\n"; |
| 51 |
|
| 52 |
echo '<div class="ws-menu-page-r-group">'."\n"; |
| 53 |
|
| 54 |
echo '<p style="text-align:center; font-size:90%;"><strong>Hi '.esc_html(wp_get_current_user()->first_name).' :-)</strong><br />Subscribe here! We\'ll keep you informed about all things related to s2Member.</p>'."\n"; |
| 55 |
|
| 56 |
echo '<div id="ws-updates-div-fname">'."\n"; |
| 57 |
echo '<label for="ws-updates-fname">First Name: *</label><br />'."\n"; |
| 58 |
echo '<input type="text" aria-required="true" autocomplete="off" name="FNAME" id="ws-updates-fname" value="'.esc_attr($user->first_name).'" />'."\n"; |
| 59 |
echo '</div>'."\n"; |
| 60 |
|
| 61 |
echo '<div id="ws-updates-div-lname">'."\n"; |
| 62 |
echo '<label for="ws-updates-lname">Last Name: *</label><br />'."\n"; |
| 63 |
echo '<input type="text" aria-required="true" autocomplete="off" name="LNAME" id="ws-updates-lname" value="'.esc_attr($user->last_name).'" />'."\n"; |
| 64 |
echo '</div>'."\n"; |
| 65 |
|
| 66 |
echo '<div id="ws-updates-div-email">'."\n"; |
| 67 |
echo '<label for="ws-updates-email">Email Address: *</label><br />'."\n"; |
| 68 |
echo '<input type="text" aria-required="true" autocomplete="off" name="EMAIL" id="ws-updates-email" value="'.format_to_edit($user->user_email).'" />'."\n"; |
| 69 |
echo '</div>'."\n"; |
| 70 |
|
| 71 |
echo '<div id="ws-updates-div-submit">'."\n"; |
| 72 |
echo '<input type="submit" value="Subscribe" name="subscribe" />'."\n"; |
| 73 |
echo '</div>'."\n"; |
| 74 |
|
| 75 |
echo '</div>'."\n"; |
| 76 |
|
| 77 |
echo '</form>'."\n"; |
| 78 |
} |
| 79 |
} |
| 80 |
} |
| 81 |
} |
| 82 |
|
| 83 |
new c_ws_plugin__s2member_menu_pages_updates(); |
| 84 |
|