PluginProbe
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions / 110815
s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions v110815
260913 260909 260829 260814 260805 110710 110731 110812 110815 110912 110913 110915 110926 110927 111002 111003 111011 111017 111029 111105 111206 111216 111220 120213 120219 All 188 releases
s2member / includes / classes / utils-html.inc.php

utils-html.inc.php in s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions 110815, at includes/classes/utils-html.inc.php

74 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * HTML utilities.
4 *
5 * Copyright: © 2009-2011
6 * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7 * ( coded in the USA )
8 *
9 * Released under the terms of the GNU General Public License.
10 * You should have received a copy of the GNU General Public License,
11 * along with this software. In the main directory, see: /licensing/
12 * If not, see: {@link http://www.gnu.org/licenses/}.
13 *
14 * @package s2Member\Utilities
15 * @since 110720
16 */
17 if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18 exit("Do not access this file directly.");
19 /**/
20 if (!class_exists ("c_ws_plugin__s2member_utils_html"))
21 {
22 /**
23 * HTML utilities.
24 *
25 * @package s2Member\Utilities
26 * @since 110720
27 */
28 class c_ws_plugin__s2member_utils_html
29 {
30 /**
31 * Returns a DOCTYPE tag along with the HEAD section and title tag.
32 *
33 * This method should NOT be called upon until
34 * {@link s2Member\API_Constants\c_ws_plugin__s2member_constants::constants()}
35 * has been processed. We need access to: ``WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5``.
36 *
37 * @package s2Member\Utilities
38 * @since 110720
39 *
40 * @param str $doctype_html_head_title Optional. The title of the HTML document being generated.
41 * @param str $doctype_html_head_action Optional. An action Hook to process during HEAD generation.
42 * @return str A DOCTYPE tag along with the HEAD section and title tag, configured by parameters.
43 */
44 public static function doctype_html_head ($doctype_html_head_title = FALSE, $doctype_html_head_action = FALSE)
45 {
46 ob_start (); /* Start output buffering here so we can "return" the output from this utility. */
47 /**/
48 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
49 /**/
50 echo '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n";
51 echo '<head>' . "\n";
52 /**/
53 echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n";
54 /**/
55 echo '<script type="text/javascript" src="' . esc_attr (site_url ("/wp-includes/js/jquery/jquery.js?ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
56 echo '<script type="text/javascript" src="' . esc_attr (site_url ("/wp-includes/js/l10n.js?ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
57 echo '<script type="text/javascript">var pwsL10n = {empty: "Strength indicator", short: "Very weak", bad: "Weak", good: "Medium", strong: "Strong", mismatch: "Mismatch"}; try{convertEntities(pwsL10n);}catch(e){};</script>' . "\n";
58 echo '<script type="text/javascript" src="' . esc_attr (site_url ("/wp-admin/js/password-strength-meter.js?ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
59 echo '<script type="text/javascript" src="' . esc_attr (site_url ("/?ws_plugin__s2member_js_w_globals=" . urlencode (WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5) . "&amp;qcABC=1&amp;ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
60 echo '<link href="' . esc_attr (site_url ("/?ws_plugin__s2member_css=1&amp;qcABC=1&amp;ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '" type="text/css" rel="stylesheet" media="all" />' . "\n";
61 /**/
62 if ($doctype_html_head_title) /* Add <title></title> tag? */
63 echo '<title>' . $doctype_html_head_title . '</title>' . "\n";
64 /**/
65 if ($doctype_html_head_action) /* Add content from Hook? */
66 do_action ($doctype_html_head_action, get_defined_vars ());
67 /**/
68 echo '</head>' . "\n";
69 /**/
70 return ob_get_clean ();
71 }
72 }
73 }
74 ?>