├── pro ├── src ├── includes │ ├── translations │ │ ├── .generate │ │ └── README.md │ ├── .htaccess │ ├── jquery │ │ ├── .htaccess │ │ ├── jquery.sprintf │ │ │ └── jquery.sprintf.min.js │ │ └── jquery.json-ps │ │ │ └── jquery.json-ps.min.js │ ├── menu-pages │ │ ├── code-samples │ │ │ ├── current-user-profile-modification-page-url-1.x-php │ │ │ ├── current-user-profile-modification-page-url-1-ops.x-php │ │ │ ├── sas-sp-tracking-code.x-php │ │ │ ├── sas-ccap-tracking-code.x-php │ │ │ ├── idev-ccap-tracking-code.x-php │ │ │ ├── idev-sp-tracking-code.x-php │ │ │ ├── sas-signup-tracking-code.x-php │ │ │ ├── idev-signup-tracking-code.x-php │ │ │ ├── sas-modification-tracking-code.x-php │ │ │ ├── sc-s2-conditional-nesting.x-php │ │ │ ├── idev-modification-tracking-code.x-php │ │ │ ├── sc-s2-conditional-nesting-farm.x-php │ │ │ ├── ccap-file-downloads.x-php │ │ │ ├── is-user-logged-in.x-php │ │ │ ├── sc-current-user-can-full-access.x-php │ │ │ ├── sc-is-user-logged-in-else.x-php │ │ │ ├── sc-current-user-can-full-access-farm.x-php │ │ │ ├── sc-is-user-logged-in-else-farm.x-php │ │ │ ├── sc-s2-conditional-nesting-else.x-php │ │ │ ├── current-user-profile-modification-page-url-3-ops.x-php │ │ │ ├── sc-s2-conditional-nesting-else-farm.x-php │ │ │ ├── current-user-profile-modification-page-url-3.x-php │ │ │ ├── jwplayer-s2stream-mp3-rtmp.x-php │ │ │ ├── jwplayer-s2stream-mp4-rtmp.x-php │ │ │ ├── current-user-can-full-access.x-php │ │ │ ├── jwplayer-s2stream-mp3.x-php │ │ │ ├── jwplayer-s2stream-mp4.x-php │ │ │ ├── current-user-id.x-php │ │ │ ├── jwplayer-s2stream-mp3-rtmp-only.x-php │ │ │ ├── jwplayer-s2stream-mp4-rtmp-only.x-php │ │ │ ├── leveln-label.x-php │ │ │ ├── current-user-last-name.x-php │ │ │ ├── current-user-login.x-php │ │ │ ├── current-user-first-name.x-php │ │ │ ├── current-user-display-name.x-php │ │ │ ├── current-user-is-logged-in.x-php │ │ │ ├── current-user-email.x-php │ │ │ ├── current-user-ip.x-php │ │ │ ├── paypal-business.x-php │ │ │ ├── reg-email-from-name.x-php │ │ │ ├── sc-is-user-logged-in.x-php │ │ │ ├── sc-is-user-logged-in-farm.x-php │ │ │ ├── reg-email-from-email.x-php │ │ │ ├── current-user-login-counter.x-php │ │ │ ├── paypal-api-password.x-php │ │ │ ├── paypal-endpoint.x-php │ │ │ ├── current-user-can-constants-1.x-php │ │ │ ├── paypal-api-username.x-php │ │ │ ├── current-user-registration-ip.x-php │ │ │ ├── current-user-registration-time.x-php │ │ │ ├── current-user-access-label.x-php │ │ │ ├── file-download-inline-extensions.x-php │ │ │ ├── specific-page-restrictions.x-php │ │ │ ├── leveln-file-downloads-allowed.x-php │ │ │ ├── paypal-api-endpoint.x-php │ │ │ ├── current-user-custom.x-php │ │ │ ├── current-user-paid-registration-time.x-php │ │ │ ├── current-user-profile-modification-page-url-2-ops.x-php │ │ │ ├── current-user-is-logged-in-as-member.x-php │ │ │ ├── leveln-file-downloads-allowed-days.x-php │ │ │ ├── logout-page-url.x-php │ │ │ ├── paypal-api-signature.x-php │ │ │ ├── current-user-profile-modification-page-url-2.x-php │ │ │ ├── paypal-return-url.x-php │ │ │ ├── s2-conditional-supplements-1.x-php │ │ │ ├── login-page-url.x-php │ │ │ ├── paypal-notify-url.x-php │ │ │ ├── current-user-downloads-allowed.x-php │ │ │ ├── login-welcome-page-url.x-php │ │ │ ├── paypal-pdt-identity-token.x-php │ │ │ ├── specific-tag-restrictions.x-php │ │ │ ├── membership-options-page-url.x-php │ │ │ ├── current-user-downloads-currently.x-php │ │ │ ├── current-user-downloads-allowed-days.x-php │ │ │ ├── custom-queries-loop.x-php │ │ │ ├── current-user-subscr-gateway.x-php │ │ │ ├── file-download-limit-exceeded-page-url.x-php │ │ │ ├── custom-queries.x-php │ │ │ ├── specific-category-restrictions.x-php │ │ │ ├── s2-conditional-supplements-2.x-php │ │ │ ├── api-mop-vars-e.x-php │ │ │ ├── version.x-php │ │ │ ├── level-file-downloads.x-php │ │ │ ├── current-user-subscr-id.x-php │ │ │ ├── specific-post-restrictions.x-php │ │ │ ├── current-user-is-specific-content.x-php │ │ │ ├── current-user-subscr-or-wp-id.x-php │ │ │ ├── sc-current-user-is-specific-content.x-php │ │ │ ├── sc-current-user-is-specific-content-farm.x-php │ │ │ ├── current-user-can-constants-2.x-php │ │ │ ├── sc-s2-conditional-supplements-2-farm.x-php │ │ │ ├── s2-conditional-supplements-3.x-php │ │ │ ├── sc-current-user-is-specific-content-else.x-php │ │ │ ├── sc-current-user-is-specific-content-else-farm.x-php │ │ │ ├── current-user-can-ccaps-1.x-php │ │ │ ├── current-user-downloads-allowed-is-unlimited.x-php │ │ │ ├── current-user-value-for-pp-on0-os0-on1-os1.x-php │ │ │ ├── sc-s2-conditional-supplements-2.x-php │ │ │ ├── sc-s2-conditional-supplements-1-farm.x-php │ │ │ ├── sc-s2-conditional-supplements-1.x-php │ │ │ ├── jwplayer-standard-mp4.x-php │ │ │ ├── s2member-paid-registration-time.x-php │ │ │ ├── current-user-fields.x-php │ │ │ ├── current-user-access-level.x-php │ │ │ ├── current-user-access-level-conditional-upgrades.x-php │ │ │ ├── current-user-paid-registration-days-dripping.x-php │ │ │ ├── jwplayer-streaming-mp4.x-php │ │ │ ├── s2drip-example1.x-php │ │ │ ├── jwplayer-streaming-mp4-sca.x-php │ │ │ ├── current-user-registration-days.x-php │ │ │ ├── sc-s2-conditional-supplements-3-farm.x-php │ │ │ ├── current-user-paid-registration-days.x-php │ │ │ ├── sc-s2-conditional-supplements-3.x-php │ │ │ ├── jwplayer-streaming-mp4-webm.x-php │ │ │ ├── current-user-can-ccaps-2.x-php │ │ │ ├── s2member-paid-registration-time-examples.x-php │ │ │ └── api-mop-vars-ro.x-php │ │ ├── start.inc.php │ │ └── menu-pages.min.js │ ├── templates │ │ ├── cfg-files │ │ │ ├── s2o-th-funcs.php │ │ │ ├── s2member-logs.php │ │ │ ├── s2-cross-xml.php │ │ │ ├── s2member-files-no-gzip.php │ │ │ ├── s2o-mu-plugins.php │ │ │ ├── s2o-nw-plugins.php │ │ │ └── s2o-st-plugins.php │ │ ├── shortcodes │ │ │ ├── paypal-cancellation-button-shortcode.php │ │ │ ├── paypal-sp-checkout-button-shortcode.php │ │ │ ├── paypal-ccaps-checkout-button-shortcode.php │ │ │ └── paypal-checkout-button-shortcode.php │ │ ├── options │ │ │ ├── paypal-membership-ccap-terms.php │ │ │ └── paypal-membership-trial-terms.php │ │ ├── badges │ │ │ └── s-badge.php │ │ ├── buttons │ │ │ ├── paypal-cancellation-button.php │ │ │ ├── paypal-sp-checkout-button.php │ │ │ └── paypal-ccaps-checkout-button.php │ │ ├── errors │ │ │ └── ip-restrictions.php │ │ ├── players │ │ │ ├── jwplayer-v7.php │ │ │ ├── jwplayer-v7-rtmp.php │ │ │ ├── jwplayer-v7-rtmp-only.php │ │ │ ├── jwplayer-v6.php │ │ │ ├── jwplayer-v6-rtmp.php │ │ │ └── jwplayer-v6-rtmp-only.php │ │ └── returns │ │ │ └── default-return.php │ ├── externals │ │ └── aweber │ │ │ ├── oauth_adapter.php │ │ │ ├── aweber_api.php │ │ │ ├── aweber_entry_data_array.php │ │ │ ├── curl_response.php │ │ │ ├── aweber_response.php │ │ │ └── curl_object.php │ ├── funcs.inc.php │ ├── classes │ │ ├── paypal-notify.inc.php │ │ ├── paypal-return.inc.php │ │ ├── profile-mods.inc.php │ │ ├── profile.inc.php │ │ ├── register.inc.php │ │ ├── s-badge-status.inc.php │ │ ├── profile-mods-4bp.inc.php │ │ ├── sc-gets.inc.php │ │ ├── sc-keys.inc.php │ │ ├── sc-eots.inc.php │ │ ├── sc-profile.inc.php │ │ ├── css-js.inc.php │ │ ├── sc-paypal-button.inc.php │ │ ├── sc-s-badge.inc.php │ │ ├── database.inc.php │ │ ├── wp-footer.inc.php │ │ ├── admin-css-js.inc.php │ │ ├── tracking-cookies.inc.php │ │ ├── check-activation.inc.php │ │ ├── cron-jobs.inc.php │ │ ├── user-new.inc.php │ │ ├── sc-if-conds.inc.php │ │ ├── sc-s-badge-in.inc.php │ │ ├── meta-boxes.inc.php │ │ ├── sc-files.inc.php │ │ ├── sc-keys-in.inc.php │ │ ├── ssl.inc.php │ │ ├── cron-jobs-in.inc.php │ │ ├── security.inc.php │ │ ├── labels.inc.php │ │ └── utils-css.inc.php │ └── codes.inc.php ├── images │ ├── bg.png │ ├── logo.png │ ├── s2___.png │ ├── checked.png │ ├── add-icon.png │ ├── brand-bg.png │ ├── brand-dark.png │ ├── brand-icon.png │ ├── brand-kb.png │ ├── edit-icon.png │ ├── idev-logo.gif │ ├── large-icon.png │ ├── lock-icon.png │ ├── s2-powered.png │ ├── s2___bar.png │ ├── s2___end.png │ ├── sas-logo.png │ ├── small-icon.png │ ├── trans-1px.png │ ├── trans-bg.png │ ├── unchecked.png │ ├── ajax-loader.gif │ ├── amazon-logo.png │ ├── aweber-logo.png │ ├── brand-light.png │ ├── brand-tools.png │ ├── brand-videos.png │ ├── brand-xlink.png │ ├── delete-icon.png │ ├── paypal-logo.png │ ├── arrow-down-icon.png │ ├── arrow-up-icon.png │ ├── brand-donations.png │ ├── brand-favicon.png │ ├── brand-support.png │ ├── brand-updates.png │ ├── jwplayer-logo.png │ ├── logo-square-big.png │ ├── mailchimp-stamp.png │ ├── wordpress-dark.png │ ├── wordpress-light.png │ ├── brand-gradient-bg.png │ ├── brand-upsell-pro.png │ ├── getresponse-logo.png │ └── brand-installation.png └── licensing │ └── license.txt ├── images ├── bg.png ├── logo.png └── README.txt ├── .htaccess ├── README.md ├── composer.json ├── readme-ms.txt └── s2member-o.php /pro: -------------------------------------------------------------------------------- 1 | ../s2member-pro -------------------------------------------------------------------------------- /src/includes/translations/.generate: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/images/bg.png -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/images/logo.png -------------------------------------------------------------------------------- /src/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/bg.png -------------------------------------------------------------------------------- /src/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/logo.png -------------------------------------------------------------------------------- /src/images/s2___.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/s2___.png -------------------------------------------------------------------------------- /src/images/checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/checked.png -------------------------------------------------------------------------------- /src/images/add-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/add-icon.png -------------------------------------------------------------------------------- /src/images/brand-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-bg.png -------------------------------------------------------------------------------- /src/images/brand-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-dark.png -------------------------------------------------------------------------------- /src/images/brand-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-icon.png -------------------------------------------------------------------------------- /src/images/brand-kb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-kb.png -------------------------------------------------------------------------------- /src/images/edit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/edit-icon.png -------------------------------------------------------------------------------- /src/images/idev-logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/idev-logo.gif -------------------------------------------------------------------------------- /src/images/large-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/large-icon.png -------------------------------------------------------------------------------- /src/images/lock-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/lock-icon.png -------------------------------------------------------------------------------- /src/images/s2-powered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/s2-powered.png -------------------------------------------------------------------------------- /src/images/s2___bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/s2___bar.png -------------------------------------------------------------------------------- /src/images/s2___end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/s2___end.png -------------------------------------------------------------------------------- /src/images/sas-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/sas-logo.png -------------------------------------------------------------------------------- /src/images/small-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/small-icon.png -------------------------------------------------------------------------------- /src/images/trans-1px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/trans-1px.png -------------------------------------------------------------------------------- /src/images/trans-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/trans-bg.png -------------------------------------------------------------------------------- /src/images/unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/unchecked.png -------------------------------------------------------------------------------- /images/README.txt: -------------------------------------------------------------------------------- 1 | These images exist for backward compatibility with existing s2Member installations. 2 | -------------------------------------------------------------------------------- /src/images/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/ajax-loader.gif -------------------------------------------------------------------------------- /src/images/amazon-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/amazon-logo.png -------------------------------------------------------------------------------- /src/images/aweber-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/aweber-logo.png -------------------------------------------------------------------------------- /src/images/brand-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-light.png -------------------------------------------------------------------------------- /src/images/brand-tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-tools.png -------------------------------------------------------------------------------- /src/images/brand-videos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-videos.png -------------------------------------------------------------------------------- /src/images/brand-xlink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-xlink.png -------------------------------------------------------------------------------- /src/images/delete-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/delete-icon.png -------------------------------------------------------------------------------- /src/images/paypal-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/paypal-logo.png -------------------------------------------------------------------------------- /src/images/arrow-down-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/arrow-down-icon.png -------------------------------------------------------------------------------- /src/images/arrow-up-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/arrow-up-icon.png -------------------------------------------------------------------------------- /src/images/brand-donations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-donations.png -------------------------------------------------------------------------------- /src/images/brand-favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-favicon.png -------------------------------------------------------------------------------- /src/images/brand-support.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-support.png -------------------------------------------------------------------------------- /src/images/brand-updates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-updates.png -------------------------------------------------------------------------------- /src/images/jwplayer-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/jwplayer-logo.png -------------------------------------------------------------------------------- /src/images/logo-square-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/logo-square-big.png -------------------------------------------------------------------------------- /src/images/mailchimp-stamp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/mailchimp-stamp.png -------------------------------------------------------------------------------- /src/images/wordpress-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/wordpress-dark.png -------------------------------------------------------------------------------- /src/images/wordpress-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/wordpress-light.png -------------------------------------------------------------------------------- /src/images/brand-gradient-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-gradient-bg.png -------------------------------------------------------------------------------- /src/images/brand-upsell-pro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-upsell-pro.png -------------------------------------------------------------------------------- /src/images/getresponse-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/getresponse-logo.png -------------------------------------------------------------------------------- /src/images/brand-installation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpsharks/s2member/HEAD/src/images/brand-installation.png -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | Options -Indexes 2 | 3 | DirectoryIndex disabled 4 | DirectoryIndex index.php 5 | -------------------------------------------------------------------------------- /src/includes/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | deny from all 6 | -------------------------------------------------------------------------------- /src/includes/jquery/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all granted 3 | 4 | 5 | allow from all 6 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-profile-modification-page-url-1.x-php: -------------------------------------------------------------------------------- 1 | Modify Profile -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-profile-modification-page-url-1-ops.x-php: -------------------------------------------------------------------------------- 1 | Modify Profile -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sas-sp-tracking-code.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sas-ccap-tracking-code.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/idev-ccap-tracking-code.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/idev-sp-tracking-code.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sas-signup-tracking-code.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/idev-signup-tracking-code.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sas-modification-tracking-code.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-s2-conditional-nesting.x-php: -------------------------------------------------------------------------------- 1 | [s2If is_user_logged_in() AND current_user_is(s2member_level1)] 2 | [_s2If is_page(1) OR is_page(2)] 3 | You can access. 4 | [/_s2If] 5 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/idev-modification-tracking-code.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-s2-conditional-nesting-farm.x-php: -------------------------------------------------------------------------------- 1 | [s2If is_user_logged_in() AND current_user_is(s2member_level1)] 2 | [_s2If is_page(1) OR is_page(2)] 3 | You can access. 4 | [/_s2If] 5 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/ccap-file-downloads.x-php: -------------------------------------------------------------------------------- 1 | http://www.example.com/?s2member_file_download=access-s2member-ccap-music/file.mp3 2 | http://www.example.com/?s2member_file_download=access-s2member-ccap-videos/file.avi -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/is-user-logged-in.x-php: -------------------------------------------------------------------------------- 1 | 2 | Content for anyone that is logged in, regardless of their Membership Level. 3 | 4 | Some public content. 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## s2Member® Framework 2 | 3 | s2Member® Framework ~ membership management for WordPress®. 4 | 5 | ## BRANCH RENAME: `000000-dev` is now just `dev` ... 6 | 7 | See announcement: https://github.com/websharks/s2member/issues/968 8 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-current-user-can-full-access.x-php: -------------------------------------------------------------------------------- 1 | [s2If current_user_can(access_s2member_level1)] 2 | Some content for Members who are logged in with an s2Member Level >= 1. 3 | [else] 4 | Some public content. 5 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-is-user-logged-in-else.x-php: -------------------------------------------------------------------------------- 1 | [s2If is_user_logged_in()] 2 | Content for anyone that is logged in, regardless of their Membership Level. 3 | [else] 4 | Some public content. They're NOT logged in. 5 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-current-user-can-full-access-farm.x-php: -------------------------------------------------------------------------------- 1 | [s2If current_user_can(access_s2member_level1)] 2 | Some content for Members who are logged in with an s2Member Level >= 1. 3 | [else] 4 | Some public content. 5 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-is-user-logged-in-else-farm.x-php: -------------------------------------------------------------------------------- 1 | [s2If is_user_logged_in()] 2 | Content for anyone that is logged in, regardless of their Membership Level. 3 | [else] 4 | Some public content. They're NOT logged in. 5 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-s2-conditional-nesting-else.x-php: -------------------------------------------------------------------------------- 1 | [s2If is_user_logged_in() AND current_user_is(s2member_level1)] 2 | [_s2If is_page(1) OR is_page(2)] 3 | You can access. 4 | [_else] 5 | Denied! 6 | [/_s2If] 7 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-profile-modification-page-url-3-ops.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-s2-conditional-nesting-else-farm.x-php: -------------------------------------------------------------------------------- 1 | [s2If is_user_logged_in() AND current_user_is(s2member_level1)] 2 | [_s2If is_page(1) OR is_page(2)] 3 | You can access. 4 | [_else] 5 | Denied! 6 | [/_s2If] 7 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-profile-modification-page-url-3.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/jwplayer-s2stream-mp3-rtmp.x-php: -------------------------------------------------------------------------------- 1 | Copy/paste this Shortcode into any WordPress® Post or Page. 2 | [s2Stream player="jwplayer-v7-rtmp" player_path="/jwplayer/jwplayer.js" player_key="YOUR KEY HERE" file_download="audio.mp3" /] 3 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/jwplayer-s2stream-mp4-rtmp.x-php: -------------------------------------------------------------------------------- 1 | Copy/paste this Shortcode into any WordPress® Post or Page. 2 | [s2Stream player="jwplayer-v7-rtmp" player_path="/jwplayer/jwplayer.js" player_key="YOUR KEY HERE" file_download="video.mp4" /] 3 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-can-full-access.x-php: -------------------------------------------------------------------------------- 1 | 2 | Some content for Members who are logged in with an s2Member Level >= 1. 3 | 4 | Some public content. 5 | 6 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/jwplayer-s2stream-mp3.x-php: -------------------------------------------------------------------------------- 1 | Copy/paste this Shortcode into any WordPress® Post or Page. 2 | [s2Stream player="jwplayer-v7" player_path="/jwplayer/jwplayer.js" player_key="YOUR KEY HERE" file_download="audio.mp3" rewrite="yes" /] 3 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/jwplayer-s2stream-mp4.x-php: -------------------------------------------------------------------------------- 1 | Copy/paste this Shortcode into any WordPress® Post or Page. 2 | [s2Stream player="jwplayer-v7" player_path="/jwplayer/jwplayer.js" player_key="YOUR KEY HERE" file_download="video.mp4" rewrite="yes" /] 3 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-id.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: 5547 3 | (or whatever their user ID# is) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_ID" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/jwplayer-s2stream-mp3-rtmp-only.x-php: -------------------------------------------------------------------------------- 1 | Copy/paste this Shortcode into any WordPress® Post or Page. 2 | [s2Stream player="jwplayer-v7-rtmp-only" player_path="/jwplayer/jwplayer.js" player_key="YOUR KEY HERE" file_download="audio.mp3" /] 3 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/jwplayer-s2stream-mp4-rtmp-only.x-php: -------------------------------------------------------------------------------- 1 | Copy/paste this Shortcode into any WordPress® Post or Page. 2 | [s2Stream player="jwplayer-v7-rtmp-only" player_path="/jwplayer/jwplayer.js" player_key="YOUR KEY HERE" file_download="video.mp4" /] 3 | -------------------------------------------------------------------------------- /src/includes/templates/cfg-files/s2o-th-funcs.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | // s2Member-only mode. Do NOT load theme functions, exclude all themes. 8 | -------------------------------------------------------------------------------- /src/includes/externals/aweber/oauth_adapter.php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: Free 3 | (or whatever Label you've configured for Level #0) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_LEVEL0_LABEL" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-last-name.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: Smith 3 | (or whatever their last name is) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_LAST_NAME" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-login.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: johnsmith22 3 | (or whatever their login/username is) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_LOGIN" /] -------------------------------------------------------------------------------- /src/includes/templates/shortcodes/paypal-cancellation-button-shortcode.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | [s2Member-PayPal-Button cancel="1" image="default" output="anchor" /] 8 | -------------------------------------------------------------------------------- /src/includes/externals/aweber/aweber_api.php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: John 3 | (or whatever their first name is) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_FIRST_NAME" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-display-name.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: Johnny 3 | (this is the User's display name) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-is-logged-in.x-php: -------------------------------------------------------------------------------- 1 | 2 | A User/Member is logged in, with an Access Level >= 0. 3 | 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2If is_user_logged_in()] 8 | content goes here 9 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-email.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: johnsmith@example.com 3 | (or whatever their email address is) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_EMAIL" /] 8 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-ip.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: 123.456.789.111 3 | (or whatever the current user's IP address happens to be) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_IP" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/paypal-business.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: paypal@example.com 3 | (or whatever you have configured as your paypal email address) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_PAYPAL_BUSINESS" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/reg-email-from-name.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: Member Support 3 | (or whatever you have configured as your From: name) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_REG_EMAIL_FROM_NAME" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-is-user-logged-in.x-php: -------------------------------------------------------------------------------- 1 | [s2If is_user_logged_in()] 2 | Content for anyone that is logged in, regardless of their Membership Level. 3 | [/s2If] 4 | 5 | [s2If !is_user_logged_in()] 6 | Some public content. They're NOT logged in. 7 | A leading !exclamation means false. 8 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-is-user-logged-in-farm.x-php: -------------------------------------------------------------------------------- 1 | [s2If is_user_logged_in()] 2 | Content for anyone that is logged in, regardless of their Membership Level. 3 | [/s2If] 4 | 5 | [s2If !is_user_logged_in()] 6 | Some public content. They're NOT logged in. 7 | A leading !exclamation means false. 8 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/reg-email-from-email.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: support@example.com 3 | (or whatever you have configured as your From: email) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_REG_EMAIL_FROM_EMAIL" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-login-counter.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: 47 3 | (the number of times the User has logged into your site) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_LOGIN_COUNTER" /]. -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/paypal-api-password.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: 523MJSDOED54Z8JU8 3 | (or whatever you have configured as your PayPal® API Password) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_PAYPAL_API_PASSWORD" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/paypal-endpoint.x-php: -------------------------------------------------------------------------------- 1 | 2 | This will output the PayPal® endpoint domain: www.paypal.com 3 | (if sandbox testing is enabled, it will output www.sandbox.paypal.com) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_PAYPAL_ENDPOINT" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-can-constants-1.x-php: -------------------------------------------------------------------------------- 1 | 2 | Content for Members with an s2Member Level >= 1. 3 | 4 | Some content for Free Subscribers. 5 | 6 | Some public content. 7 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/paypal-api-username.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: example-pro_api1.example.com 3 | (or whatever you have configured as your PayPal® API Username) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_PAYPAL_API_USERNAME" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-registration-ip.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: 123.456.789.111 3 | (or whatever the User's Registration IP address was) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_IP" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-registration-time.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: 1270537981 3 | (this is a Unix timestamp, which is based on seconds) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_TIME" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-access-label.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: Gold Member 3 | (or whatever Label you've configured for their Membership Level) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_ACCESS_LABEL" /]. 8 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/file-download-inline-extensions.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: pdf,jpg,jpeg,jpe,png 3 | (s2Member will display these extensions inline) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/specific-page-restrictions.x-php: -------------------------------------------------------------------------------- 1 | ID, "page")) 7 | continue; 8 | /* Skip it. The current User/Member 9 | CANNOT access this particular Page. */ 10 | } 11 | } 12 | ?> -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/leveln-file-downloads-allowed.x-php: -------------------------------------------------------------------------------- 1 | Level #0 Users are allowed to download 2 | files 3 | every days. 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_LEVEL0_FILE_DOWNLOADS_ALLOWED" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/paypal-api-endpoint.x-php: -------------------------------------------------------------------------------- 1 | 2 | This will output the PayPal® API endpoint domain: api-3t.paypal.com 3 | (if sandbox testing is enabled, it will output api-3t.sandbox.paypal.com) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_PAYPAL_API_ENDPOINT" /] -------------------------------------------------------------------------------- /src/includes/templates/cfg-files/s2member-logs.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | Require all denied 9 | 10 | 11 | deny from all 12 | 13 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-custom.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: www.yourdomain.com|cv1|cv2|cv3 3 | (this is the input field value for the custom="" attribute in your Shortcode) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_CUSTOM" /] 8 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-paid-registration-time.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: 1270537981 3 | (this is a Unix timestamp, which is based on seconds) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-profile-modification-page-url-2-ops.x-php: -------------------------------------------------------------------------------- 1 | Modify Profile -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-is-logged-in-as-member.x-php: -------------------------------------------------------------------------------- 1 | 2 | A Member is logged in, with an Access Level >= 1. 3 | 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2If is_user_logged_in() AND current_user_can(access_s2member_level1)] 8 | content goes here 9 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/leveln-file-downloads-allowed-days.x-php: -------------------------------------------------------------------------------- 1 | Level #0 Users are allowed to download 2 | files 3 | every days. 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_LEVEL0_FILE_DOWNLOADS_ALLOWED_DAYS" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/logout-page-url.x-php: -------------------------------------------------------------------------------- 1 | 2 | My Account 3 | | Logout 4 | 5 | 6 | ---- s2member Shortcode Equivalent ---- 7 | 8 | [s2Get constant="S2MEMBER_LOGOUT_PAGE_URL" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/paypal-api-signature.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: Akdfw392-AnhvhsdfjLSJSKdtFuAmHxW3iD1N3GoZuZ8Vr2ii 3 | (or whatever you have configured as your PayPal® API Signature) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_PAYPAL_API_SIGNATURE" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-profile-modification-page-url-2.x-php: -------------------------------------------------------------------------------- 1 | Modify Profile -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/paypal-return-url.x-php: -------------------------------------------------------------------------------- 1 | 2 | This will output something like: http://www.example.com/?s2member_paypal_return=1 3 | (this is used as the Signup Confirmation Page, and also handles PDT/Auto-Return) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_PAYPAL_RETURN_URL" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/s2-conditional-supplements-1.x-php: -------------------------------------------------------------------------------- 1 | 2 | Content for Members at exactly Level# 1. 3 | 4 | Some content for those who are NOT at Level #4. 5 | 6 | Some public content. 7 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/login-page-url.x-php: -------------------------------------------------------------------------------- 1 | 2 | Please Signup 3 | | Or Login 4 | 5 | 6 | ---- s2member Shortcode Equivalent ---- 7 | 8 | [s2Get constant="S2MEMBER_LOGIN_PAGE_URL" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/paypal-notify-url.x-php: -------------------------------------------------------------------------------- 1 | 2 | This will output something like: http://www.example.com/?s2member_paypal_notify=1 3 | (this is used silently behind the scenes to communicate back and forth with PayPal) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_PAYPAL_NOTIFY_URL" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-downloads-allowed.x-php: -------------------------------------------------------------------------------- 1 | 2 | This will output the number of files they're allowed to download. 3 | (the number of files allowed is based on their Membership Level) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/login-welcome-page-url.x-php: -------------------------------------------------------------------------------- 1 | 2 | My Account 3 | | Logout 4 | 5 | 6 | ---- s2member Shortcode Equivalent ---- 7 | 8 | [s2Get constant="S2MEMBER_LOGIN_WELCOME_PAGE_URL" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/paypal-pdt-identity-token.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: jjweu7234jKDdsjSLKSEDFoe38345j3232llii3450823kk2o0jgg 3 | (or whatever you have configured as your PayPal® Identity Token) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_PAYPAL_PDT_IDENTITY_TOKEN" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/specific-tag-restrictions.x-php: -------------------------------------------------------------------------------- 1 | name, "tag")) 7 | continue; 8 | /* Skip it. The current User/Member 9 | CANNOT access this Tag Archive, 10 | or any Posts/Pages with this Tag. */ 11 | } 12 | } 13 | ?> -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/membership-options-page-url.x-php: -------------------------------------------------------------------------------- 1 | 2 | Please Signup 3 | | Or Login 4 | 5 | 6 | ---- s2member Shortcode Equivalent ---- 7 | 8 | [s2Get constant="S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-downloads-currently.x-php: -------------------------------------------------------------------------------- 1 | 2 | This will output the number of files they've downloaded recently. 3 | (that is, the number of files within the last X days, according to your configuration) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-downloads-allowed-days.x-php: -------------------------------------------------------------------------------- 1 | 2 | This will output the number of days (the period) in which stats are being kept. 3 | (users are allowed to download X number of files every X number of days) 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/custom-queries-loop.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-subscr-gateway.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: paypal 3 | (this is the Paid Subscr. Gateway associated with their Paid Subscr. ID) 4 | (possible values: paypal, alipay, authnet, ccbill, clickbank, google) 5 | 6 | ---- s2member Shortcode Equivalent ---- 7 | 8 | [s2Get constant="S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/file-download-limit-exceeded-page-url.x-php: -------------------------------------------------------------------------------- 1 | S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED){ ?> 2 | Limit Exceeded, click here for details. 3 | 4 | 5 | ---- s2member Shortcode Equivalent ---- 6 | 7 | [s2Get constant="S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/custom-queries.x-php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/specific-category-restrictions.x-php: -------------------------------------------------------------------------------- 1 | cat_ID, "category")) 7 | continue; 8 | /* Skip it. The current User/Member CANNOT access this Category, 9 | or any Posts inside this Category, or any of its sub-Categories. */ 10 | } 11 | } 12 | ?> -------------------------------------------------------------------------------- /src/includes/templates/cfg-files/s2-cross-xml.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | '."\n"; ?> 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/s2-conditional-supplements-2.x-php: -------------------------------------------------------------------------------- 1 | 2 | Content for Members who CANNOT access Level #1 on this Blog. 3 | 4 | Content for Members who CANNOT access Level #1 on Blog ID# 24. (i.e., Multisite Networking) 5 | 6 | Some public content. 7 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/api-mop-vars-e.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: 110620 3 | (or whatever the current version number is) 4 | Use PHP's version_compare() function to test this. 5 | 6 | Note: s2Member versions now follow their release date. 7 | Ex: s2Member v110620 was released June 20th 2011. 8 | (YYMMDD format) 9 | 10 | ---- s2member Shortcode Equivalent ---- 11 | 12 | [s2Get constant="S2MEMBER_VERSION" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/level-file-downloads.x-php: -------------------------------------------------------------------------------- 1 | http://www.example.com/?s2member_file_download=access-s2member-level0/tiger.doc 2 | http://www.example.com/?s2member_file_download=access-s2member-level1/zebra.pdf 3 | http://www.example.com/?s2member_file_download=access-s2member-level2/elephant.doc 4 | http://www.example.com/?s2member_file_download=access-s2member-level3/rhino.pdf 5 | http://www.example.com/?s2member_file_download=access-s2member-level4/lion.doc -------------------------------------------------------------------------------- /src/includes/templates/shortcodes/paypal-sp-checkout-button-shortcode.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | [s2Member-PayPal-Button sp="1" ids="0" exp="72" desc="" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="%%custom%%" ra="0.01" image="default" output="button" /] 8 | -------------------------------------------------------------------------------- /src/includes/templates/options/paypal-membership-ccap-terms.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | "> 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/includes/templates/shortcodes/paypal-ccaps-checkout-button-shortcode.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | [s2Member-PayPal-Button level="*" ccaps="music,videos" desc="" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="%%custom%%" ra="0.01" rp="1" rt="L" rr="BN" image="default" output="button" /] 8 | -------------------------------------------------------------------------------- /src/includes/templates/shortcodes/paypal-checkout-button-shortcode.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | [s2Member-PayPal-Button level="%%level%%" ccaps="" desc="%%level_label%% / " ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="%%custom%%" ta="0" tp="0" tt="D" ra="0.01" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" /] 8 | -------------------------------------------------------------------------------- /src/includes/templates/badges/s-badge.php: -------------------------------------------------------------------------------- 1 | 6 |
7 | s2Member®" /> 8 |
9 | -------------------------------------------------------------------------------- /src/includes/templates/buttons/paypal-cancellation-button.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | /i/btn/btn_unsubscribe_LG.gif" style="width:auto; height:auto; border:0;" alt="PayPal" /> 9 | 10 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-subscr-id.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: I-82234JD0923423 3 | 4 | This is the Paid Subscription ID associated with their account. 5 | Or, for Lifetime subscriptions sold through Buy Now buttons, this will hold the Paid Transaction ID associated with their purchase. 6 | Or, if the User is a Free Subscriber (i.e., NOT a paying Member), this will simply be an empty string. 7 | 8 | ---- s2member Shortcode Equivalent ---- 9 | 10 | [s2Get constant="S2MEMBER_CURRENT_USER_SUBSCR_ID" /] -------------------------------------------------------------------------------- /src/includes/templates/options/paypal-membership-trial-terms.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/specific-post-restrictions.x-php: -------------------------------------------------------------------------------- 1 | ID, "post")) 7 | continue; 8 | /* Skip it. The current User/Member 9 | CANNOT access this particular Post. */ 10 | 11 | $post_or_page_id = $post->ID; 12 | if (!is_permitted_by_s2member ($post_or_page_id, "singular")) 13 | continue; 14 | /* The "singular" attribute can check both Pages and Posts the same time. 15 | So if this was actually a "Page", that would be valid, w/ "singular". */ 16 | } 17 | } 18 | ?> -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-is-specific-content.x-php: -------------------------------------------------------------------------------- 1 | 2 | Some premium content for Level 4 Members. 3 | 4 | Some premium content for Level 3 Members. 5 | 6 | Some premium content for Level 2 Members. 7 | 8 | Some premium content for Level 1 Members. 9 | 10 | Some content for Free Subscribers. 11 | 12 | Some public content. 13 | -------------------------------------------------------------------------------- /src/includes/templates/errors/ip-restrictions.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | <?php echo _x('503: Service Temporarily Unavailable', "s2member-front", "s2member"); ?> 12 | 13 | 14 | 503: Service Temporarily Unavailable
Too many IP addresses accessing one secure area!
Please contact Support if you need assistance.', "s2member-front", "s2member"); ?> 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-subscr-or-wp-id.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: I-82234JD0923423 3 | Or possibly something like: 8845 4 | 5 | This is the Paid Subscription ID associated with their account. 6 | Or, for Lifetime subscriptions sold through Buy Now buttons, this will hold the Paid Transaction ID associated with their purchase. 7 | Or, if the User is a Free Subscriber (i.e., NOT a paying Member), this will hold their Free Subscriber ID (i.e., a WordPress® User ID). 8 | 9 | ---- s2member Shortcode Equivalent ---- 10 | 11 | [s2Get constant="S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-current-user-is-specific-content.x-php: -------------------------------------------------------------------------------- 1 | [s2If current_user_is(s2member_level4)] 2 | Some premium content for Level 4 Members. 3 | [/s2If] 4 | 5 | [s2If current_user_is(s2member_level3)] 6 | Some premium content for Level 3 Members. 7 | [/s2If] 8 | 9 | [s2If current_user_is(s2member_level2)] 10 | Some premium content for Level 2 Members. 11 | [/s2If] 12 | 13 | [s2If current_user_is(s2member_level1)] 14 | Some premium content for Level 1 Members. 15 | [/s2If] 16 | 17 | [s2If current_user_is(s2member_level0)] 18 | Some content for Free Subscribers. 19 | [/s2If] 20 | 21 | [s2If !current_user_can(access_s2member_level0)] 22 | Some public content. 23 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-current-user-is-specific-content-farm.x-php: -------------------------------------------------------------------------------- 1 | [s2If current_user_is(s2member_level4)] 2 | Some premium content for Level 4 Members. 3 | [/s2If] 4 | 5 | [s2If current_user_is(s2member_level3)] 6 | Some premium content for Level 3 Members. 7 | [/s2If] 8 | 9 | [s2If current_user_is(s2member_level2)] 10 | Some premium content for Level 2 Members. 11 | [/s2If] 12 | 13 | [s2If current_user_is(s2member_level1)] 14 | Some premium content for Level 1 Members. 15 | [/s2If] 16 | 17 | [s2If current_user_is(s2member_level0)] 18 | Some content for Free Subscribers. 19 | [/s2If] 20 | 21 | [s2If !current_user_can(access_s2member_level0)] 22 | Some public content. 23 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-can-constants-2.x-php: -------------------------------------------------------------------------------- 1 | = 4){ ?> 2 | Some content for Members with an s2Member Level >= 4. 3 | = 3){ ?> 4 | Some content for Members with an s2Member Level >= 3. 5 | = 2){ ?> 6 | Some content for Members with an s2Member Level >= 2. 7 | = 1){ ?> 8 | Some content for Members with an s2Member Level >= 1. 9 | 10 | Some content for Free Subscribers. 11 | 12 | Some public content. 13 | 14 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-s2-conditional-supplements-2-farm.x-php: -------------------------------------------------------------------------------- 1 | [s2If !current_user_can(access_s2member_level4)] 2 | 3 | Content for someone who does NOT have Level #4 access. 4 | Possibly an Upgrade Button here. 5 | 6 | * Nested PayPal® Form/Button Shortcodes ARE fine. 7 | [s2Member-PayPal-Button level="4" ra="49.95" /] 8 | 9 | [/s2If] 10 | 11 | [s2If current_user_is(administrator)] 12 | Content specifically for a WordPress® Administrator. 13 | [/s2If] 14 | 15 | [s2If current_user_is(editor)] 16 | Content specifically for a WordPress® Editor. 17 | [/s2If] 18 | 19 | [s2If current_user_is(author)] 20 | Content specifically for a WordPress® Author. 21 | [/s2If] 22 | 23 | [s2If current_user_is(contributor)] 24 | Content specifically for a WordPress® Contributor. 25 | [/s2If] 26 | 27 | [s2If current_user_is(subscriber)] 28 | Content specifically for a WordPress® Subscriber. 29 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/s2-conditional-supplements-3.x-php: -------------------------------------------------------------------------------- 1 | 2 | 3 | This Member CANNOT access Level #4, but... 4 | they CAN access Level #2 on this Blog, OR (||) on Blog ID# 24. (i.e., Multisite Networking) 5 | 6 | 7 | Also display free gift here. This is a Custom Capability check, using a nested Conditional. 8 | 9 | 10 | 11 | 12 | Content for Members who can access Level #1 on this Blog, OR (||) on Blog ID# 24. (i.e., Multisite Networking) 13 | 14 | 15 | 16 | Some public content. 17 | 18 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-current-user-is-specific-content-else.x-php: -------------------------------------------------------------------------------- 1 | Notice that NESTED Conditionals require a preceding underscore (i.e., _s2If, __s2If, ___s2If). 2 | You can go up to ten levels deep ( __________s2If ). 3 | 4 | [s2If current_user_is(s2member_level4)] 5 | Some premium content for Level 4 Members. 6 | [else] 7 | [_s2If current_user_is(s2member_level3)] 8 | Some premium content for Level 3 Members. 9 | [_else] 10 | [__s2If current_user_is(s2member_level2)] 11 | Some premium content for Level 2 Members. 12 | [__else] 13 | [___s2If current_user_is(s2member_level1)] 14 | Some premium content for Level 1 Members. 15 | [___else] 16 | [____s2If current_user_is(s2member_level0)] 17 | Some content for Free Subscribers. 18 | [____else] 19 | Some public content. 20 | [/____s2If] 21 | [/___s2If] 22 | [/__s2If] 23 | [/_s2If] 24 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-current-user-is-specific-content-else-farm.x-php: -------------------------------------------------------------------------------- 1 | Notice that NESTED Conditionals require a preceding underscore (i.e., _s2If, __s2If, ___s2If). 2 | You can go up to ten levels deep ( __________s2If ). 3 | 4 | [s2If current_user_is(s2member_level4)] 5 | Some premium content for Level 4 Members. 6 | [else] 7 | [_s2If current_user_is(s2member_level3)] 8 | Some premium content for Level 3 Members. 9 | [_else] 10 | [__s2If current_user_is(s2member_level2)] 11 | Some premium content for Level 2 Members. 12 | [__else] 13 | [___s2If current_user_is(s2member_level1)] 14 | Some premium content for Level 1 Members. 15 | [___else] 16 | [____s2If current_user_is(s2member_level0)] 17 | Some content for Free Subscribers. 18 | [____else] 19 | Some public content. 20 | [/____s2If] 21 | [/___s2If] 22 | [/__s2If] 23 | [/_s2If] 24 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-can-ccaps-1.x-php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Some premium content for all Level 1 Members. 4 | 5 | 6 | Display links for music as well. 7 | 8 | 9 | 10 | Display videos as well. 11 | 12 | 13 | 14 | Some public content. 15 | 16 | 17 | ---- s2member Shortcode Equivalents ---- 18 | 19 | [s2If current_user_can(access_s2member_level1)] 20 | 21 | Some premium content for all Level 1 Members. 22 | 23 | [_s2If current_user_can(access_s2member_ccap_music)] 24 | Display links for music as well. 25 | [/_s2If] 26 | 27 | [_s2If current_user_can(access_s2member_ccap_videos)] 28 | Display videos as well. 29 | [/_s2If] 30 | 31 | [/s2If] 32 | 33 | [s2If !current_user_can(access_s2member_level1)] 34 | Some public content. 35 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-downloads-allowed-is-unlimited.x-php: -------------------------------------------------------------------------------- 1 | You are allowed to download files 2 | every days. 3 | 4 | ---- s2Member Shortcode Equivalent (Requires s2Member Pro) ------------ 5 | 6 | You are allowed to download [s2If php="S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED"]unlimited 7 | [else][s2Get constant="S2MEMBER_LEVEL2_FILE_DOWNLOADS_ALLOWED" /][/s2If] files 8 | every [s2Get constant="S2MEMBER_LEVEL2_FILE_DOWNLOADS_ALLOWED_DAYS" /] days. 9 | 10 | **NOTE** The use of `[s2If php=""]` and `[else]` requires s2Member Pro. 11 | **NOTE** Arbitrary PHP code (via [s2If php=""]) will only work if you enable this functionality. 12 | Please visit `Dashboard → s2Member → Restriction Options → Simple Shortcode Conditionals` 13 | to set your preferences and enable `[s2If php=""]` when s2Member Pro is installed. -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-value-for-pp-on0-os0-on1-os1.x-php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | ---- s2member Shortcode Equivalents ---- 11 | 12 | [s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0" /] 13 | [s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0" /] 14 | 15 | [s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1" /] 16 | [s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1" /] -------------------------------------------------------------------------------- /src/includes/templates/cfg-files/s2member-files-no-gzip.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | RewriteEngine On 14 | RewriteBase 15 | RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR] 16 | RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1 17 | RewriteRule .* - [E=no-gzip:1] 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-s2-conditional-supplements-2.x-php: -------------------------------------------------------------------------------- 1 | [s2If current_user_can(access_s2member_ccap_free_gift)] 2 | Display free gift here. This Member has access to a Custom Capability that supplies a free gift. 3 | [/s2If] 4 | 5 | [s2If !current_user_can(access_s2member_level4)] 6 | 7 | Content for someone who does NOT have Level #4 access. 8 | Possibly an Upgrade Button here. 9 | 10 | * Nested PayPal Form/Button Shortcodes ARE fine. 11 | [s2Member-PayPal-Button level="4" ra="49.95" /] 12 | 13 | [/s2If] 14 | 15 | [s2If current_user_is(administrator)] 16 | Content specifically for a WordPress® Administrator. 17 | [/s2If] 18 | 19 | [s2If current_user_is(editor)] 20 | Content specifically for a WordPress® Editor. 21 | [/s2If] 22 | 23 | [s2If current_user_is(author)] 24 | Content specifically for a WordPress® Author. 25 | [/s2If] 26 | 27 | [s2If current_user_is(contributor)] 28 | Content specifically for a WordPress® Contributor. 29 | [/s2If] 30 | 31 | [s2If current_user_is(subscriber)] 32 | Content specifically for a WordPress® Subscriber. 33 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-s2-conditional-supplements-1-farm.x-php: -------------------------------------------------------------------------------- 1 | [s2If current_user_is(s2member_level1)] 2 | Content for Members at exactly Level# 1, on this Blog. 3 | [/s2If] 4 | 5 | [s2If current_user_is(s2member_level1) OR current_user_is(s2member_level2)] 6 | 7 | They're either a Level #1 Member OR a Level# 2 Member. 8 | * Note the use of `OR` here. True if either condition is met. 9 | 10 | [/s2If] 11 | 12 | [s2If current_user_is(s2member_level3) OR current_user_is(s2member_level4)] 13 | 14 | Content for Level #3 - OR - Level #4 Members. Either/or. 15 | 16 | Hi there [s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /]. 17 | You have [s2Get constant="S2MEMBER_CURRENT_USER_ACCESS_LABEL" /]. 18 | 19 | ^ This uses the s2Get Shortcode to retrieve the value of s2Member API Constants. 20 | These are also documented under: `s2Member → API Scripting`. 21 | 22 | So, this might come out to something like: 23 | `Hi there John. 24 | You have Gold Membership.` 25 | 26 | Here is a Custom Field value: 27 | [s2Get user_field="country_code" /] 28 | 29 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-s2-conditional-supplements-1.x-php: -------------------------------------------------------------------------------- 1 | [s2If current_user_is(s2member_level1)] 2 | Content for Members at exactly Level# 1, on this Blog. 3 | [/s2If] 4 | 5 | [s2If current_user_is(s2member_level2) OR current_user_is_for_blog(24,s2member_level2)] 6 | 7 | They are either a Level #2 Member on this Blog, 8 | OR ... they're at Level# 2 on Blog ID# 24 (i.e., Multisite Networking) 9 | 10 | * Note the use of `OR` here. True if either condition is met. 11 | 12 | [/s2If] 13 | 14 | [s2If current_user_is(s2member_level3) OR current_user_is(s2member_level4)] 15 | 16 | Content for Level #3 - OR - Level #4 Members. Either/or. 17 | 18 | Hi there [s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /]. 19 | You have [s2Get constant="S2MEMBER_CURRENT_USER_ACCESS_LABEL" /]. 20 | 21 | ^ This uses the s2Get Shortcode to retrieve the value of s2Member API Constants. 22 | These are also documented under: `s2Member → API Scripting`. 23 | 24 | So, this might come out to something like: 25 | `Hi there John. 26 | You have Gold Membership.` 27 | 28 | Here is a Custom Field value: 29 | [s2Get user_field="country_code" /] 30 | 31 | [/s2If] -------------------------------------------------------------------------------- /src/includes/funcs.inc.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
JW Player® appears here.
9 | 10 | 11 | 12 | 26 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "websharks/s2member", 3 | "homepage": "https://github.com/websharks/s2member", 4 | "description": "Membership management for WordPress.", 5 | "keywords": ["websharks", "s2member"], 6 | 7 | "type": "project", 8 | "license": "GPL-3.0+", 9 | 10 | "authors": [{ 11 | "name": "websharks", 12 | "homepage": "http://websharks-inc.com/", 13 | "role": "company" 14 | }, { 15 | "name": "jaswsinc", 16 | "homepage": "http://jaswsinc.com/", 17 | "role": "developer" 18 | }, { 19 | "name": "raamdev", 20 | "homepage": "http://raam.org/", 21 | "role": "developer" 22 | }], 23 | 24 | "support": { 25 | "source": "https://github.com/websharks/s2member", 26 | "issues": "https://github.com/websharks/s2member/issues" 27 | }, 28 | 29 | "require": { 30 | "defuse/php-encryption": "2.*" 31 | }, 32 | "require-dev": { 33 | "squizlabs/php_codesniffer": "^3.5" 34 | }, 35 | 36 | "minimum-stability": "dev", 37 | "prefer-stable": true, 38 | 39 | "autoload": { 40 | "psr-4": {}, 41 | "files": [] 42 | }, 43 | 44 | "config": { 45 | "vendor-dir": "src/vendor", 46 | "preferred-install": "dist" 47 | }, 48 | 49 | "repositories": [] 50 | } 51 | -------------------------------------------------------------------------------- /src/includes/templates/players/jwplayer-v7.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | 43 | -------------------------------------------------------------------------------- /src/includes/templates/players/jwplayer-v7-rtmp.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | 43 | -------------------------------------------------------------------------------- /src/includes/templates/players/jwplayer-v7-rtmp-only.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | 43 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/s2member-paid-registration-time.x-php: -------------------------------------------------------------------------------- 1 | * Function: s2member_paid_registration_time ($level, $user_id); // returns a Unix timestamp. 2 | 3 | The $level argument is optional. It defaults to the first/initial Paid Registration Time, regardless of Level#. 4 | Or you could do this: s2member_paid_registration_time("level1"); which will give you the Registration Time at Level #1. 5 | If a User/Member has never paid for Level #1 (i.e., they signed up at Level#2), the function will return 0. 6 | 7 | The argument $user_id defaults to the current user that is logged in. 8 | 9 | Here are some examples: 10 | 11 | -------------------------------------------------------------------------------- /src/includes/classes/paypal-notify.inc.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | This would output the first and last name for the current user. 4 | 5 | Custom Fields are also included in the JSON decoded array. 6 | 7 | ( Displays a full list of all associative array elements. ) 8 | 9 | ---- s2member Shortcode Equivalents ---- 10 | 11 | [s2Get user_field="id" /] 12 | [s2Get user_field="ip" /] 13 | [s2Get user_field="reg_ip" /] 14 | [s2Get user_field="email" /] 15 | [s2Get user_field="login" /] 16 | [s2Get user_field="first_name" /] 17 | [s2Get user_field="last_name" /] 18 | [s2Get user_field="display_name" /] 19 | [s2Get user_field="s2member_custom" /] 20 | [s2Get user_field="s2member_subscr_id" /] 21 | [s2Get user_field="s2member_subscr_or_wp_id" /] 22 | [s2Get user_field="s2member_subscr_gateway" /] 23 | [s2Get user_field="my_custom_field_id" /] 24 | [s2Get user_field="any other WP_User property" /] 25 | 26 | Or, to include the JSON encoded array in a JavaScript routine. 27 | 31 | -------------------------------------------------------------------------------- /src/includes/templates/cfg-files/s2o-mu-plugins.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | // s2Member-only mode. Only load (o)nly/(a)ll files. 8 | 9 | if(is_file(WPMU_PLUGIN_DIR.'/s2member-o-hacks.php')) 10 | include_once WPMU_PLUGIN_DIR.'/s2member-o-hacks.php'; 11 | 12 | else if(is_file(WPMU_PLUGIN_DIR.'/s2-o-hacks.php')) 13 | include_once WPMU_PLUGIN_DIR.'/s2-o-hacks.php'; 14 | 15 | // -------------------------------------------------- 16 | 17 | if(is_file(WPMU_PLUGIN_DIR.'/s2member-a-hacks.php')) 18 | include_once WPMU_PLUGIN_DIR.'/s2member-a-hacks.php'; 19 | 20 | else if(is_file(WPMU_PLUGIN_DIR.'/s2-a-hacks.php')) 21 | include_once WPMU_PLUGIN_DIR.'/s2-a-hacks.php'; 22 | 23 | // -------------------------------------------------- 24 | 25 | if(is_file(WPMU_PLUGIN_DIR.'/s2member-o.php')) 26 | include_once WPMU_PLUGIN_DIR.'/s2member-o.php'; 27 | 28 | else if(is_file(WPMU_PLUGIN_DIR.'/s2-o.php')) 29 | include_once WPMU_PLUGIN_DIR.'/s2-o.php'; 30 | 31 | // -------------------------------------------------- 32 | 33 | if(is_file(WPMU_PLUGIN_DIR.'/s2member-a.php')) 34 | include_once WPMU_PLUGIN_DIR.'/s2member-a.php'; 35 | 36 | else if(is_file(WPMU_PLUGIN_DIR.'/s2-a.php')) 37 | include_once WPMU_PLUGIN_DIR.'/s2-a.php'; 38 | -------------------------------------------------------------------------------- /src/includes/templates/players/jwplayer-v6.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | 45 | -------------------------------------------------------------------------------- /src/includes/templates/players/jwplayer-v6-rtmp.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | 45 | -------------------------------------------------------------------------------- /src/includes/templates/players/jwplayer-v6-rtmp-only.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | 45 | -------------------------------------------------------------------------------- /src/includes/classes/profile-mods.inc.php: -------------------------------------------------------------------------------- 1 | 2 | A Member has an Access Level of 4. 3 | 4 | A Member has an Access Level of 3. 5 | 6 | A Member has an Access Level of 2. 7 | 8 | A Member has an Access Level of 1. 9 | 10 | A User is logged in as a Free Subscriber. 11 | 12 | A User is not logged in at all. 13 | 14 | 15 | ---- s2member Shortcode Equivalent ---- 16 | 17 | [s2If current_user_is(s2member_level4)] 18 | Some premium content for Level 4 Members. 19 | [/s2If] 20 | 21 | [s2If current_user_is(s2member_level3)] 22 | Some premium content for Level 3 Members. 23 | [/s2If] 24 | 25 | [s2If current_user_is(s2member_level2)] 26 | Some premium content for Level 2 Members. 27 | [/s2If] 28 | 29 | [s2If current_user_is(s2member_level1)] 30 | Some premium content for Level 1 Members. 31 | [/s2If] 32 | 33 | [s2If current_user_is(s2member_level0)] 34 | Some content for Free Subscribers. 35 | [/s2If] 36 | 37 | [s2If !is_user_logged_in()] 38 | Some public content. 39 | [/s2If] 40 | -------------------------------------------------------------------------------- /src/includes/classes/register.inc.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | // s2Member-only mode. Only load the s2Member plugin, exclude all others. 8 | 9 | $o_ws_plugin__s2member = preg_replace('/-o\.php$/', '.php', __FILE__); 10 | $o_ws_plugin__s2member_is_loaded_already = defined('WS_PLUGIN__S2MEMBER_VERSION') ? TRUE : FALSE; 11 | $o_ws_plugin__plugins_s2member = WP_PLUGIN_DIR.'/'.basename(dirname($o_ws_plugin__s2member)).'/'.basename($o_ws_plugin__s2member); 12 | 13 | if((!is_file($o_ws_plugin__plugins_s2member) || @is_link($o_ws_plugin__plugins_s2member)) && is_file($o_ws_plugin__s2member) && !$o_ws_plugin__s2member_is_loaded_already) 14 | include_once $o_ws_plugin__s2member; // s2Member in a strange location? 15 | 16 | else if(in_array($o_ws_plugin__plugins_s2member, wp_get_active_network_plugins()) && is_file($o_ws_plugin__plugins_s2member) && !$o_ws_plugin__s2member_is_loaded_already) 17 | include_once $o_ws_plugin__plugins_s2member; 18 | 19 | else if(apply_filters('ws_plugin_s2member_o_force', FALSE) && !$o_ws_plugin__s2member_is_loaded_already) // Off by default. Force s2Member to load? 20 | include_once $o_ws_plugin__s2member; 21 | 22 | unset($o_ws_plugin__plugins_s2member, $o_ws_plugin__s2member_is_loaded_already, $o_ws_plugin__s2member); 23 | -------------------------------------------------------------------------------- /src/includes/templates/cfg-files/s2o-st-plugins.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | // s2Member-only mode. Only load the s2Member plugin, exclude all others. 8 | 9 | $o_ws_plugin__s2member = preg_replace('/-o\.php$/', '.php', __FILE__); 10 | $o_ws_plugin__s2member_is_loaded_already = defined('WS_PLUGIN__S2MEMBER_VERSION') ? TRUE : FALSE; 11 | $o_ws_plugin__plugins_s2member = WP_PLUGIN_DIR.'/'.basename(dirname($o_ws_plugin__s2member)).'/'.basename($o_ws_plugin__s2member); 12 | 13 | if((!is_file($o_ws_plugin__plugins_s2member) || @is_link($o_ws_plugin__plugins_s2member)) && is_file($o_ws_plugin__s2member) && !$o_ws_plugin__s2member_is_loaded_already) 14 | include_once $o_ws_plugin__s2member; // s2Member in a strange location? 15 | 16 | else if(in_array($o_ws_plugin__plugins_s2member, wp_get_active_and_valid_plugins()) && is_file($o_ws_plugin__plugins_s2member) && !$o_ws_plugin__s2member_is_loaded_already) 17 | include_once $o_ws_plugin__plugins_s2member; 18 | 19 | else if(apply_filters('ws_plugin_s2member_o_force', FALSE) && !$o_ws_plugin__s2member_is_loaded_already) // Off by default. Force s2Member to load? 20 | include_once $o_ws_plugin__s2member; 21 | 22 | unset($o_ws_plugin__plugins_s2member, $o_ws_plugin__s2member_is_loaded_already, $o_ws_plugin__s2member); 23 | -------------------------------------------------------------------------------- /src/includes/classes/s-badge-status.inc.php: -------------------------------------------------------------------------------- 1 | 2 | Member is already at the highest Level. No Modification Button displayed here. 3 | 4 | Insert Modification Button here. Upgrade Level 3 Members to highest Level 4. 5 | 6 | Insert Modification Button here. Upgrade Level 2 Members to Level 3 or higher. 7 | 8 | Insert Modification Button here. Upgrade Level 1 Members to Level 2 or higher. 9 | 10 | Insert Modification Button here. Let Free Subscribers become a Member. 11 | 12 | 13 | ---- s2member Shortcode Equivalents ---- 14 | 15 | [s2If current_user_is(s2member_level4)] 16 | Member is already at the highest Level. No Modification Button displayed here. 17 | [/s2If] 18 | 19 | [s2If current_user_is(s2member_level3)] 20 | Insert Modification Button here. Upgrade Level 3 Members to highest Level 4. 21 | [/s2If] 22 | 23 | [s2If current_user_is(s2member_level2)] 24 | Insert Modification Button here. Upgrade Level 2 Members to Level 3 or higher. 25 | [/s2If] 26 | 27 | [s2If current_user_is(s2member_level1)] 28 | Insert Modification Button here. Upgrade Level 1 Members to Level 2 or higher. 29 | [/s2If] 30 | 31 | [s2If current_user_is(s2member_level0)] 32 | Insert Modification Button here. Let Free Subscribers become a Member. 33 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-paid-registration-days-dripping.x-php: -------------------------------------------------------------------------------- 1 | = 30){ ?> 2 | Drip content to Members that started paying you at least 30 days ago. 3 | 4 | 5 | = 60){ ?> 6 | Drip content to Members that started paying you at least 60 days ago. 7 | 8 | 9 | = 90){ ?> 10 | Drip content to Members that started paying you at least 90 days ago. 11 | 12 | 13 | ---- s2member Shortcode Equivalent (Requires s2Member Pro) ---- 14 | 15 | [s2If php="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 30"] 16 | Drip content to Members that started paying you at least 30 days ago. 17 | [/s2If] 18 | 19 | [s2If php="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 60"] 20 | Drip content to Members that started paying you at least 60 days ago. 21 | [/s2If] 22 | 23 | [s2If php="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 90"] 24 | Drip content to Members that started paying you at least 90 days ago. 25 | [/s2If] 26 | 27 | **NOTE** The use of `[s2If php=""]` requires s2Member Pro. 28 | **NOTE** Arbitrary PHP code (via [s2If php=""]) will only work if you enable this functionality. 29 | Please visit `Dashboard → s2Member → Restriction Options → Simple Shortcode Conditionals` 30 | to set your preferences and enable `[s2If php=""]` when s2Member Pro is installed. 31 | 32 | ---- Another s2member Shortcode Equivalent ---- 33 | 34 | [s2Get constant="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS" /] -------------------------------------------------------------------------------- /readme-ms.txt: -------------------------------------------------------------------------------- 1 | = Is s2Member compatible with WordPress Multisite Networking? = 2 | Multisite support is no longer included in the s2Member Framework. However, it is available with s2Member Pro. s2Member Pro is compatible with Multisite Networking. After you enable Multisite Networking, install the s2Member Pro Add-On. Then, navigate to `s2Member → Multisite (Config)` in the Dashboard of your Main Site. You can learn more about s2Member Pro at [s2Member.com](http://www.s2member.com/). 3 | 4 | = I was using the free version in a Multisite Network before. What happened? = 5 | s2Member (when running on a Multisite Network) requires minor alterations in WordPress core that are not compatible with plugins available at WordPress.org (i.e., not allowed) at this time. For this reason, full support for Multisite Networks is now available only in the pro version. 6 | 7 | = What if I have already configured Multisite Network options on this site? = 8 | If you already customized s2Member's Multisite Network configuration options in a previous release, those settings will remain and still be functional over the short-term; i.e., the functionality that makes s2Member compatible with Multisite Networking is still included, even in the s2Member Framework. However, the routines that deal with core patches, and those that allow you to change Multisite options are no longer available. You will need to acquire the Pro version to regain that portion of the s2Member Dashboard. 9 | 10 | _Or, you can revert to [a previous release](http://s2member.com/release-archive/) of s2Member if you'd like. s2Member Framework v151218 is suggested if you go that route._ 11 | -------------------------------------------------------------------------------- /src/includes/classes/sc-profile.inc.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
JW Player® appears here.
9 | 10 | 11 | 12 | $s2_jw_config["mp4_video_file_name"], "url_to_storage_source" => true, "count_against_user" => true); ?> 14 | 15 | 17 | 18 | 32 | 33 | 34 | Sorry, you do NOT have access to this file. 35 | 36 | -------------------------------------------------------------------------------- /src/includes/classes/sc-paypal-button.inc.php: -------------------------------------------------------------------------------- 1 | data = $data; 14 | $this->keys = array_keys($data); 15 | $this->name = $name; 16 | $this->parent = $parent; 17 | } 18 | 19 | public function count() { 20 | return sizeOf($this->data); 21 | } 22 | 23 | public function offsetExists($offset) { 24 | return (isset($this->data[$offset])); 25 | } 26 | 27 | public function offsetGet($offset) { 28 | return $this->data[$offset]; 29 | } 30 | 31 | public function offsetSet($offset, $value) { 32 | $this->data[$offset] = $value; 33 | $this->parent->{$this->name} = $this->data; 34 | return $value; 35 | } 36 | 37 | public function offsetUnset($offset) { 38 | unset($this->data[$offset]); 39 | } 40 | 41 | public function rewind() { 42 | $this->counter = 0; 43 | } 44 | 45 | public function current() { 46 | return $this->data[$this->key()]; 47 | } 48 | 49 | public function key() { 50 | return $this->keys[$this->counter]; 51 | } 52 | 53 | public function next() { 54 | $this->counter++; 55 | } 56 | 57 | public function valid() { 58 | if ($this->counter >= sizeOf($this->data)) { 59 | return false; 60 | } 61 | return true; 62 | } 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/includes/classes/database.inc.php: -------------------------------------------------------------------------------- 1 | query("SET SESSION `wait_timeout` = 300"); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /s2member-o.php: -------------------------------------------------------------------------------- 1 | '.$ws_plugin__s2member_o['wp_settings_as']); 51 | } 52 | else // Else fallback on full WordPress. 53 | require($ws_plugin__s2member_o['wp_dir'].'/wp-load.php'); 54 | } 55 | unset($ws_plugin__s2member_o); 56 | -------------------------------------------------------------------------------- /src/includes/classes/wp-footer.inc.php: -------------------------------------------------------------------------------- 1 | headers['Http-Version'] = $matches[1]; 31 | $this->headers['Status-Code'] = $matches[2]; 32 | $this->headers['Status'] = $matches[2].' '.$matches[3]; 33 | 34 | # Convert headers into an associative array 35 | foreach ($headers as $header) { 36 | preg_match('#(.*?)\:\s(.*)#', $header, $matches); 37 | $this->headers[$matches[1]] = $matches[2]; 38 | } 39 | 40 | # Remove the headers from the response body 41 | $this->body = preg_replace($pattern, '', $response); 42 | } 43 | 44 | public function __toString() 45 | { 46 | return $this->body; 47 | } 48 | 49 | public function headers(){ 50 | return $this->headers; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/jwplayer-streaming-mp4-sca.x-php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
JW Player® appears here.
9 | 10 | 11 | 12 | 18 | 19 | 40 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-registration-days.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: 120 (120 days is approx 4 months) 3 | 4 | ------------------------------------------------------------------------- 5 | 6 | In this example, the longer they've been registered (for free or otherwise), the more they get. 7 | 8 | = 30){ ?> 9 | Drip content to Users who've been registered for at least 30 days. 10 | 11 | 12 | = 60){ ?> 13 | Drip content to Users who've been registered for at least 60 days. 14 | 15 | 16 | = 90){ ?> 17 | Drip content to Users who've been registered for at least 90 days. 18 | 19 | 20 | ---- s2member Shortcode Equivalent (Requires s2Member Pro) ---- 21 | 22 | [s2If php="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 30"] 23 | Drip content to Users who've been registered for at least 30 days. 24 | [/s2If] 25 | 26 | [s2If php="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 60"] 27 | Drip content to Users who've been registered for at least 60 days. 28 | [/s2If] 29 | 30 | [s2If php="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 90"] 31 | Drip content to Users who've been registered for at least 90 days. 32 | [/s2If] 33 | 34 | **NOTE** The use of `[s2If php=""]` requires s2Member Pro. 35 | **NOTE** Arbitrary PHP code (via [s2If php=""]) will only work if you enable this functionality. 36 | Please visit `Dashboard → s2Member → Restriction Options → Simple Shortcode Conditionals` 37 | to set your preferences and enable `[s2If php=""]` when s2Member Pro is installed. 38 | 39 | ---- Another s2member Shortcode Equivalent ---- 40 | 41 | [s2Get constant="S2MEMBER_CURRENT_USER_REGISTRATION_DAYS" /] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/sc-s2-conditional-supplements-3-farm.x-php: -------------------------------------------------------------------------------- 1 | [s2If current_user_cannot(access_s2member_level4) AND current_user_can(access_s2member_level2)] 2 | 3 | This Member CANNOT access Level #4, 4 | but, they CAN access Level #2. 5 | 6 | [_s2If current_user_can(access_s2member_level3)] 7 | 8 | Notice that NESTED Conditionals require a preceding underscore (i.e., _s2If, __s2If, ___s2If). 9 | You can go up to ten levels deep ( __________s2If ). 10 | 11 | Nested PayPal Form/Button Shortcodes ARE fine too. 12 | However, you do NOT need a preceding underscore on Form/Button codes. Or any other Shortcode for that matter. 13 | You ONLY need the preceding underscore on _s2If Conditionals that are being nested into each other. 14 | 15 | ( Hi [s2Get constant="S2MEMBER_CURRENT_USER_DISPLAY_NAME" /], upgrade now to Level #4! ) 16 | [s2Member-PayPal-Button level="4" ra="49.95" ... /] 17 | ~ see, this will work just fine. 18 | 19 | [/_s2If] 20 | 21 | [/s2If] 22 | 23 | [s2If !current_user_can(access_s2member_level4) AND !current_user_can(access_s2member_level3) AND !current_user_can(access_s2member_level2) AND current_user_can(access_s2member_level1)] 24 | Content for Members who can ONLY access Level #1 on this Blog. 25 | ~ The following 2 examples below, say the same thing. 26 | [/s2If] 27 | 28 | [s2If current_user_cannot(access_s2member_level4) AND current_user_cannot(access_s2member_level3) AND current_user_cannot(access_s2member_level2) AND current_user_can(access_s2member_level1)] 29 | Content for Members who can ONLY access Level #1 on this Blog. 30 | ~ Same thing, only this uses explicit false tests. 31 | [/s2If] 32 | 33 | [s2If current_user_is(s2member_level1)] 34 | Content for Members who can ONLY access Level #1 on this Blog. 35 | ~ Same thing, only this is MUCH simpler, less typing. 36 | [/s2If] -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/current-user-paid-registration-days.x-php: -------------------------------------------------------------------------------- 1 | 2 | This may output something like: 120 (120 days is approx 4 months) 3 | 4 | ------------------------------------------------------------------------- 5 | 6 | In this example, the longer they've been a "paying" Member, the more they get. 7 | 8 | = 30){ ?> 9 | Drip content to Members that started paying you at least 30 days ago. 10 | 11 | 12 | = 60){ ?> 13 | Drip content to Members that started paying you at least 60 days ago. 14 | 15 | 16 | = 90){ ?> 17 | Drip content to Members that started paying you at least 90 days ago. 18 | 19 | 20 | ---- s2member Shortcode Equivalent (Requires s2Member Pro) ---- 21 | 22 | [s2If php="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 30"] 23 | Drip content to Members that started paying you at least 30 days ago. 24 | [/s2If] 25 | 26 | [s2If php="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 60"] 27 | Drip content to Members that started paying you at least 60 days ago. 28 | [/s2If] 29 | 30 | [s2If php="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 90"] 31 | Drip content to Members that started paying you at least 90 days ago. 32 | [/s2If] 33 | 34 | **NOTE** The use of `[s2If php=""]` requires s2Member Pro. 35 | **NOTE** Arbitrary PHP code (via [s2If php=""]) will only work if you enable this functionality. 36 | Please visit `Dashboard → s2Member → Restriction Options → Simple Shortcode Conditionals` 37 | to set your preferences and enable `[s2If php=""]` when s2Member Pro is installed. 38 | 39 | ---- Another s2member Shortcode Equivalent ---- 40 | 41 | [s2Get constant="S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS" /] -------------------------------------------------------------------------------- /src/includes/classes/check-activation.inc.php: -------------------------------------------------------------------------------- 1 | =")) 42 | c_ws_plugin__s2member_installation::activate("version"); 43 | 44 | else if(is_multisite() && is_main_site() && (!($mms_v = get_option("ws_plugin__s2member_activated_mms_version")) || !version_compare($mms_v, WS_PLUGIN__S2MEMBER_VERSION, ">="))) 45 | c_ws_plugin__s2member_installation::activate("mms_version"); 46 | 47 | else if(!($l = (int)get_option("ws_plugin__s2member_activated_levels")) || $l !== $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]) 48 | c_ws_plugin__s2member_installation::activate("levels"); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/includes/classes/cron-jobs.inc.php: -------------------------------------------------------------------------------- 1 | =i)?"":Array(1+i-o.length>>>0).join(l);return n?o+m:m+o};var c=function(n,m,q,i,l,p){var o=i-n.length;if(o>0){if(q||!l){n=b(n,i,p,q)}else{n=n.slice(0,m.length)+b("",o,"0",true)+n.slice(m.length)}}return n};var j=function(q,p,o,r,l,i,n){var m=q>>>0;o=o&&m&&{"2":"0b","8":"0","16":"0x"}[p]||"";q=o+b(m.toString(p),i||0,"0",false);return c(q,o,r,l,n)};var e=function(n,p,l,i,m,o){if(i!=null){n=n.slice(0,i)}return c(n,"",p,l,m,o)};var d=function(A,n,o,s,C,x,m){var i;var w;var l;var B;var u;if(A=="%%"){return"%"}var t=false,p="",r=false,z=false,y=" ";var q=o.length;for(var v=0;o&&v-1?6:(m=="d")?0:undefined}else{if(x=="*"){x=+h[f++]}else{if(x.charAt(0)=="*"){x=+h[x.slice(1,-1)]}else{x=+x}}}u=n?h[n.slice(0,-1)]:h[f++];switch(m){case"s":return e(String(u),t,s,x,r,y);case"c":return e(String.fromCharCode(+u),t,s,x,r);case"b":return j(u,2,z,t,s,x,r);case"o":return j(u,8,z,t,s,x,r);case"x":return j(u,16,z,t,s,x,r);case"X":return j(u,16,z,t,s,x,r).toUpperCase();case"u":return j(u,10,z,t,s,x,r);case"i":case"d":i=(+u)|0;w=i<0?"-":p;u=w+b(String(Math.abs(i)),x,"0",false);return c(u,w,t,s,r);case"e":case"E":case"f":case"F":case"g":case"G":i=+u;w=i<0?"-":p;l=["toExponential","toFixed","toPrecision"]["efg".indexOf(m.toLowerCase())];B=["toString","toUpperCase"]["eEfFgG".indexOf(m)%2];u=w+Math.abs(i)[l](x);return c(u,w,t,s,r)[B]();default:return A}};return k.replace(g,d)}}})(jQuery); -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/jwplayer-streaming-mp4-webm.x-php: -------------------------------------------------------------------------------- 1 | 8 | 9 |
JW Player® appears here.
10 | 11 | 12 | 13 | $s2_jw_config["mp4_video_file_name"], "url_to_storage_source" => true, "count_against_user" => true); 15 | $webm_cfg = array("file_download" => $s2_jw_config["webm_video_file_name"], "url_to_storage_source" => true /* Don't count variations. */); ?> 16 | 17 | 20 | 21 | 36 | 37 | 38 | Sorry, you do NOT have access to this file. 39 | 40 | -------------------------------------------------------------------------------- /src/includes/classes/sc-if-conds.inc.php: -------------------------------------------------------------------------------- 1 | '1'), $attr); // One attribute. 53 | $code = c_ws_plugin__s2member_utilities::s_badge_gen($attr['v'], FALSE, FALSE); 54 | 55 | return apply_filters('ws_plugin__s2member_sc_s_badge', $code, get_defined_vars()); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/includes/externals/aweber/aweber_response.php: -------------------------------------------------------------------------------- 1 | adapter = $adapter; 34 | $this->url = $url; 35 | $this->data = $response; 36 | } 37 | 38 | /** 39 | * __set 40 | * 41 | * Manual re-implementation of __set, allows sub classes to access 42 | * the default behavior by using the parent:: format. 43 | * 44 | * @param mixed $key Key of the attr being set 45 | * @param mixed $value Value being set to the attr 46 | * @access public 47 | */ 48 | public function __set($key, $value) { 49 | $this->{$key} = $value; 50 | } 51 | 52 | /** 53 | * __get 54 | * 55 | * PHP "MagicMethod" to allow for dynamic objects. Defers first to the 56 | * data in $this->data. 57 | * 58 | * @param String $value Name of the attribute requested 59 | * @access public 60 | * @return mixed 61 | */ 62 | public function __get($value) { 63 | if (in_array($value, $this->_privateData)) { 64 | return null; 65 | } 66 | if (array_key_exists($value, $this->data)) { 67 | return $this->data[$value]; 68 | } 69 | if ($value == 'type') return $this->_type(); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/includes/classes/meta-boxes.inc.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Some premium content for all Level 1 Members. 4 | 5 | 6 | Display links for downloading your eBooks. 7 | 8 | Insert a PayPal® Modification Button that includes the Custom Capability: ebooks 9 | This might read, "Upgrade Your Membership for access to my eBooks!". 10 | 11 | 12 | 13 | Display links for accessing your reports. 14 | 15 | Insert a PayPal® Modification Button that includes the Custom Capability: reports 16 | This might read, "Upgrade Your Membership for access to my reports!". 17 | 18 | 19 | 20 | Display tips. 21 | 22 | Insert a PayPal® Modification Button that includes the Custom Capability: tips 23 | This might read, "Upgrade Your Membership for access to my tips!". 24 | 25 | 26 | 27 | Some public content. 28 | 29 | 30 | ---- s2member Shortcode Equivalents ---- 31 | 32 | [s2If current_user_can(access_s2member_level1)] 33 | 34 | Some premium content for all Level 1 Members. 35 | 36 | [_s2If current_user_can(access_s2member_ccap_ebooks)] 37 | Display links for downloading your eBooks. 38 | [/_s2If] 39 | [_s2If !current_user_can(access_s2member_ccap_ebooks)] 40 | Insert a PayPal® Modification Button that includes the Custom Capability: ebooks 41 | This might read, "Upgrade Your Membership for access to my eBooks!". 42 | [/_s2If] 43 | 44 | [_s2If current_user_can(access_s2member_ccap_reports)] 45 | Display links for accessing your reports. 46 | [/_s2If] 47 | [_s2If !current_user_can(access_s2member_ccap_reports)] 48 | Insert a PayPal® Modification Button that includes the Custom Capability: reports 49 | This might read, "Upgrade Your Membership for access to my reports!". 50 | [/_s2If] 51 | 52 | [_s2If current_user_can(access_s2member_ccap_tips)] 53 | Display tips. 54 | [/_s2If] 55 | [_s2If !current_user_can(access_s2member_ccap_tips)] 56 | Insert a PayPal® Modification Button that includes the Custom Capability: tips 57 | This might read, "Upgrade Your Membership for access to my tips!". 58 | [/_s2If] 59 | 60 | [/s2If] 61 | 62 | [s2If !current_user_can(access_s2member_level1)] 63 | Some public content. 64 | [/s2If] -------------------------------------------------------------------------------- /src/includes/classes/sc-keys-in.inc.php: -------------------------------------------------------------------------------- 1 | '', 'directive' => ''), $attr); 53 | 54 | foreach(array_keys(get_defined_vars()) as $__v) $__refs[$__v] =& $$__v; 55 | do_action('ws_plugin__s2member_before_sc_get_key_after_shortcode_atts', get_defined_vars()); 56 | unset($__refs, $__v); // Allow variables to be modified by reference. 57 | 58 | if($attr['file_download']) // Requesting a File Download Key? 59 | $get = c_ws_plugin__s2member_files::file_download_key($attr['file_download'], $attr['directive']); 60 | 61 | return apply_filters('ws_plugin__s2member_sc_get_key', isset($get) ? $get : '', get_defined_vars()); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/includes/menu-pages/start.inc.php: -------------------------------------------------------------------------------- 1 | ' . "\n"; 34 | 35 | echo '
'."\n"; 36 | 37 | echo '
'."\n"; 38 | c_ws_plugin__s2member_menu_pages_tb::display (); 39 | echo '
'."\n"; 40 | 41 | echo '

Quick Start

' . "\n"; 42 | 43 | echo '' . "\n"; 44 | echo '' . "\n"; 45 | echo '' . "\n"; 46 | echo '' . "\n"; 58 | 59 | echo '' . "\n"; 62 | 63 | echo '' . "\n"; 64 | echo '' . "\n"; 65 | echo '
' . "\n"; 47 | 48 | do_action("ws_plugin__s2member_during_start_page_before_left_sections", get_defined_vars()); 49 | 50 | echo 51 | '
',"\n", 52 | '
',"\n", 53 | '',"\n", 54 | '
',"\n", 55 | '
',"\n"; 56 | 57 | echo '
' . "\n"; 60 | c_ws_plugin__s2member_menu_pages_rs::display (); 61 | echo '
' . "\n"; 66 | 67 | echo '' . "\n"; 68 | } 69 | } 70 | } 71 | 72 | new c_ws_plugin__s2member_menu_page_start (); 73 | -------------------------------------------------------------------------------- /src/includes/classes/ssl.inc.php: -------------------------------------------------------------------------------- 1 | ID, 's2member_force_ssl', TRUE)))) 61 | if(!preg_match('/^(0|no|off|false)$/i', (string)$force_ssl) && ($forced = TRUE)) // Make sure it's NOT a negative variation. 62 | c_ws_plugin__s2member_ssl_in::force_ssl(get_defined_vars()); // Call inner routine now. 63 | } 64 | do_action('ws_plugin__s2member_after_check_force_ssl', get_defined_vars()); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/s2member-paid-registration-time-examples.x-php: -------------------------------------------------------------------------------- 1 | ------- Example #1 ------------------------------------------------------ 2 | 3 | 0){ ?> 4 | 5 | This is some content that will be displayed to all Members that have paid you at some point. 6 | 7 | 0){ ?> 8 | This will be displayed to all Members that have paid for Level#2 at some point. 9 | 10 | 11 | 0){ ?> 12 | This will be displayed to all Members that have paid for Level#3 at some point. 13 | 14 | 15 | 16 | 17 | ------- Example #2 ------------------------------------------------------ 18 | 19 | 0){ ?> 20 | 21 | This is some content that will be displayed to all Members that have paid you at some point. 22 | 23 | 25 | 26 | 27 | Drip content to Members that started paying you at Level#1, at least 30 days ago. 28 | 29 | 30 | 31 | Drip more content to Members that started paying you at Level#1, at least 60 days ago. 32 | 33 | 34 | 35 | 36 | ---- Example #2 Shortcode Equivalent (Requires s2Member Pro) ------------ 37 | 38 | [s2If php="s2member_paid_registration_time() > 0"] 39 | 40 | This is some content that will be displayed to all Members that have paid you at some point. 41 | 42 | [_s2If php="($level1_payment_time = s2member_paid_registration_time('level1')) && $level1_payment_time <= ($_30_days_ago = strtotime('-30 days'))"] 43 | Drip content to Members that started paying you at Level#1, at least 30 days ago. 44 | [/_s2If] 45 | 46 | [_s2If php="($level1_payment_time = s2member_paid_registration_time('level1')) && $level1_payment_time <= ($_60_days_ago = strtotime('-60 days'))"] 47 | Drip content to Members that started paying you at Level#1, at least 60 days ago. 48 | [/_s2If] 49 | 50 | [/s2If] 51 | 52 | **NOTE** The use of `[s2If php=""]` requires s2Member Pro. 53 | **NOTE** Arbitrary PHP code (via [s2If php=""]) will only work if you enable this functionality. 54 | Please visit `Dashboard → s2Member → Restriction Options → Simple Shortcode Conditionals` 55 | to set your preferences and enable `[s2If php=""]` when s2Member Pro is installed. -------------------------------------------------------------------------------- /src/includes/templates/returns/default-return.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | %%doctype_html_head%% 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | %%header%% 16 |
17 |
18 |
19 | 20 | 21 | 22 | 23 |
24 |
25 | %%response%% 26 |
27 | %%continue%% 28 |
29 |
30 |
31 |
32 | 33 | 34 |
35 |
36 | %%support%% 37 |
38 |
39 |
40 | 41 | %%tracking%% 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/includes/menu-pages/code-samples/api-mop-vars-ro.x-php: -------------------------------------------------------------------------------- 1 | NOTE: While these old variables no longer appear in the URL, 2 | s2Member will create the following variables (internally) for backward compatibility 3 | with older versions of the software. 4 | 5 | ----------------------------------------------------------------------------------------------------------- 6 | These example redirection links include all possible MOP Variable variations in the query string. 7 | ----------------------------------------------------------------------------------------------------------- 8 | 9 | .../membership-options-page/?s2member_seeking=page-587&s2member_level_req=1 10 | .../membership-options-page/?s2member_seeking=post-545&s2member_level_req=2 11 | .../membership-options-page/?s2member_seeking=catg-698&s2member_level_req=4 12 | .../membership-options-page/?s2member_seeking=ptag-447&s2member_level_req=3 13 | .../membership-options-page/?s2member_seeking=page-887&s2member_ccap_req=music 14 | .../membership-options-page/?s2member_seeking=post-871&s2member_ccap_req=videos 15 | .../membership-options-page/?s2member_seeking=post-369&s2member_sp_req=369 16 | .../membership-options-page/?s2member_seeking=bbpress&s2member_level_req=1 17 | .../membership-options-page/?s2member_seeking=ruri-aHR0cDovL3d3dy5leGFtcGxlLmNvbS8&s2member_level_req=1 18 | .../membership-options-page/?s2member_seeking=file-example.zip&s2member_level_req=1 19 | 20 | ----------------------------------------------------------------------------------------------------------- 21 | 22 | Here is a breakdown on each of these Variables: 23 | 24 | * `s2member_seeking` = [post|page|catg|ptag]-[ID number] (Post ID, Page ID, Category ID, Tag ID) 25 | Or: `s2member_seeking` = ruri-[base64 encoded URI] (only applies w/ Membership URI Restrictions) 26 | Or: `s2member_seeking` = file-[protected file name] (only applies w/ Download Restrictions) 27 | Or: `s2member_seeking` = bbpress (only applies when the s2Member → bbPress Bridge is installed) 28 | * `s2member_level_req` = a Membership Level # required for access (only applies to Membership Level Access) 29 | * `s2member_ccap_req` = a Custom Capability required for access (only applies to Custom Capability Restrictions) 30 | * `s2member_sp_req` = a Specific Post/Page ID required (only applies to Specific Post/Page Access Restrictions) 31 | 32 | `s2member_seeking` is always passed in; it is never excluded. 33 | `s2member_level_req`, `s2member_ccap_req`, `s2member_sp_req` are mutually exclusive. 34 | Only ONE of these three Variables will be passed in combination with `s2member_seeking`. 35 | 36 | ----------------------------------------------------------------------------------------------------------- 37 | 38 | * These old MOP Vars are deprecated (they will NOT be available in future versions of s2Member). -------------------------------------------------------------------------------- /src/includes/templates/buttons/paypal-sp-checkout-button.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | " /> 24 | 25 | 26 | 27 | "; ?>" /> 28 | 29 | "; ?>" /> 30 | "; ?>" /> 31 | 32 | "; ?>" /> 33 | "; ?>" /> 34 | 35 | /i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal" /> 36 |
37 | -------------------------------------------------------------------------------- /src/includes/templates/buttons/paypal-ccaps-checkout-button.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | " /> 24 | 25 | 26 | 27 | "; ?>" /> 28 | 29 | "; ?>" /> 30 | "; ?>" /> 31 | 32 | "; ?>" /> 33 | "; ?>" /> 34 | 35 | /i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal" /> 36 |
37 | -------------------------------------------------------------------------------- /src/includes/classes/cron-jobs-in.inc.php: -------------------------------------------------------------------------------- 1 | array('interval' => 600, 'display' => 'Every 10 Minutes')); 50 | 51 | return apply_filters('ws_plugin__s2member_extend_cron_schedules', array_merge($array, $schedules), get_defined_vars()); 52 | } 53 | 54 | /** 55 | * Allows the Auto-EOT Sytem to be processed through a server-side Cron Job. 56 | * 57 | * @package s2Member\Cron_Jobs 58 | * @since 3.5 59 | * 60 | * @attaches-to ``add_action('init');`` 61 | */ 62 | public static function auto_eot_system_via_cron() 63 | { 64 | do_action('ws_plugin__s2member_before_auto_eot_system_via_cron', get_defined_vars()); 65 | 66 | if(!empty($_GET['s2member_auto_eot_system_via_cron'])) 67 | { 68 | if($GLOBALS['WS_PLUGIN__']['s2member']['o']['auto_eot_system_enabled']) 69 | { 70 | c_ws_plugin__s2member_auto_eots::auto_eot_system(); // Process. 71 | do_action('ws_plugin__s2member_during_auto_eot_system_via_cron', get_defined_vars()); 72 | } 73 | exit(); // Clean exit. 74 | } 75 | do_action('ws_plugin__s2member_after_auto_eot_system_via_cron', get_defined_vars()); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/licensing/license.txt: -------------------------------------------------------------------------------- 1 | Copyright: © 2013 [WebSharks, Inc.](http://www.websharks-inc.com/bizdev/) (coded in the USA) 2 | 3 | Released under the terms of the [GNU General Public License](http://www.gnu.org/licenses/gpl-2.0.html). 4 | 5 | = Credits / Additional Acknowledgments = 6 | 7 | * Software designed for WordPress®. 8 | - GPL License 9 | - WordPress® 10 | * JavaScript extensions require jQuery. 11 | - GPL License 12 | - jQuery 13 | * Readme parsing routines, powered (in part) by PHP Markdown. 14 | - BSD / GPL Compatible License 15 | - PHP Markdown 16 | * Administration panel (tools icon) was provided by Everaldo.com. 17 | - LGPL License 18 | - Everaldo 19 | * Administration panel (videos icon) was provided by David Vignoni. 20 | - LGPL License 21 | - David Vignoni 22 | * PayPal® and its associated API, buttons & services have been integrated into this software via external hyperlinks. 23 | The files/services provided by PayPal® are not distributed with this software. They have their own terms & conditions. 24 | - PayPal®, a 3rd party service, is powered by eBay, Inc. 25 | - PayPal® is a trademark of eBay, Inc. 26 | * The W3C® and its associated validator & services have been integrated into this software via external hyperlinks. 27 | The files/services provided by the W3C® are not distributed with this software. They have their own terms & conditions. 28 | - The W3C®, a 3rd party service, is powered by the World Wide Web Consortium 29 | - W3C® is a trademark of the World Wide Web Consortium. 30 | * The MailChimp® services have been integrated into this software through a GPL compatible API & hyperlinks. 31 | The services provided by MailChimp® are not distributed with this software. They have their own terms & conditions. 32 | - MailChimp®, a 3rd party service, is powered by The Rocket Science Group, LLC 33 | - MailChimp® is a trademark of The Rocket Science Group, LLC. 34 | * The AWeber® services have been integrated into this software through hyperlinks & email commands. 35 | The services provided by AWeber® are not distributed with this software. They have their own terms & conditions. 36 | - AWeber®, a 3rd party service, is powered by AWeber Communications 37 | - AWeber® is a trademark of AWeber Communications. -------------------------------------------------------------------------------- /src/includes/jquery/jquery.json-ps/jquery.json-ps.min.js: -------------------------------------------------------------------------------- 1 | if(!this.JSON){this.JSON={}}(function(){var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i | \>|\> /", ">", $css); 48 | $css = preg_replace ("/\[ /", "[", $css); 49 | $css = preg_replace ("/ \]/", "]", $css); 50 | $css = preg_replace ("/ \!\= | \!\=|\!\= /", "!=", $css); 51 | $css = preg_replace ("/ \|\= | \|\=|\|\= /", "|=", $css); 52 | $css = preg_replace ("/ \^\= | \^\=|\^\= /", "^=", $css); 53 | $css = preg_replace ("/ \$\= | \$\=|\$\= /", "$=", $css); 54 | $css = preg_replace ("/ \*\= | \*\=|\*\= /", "*=", $css); 55 | $css = preg_replace ("/ ~\= | ~\=|~\= /", "~=", $css); 56 | $css = preg_replace ("/ \= | \=|\= /", "=", $css); 57 | $css = preg_replace ("/ \+ | \+|\+ /", "+", $css); 58 | $css = preg_replace ("/ ~ | ~|~ /", "~", $css); 59 | $css = preg_replace ("/ \{ | \{|\{ /", "{", $css); 60 | $css = preg_replace ("/ \} | \}|\} /", "}", $css); 61 | $css = preg_replace ("/ \: | \:|\: /", ":", $css); 62 | $css = preg_replace ("/ ; | ;|; /", ";", $css); 63 | $css = preg_replace ("/;\}/", "}", $css); 64 | 65 | return preg_replace_callback ($c6, "c_ws_plugin__s2member_utils_css::_compress_css_c3", $css); 66 | } 67 | /** 68 | * Handles CSS compression of hex colors. 69 | * 70 | * Reduces 6 character hex codes to just 3 whenever possible. 71 | * 72 | * @package s2Member\Utilities 73 | * @since 3.5 74 | * 75 | * @param array $m Array of matches from ``preg_replace_callback()``. 76 | * @return string Shortened hex code when possible, full hex code when not possible. 77 | */ 78 | public static function _compress_css_c3 ($m = FALSE) 79 | { 80 | if ($m[2][0] === $m[2][1] && $m[2][2] === $m[2][3] && $m[2][4] === $m[2][5]) 81 | return $m[1] . $m[2][0] . $m[2][2] . $m[2][4]; 82 | return $m[0]; 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/includes/menu-pages/menu-pages.min.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function(e){e(window).resize(window.tb_position=function(){var a=e(window).width()>720?720:e(window).width(),t=e(window).height(),n=e("body.admin-bar").length?28:0;e("#TB_window").css({width:a-50+"px",height:t-45-n+"px",top:25+n+"px","margin-top":0,"margin-left":"-"+parseInt((a-50)/2,10)+"px"}),e("#TB_ajaxContent").css({width:a-50+"px",height:t-75-n+"px",margin:0,padding:0})});var a=e("table.ws-menu-page-table td.ws-menu-page-table-r"),t=e("> .toggler",a),n=e("> .wrapper",a),s=e("div.ws-menu-page-group");s.each(function(a){var t=e(this),n=t,i=e.trim(n.attr("title")),r=e('
'+i+"
");r.css({"z-index":1}),r.insertBefore(n),r.click(function(){var a=e(this),t=a.next();return a.hasClass("open")?a.add(t).removeClass("open"):a.add(t).addClass("open"),!1}),s.length>1&&0===a&&(e('
').insertBefore("div.ws-menu-page-toolbox").click(function(){return e("div.ws-menu-page-group-header").each(function(){var a=e(this),t=a.next();a.add(t).removeClass("open")}),!1}),e('
').insertBefore("div.ws-menu-page-toolbox").click(function(){return e("div.ws-menu-page-group-header").each(function(){var a=e(this),t=a.next();a.add(t).addClass("open")}),!1})),"open"===n.attr("default-state")&&r.trigger("click")}),t.click(function(){a.hasClass("open")?(n.hide(),a.removeClass("open")):(n.show(),a.addClass("open"))}),"open"===t.attr("default-state")&&t.click(),e("div.ws-menu-page-r-group-header").click(function(){var a=e(this),t=a.next();return a.hasClass("open")?a.add(t).removeClass("open"):a.add(t).addClass("open"),!1}),e("div.ws-menu-page-group-header:first, div.ws-menu-page-r-group-header:first").css({"margin-top":"0"}),e("div.ws-menu-page-group-header:last, div.ws-menu-page-r-group-header:last, div.ws-menu-page-group:last").css({"margin-bottom":"0"}),e("input.ws-menu-page-media-btn").filter(function(){return!!e(this).attr("rel")}).click(function(){var a=e(this);return window.send_to_editor=function(t){var n,s,i,r,o=e.trim(a.attr("rel"));o&&(n=e("input#"+o)).length>0?(i=n.css("background-color"),r=e.trim(e(t).attr("src")),r=r?r:e.trim(e("img",t).attr("src")),n.val(r),n.css({"background-color":"#485230"}),setTimeout(function(){n.css({"background-color":i})},2e3),tb_remove()):o&&(s=e("textarea#"+o)).length>0&&(i=s.css("background-color"),r=e.trim(e(t).attr("src")),r=r?r:e.trim(e("img",t).attr("src")),s.val(e.trim(s.val())+"\n"+r),s.css({"background-color":"#485230"}),setTimeout(function(){s.css({"background-color":i})},2e3),tb_remove())},tb_show("","./media-upload.php?type=image&TB_iframe=true"),!1}),e("form#ws-updates-form").submit(function(){var a="";return e.trim(e("input#ws-updates-fname").val())||(a+="First Name missing, please try again.\n\n"),e.trim(e("input#ws-updates-lname").val())||(a+="Last Name missing, please try again.\n\n"),e.trim(e("input#ws-updates-email").val())?e("input#ws-updates-email").val().match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)||(a+="Invalid email address, please try again.\n\n"):a+="Email missing, please try again.\n\n",!(a=e.trim(a))||(alert("— Oops, you missed something: —\n\n"+a),!1)})}); --------------------------------------------------------------------------------