options.php000064400000016243147206764460006776 0ustar00 'foxiz_config_section_membership', 'title' => esc_html__( 'Membership', 'foxiz-core' ), 'desc' => esc_html__( 'Select options for the membership plugin.', 'foxiz-core' ), 'icon' => 'el el-group', 'fields' => array( array( 'id' => 'membership_info_warning', 'type' => 'info', 'desc' => esc_html__( 'Simple WordPress Membership Plugin is missing!', 'foxiz-core' ), 'style' => 'warning', ), array( 'id' => 'membership_install_warning', 'type' => 'info', 'style' => 'warning', 'desc' => html_entity_decode( esc_html__( 'Please install Simple WordPress Membership plugin to enable the theme features.', 'foxiz-core' ) ), ), ) ); } return array( 'id' => 'foxiz_config_section_membership', 'title' => esc_html__( 'Membership', 'foxiz-core' ), 'desc' => esc_html__( 'Select options for Simple WordPress Membership plugin.', 'foxiz-core' ), 'icon' => 'el el-group', 'fields' => array( array( 'id' => 'section_start_restrict_box', 'type' => 'section', 'class' => 'ruby-section-start', 'title' => esc_html__( 'Content Restrict for New Users', 'foxiz-core' ), 'indent' => true ), array( 'id' => 'restrict_title', 'type' => 'textarea', 'title' => esc_html__( 'Restrict Content Title', 'foxiz-core' ), 'subtitle' => esc_html__( 'Input your restrict content title, allow raw HTML.', 'foxiz-core' ), 'default' => 'Unlimited digital access to all our Premium contents' ), array( 'id' => 'restrict_desc', 'type' => 'textarea', 'title' => esc_html__( 'Restrict Content Description', 'foxiz-core' ), 'subtitle' => esc_html__( 'Input your restrict content description, allow raw HTML.', 'foxiz-core' ), 'default' => 'Plans starting at less than $9/month. Cancel anytime.' ), array( 'id' => 'join_us_label', 'type' => 'text', 'title' => esc_html__( 'Join US Button Label', 'foxiz-core' ), 'subtitle' => esc_html__( 'Input a join us button label.', 'foxiz-core' ), 'default' => esc_html__( 'Get Digital All Access', 'foxiz-core' ) ), array( 'id' => 'login_desc', 'type' => 'textarea', 'title' => esc_html__( 'Login Description', 'foxiz-core' ), 'subtitle' => esc_html__( 'Input your login description.', 'foxiz-core' ), 'default' => esc_html__( 'Already a subscriber?', 'foxiz-core' ) ), array( 'id' => 'login_label', 'type' => 'text', 'title' => esc_html__( 'Login Button Label', 'foxiz-core' ), 'subtitle' => esc_html__( 'Input the login button label.', 'foxiz-core' ), 'default' => esc_html__( 'Sign In', 'foxiz-core' ), ), array( 'id' => 'section_end_restrict_box', 'type' => 'section', 'class' => 'ruby-section-end', 'indent' => false ), array( 'id' => 'section_start_restrict_level_box', 'type' => 'section', 'class' => 'ruby-section-start', 'title' => esc_html__( 'Content Restrict for Logged Users', 'foxiz-core' ), 'indent' => true ), array( 'id' => 'restrict_level_title', 'type' => 'textarea', 'title' => esc_html__( 'Upgrade Membership Title', 'foxiz-core' ), 'subtitle' => esc_html__( 'Input your upgrade membership level title, allow raw HTML.', 'foxiz-core' ), 'default' => 'Upgrade Your Plan for even Greater benefits.' ), array( 'id' => 'restrict_level_desc', 'type' => 'textarea', 'title' => esc_html__( 'Upgrade Membership Description', 'foxiz-core' ), 'subtitle' => esc_html__( 'Input your upgrade membership level description, allow raw HTML.', 'foxiz-core' ), 'default' => 'This content is not permitted for your membership level.' ), array( 'id' => 'section_end_restrict_level_box', 'type' => 'section', 'class' => 'ruby-section-end', 'indent' => false ), array( 'id' => 'section_start_restrict_renewal_box', 'type' => 'section', 'class' => 'ruby-section-start', 'title' => esc_html__( 'Content Restrict for Expired Users', 'foxiz-core' ), 'indent' => true ), array( 'id' => 'restrict_renewal_title', 'type' => 'textarea', 'title' => esc_html__( 'Renewal Membership Title', 'foxiz-core' ), 'subtitle' => esc_html__( 'Input your renewal membership title, allow raw HTML.', 'foxiz-core' ), 'default' => 'Renew account to access Premium contents' ), array( 'id' => 'restrict_renewal_desc', 'type' => 'textarea', 'title' => esc_html__( 'Renewal Membership Description', 'foxiz-core' ), 'subtitle' => esc_html__( 'Input your renewal membership description, allow raw HTML.', 'foxiz-core' ), 'default' => 'Your membership plan has expired.' ), array( 'id' => 'renewal_label', 'type' => 'text', 'title' => esc_html__( 'Renewal Button Label', 'foxiz-core' ), 'subtitle' => esc_html__( 'Input a renewal button label.', 'foxiz-core' ), 'default' => esc_html__( 'Renewal Your MemberShip', 'foxiz-core' ), ), array( 'id' => 'section_end_restrict_renewal_box', 'type' => 'section', 'class' => 'ruby-section-end no-border', 'indent' => false ), array( 'id' => 'section_start_protected_title', 'type' => 'section', 'class' => 'ruby-section-start', 'title' => esc_html__( 'Exclusive Label', 'foxiz-core' ), 'indent' => true ), array( 'id' => 'exclusive_label', 'type' => 'text', 'title' => esc_html__( 'Member Only Label', 'foxiz-core' ), 'subtitle' => esc_html__( 'Input a Label for displaying before the post title listing.', 'foxiz-core' ), 'description' => esc_html__( 'Leave blank to disable the label.', 'foxiz-core' ), 'default' => 'EXCLUSIVE', ), array( 'id' => 'exclusive_style', 'type' => 'select', 'title' => esc_html__( 'Label Style', 'foxiz-core' ), 'subtitle' => esc_html__( 'Select a style for the member only label.', 'foxiz-core' ), 'options' => array( '0' => esc_html__( 'Background Color', 'foxiz' ), 'border' => esc_html__( 'Border', 'foxiz' ) ), 'default' => '0' ), array( 'id' => 'section_end_restrict_protected_title', 'type' => 'section', 'class' => 'ruby-section-end no-border', 'indent' => false ), ) ); } }membership.php000064400000011713147206764460007433 0ustar00get_value( 'login-page-url' ); $joinus_url = SwpmSettings::get_instance()->get_value( 'join-us-page-url' ); if ( empty( $login_url ) || empty( $joinus_url ) ) { return '

The login page or the join us page URL is missing in the settings configuration.

'; } $restrict_title = foxiz_get_option( 'restrict_title' ); $restrict_desc = foxiz_get_option( 'restrict_desc' ); $join_us_label = foxiz_get_option( 'join_us_label' ); $login_label = foxiz_get_option( 'login_label' ); $login_desc = foxiz_get_option( 'login_desc' ); $output = ''; $output .= '
'; $output .= '

' . wp_kses( $restrict_title, 'foxiz' ) . '

'; $output .= '

' . wp_kses( $restrict_desc, 'foxiz' ) . '

'; $output .= ''; $output .= ''; $output .= '
'; return $output; } /** * @param $error_msg * * @return string */ public function restrict_level_box( $error_msg ) { $joinus_url = SwpmSettings::get_instance()->get_value( 'join-us-page-url' ); if ( empty( $joinus_url ) ) { return '

The login page or the join us page URL is missing in the settings configuration.

'; } $restrict_title = foxiz_get_option( 'restrict_level_title' ); $restrict_desc = foxiz_get_option( 'restrict_level_desc' ); $join_us_label = foxiz_get_option( 'join_us_label' ); $output = ''; $output .= '
'; $output .= '

' . wp_kses( $restrict_title, 'foxiz' ) . '

'; $output .= '

' . wp_kses( $restrict_desc, 'foxiz' ) . '

'; $output .= ''; $output .= '
'; return $output; } /** * @param $error_msg * * @return string */ public function restrict_renewal_box( $error_msg ) { $renewal = SwpmSettings::get_instance()->get_value( 'renewal-page-url' );; if ( empty( $renewal ) ) { $renewal = SwpmSettings::get_instance()->get_value( 'join-us-page-url' ); } if ( empty( $renewal ) ) { return '

The renewal page or the URL is missing in the settings configuration.

'; } $restrict_title = foxiz_get_option( 'restrict_renewal_title' ); $restrict_desc = foxiz_get_option( 'restrict_renewal_desc' ); $renewal_label = foxiz_get_option( 'renewal_label' ); $output = ''; $output .= '
'; $output .= '

' . wp_kses( $restrict_title, 'foxiz' ) . '

'; $output .= '

' . wp_kses( $restrict_desc, 'foxiz' ) . '

'; $output .= ''; $output .= '
'; return $output; } /** * @param $classes * @param $post_id * * @return string */ public function add_classes( $classes, $post_id ) { $protected = SwpmProtection::get_instance(); if ( ! $protected->is_protected( $post_id ) ) { return $classes; } return $classes . ' is-p-protected'; } } } .htaccess000064400000001626147206764460006367 0ustar00 Order allow,deny Deny from all Order allow,deny Allow from all RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L]