当前位置: 首页>>代码示例>>PHP>>正文


PHP c_ws_plugin__s2member_utils_strings::highlight_php方法代码示例

本文整理汇总了PHP中c_ws_plugin__s2member_utils_strings::highlight_php方法的典型用法代码示例。如果您正苦于以下问题:PHP c_ws_plugin__s2member_utils_strings::highlight_php方法的具体用法?PHP c_ws_plugin__s2member_utils_strings::highlight_php怎么用?PHP c_ws_plugin__s2member_utils_strings::highlight_php使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在c_ws_plugin__s2member_utils_strings的用法示例。


在下文中一共展示了c_ws_plugin__s2member_utils_strings::highlight_php方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<div class="ws-menu-page-group" title="Pro API For Remote Operations">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-api-remote-operations-section">' . "\n";
         echo '<h3>Pro API For Remote Operations (PHP scripting required)</h3>' . "\n";
         echo '<p>With s2Member Pro installed, you have access to the s2Member Pro API For Remote Operations. This is made available for developers that wish to create User/Member accounts dynamically through custom scripts of their own. s2Member\'s Remote Operations API requires a secret API Key in order to POST authenticated requests to your installation of s2Member.</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h4>Remote Operations API: <strong>Your secret API Key</strong></h4>' . "\n";
         echo '<input type="text" autocomplete="off" value="' . format_to_edit(c_ws_plugin__s2member_pro_remote_ops::remote_ops_key_gen()) . '" style="width:99%;" />' . "\n";
         echo '<p><em><strong class="ws-menu-page-hilite">Experimental:</strong> The Remote Operations API is currently in an experimental state. The Operations that are currently possible include: <code>auth_check_user</code>, <code>get_user</code>, <code>create_user</code>, <code>modify_user</code>, <code>delete_user</code>. In a future release of s2Member Pro, we will add further documentation and some additional Remote Operations to this API. Thanks for your patience.</em></p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h4>Remote Operation: <code>auth_check_user</code> (authenticate existing Users/Members)</h4>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(str_replace("www.example.com", $_SERVER["HTTP_HOST"], str_replace("http://www.example.com/", site_url("/"), str_replace("[API Key]", c_ws_plugin__s2member_pro_remote_ops::remote_ops_key_gen(), file_get_contents(dirname(__FILE__) . "/code-samples/remote-op-auth-check-user.x-php"))))) . '</p>' . "\n";
         echo '<h4>Remote Operation: <code>get_user</code> (retrieve data about existing Users/Members)</h4>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(str_replace("www.example.com", $_SERVER["HTTP_HOST"], str_replace("http://www.example.com/", site_url("/"), str_replace("[API Key]", c_ws_plugin__s2member_pro_remote_ops::remote_ops_key_gen(), file_get_contents(dirname(__FILE__) . "/code-samples/remote-op-get-user.x-php"))))) . '</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h4>Remote Operation: <code>create_user</code> (or update existing Users/Members)</h4>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(str_replace("www.example.com", $_SERVER["HTTP_HOST"], str_replace("http://www.example.com/", site_url("/"), str_replace("[API Key]", c_ws_plugin__s2member_pro_remote_ops::remote_ops_key_gen(), file_get_contents(dirname(__FILE__) . "/code-samples/remote-op-create-user.x-php"))))) . '</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h4>Remote Operation: <code>modify_user</code> (updates existing Users/Members)</h4>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(str_replace("www.example.com", $_SERVER["HTTP_HOST"], str_replace("http://www.example.com/", site_url("/"), str_replace("[API Key]", c_ws_plugin__s2member_pro_remote_ops::remote_ops_key_gen(), file_get_contents(dirname(__FILE__) . "/code-samples/remote-op-modify-user.x-php"))))) . '</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h4>Remote Operation: <code>delete_user</code> (deletes existing Users/Members)</h4>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(str_replace("www.example.com", $_SERVER["HTTP_HOST"], str_replace("http://www.example.com/", site_url("/"), str_replace("[API Key]", c_ws_plugin__s2member_pro_remote_ops::remote_ops_key_gen(), file_get_contents(dirname(__FILE__) . "/code-samples/remote-op-delete-user.x-php"))))) . '</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>TIP:</strong> In addition to this documentation, you may also want to have a look at the <a href="http://www.s2member.com/codex/" target="_blank" rel="external">s2Member Codex</a>.<br />' . "\n";
         echo '<strong>See Also:</strong> <a href="http://www.s2member.com/codex/stable/s2member/api_constants/package-summary/" target="_blank" rel="external">s2Member Codex -› API Constants</a>, and <a href="http://www.s2member.com/codex/stable/s2member/api_functions/package-summary/" target="_blank" rel="external">s2Member Codex -› API Functions</a>.</p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
     }
 }
开发者ID:donwea,项目名称:nhap.org,代码行数:32,代码来源:scripting-api-remote-ops.inc.php

示例2: __construct

 public function __construct()
 {
     if (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site()) {
         echo '<p><strong>S2MEMBER_PRO_VERSION</strong><br />This will always be a (string) with the current s2Member Pro version. Available since s2Member Pro v1.0. Dated versions began with s2Member Pro v110604.</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
     } else {
         echo '<p><strong>S2MEMBER_PRO_VERSION</strong><br />This will always be a (string) with the current s2Member Pro version. Available since s2Member Pro v1.0. Dated versions began with s2Member Pro v110604.</p>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/pro-version.x-php")) . '</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
     }
 }
开发者ID:SollyNZ,项目名称:damn-plugins,代码行数:11,代码来源:scripting-api-constants.inc.php

示例3: __construct

 public function __construct()
 {
     if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<div class="ws-menu-page-group" title="Pro Login Widget via PHP">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-api-login-widget-section">' . "\n";
         echo '<h3>Pro Login Widget via PHP Tag (some scripting required)</h3>' . "\n";
         echo '<p>With s2Member Pro installed, you have access to the s2Member Pro Login Widget. This is made available in your Dashboard under: <strong>Appearance → Widgets</strong>. Very simple to use; just drag &amp; drop (that\'s it). For developers though, sometimes it is necessary to include the Pro Login Widget in non-widgetized sections of a WordPress theme; or even into another plugin that you run in concert with s2Member. You can use this PHP tag to build the Pro Login Widget dynamically: ' . c_ws_plugin__s2member_utils_strings::highlight_php('<?php echo s2member_pro_login_widget(); ?>') . '</p>' . "\n";
         echo '<p>The Pro Login Widget can also be configured with an <em>optional</em> array of <a href="http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_s2member_pro_login_widget()" target="_blank" rel="external">configuration parameters</a>.</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>TIP:</strong> In addition to this documentation, you may also want to have a look at the <a href="http://www.s2member.com/codex/" target="_blank" rel="external">s2Member Codex</a>.<br />' . "\n";
         echo '<strong>See Also:</strong> <a href="http://www.s2member.com/codex/stable/s2member/api_constants/package-summary/" target="_blank" rel="external">s2Member Codex → API Constants</a>, and <a href="http://www.s2member.com/codex/stable/s2member/api_functions/package-summary/" target="_blank" rel="external">s2Member Codex → API Functions</a>.</p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
     }
 }
开发者ID:codeforest,项目名称:s2member-pro,代码行数:15,代码来源:scripting-api-login-widget.inc.php

示例4: __construct

 public function __construct()
 {
     if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
         echo '<div class="ws-menu-page-group" title="Pro API For Remote Operations">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-api-remote-operations-section">' . "\n";
         echo '<h3>Pro API For Remote Operations ( some scripting required )</h3>' . "\n";
         echo '<p>With s2Member Pro installed, you have access to the s2Member Pro API For Remote Operations. This is made available for developers that wish to create User/Member accounts dynamically through custom scripts of their own. s2Member\'s Remote Operations API requires a secret API Key in order to POST authenticated requests to your installation of s2Member. Here is the API Key for this installation domain:</p>' . "\n";
         echo '<input type="text" autocomplete="off" value="' . format_to_edit(c_ws_plugin__s2member_pro_remote_ops::remote_ops_key_gen()) . '" style="width:99%;" />' . "\n";
         echo '<p><em><strong>Experimental:</strong> The Remote Operations API is currently in an experimental state. The only Operation that is currently possible, is the <code>create_user</code> Operation, which is shown in the code sample below. In a future release of s2Member Pro, we will add further documentation and some additional Remote Operations to this API. Thanks for your patience.</em></p>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(str_replace("www.example.com", $_SERVER["HTTP_HOST"], str_replace("http://www.example.com/", site_url("/"), str_replace("[API Key]", c_ws_plugin__s2member_pro_remote_ops::remote_ops_key_gen(), file_get_contents(dirname(__FILE__) . "/code-samples/remote-op-create-user.x-php"))))) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><strong>TIP:</strong> In addition to this documentation, you may also want to have a look at the <a href="http://www.primothemes.com/forums/viewforum.php?f=40" target="_blank" rel="external">s2Member Codex</a>.<br />' . "\n";
         echo '<strong>See Also:</strong> <a href="http://www.primothemes.com/forums/viewtopic.php?f=40&t=12450" target="_blank" rel="external">s2Member Codex -> API Constants</a>, and <a href="http://www.primothemes.com/forums/viewtopic.php?f=40&t=12455" target="_blank" rel="external">s2Member Codex -> API Functions</a>.</p>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
 }
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:21,代码来源:scripting-api-remote-ops.inc.php

示例5: __construct


//.........这里部分代码省略.........
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link to the Specific Post/Page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use <a href="http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_s2member_decrypt()" target="_blank" rel="external">s2member_decrypt()</a>.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>Coupon Replacement Codes:</strong>' . "\n";
         echo '<ul class="ws-menu-page-li-margins">' . "\n";
         echo '<li><code>%%full_coupon_code%%</code> = A full Coupon Code—if one is accepted by your configuration of s2Member. This may indicate an Affiliate Coupon Code, which will include your Affiliate Suffix Chars too (i.e., the full Coupon Code).</li>' . "\n";
         echo '<li><code>%%coupon_code%%</code> = A Coupon Code—if one is accepted by your configuration of s2Member. This will NOT include any Affiliate Suffix Chars. This indicates the actual Coupon Code accepted by your configuration of s2Member (excluding any Affiliate ID).</li>' . "\n";
         echo '<li><code>%%coupon_affiliate_id%%</code> = This is the end of an Affiliate Coupon Code <em>(i.e., the referring affiliate\'s ID)</em>. This is only applicable if an Affiliate Coupon Code is accepted by your configuration of s2Member.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;" class="ws-menu-page-li-margins">' . "\n";
         echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
         echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
         echo '<em>(The campaign (i.e., christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
         echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
         echo '</div>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3>Cancellations &amp; Billing Updates (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-pro-forms-success-cancellations-updates\').toggle(); return false;" class="ws-dotted-link">open/close</a>)</h3>' . "\n";
         echo '<div id="ws-plugin--s2member-pro-forms-success-cancellations-updates" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;" class="ws-menu-page-li-margins">' . "\n";
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link back to their account page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link back to their account page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use <a href="http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_s2member_decrypt()" target="_blank" rel="external">s2member_decrypt()</a>.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '</div>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3>Verify The Integrity Of Replacement Codes (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-pro-forms-success-verification\').toggle(); return false;" class="ws-dotted-link">open/close</a>)</h3>' . "\n";
         echo '<div id="ws-plugin--s2member-pro-forms-success-verification" style="display:none;">' . "\n";
         echo '<p>If you know a little PHP, you can verify the integrity of the Replacement Codes returned by s2Member. This is important, because in this particular situation, Replacement Codes are passed publicly in the query string of your Custom Return URL. In other words, a Customer could manually change one of the values; like the dollar amounts. For this reason, you should always verify the integrity of the details being returned to any processing routines that receive this information. In the PHP code for your Custom Return URL, you can use this s2Member API Function: <code>s2member_pro_paypal_s2p_v_query_ok()</code>.</p>' . "\n";
         echo '<p>Here are some examples:</p>' . "\n";
         echo '<p>1. <strong>Shortcode attribute:</strong> <code>success="/thank-you/?subscr_id=%%subscr_id%%&amp;initial=%%initial%%&amp;regular=%%regular%%"</code></p>' . "\n";
         echo '<p>2. <strong>s2Member returns Customer to:</strong> <code>/thank-you/?subscr_id=123&amp;initial=0.00&amp;regular=24.95&amp;s2p-v=234098234-23409sdfs234sd234209sdf</code></p>' . "\n";
         echo '<p>3. <strong>Now, in your Custom Return Page, you will need to do this before trusting anything:</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-s2p-v-query-ok-1.x-php")) . '</p>' . "\n";
         echo '<p>s2Member will only verify a query string for up to 10 seconds. After 10 seconds, <code>s2member_pro_paypal_s2p_v_query_ok()</code> will always return <code>false</code>, even if the integrity of the query string is valid. This prevents a Customer from bookmarking your Return URL; thereby causing duplicate commissions; in case you\'re using it for tracking purposes.</p>' . "\n";
         echo '<p>Again, if you only need to obtain details for the purpose of tracking sales, you should just use the simpler API Tracking methods provided by s2Member, under: <strong>s2Member → API / Tracking</strong>. The API Tracking methods are specifically designed for tracking sales, exactly ONE time for each Customer.</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><em>If it is your intention to allow Customers to bookmark your Custom Return URL, you can still do that. Just be aware that <code>s2member_pro_paypal_s2p_v_query_ok()</code> will return <code>false</code> after the first 10 seconds. If you want to verify after 10 seconds, you can pass a second argument to the function, like this:</em></p>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/paypal-s2p-v-query-ok-2.x-php")) . '</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3>Could a Customer change the timestamp in the URL?</h3>' . "\n";
         echo '<p>Based on the structure of the URL, it would appear possible; however, it\'s NOT. s2Member uses an advanced checksum.</p>' . "\n";
         echo '<h3>Can I get rid of the <code>s2p-v</code> variable?</h3>' . "\n";
         echo '<p>No, this variable is always passed to your Custom Return URL, it\'s for important verification purposes.</p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
     }
     echo '<div class="ws-menu-page-group" title="Shortcode Attributes (Explained)">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-shortcode-attrs-section">' . "\n";
     echo '<h3>Shortcode Attributes (Explained In Full Detail)</h3>' . "\n";
     echo '<p>When you generate a Form, s2Member will make a <a href="http://s2member.com/r/shortcode-reference/" target="_blank" rel="external">Shortcode</a> available to you. Like most Shortcodes for WordPress, s2Member reads Attributes in your Shortcode. These Attributes will be pre-configured by one of s2Member\'s Form Generators automatically; so there really is nothing more you need to do. However, many site owners like to know exactly how these Shortcode Attributes work. Below, is a brief overview of each possible Shortcode Attribute.</p>' . "\n";
     echo '<table class="form-table" style="margin-top:0;">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr style="padding-top:0;">' . "\n";
     echo '<td style="padding-top:0;">' . "\n";
     echo '<ul class="ws-menu-page-li-margins">' . "\n";
     echo '<li><code>accept="paypal,visa,mastercard,amex,discover,maestro,solo"</code> Accepted Billing Methods. A comma-delimited list of Billing Methods you want to accept. Due to a PayPal policy, you may NOT exclude PayPal from this list; s2Member won\'t let you. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>accept_via_paypal="paypal"</code> Accepted Billing via PayPal. A comma-delimited list of Billing Methods you want to accept through PayPal, as opposed to processing them on-site. Due to a PayPal policy, you may NOT exclude PayPal from this list; s2Member won\'t let you. <strong>Tip:</strong> If you don\'t have a PayPal Pro account, you can set <code>accept="paypal"</code>, or set <code>accept_via_paypal="paypal,visa,mastercard,amex,discover,maestro,solo"</code>. With one or both of these configurations, all you need is a PayPal Standard account with Express Checkout <em>(which is free)</em>. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo '<li><code>accept_coupons="1"</code> Accept Coupons? Possible values: <code>0</code> = do NOT accept Coupons on this particular Form; <code>1</code> = DO accept Coupon Codes on this particular Form.</li>' . "\n";
     echo '<li><code>cancel="0"</code> Cancellation Form. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Cancellation Form, <code>1</code> = this IS a Cancellation Form.</li>' . "\n";
     echo '<li><code>captcha=""</code> When you set this Attribute, visitors must prove they\'re human by typing a <a href="http://s2member.com/r/captcha-reference/" target="_blank" rel="external">captcha/security code</a>. This service is powered by Google\'s reCaptcha system. Possible values: <code>0</code> = do NOT require a captcha code on this Form; <code>clean</code> = DO require a captcha code on this Form; using the <code>clean</code> theme style. Possible theme styles include: <code>red</code>, <code>white</code>, <code>clean</code>, and <code>blackglass</code>. Or, if you supplied reCaptcha v2 keys in your s2Member General Options (i.e., you are using reCaptcha v2), this must be <code>light</code> or <code>dark</code>.</li>' . "\n";
     echo '<li><code>cc="USD"</code> 3 character Currency Code. Not valid when <code>cancel="1"</code>.</li>' . "\n";
     echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<li><code>ccaps="music,videos"</code> A comma-delimited list of Custom Capabilities. Only valid w/ Membership Level Access and/or Independent Custom Capabilities.</li>' . "\n" : '';
     echo '<li><code>coupon="SAVE-10"</code> Default/pre-filled Coupon Code. This is optional, and the Coupon Code (if supplied) must exist in your Coupon Code configuration.</li>' . "\n";
     echo '<li><code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '"</code> must start with your domain. Additional values can be piped in (ex: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3|etc"</code>). Not valid when <code>cancel="1"</code>.</li>' . "\n";
开发者ID:codeforest,项目名称:s2member-pro,代码行数:67,代码来源:paypal-forms.inc.php

示例6: __construct


//.........这里部分代码省略.........
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_amazon_cf_files_distro_streaming_cname" id="ws-plugin--s2member-amazon-cf-files-streaming-distro-cname" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_cf_files_distro_streaming_cname"]) . '" /><br />' . "\n";
         echo 'Example: <code>s2-streaming-files.' . esc_html(c_ws_plugin__s2member_utils_urls::parse_url(site_url(), PHP_URL_HOST)) . '</code>.<br />' . "\n";
         echo '<em>* Optional, do NOT fill this in unless you know what you\'re doing. This requires DNS changes.</em>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_amazon_cf", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_rtmp_streaming", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_rtmp_streaming", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="JW Player v6 &amp; RTMP Protocol Examples">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-rtmp-streaming-section">' . "\n";
         echo '<h3>JW Player v6 &amp; RTMP Protocol Examples</h3>' . "\n";
         echo '<a href="http://www.longtailvideo.com/players/" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/jwplayer-logo.png" class="ws-menu-page-right" style="width:179px; height:58px; border:0; border-radius:3px; background:#FFFFFF; padding:15px;" alt="." /></a>' . "\n";
         echo '<p>While it is possible to serve audio/video files protected by s2Member, without needing to integrate Amazon S3 or CloudFront; we DO highly recommend that you integrate both Amazon S3 and Amazon CloudFront in order to maximize speed and compatibility across various viewing platforms. That being said, there are code samples below that will serve audio/video files both with and without Amazon S3/CloudFront. You can also check the <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Forum URI")) . '" target="_blank" rel="external">s2Member Support Forums</a> for tips/tricks if you like.</p>' . "\n";
         echo '<p><strong>One of the great things about Amazon CloudFront</strong>, is its ability to <strong>stream/seek media files</strong> in the truest sense of the word. For sites delivering protected <em>FLV/MP4/OGG/WEBM</em> and other streaming audio/video file types over the <em>RTMP</em> protocol, Amazon CloudFront is our recommendation. Once you\'ve successfully configured s2Member to use both Amazon S3 and Amazon CloudFront together, please review the code samples below. s2Member can automatically serve your protected files over the <em>RTMP</em> protocol using an Amazon CloudFront Streaming Distribution.</p>' . "\n";
         echo '<p><strong>See also:</strong> This KB article: <a href="http://www.s2member.com/kb/jwplayer-s2stream-shortcodes/" target="_blank" rel="external">JW Player w/ <code>[s2Stream /]</code> Shortcodes</a>.</p>' . "\n";
         if (stripos(wp_get_theme(), 'infocus') !== FALSE) {
             echo '<p><strong>Note:</strong> It appears that you\'re using the inFocus WordPress theme. If you experience trouble with the shortcodes below, try wrapping the shortcode in <code>[raw][/raw]</code> tags (e.g., <code>[raw][s2Stream ... /][/raw]</code>).</p>' . "\n";
         }
         do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_rtmp_streaming", get_defined_vars());
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3><code>[s2Stream /]</code> Video Shortcode Examples (recommended — it\'s the easiest way)</h3>' . "\n";
         echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp4\').toggle(); return false;" class="ws-dotted-link">JW Player (MP4 file, via Rewrite URLs. Amazon S3/CloudFront NOT required)</a></p>' . "\n";
         echo '<p id="ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp4" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Works with any audio/video file. This does NOT require s2Member to be integrated with Amazon S3/CloudFront.<br /><br />' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/jwplayer-s2stream-mp4.x-php")) . '</p>' . "\n";
         echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp4-rtmp\').toggle(); return false;" class="ws-dotted-link">JW Player (RTMP streaming MP4, via s2Member\'s Amazon S3/CloudFront integration)</a></p>' . "\n";
         echo '<p id="ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp4-rtmp" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Streams with the RTMP protocol, plus there is a full download fallback of the MP4 source file if streaming is not possible on a particular device.<br />This requires s2Member to be integrated with Amazon S3/CloudFront.<br /><br />' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/jwplayer-s2stream-mp4-rtmp.x-php")) . '</p>' . "\n";
         echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp4-rtmp-only\').toggle(); return false;" class="ws-dotted-link">JW Player (RTMP streaming MP4 only, via s2Member\'s Amazon S3/CloudFront integration)</a></p>' . "\n";
         echo '<p id="ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp4-rtmp-only" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Streams with the RTMP protocol only, with no access to the source file, only to the RTMP stream.<br />This requires s2Member to be integrated with Amazon S3/CloudFront.<br /><br />' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/jwplayer-s2stream-mp4-rtmp-only.x-php")) . '</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3><code>[s2Stream /]</code> Audio Shortcode Examples (recommended — it\'s the easiest way)</h3>' . "\n";
         echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp3\').toggle(); return false;" class="ws-dotted-link">JW Player (MP3 file, via Rewrite URLs. Amazon S3/CloudFront NOT required)</a></p>' . "\n";
         echo '<p id="ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp3" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Works with any audio/video file. This does NOT require s2Member to be integrated with Amazon S3/CloudFront.<br /><br />' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/jwplayer-s2stream-mp3.x-php")) . '</p>' . "\n";
         echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp3-rtmp\').toggle(); return false;" class="ws-dotted-link">JW Player (RTMP streaming MP3, via s2Member\'s Amazon S3/CloudFront integration)</a></p>' . "\n";
         echo '<p id="ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp3-rtmp" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Streams with the RTMP protocol, plus there is a full download fallback of the MP3 source file if streaming is not possible on a particular device.<br />This requires s2Member to be integrated with Amazon S3/CloudFront.<br /><br />' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/jwplayer-s2stream-mp3-rtmp.x-php")) . '</p>' . "\n";
         echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp3-rtmp-only\').toggle(); return false;" class="ws-dotted-link">JW Player (RTMP streaming MP3 only, via s2Member\'s Amazon S3/CloudFront integration)</a></p>' . "\n";
         echo '<p id="ws-plugin--s2member-rtmp-streaming-details-jwplayer-s2stream-mp3-rtmp-only" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />Streams with the RTMP protocol only, with no access to the source file, only to the RTMP stream.<br />This requires s2Member to be integrated with Amazon S3/CloudFront.<br /><br />' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/jwplayer-s2stream-mp3-rtmp-only.x-php")) . '</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<h3>PHP Code Examples (for more advanced integrations via PHP — in WordPress themes)</h3>' . "\n";
         echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--s2member-rtmp-streaming-details-jwplayer-standard-mp4\').toggle(); return false;" class="ws-dotted-link">JW Player (MP4 file, via Rewrite URLs. Amazon S3/CloudFront NOT required)</a></p>' . "\n";
         echo '<p id="ws-plugin--s2member-rtmp-streaming-details-jwplayer-standard-mp4" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This does NOT require s2Member to be integrated with Amazon S3/CloudFront.<br />Also see: <code>s2Member -› Download Options -› Advanced Mod Rewrite Linkage</code>.<br /><br />' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/jwplayer-standard-mp4.x-php")) . '</p>' . "\n";
         echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--s2member-rtmp-streaming-details-jwplayer-streaming-mp4\').toggle(); return false;" class="ws-dotted-link">JW Player (RTMP streaming MP4, via s2Member\'s Amazon S3/CloudFront integration)</a></p>' . "\n";
         echo '<p id="ws-plugin--s2member-rtmp-streaming-details-jwplayer-streaming-mp4" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This requires s2Member to be integrated with Amazon S3/CloudFront.<br />Also see: <a href="http://www.s2member.com/codex/stable/s2member/api_functions/package-summary/" target="_blank" rel="external">s2Member Codex -› API Functions</a>.<br /><br />' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/jwplayer-streaming-mp4.x-php")) . '</p>' . "\n";
         echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--s2member-rtmp-streaming-details-jwplayer-streaming-mp4-sca\').toggle(); return false;" class="ws-dotted-link">JW Player (RTMP streaming MP4, via s2Member\'s JSON/Shortcode alternative)</a></p>' . "\n";
         echo '<p id="ws-plugin--s2member-rtmp-streaming-details-jwplayer-streaming-mp4-sca" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This requires s2Member to be integrated with Amazon S3/CloudFront.<br />Also see: <a href="http://www.s2member.com/codex/stable/s2member/api_functions/package-summary/" target="_blank" rel="external">s2Member Codex -› API Functions</a>.<br /><br />' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/jwplayer-streaming-mp4-sca.x-php")) . '</p>' . "\n";
         echo '<p style="font-size:110%;"><a href="#" onclick="jQuery(\'p#ws-plugin--s2member-rtmp-streaming-details-jwplayer-streaming-mp4-webm\').toggle(); return false;" class="ws-dotted-link">JW Player (RTMP streaming MP4, advanced w/ multiple fallbacks)</a></p>' . "\n";
         echo '<p id="ws-plugin--s2member-rtmp-streaming-details-jwplayer-streaming-mp4-webm" style="display:none;">Download <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">JW Player here</a>, and upload <code>/jwplayer/</code> to your website\'s root directory.<br />This requires s2Member to be integrated with Amazon S3/CloudFront.<br />Also see: <a href="http://www.s2member.com/codex/stable/s2member/api_functions/package-summary/" target="_blank" rel="external">s2Member Codex -› API Functions</a>.<br /><br />' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/jwplayer-streaming-mp4-webm.x-php")) . '</p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_rtmp_streaming", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_rewrite_linkage", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_rewrite_linkage", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Advanced Mod-Rewrite Linkage">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-rewrite-linkage-section">' . "\n";
         echo '<h3>Advanced Mod-Rewrite Linkage</h3>' . "\n";
         echo '<p>s2Member automatically creates <code>mod_rewrite</code> rules inside your <code>/' . esc_html(c_ws_plugin__s2member_utils_dirs::basename_dir_app_data($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory, which provide additional flexibility in the way protected files can be served to your Customers. With s2Member\'s <code>mod_rewrite</code> rules, it is now possible to link directly to a protected file, avoiding the use of query string variables <em>(it\'s completely optional though, i.e. NOT required)</em>.</p>' . "\n";
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:67,代码来源:down-ops.inc.php

示例7: __construct


//.........这里部分代码省略.........
         echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
         echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
         echo '<em>(The campaign (i.e., christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
         echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><em><strong>Tip:</strong> With <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Add-on / Prices")) . '" target="_blank" rel="external">s2Member Pro-Forms</a>, it\'s possible to integrate Affiliate Coupon Codes. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code that you\'ve configured with s2Member Pro. Please check your Dashboard here: <strong>s2Member ⥱ Pro Coupon Codes ⥱ Affiliate Coupon Codes</strong>. This is a VERY powerful feature.</em></p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_trk_ops_page_during_left_sections_after_sp_tracking", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_trk_ops_page_during_left_sections_display_integrations_divider", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_trk_ops_page_during_left_sections_before_integrations_divider", get_defined_vars());
         echo '<div style="border-bottom:1px solid #DFDFDF; margin:-20px 0 20px 0; padding:0;">&nbsp;</div>' . "\n";
         do_action("ws_plugin__s2member_during_trk_ops_page_during_left_sections_after_integrations_divider", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_trk_ops_page_during_left_sections_display_idev", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_trk_ops_page_during_left_sections_before_idev", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Integrating iDevAffiliate">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-idev-section">' . "\n";
         echo '<h3>Integrating iDevAffiliate (affiliate program management)</h3>' . "\n";
         echo '<a href="http://www.s2member.com/idev-affiliate" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/idev-logo.gif" class="ws-menu-page-right ws-menu-page-bordered" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
         echo '<p>Adding affiliate tracking software to your site is one of the most effective ways to achieve more sales, more traffic, and more search engine ranking. <a href="http://www.s2member.com/idev-affiliate" target="_blank" rel="external">iDevAffiliate</a> (an affiliate management portal), installs in just minutes, and can be integrated seamlessly with s2Member. We recommend <a href="http://www.s2member.com/idev-affiliate" target="_blank" rel="external">iDevAffiliate Standard</a> ( $99 ) because of its proven track record, and its ability to integrate with s2Member using a variety of techniques. The most popular being a Hidden Image Tag.</p>' . "\n";
         echo '<p>If you choose to <a href="http://www.s2member.com/idev-affiliate" target="_blank" rel="external">install iDevAffiliate</a>, you will need to configure your <strong>iDevAffiliate ⥱ Shopping Cart Integration</strong>. Please choose <code>Generic Tracking Pixel</code>. Then, grab your Hidden Image Tag, and pop the code provided by iDevAffiliate into one of the fields for Tracking Codes <em>(at the top of this page)</em>. You MUST also add Replacement Codes to your Hidden Image Tag. To save you some trouble, we\'ve provided some examples below, one for each of s2Member\'s Tracking Code integrations.</p>' . "\n";
         do_action("ws_plugin__s2member_during_trk_ops_page_during_left_sections_during_idev", get_defined_vars());
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>Signup Tracking Code, for iDevAffiliate integration:</strong></p>' . "\n";
         echo '<p>idev_saleamt=<strong>%%initial%%</strong><br />idev_ordernum=<strong>%%subscr_id%%</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/idev-signup-tracking-code.x-php")) . '</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>Modification Tracking Code, for iDevAffiliate integration:</strong></p>' . "\n";
         echo '<p>idev_saleamt=<strong>%%initial%%</strong><br />idev_ordernum=<strong>%%subscr_id%%</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/idev-modification-tracking-code.x-php")) . '</p>' . "\n";
         if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             echo '<p><strong>Capability Tracking Code, for iDevAffiliate integration:</strong></p>' . "\n";
             echo '<p>idev_saleamt=<strong>%%amount%%</strong><br />idev_ordernum=<strong>%%txn_id%%</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/idev-ccap-tracking-code.x-php")) . '</p>' . "\n";
         }
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><strong>Specific Post/Page Tracking Code, for iDevAffiliate integration:</strong></p>' . "\n";
         echo '<p>idev_saleamt=<strong>%%amount%%</strong><br />idev_ordernum=<strong>%%txn_id%%</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/idev-sp-tracking-code.x-php")) . '</p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p>Your <code>profile</code> ID will be assigned by iDevAffiliate. Be sure to replace <code>profile=123</code> with your own profile ID.</p>' . "\n";
         echo '<p><em><strong>Tip:</strong> iDevAffiliate also provides an alternative method, using a 3rd-party call. The alternative 3rd-party call, could be used with <strong>s2Member ⥱ API Notifications.</strong> A 3rd-party call, is essentially an HTTP connection that runs silently behind-the-scenes, as opposed to being loaded in a browser. It\'s a bit more powerful (and reliable), but also more advanced.</em></p>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<p><em><strong>Tip:</strong> With <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Add-on / Prices")) . '" target="_blank" rel="external">s2Member Pro-Forms</a>, it\'s possible to integrate Affiliate Coupon Codes with iDevAffiliate. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code that you\'ve configured with s2Member Pro. Please check your Dashboard here: <strong>s2Member ⥱ Pro Coupon Codes ⥱ Affiliate Coupon Codes</strong>. This is a VERY powerful feature.</em></p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_trk_ops_page_during_left_sections_after_idev", get_defined_vars());
     }
     if (apply_filters("ws_plugin__s2member_during_trk_ops_page_during_left_sections_display_shareasale", TRUE, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_trk_ops_page_during_left_sections_before_shareasale", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Integrating ShareASale">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-shareasale-section">' . "\n";
         echo '<h3>Integrating ShareASale (affiliate program management)</h3>' . "\n";
         echo '<a href="http://www.s2member.com/shareasale" target="_blank"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/sas-logo.png" class="ws-menu-page-right ws-menu-page-bordered" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
         echo '<p>Established in 2000, <a href="http://www.s2member.com/shareasale" target="_blank" rel="external">ShareASale</a> provides award winning technology and service; which will enable you to connect with a network of established affiliates, as well as recruit new ones. Joining ShareASale, maximizes your ability to reach the greatest number of affiliates, with the least amount of work. At ShareASale, you\'ll have access to an existing affiliate-base. You place your site on the market, and let their existing affiliates promote your products/services.</p>' . "\n";
         echo '<p>If you <a href="http://www.s2member.com/shareasale" target="_blank" rel="external">become a Merchant at ShareASale</a>, you will need to configure your <strong>ShareASale ⥱ Sale Tracking</strong>. Grab your Hidden Image Tag, and pop the code provided by ShareASale into one of the fields for Tracking Codes <em>(at the top of this page)</em>. You MUST also add Replacement Codes to your Hidden Image Tag. To save you some trouble, we\'ve provided some examples below, one for each of s2Member\'s Tracking Code integrations.</p>' . "\n";
         do_action("ws_plugin__s2member_during_trk_ops_page_during_left_sections_during_shareasale", get_defined_vars());
开发者ID:EliasGoldberg,项目名称:troop-sim,代码行数:67,代码来源:trk-ops.inc.php

示例8: __construct

 public function __construct()
 {
     echo '<div class="wrap ws-menu-page">' . "\n";
     /**/
     echo '<div id="icon-plugins" class="icon32"><br /></div>' . "\n";
     echo '<h2>s2Member® API / Scripting</h2>' . "\n";
     /**/
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     /**/
     do_action("ws_plugin__s2member_during_scripting_page_before_left_sections", get_defined_vars());
     /**/
     if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_easy_way", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_easy_way", get_defined_vars());
         /**/
         echo '<div class="ws-menu-page-group" title="The Extremely Easy Way">' . "\n";
         /**/
         echo '<div class="ws-menu-page-section ws-plugin--s2member-api-easy-way-section">' . "\n";
         echo '<h3>The Extremely Easy Way ( no scripting required )</h3>' . "\n";
         echo '<p>From your s2Member Restriction Options panel, you may restrict access to certain Posts, Pages, Tags, Categories, and/or URIs based on a Member\'s Level. The s2Member Restriction Options panel makes it easy for you. All you do is type in the basics of what you want to restrict access to, and those sections of your site will be off limits to non-Members. That being said, there are times when you might need to have greater control over which portions of your site can be viewed by non-Members, or Members at different Levels; with different Capabilities. This is where API Scripting with Conditionals comes in.</p>' . "\n";
         do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_api_easy_way", get_defined_vars());
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
         /**/
         do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_after_api_easy_way", get_defined_vars());
     }
     /**/
     if (apply_filters("ws_plugin__s2member_during_scripting_page_during_left_sections_display_api_simple_way", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_before_api_simple_way", get_defined_vars());
         /**/
         if (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site()) {
             echo '<div class="ws-menu-page-group" title="Simple/Shortcode Conditionals">' . "\n";
             /**/
             echo '<div class="ws-menu-page-section ws-plugin--s2member-api-simple-way-section">' . "\n";
             echo '<h3>Simple Conditionals ( via WordPress® Shortcodes )</h3>' . "\n";
             echo '<p>In an effort to give you even more control over access restrictions, s2Member makes Simple Conditionals available to you from within WordPress®, using Shortcodes that are fully compatible with both the Visual Editor, and also the HTML Tab in WordPress®. In this section, we\'ll demonstrate several functions that are possible using Shortcodes: <strong><code>is_user_logged_in()</code></strong>, <strong><code>is_user_not_logged_in()</code></strong>, <strong><code>user_is(user_id, role)</code></strong>, <strong><code>user_is_not(user_id, role)</code></strong>, <strong><code>user_can(user_id, capability)</code></strong>, <strong><code>user_cannot(user_id, capability)</code></strong>, <strong><code>current_user_is(role)</code></strong>, <strong><code>current_user_is_not(role)</code></strong>, <strong><code>current_user_can(capability)</code></strong>, <strong><code>current_user_cannot(capability)</code></strong>. To make use of these functions, please follow our code samples below. Using Shortcodes, it\'s easy to build Simple Conditionals within your content; based on a Member\'s Level, or even based on Custom Capabilities. s2Member\'s Shortcodes can be used inside a Post/Page, and also inside Text Widgets.</p>' . "\n";
             echo '<p><em>There are <strong>two different Shortcodes</strong> being demonstrated here:<br /><strong>1. <code>s2If</code></strong> ( for testing simple conditional expressions ).<br /><strong>2. <code>s2Get</code></strong> ( to get an API Constant value, a Custom Field, or meta key ).</em></p>' . "\n";
             do_action("ws_plugin__s2member_during_scripting_page_during_left_sections_during_api_simple_way_farm", get_defined_vars());
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #1:</strong> Full access for anyone that is logged in.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-is-user-logged-in-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #2:</strong> Full access for any Member with a Level >= 1.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-current-user-can-full-access-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #3:</strong> Specific content for each different Member Level.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-current-user-is-specific-content-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #4:</strong> Simple Conditionals w/ integrated use of [s2Get /].</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-1-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #5:</strong> Using multiple Conditionals together, and even nesting other Shortcodes.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-2-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Example #6:</strong> Using multiple Conditionals together, and even nesting Conditionals.</strong></p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-supplements-3-farm.x-php")) . '</p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><strong>Membership Levels provide incremental access:</strong></p>' . "\n";
             echo '<p>* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 &amp; 3.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 &amp; 2.<br />* A Member with Level 2 access, will also be able to access Levels 0 &amp; 1.<br />* A Member with Level 1 access, will also be able to access Level 0.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0.<br />* A public Visitor will have NO access to protected content.</p>' . "\n";
             echo '<p><em>* WordPress® Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ). WordPress® Administrators, Editors, Authors, and Contributors have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.</em></p>' . "\n";
             /**/
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             /**/
             echo '<p><em><strong>s2Member supports many <a href="http://codex.wordpress.org/Conditional_Tags" target="_blank" rel="external">Conditional Tags</a> in WordPress®.</strong> Including: <strong><code>is_user_logged_in()</code></strong>, <strong><code>is_user_not_logged_in()</code></strong>, <strong><code>user_is(user_id, role)</code></strong>, <strong><code>user_is_not(user_id, role)</code></strong>, <strong><code>user_can(user_id, capability)</code></strong>, <strong><code>user_cannot(user_id, capability)</code></strong>, <strong><code>current_user_is(role)</code></strong>, <strong><code>current_user_is_not(role)</code></strong>, <strong><code>current_user_can(capability)</code></strong>, <strong><code>current_user_cannot(capability)</code></strong>, <strong><code>is_admin()</code></strong>, <strong><code>is_blog_admin()</code></strong>, <strong><code>is_user_admin()</code></strong>, <strong><code>is_network_admin()</code></strong>, <strong><code>is_404()</code></strong>, <strong><code>is_home()</code></strong>, <strong><code>is_front_page()</code></strong>, <strong><code>is_singular(ID|slug|{slug,ID})"</code></strong>, <strong><code>is_single(ID|slug|{slug,ID})</code></strong>, <strong><code>is_page(ID|slug|{slug,ID})</code></strong>, <strong><code>is_page_template(file.php)</code></strong>, <strong><code>is_attachment()</code></strong>, <strong><code>is_feed()</code></strong>, <strong><code>is_archive()</code></strong>, <strong><code>is_search()</code></strong>, <strong><code>is_category(ID|slug|{slug,ID})</code></strong>, <strong><code>is_tax(taxonomy,term)</code></strong>, <strong><code>is_tag(slug|{slug,slug})"</code></strong>, <strong><code>has_tag(slug|{slug,slug})"</code></strong>, <strong><code>is_author(ID|slug|{slug,ID})</code></strong>, <strong><code>is_date()</code></strong>, <strong><code>is_day()</code></strong>, <strong><code>is_month()</code></strong>, <strong><code>is_time()</code></strong>, <strong><code>is_year()</code></strong>, <strong><code>is_sticky(ID)</code></strong>, <strong><code>is_paged()</code></strong>, <strong><code>is_preview()</code></strong>, <strong><code>is_comments_popup()</code></strong>, <strong><code>in_the_loop()</code></strong>, <strong><code>comments_open()</code></strong>, <strong><code>pings_open()</code></strong>, <strong><code>has_excerpt(ID)</code></strong>, <strong><code>has_post_thumbnail(ID)</code></strong>.</em></p>' . "\n";
             /**/
             echo '<p><em><strong>Passing arguments into a Simple Conditional:</strong></em></p>' . "\n";
             echo '<p><em>1. True/false -> ex: <code>current_user_can()</code> / <code>!current_user_can()</code><br />2. False explicitly -> ex: <code>current_user_cannot()</code><br />3. Passing an ID -> ex: <code>is_page(24)</code><br />4. Passing a Slug -> ex: <code>is_page(my-cool-page)</code><br />5. Passing an Array -> ex: <code>is_page({my-cool-page,24,about,contact-form})</code></em></p>' . "\n";
             echo '<p><em>*Tip: do NOT use spaces inside Conditionals.<br /> <strong class="ws-menu-page-error-hilite">BAD</strong> <code>is_page(My Membership Options Page)</code><br />- use slugs or IDs instead, no spaces.</em></p>' . "\n";
             /**/
             echo '<p><em><strong>Implementing AND/OR Conditional expressions:</strong></em></p>' . "\n";
             echo '<p><em>*Tip: do NOT mix AND/OR expressions.<br /> <strong class="ws-menu-page-error-hilite">BAD</strong> <code>is_user_logged_in() AND is_page(1) OR is_page(2)</code><br />- use one or the other; do NOT mix AND/OR together.</em></p>' . "\n";
             echo '<p><em><strong class="ws-menu-page-hilite">If you need to have both types of logic, use nesting:</strong></em></p>' . "\n";
             echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/sc-s2-conditional-nesting.x-php")) . '</p>' . "\n";
             echo '</div>' . "\n";
             /**/
             echo '</div>' . "\n";
         } else {
             echo '<div class="ws-menu-page-group" title="Simple/Shortcode Conditionals">' . "\n";
             /**/
             echo '<div class="ws-menu-page-section ws-plugin--s2member-api-simple-way-section">' . "\n";
             echo '<h3>Simple Conditionals ( via WordPress® Shortcodes )</h3>' . "\n";
             echo '<p>In an effort to give you even more control over access restrictions, s2Member makes Simple Conditionals available to you from within WordPress®, using Shortcodes that are fully compatible with both the Visual Editor, and also the HTML Tab in WordPress®. In this section, we\'ll demonstrate several functions that are possible using Shortcodes: <strong><code>is_user_logged_in()</code></strong>, <strong><code>is_user_not_logged_in()</code></strong>, <strong><code>user_is(user_id, role)</code></strong>, <strong><code>user_is_not(user_id, role)</code></strong>, <strong><code>user_can(user_id, capability)</code></strong>, <strong><code>user_cannot(user_id, capability)</code></strong>, <strong><code>current_user_is(role)</code></strong>, <strong><code>current_user_is_not(role)</code></strong>, <strong><code>current_user_can(capability)</code></strong>, <strong><code>current_user_cannot(capability)</code></strong>, <strong><code>current_user_is_for_blog(blog_id,role)</code></strong>, <strong><code>current_user_is_not_for_blog(blog_id,role)</code></strong>, <strong><code>current_user_can_for_blog(blog_id,capability)</code></strong>, <strong><code>current_user_cannot_for_blog(blog_id,capability)</code></strong>. To make use of these functions, please follow our code samples below. Using Shortcodes, it\'s easy to build Simple Conditionals within your content; based on a Member\'s Level, or even based on Custom Capabilities. s2Member\'s Shortcodes can be used inside a Post/Page, and also inside Text Widgets.</p>' . "\n";
             echo '<p><em>There are <strong>two different Shortcodes</strong> being demonstrated here:<br /><strong>1. <code>s2If</code></strong> ( for testing simple conditional expressions ).<br /><strong>2. <code>s2Get</code></strong> ( to get an API Constant value, a Custom Field, or meta key ).</em></p>' . "\n";
//.........这里部分代码省略.........
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:101,代码来源:scripting.inc.php

示例9: form

 /**
  * Widget form control.
  *
  * @package s2Member\Widgets
  * @since 1.5
  *
  * @param array $instance Optional. An array of options for this instance.
  * @return null
  */
 public function form($instance = FALSE)
 {
     $options = c_ws_plugin__s2member_pro_login_widget::configure_options_and_their_defaults((array) $instance);
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__s2member_pro_login_widget_before_form", get_defined_vars(), $this);
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /*
     Ok, here is where we need to handle the widget control form. This allows a user to further customize the widget.
     */
     echo '<label for="' . esc_attr($this->get_field_id("title")) . '"><strong>Public Title</strong> ( when NOT logged in )</label><br />' . "\n";
     echo '<input type="text" autocomplete="off" id="' . esc_attr($this->get_field_id("title")) . '" name="' . esc_attr($this->get_field_name("title")) . '" value="' . format_to_edit($options["title"]) . '" class="widefat" /><br /><br />' . "\n";
     /**/
     echo '<label for="' . esc_attr($this->get_field_id("login_redirect")) . '">Redirection After Login</label><br />' . "\n";
     echo '<select id="' . esc_attr($this->get_field_id("login_redirect")) . '" name="' . esc_attr($this->get_field_name("login_redirect")) . '" class="widefat"><option value=""' . (!$options["login_redirect"] ? ' selected="selected"' : '') . '>Login Welcome Page</option><option value="%%previous%%"' . ($options["login_redirect"] === "%%previous%%" ? ' selected="selected"' : '') . '>Previous page</option><option value="%%home%%"' . ($options["login_redirect"] === "%%home%%" ? ' selected="selected"' : '') . '>Home Page</option></select><br /><br />' . "\n";
     /**/
     echo '<label for="' . esc_attr($this->get_field_id("signup_url")) . '">Signup Now ( enter URL, or just use <code>%%automatic%%</code> )</label><br />' . "\n";
     echo '<input type="text" autocomplete="off" id="' . esc_attr($this->get_field_id("signup_url")) . '" name="' . esc_attr($this->get_field_name("signup_url")) . '" value="' . format_to_edit($options["signup_url"]) . '" class="widefat" /><br />' . "\n";
     echo '<small>( leave blank to exclude this link )</small><br /><br />' . "\n";
     /**/
     echo '<label for="' . esc_attr($this->get_field_id("code")) . '">Additional XHTML' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '/PHP' : '') . ' Code?</label><br />' . "\n";
     echo '<textarea id="' . esc_attr($this->get_field_id("logged_out_code")) . '" name="' . esc_attr($this->get_field_name("logged_out_code")) . '" rows="1" cols="1" class="widefat" style="height:50px;">' . format_to_edit($options["logged_out_code"]) . '</textarea>' . "\n";
     /**/
     echo '<div style="margin:15px 0 15px 0; height:1px; line-height:1px; background:#CCCCCC;"></div>' . "\n";
     /**/
     echo '<label for="' . esc_attr($this->get_field_id("profile_title")) . '"><strong>Profile Title</strong> ( when logged-in )</label><br />' . "\n";
     echo '<input type="text" autocomplete="off" id="' . esc_attr($this->get_field_id("profile_title")) . '" name="' . esc_attr($this->get_field_name("profile_title")) . '" value="' . format_to_edit($options["profile_title"]) . '" class="widefat" /><br /><br />' . "\n";
     /**/
     echo '<label for="' . esc_attr($this->get_field_id("display_gravatar")) . '">Display Gravatar Image?</label><br />' . "\n";
     echo '<select id="' . esc_attr($this->get_field_id("display_gravatar")) . '" name="' . esc_attr($this->get_field_name("display_gravatar")) . '" class="widefat"><option value="1"' . ($options["display_gravatar"] ? ' selected="selected"' : '') . '>Yes, display Gravatar</option><option value="0"' . (!$options["display_gravatar"] ? ' selected="selected"' : '') . '>No, do NOT display</option></select><br /><br />' . "\n";
     /**/
     echo '<label for="' . esc_attr($this->get_field_id("link_gravatar")) . '">Link To Gravatar.com?</label><br />' . "\n";
     echo '<select id="' . esc_attr($this->get_field_id("link_gravatar")) . '" name="' . esc_attr($this->get_field_name("link_gravatar")) . '" class="widefat"><option value="1"' . ($options["link_gravatar"] ? ' selected="selected"' : '') . '>Yes, apply link</option><option value="0"' . (!$options["link_gravatar"] ? ' selected="selected"' : '') . '>No, do NOT apply</option></select><br /><br />' . "\n";
     /**/
     echo '<label for="' . esc_attr($this->get_field_id("display_name")) . '">Display User\'s Name?</label><br />' . "\n";
     echo '<select id="' . esc_attr($this->get_field_id("display_name")) . '" name="' . esc_attr($this->get_field_name("display_name")) . '" class="widefat"><option value="1"' . ($options["display_name"] ? ' selected="selected"' : '') . '>Yes, display User\'s name</option><option value="0"' . (!$options["display_name"] ? ' selected="selected"' : '') . '>No, do NOT display</option></select><br /><br />' . "\n";
     /**/
     echo '<label for="' . esc_attr($this->get_field_id("my_account_url")) . '">My Account ( enter URL, or just use <code>%%automatic%%</code> )</label><br />' . "\n";
     echo '<input type="text" autocomplete="off" id="' . esc_attr($this->get_field_id("my_account_url")) . '" name="' . esc_attr($this->get_field_name("my_account_url")) . '" value="' . format_to_edit($options["my_account_url"]) . '" class="widefat" /><br />' . "\n";
     echo '<small>( leave blank to exclude this link )</small><br /><br />' . "\n";
     /**/
     echo '<label for="' . esc_attr($this->get_field_id("my_profile_url")) . '">Edit Profile ( enter URL, or use <code>%%automatic%%</code> )</label><br />' . "\n";
     echo '<input type="text" autocomplete="off" id="' . esc_attr($this->get_field_id("my_profile_url")) . '" name="' . esc_attr($this->get_field_name("my_profile_url")) . '" value="' . format_to_edit($options["my_profile_url"]) . '" class="widefat" /><br />' . "\n";
     echo '<small>( leave blank to exclude this link )</small><br /><br />' . "\n";
     /**/
     echo '<label for="' . esc_attr($this->get_field_id("logout_redirect")) . '">Redirection After Logout</label><br />' . "\n";
     echo '<select id="' . esc_attr($this->get_field_id("logout_redirect")) . '" name="' . esc_attr($this->get_field_name("logout_redirect")) . '" class="widefat"><option value="%%home%%"' . ($options["logout_redirect"] === "%%home%%" ? ' selected="selected"' : '') . '>Home Page</option><option value="%%previous%%"' . ($options["logout_redirect"] === "%%previous%%" ? ' selected="selected"' : '') . '>Previous page</option><option value=""' . (!$options["logout_redirect"] ? ' selected="selected"' : '') . '>Login screen</option></select><br /><br />' . "\n";
     /**/
     echo '<label for="' . esc_attr($this->get_field_id("code")) . '">Additional XHTML' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '/PHP' : '') . ' Code?</label><br />' . "\n";
     echo '<textarea id="' . esc_attr($this->get_field_id("logged_in_code")) . '" name="' . esc_attr($this->get_field_name("logged_in_code")) . '" rows="1" cols="1" class="widefat" style="height:50px;">' . format_to_edit($options["logged_in_code"]) . '</textarea>' . "\n";
     /**/
     echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<div style="margin:15px 0 15px 0; height:1px; line-height:1px; background:#CCCCCC;"></div>' . "\n" : '';
     echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<em>Or include this widget dynamically via PHP:<br />' . c_ws_plugin__s2member_utils_strings::highlight_php('<?php echo s2member_pro_login_widget(); ?>') . '<br /><small>See: <code>s2Member -> API Scripting -> Pro Login Widget</code></small></em>' . "\n" : '';
     /**/
     do_action("ws_plugin__s2member_pro_login_widget_after_form", get_defined_vars(), $this);
     /**/
     echo '<br />' . "\n";
     /**/
     return;
     /* Return for uniformity. */
 }
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:71,代码来源:login-widget.inc.php

示例10: __construct


//.........这里部分代码省略.........
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link to the Specific Post/Page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link to the Specific Post/Page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use <a href="http://www.primothemes.com/forums/viewtopic.php?f=40&t=12453#src_doc_s2member_decrypt%28%29" target="_blank" rel="external">s2member_decrypt()</a>.</li>' . "\n";
         echo '</ul>' . "\n";
         /**/
         echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
         echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
         echo '<em>( The campaign ( i.e. christmas-promo ) could be referenced using <code>%%cv1%%</code> )</em><br />' . "\n";
         echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Cancellations &amp; Billing Updates ( <a href="#" onclick="jQuery(\'div#ws-plugin--s2member-pro-forms-success-cancellations-updates\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--s2member-pro-forms-success-cancellations-updates" style="display:none;">' . "\n";
         echo '<ul style="margin: 10px 0 10px 20px; list-style: disc outside;">' . "\n";
         echo '<li><code>%%response%%</code> = Deprecated. Use <code>%%s_response%%</code>. A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link back to their account page. You don\'t have to use this. You can generate your own response if you like.</li>' . "\n";
         echo '<li><code>%%s_response%%</code> = A successful response message that *would* have been displayed to the Customer, had they NOT been redirected to your Custom Return URL upon success. This may contain some basic HTML. For instance, a link back to their account page. You don\'t have to use this. You can generate your own response if you like. Value is encrypted. Use <a href="http://www.primothemes.com/forums/viewtopic.php?f=40&t=12453#src_doc_s2member_decrypt%28%29" target="_blank" rel="external">s2member_decrypt()</a>.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Verify The Integrity Of Replacement Codes ( <a href="#" onclick="jQuery(\'div#ws-plugin--s2member-pro-forms-success-verification\').toggle(); return false;" class="ws-dotted-link">open/close</a> )</h3>' . "\n";
         echo '<div id="ws-plugin--s2member-pro-forms-success-verification" style="display:none;">' . "\n";
         echo '<p>If you know a little PHP, you can verify the integrity of the Replacement Codes returned by s2Member. This is important, because in this particular situation, Replacement Codes are passed publicly in the query string of your Custom Return URL. In other words, a Customer could manually change one of the values; like the dollar amounts. For this reason, you should always verify the integrity of the details being returned to any processing routines that receive this information. In the PHP code for your Custom Return URL, you can use this s2Member API Function: <code>s2member_pro_authnet_s2p_v_query_ok()</code>.</p>' . "\n";
         echo '<p>Here are some examples:</p>' . "\n";
         echo '<p>1. <strong>Shortcode attribute:</strong> <code>success="/thank-you/?subscr_id=%%subscr_%%&amp;initial=%%initial%%&amp;regular=%%regular%%"</code></p>' . "\n";
         echo '<p>2. <strong>s2Member returns Customer to:</strong> <code>/thank-you/?subscr_id=123&amp;initial=0.00&amp;regular=24.95&amp;s2p-v=234098234-23409sdfs234sd234209sdf</code></p>' . "\n";
         echo '<p>3. <strong>Now, in your Custom Return Page, you will need to do this before trusting anything:</strong></p>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/authnet-s2p-v-query-ok-1.x-php")) . '</p>' . "\n";
         echo '<p>s2Member will only verify a query string for up to 10 seconds. After 10 seconds, <code>s2member_pro_authnet_s2p_v_query_ok()</code> will always return <code>false</code>, even if the integrity of the query string is valid. This prevents a Customer from bookmarking your Return URL; thereby causing duplicate commissions; in case you\'re using it for tracking purposes.</p>' . "\n";
         echo '<p>Again, if you only need to obtain details for the purpose of tracking sales, you should just use the simpler API Tracking methods provided by s2Member, under: <code>s2Member -> API / Tracking</code>. The API Tracking methods are specifically designed for tracking sales, exactly ONE time for each Customer.</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<p><em>If it is your intention to allow Customers to bookmark your Custom Return URL, you can still do that. Just be aware that <code>s2member_pro_authnet_s2p_v_query_ok()</code> will return <code>false</code> after the first 10 seconds. If you want to verify after 10 seconds, you can pass a second argument to the function, like this:</em></p>' . "\n";
         echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__) . "/code-samples/authnet-s2p-v-query-ok-2.x-php")) . '</p>' . "\n";
         /**/
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         /**/
         echo '<h3>Could a Customer change the timestamp in the URL?</h3>' . "\n";
         echo '<p>Based on the structure of the URL, it would appear possible; however, it\'s NOT. s2Member uses an advanced checksum.</p>' . "\n";
         echo '<h3>Can I get rid of the <code>s2p-v</code> variable?</h3>' . "\n";
         echo '<p>No, this variable is always passed to your Custom Return URL, it\'s for important verification purposes.</p>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         /**/
         echo '</div>' . "\n";
     }
     /**/
     echo '<div class="ws-menu-page-group" title="Shortcode Attributes ( Explained )">' . "\n";
     /**/
     echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-shortcode-attrs-section">' . "\n";
     echo '<h3>Shortcode Attributes ( Explained In Full Detail )</h3>' . "\n";
     echo '<p>When you generate a Form, s2Member will make a <a href="http://codex.wordpress.org/Shortcode_API#Overview" target="_blank" rel="external">Shortcode</a> available to you. Like most Shortcodes for WordPress®, s2Member reads Attributes in your Shortcode. These Attributes will be pre-configured by one of s2Member\'s Form Generators automatically; so there really is nothing more you need to do. However, many site owners like to know exactly how these Shortcode Attributes work. Below, is a brief overview of each possible Shortcode Attribute.</p>' . "\n";
     /**/
     echo '<table class="form-table" style="margin-top:0;">' . "\n";
     echo '<tbody>' . "\n";
     echo '<tr style="padding-top:0;">' . "\n";
     /**/
     echo '<td style="padding-top:0;">' . "\n";
     echo '<ul>' . "\n";
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:67,代码来源:authnet-forms.inc.php

示例11: form

 /**
  * Widget form control.
  *
  * @package s2Member\Widgets
  * @since 1.5
  *
  * @param array $instance Optional. An array of options for this instance.
  *
  * @return null PhpStorm wants this here for whatever reason. lol
  */
 public function form($instance = array())
 {
     $options = $this->configure_options_and_their_defaults((array) $instance);
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action('ws_plugin__s2member_pro_login_widget_before_form', get_defined_vars(), $this);
     unset($__refs, $__v);
     // Housekeeping.
     /*
     Ok, here is where we need to handle the widget control form. This allows a user to further customize the widget.
     */
     echo '<label for="' . esc_attr($this->get_field_id('title')) . '"><strong>Public Title</strong> (when not logged in)</label><br />' . "\n";
     echo '<input type="text" autocomplete="off" id="' . esc_attr($this->get_field_id('title')) . '" name="' . esc_attr($this->get_field_name('title')) . '" value="' . format_to_edit($options['title']) . '" class="widefat" /><br /><br />' . "\n";
     echo '<label for="' . esc_attr($this->get_field_id('login_redirect')) . '">Redirection After Login</label><br />' . "\n";
     echo '<select id="' . esc_attr($this->get_field_id('login_redirect')) . '" name="' . esc_attr($this->get_field_name('login_redirect')) . '" class="widefat"><option value=""' . (!$options['login_redirect'] ? ' selected="selected"' : '') . '>Login Welcome Page</option><option value="%%previous%%"' . ($options['login_redirect'] === '%%previous%%' ? ' selected="selected"' : '') . '>Previous page</option><option value="%%home%%"' . ($options['login_redirect'] === '%%home%%' ? ' selected="selected"' : '') . '>Home Page</option></select><br /><br />' . "\n";
     echo '<label for="' . esc_attr($this->get_field_id('signup_url')) . '">Signup Now (enter URL, or just use <code>%%automatic%%</code>)</label><br />' . "\n";
     echo '<input type="text" autocomplete="off" id="' . esc_attr($this->get_field_id('signup_url')) . '" name="' . esc_attr($this->get_field_name('signup_url')) . '" value="' . format_to_edit($options['signup_url']) . '" class="widefat" /><br />' . "\n";
     echo '<small>(leave blank to exclude this link)</small><br /><br />' . "\n";
     echo '<label for="' . esc_attr($this->get_field_id('code')) . '">Additional HTML' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '/PHP' : '') . ' Code (or <a href="https://codex.wordpress.org/Shortcode_API" target="_blank">Shortcodes</a>)</label><br />' . "\n";
     echo '<textarea id="' . esc_attr($this->get_field_id('logged_out_code')) . '" name="' . esc_attr($this->get_field_name('logged_out_code')) . '" rows="1" cols="1" class="widefat" style="height:50px;">' . format_to_edit($options['logged_out_code']) . '</textarea>' . "\n";
     echo '<div style="margin:15px 0 15px 0; height:1px; line-height:1px; background:#CCCCCC;"></div>' . "\n";
     echo '<label for="' . esc_attr($this->get_field_id('profile_title')) . '"><strong>Profile Title</strong> (when logged-in)</label><br />' . "\n";
     echo '<input type="text" autocomplete="off" id="' . esc_attr($this->get_field_id('profile_title')) . '" name="' . esc_attr($this->get_field_name('profile_title')) . '" value="' . format_to_edit($options['profile_title']) . '" class="widefat" /><br /><br />' . "\n";
     echo '<label for="' . esc_attr($this->get_field_id('display_gravatar')) . '">Display Gravatar Image?</label><br />' . "\n";
     echo '<select id="' . esc_attr($this->get_field_id('display_gravatar')) . '" name="' . esc_attr($this->get_field_name('display_gravatar')) . '" class="widefat"><option value="1"' . ($options['display_gravatar'] ? ' selected="selected"' : '') . '>Yes, display Gravatar</option><option value="0"' . (!$options['display_gravatar'] ? ' selected="selected"' : '') . '>No, do not display</option></select><br /><br />' . "\n";
     echo '<label for="' . esc_attr($this->get_field_id('link_gravatar')) . '">Link To Gravatar.com?</label><br />' . "\n";
     echo '<select id="' . esc_attr($this->get_field_id('link_gravatar')) . '" name="' . esc_attr($this->get_field_name('link_gravatar')) . '" class="widefat"><option value="1"' . ($options['link_gravatar'] ? ' selected="selected"' : '') . '>Yes, apply link</option><option value="0"' . (!$options['link_gravatar'] ? ' selected="selected"' : '') . '>No, do not apply</option></select><br /><br />' . "\n";
     echo '<label for="' . esc_attr($this->get_field_id('display_name')) . '">Display User\'s Name?</label><br />' . "\n";
     echo '<select id="' . esc_attr($this->get_field_id('display_name')) . '" name="' . esc_attr($this->get_field_name('display_name')) . '" class="widefat"><option value="1"' . ($options['display_name'] ? ' selected="selected"' : '') . '>Yes, display User\'s name</option><option value="0"' . (!$options['display_name'] ? ' selected="selected"' : '') . '>No, do not display</option></select><br /><br />' . "\n";
     echo '<label for="' . esc_attr($this->get_field_id('my_account_url')) . '">My Account (enter URL, or just use <code>%%automatic%%</code>)</label><br />' . "\n";
     echo '<input type="text" autocomplete="off" id="' . esc_attr($this->get_field_id('my_account_url')) . '" name="' . esc_attr($this->get_field_name('my_account_url')) . '" value="' . format_to_edit($options['my_account_url']) . '" class="widefat" /><br />' . "\n";
     echo '<small><a href="#" onclick="alert(\'Replacement Codes:\\n\\n%%current_user_login%% = The current User\\\'s Username, lowercase (deprecated, please use %%current_user_nicename%%).\\n\\n%%current_user_nicename%% = The current User\\\'s Nicename in lowercase format (i.e., a cleaner version of the username for URLs; recommended for best compatibility).\\n\\n%%current_user_id%% = The current User\\\'s ID.\\n\\n%%current_user_level%% = The current User\\\'s s2Member Level.\\n\\n%%current_user_role%% = The current User\\\'s WordPress Role.' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '\\n\\n%%current_user_ccaps%% = The current User\\\'s Custom Capabilities.' : '') . '\\n\\n%%current_user_logins%% = Number of times the current User has logged in.\\n\\nFor example, if you\\\'re using BuddyPress and you want to link Members to their BuddyPress account settings page, you would setup a URL like this one: ' . home_url("/members/%%current_user_nicename%%/settings/") . '\'); return false;">Replacement Codes</a> are available for use in custom URLs.</small><br />' . "\n";
     echo '<small>Note: you can leave this blank to exclude the link entirely.</small><br /><br />' . "\n";
     echo '<label for="' . esc_attr($this->get_field_id('my_profile_url')) . '">Edit Profile (enter URL, or use <code>%%automatic%%</code>)</label><br />' . "\n";
     echo '<input type="text" autocomplete="off" id="' . esc_attr($this->get_field_id('my_profile_url')) . '" name="' . esc_attr($this->get_field_name('my_profile_url')) . '" value="' . format_to_edit($options['my_profile_url']) . '" class="widefat" /><br />' . "\n";
     echo '<small><a href="#" onclick="alert(\'Replacement Codes:\\n\\n%%current_user_login%% = The current User\\\'s Username, lowercase (deprecated, please use %%current_user_nicename%%).\\n\\n%%current_user_nicename%% = The current User\\\'s Nicename in lowercase format (i.e., a cleaner version of the username for URLs; recommended for best compatibility).\\n\\n%%current_user_id%% = The current User\\\'s ID.\\n\\n%%current_user_level%% = The current User\\\'s s2Member Level.\\n\\n%%current_user_role%% = The current User\\\'s WordPress Role.' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '\\n\\n%%current_user_ccaps%% = The current User\\\'s Custom Capabilities.' : '') . '\\n\\n%%current_user_logins%% = Number of times the current User has logged in.\\n\\nFor example, if you\\\'re using BuddyPress and you want to link Members to their BuddyPress profile page, you would setup a URL like this one: ' . home_url("/members/%%current_user_nicename%%/profile/") . '\'); return false;">Replacement Codes</a> are available for use in custom URLs.</small><br />' . "\n";
     echo '<small>Note: you can leave this blank to exclude the link entirely.</small><br /><br />' . "\n";
     echo '<label for="' . esc_attr($this->get_field_id('logout_redirect')) . '">Redirection After Logout</label><br />' . "\n";
     echo '<select id="' . esc_attr($this->get_field_id('logout_redirect')) . '" name="' . esc_attr($this->get_field_name('logout_redirect')) . '" class="widefat"><option value="%%home%%"' . ($options['logout_redirect'] === '%%home%%' ? ' selected="selected"' : '') . '>Home Page</option><option value="%%previous%%"' . ($options['logout_redirect'] === '%%previous%%' ? ' selected="selected"' : '') . '>Previous page</option><option value=""' . (!$options['logout_redirect'] ? ' selected="selected"' : '') . '>Login screen</option></select><br /><br />' . "\n";
     echo '<label for="' . esc_attr($this->get_field_id('code')) . '">Additional HTML' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '/PHP' : '') . ' Code (or <a href="https://codex.wordpress.org/Shortcode_API" target="_blank">Shortcodes</a>)</label><br />' . "\n";
     echo '<textarea id="' . esc_attr($this->get_field_id('logged_in_code')) . '" name="' . esc_attr($this->get_field_name('logged_in_code')) . '" rows="1" cols="1" class="widefat" style="height:50px;">' . format_to_edit($options['logged_in_code']) . '</textarea>' . "\n";
     echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<div style="margin:15px 0 15px 0; height:1px; line-height:1px; background:#CCCCCC;"></div>' . "\n" : '';
     echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<em>Or include this widget dynamically via PHP:<br />' . c_ws_plugin__s2member_utils_strings::highlight_php('<?php echo s2member_pro_login_widget(); ?>') . '<br /><small>See: <strong>s2Member → API Scripting → Pro Login Widget</strong></small></em>' . "\n" : '';
     do_action('ws_plugin__s2member_pro_login_widget_after_form', get_defined_vars(), $this);
     echo '<br />' . "\n";
 }
开发者ID:codeforest,项目名称:s2member-pro,代码行数:57,代码来源:login-widget.inc.php


注:本文中的c_ws_plugin__s2member_utils_strings::highlight_php方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。