• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Store
    • Cart
    • Checkout
  • Blog
    • Basics [Free]
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Contact
  • Sign In
  • Show Search
Hide Search
Home » Plugins » WP-Members » Documentation » API Functions

API Functions

WP-Members has several functions that can be used for customizing how your install works and operates.  These can be used in conjunction with the various filter and action hooks as well as shortcodes.

Form Pages and URLs

  • wpmem_redirect_to_login() – redirects content to the login page (if one is set).
  • wpmem_is_blocked() – checks if content is blocked or not.
  • wpmem_login_url() – returns the login page URLas set in the plugin’s settings.
  • wpmem_register_url() – returns the register page URLas set in the plugin’s settings.
  • wpmem_profile_url() – returns the user profile page URLas set in the plugin’s settings.
  • wpmem_user_pages() – returns an array of login, register, and profile page urls.
  • wpmem_current_url() – returns the current page URL.
  • wpmem_current_post_id() – returns the post ID for the current URL.
  • wpmem_is_reg_page() – checks the value of the wpmem_reg_page hidden field to validate what page the registration is occurring on.

Forms

  • wpmem_form_field() – creates a form field.
  • wpmem_form_label() – creates a field label.
  • wpmem_fields() – gets the form fields settings array.

Dialogs and Emails

  • wpmem_gettext() – returns a requested string from the get_text function.
  • wpmem_display_message() – displays a requested dialog.
  • wpmem_use_custom_dialog() – uses a custom message dialog.
  • wpmem_add_custom_dialog() – adds a custom message dialog.
  • wpmem_add_custom_email() – adds a custom email message.
  • wpmem_login_status() – displays a user’s login status.
  • wpmem_loginout() – creates a login/logout link.
  • wpmem_mail_from()
  • wpmem_mail_from_name()
  • wpmem_email_to_user()
  • wpmem_notify_admin()

User Functions

  • wpmem_user_has_role() – checks if a user has a specific role.
  • wpmem_user_has_meta() – checks if a user has a given meta value.
  • wpmem_is_user_activated() – checks if the current or requested user is activated.
  • wpmem_user_data() – returns an array of the user’s registration data.
  • wpmem_update_user_role() – updates a user’s role.
  • wpmem_user_has_access() – checks if a user has valid access criteria.
  • wpmem_set_user_product() – assigns product access to a user.
  • wpmem_remove_user_product() – removes product access from a user.
  • wpmem_set_as_logged_in() – sets a user as logged in.
  • wpmem_create_membership_number() – Creates a membership number.

Utilities

  • wpmem_get() – utility to check posted variables and query strings.
  • wpmem_securify() – filters the main content variable.
  • wpmem_do_excerpt()
  • wpmem_get_excluded_meta()
  • wpmem_use_ssl() – checks if ssl is being used and returns https:// or http:// accordingly.
  • wpmem_force_ssl() – forces a given URL to use ssl (https://).
  • wpmem_write_log()
  • wpmem_array_insert() – inserts array items at specific point in an array.
  • wpmem_load_dropins() – loads dropin code snippets.
  • wpmem_format_date() – formats a given date.
  • wpmem_do_shortcode() – executes a given shortcode (any shortcode, not just WP-Members) without running the full shortcode regex.

Extension API Functions

MailChimp Integration

  • wpmem_mc_get_list_member() – retreives subscriber data from the MailChimp API.
  • wpmem_mc_process_user() – subscribe, update, unsubscribe, or delete a user from the list.
  • Getting Started
  • Recommended WordPress® Settings
  • Plugin Settings
    • Options
    • Fields
    • Dialogs
    • Emails
  • Managing Content
    • Restricting Posts
    • Restricting Pages
    • Show Excerpts
    • Custom Post Types
  • Managing Users
  • Registration
    • Choosing Fields
    • Create a Registration Page
    • Moderating Registration
    • Using CAPTCHA
    • Turn Off Registration
  • User Profile
  • Membership Products
  • Menus
    • Logged In Menus
    • Login/Logout Menu Link
  • Customizing Emails
    • Email Address
    • Email Content
    • Email Format
    • Email Shortcodes
    • Email Troubleshooting
  • Customizing Forms
    • Create a Custom Stylesheet
    • Using the WordPress Customizer
    • Login Form HTML
    • Registration Form HTML
    • Widget Login Form HTML
  • Shortcodes
    • Pages and Forms
    • Login Status
    • User Fields
    • Email
    • Other Shortcodes
  • API Functions
  • Filter and Action Hooks
  • WP-Members FAQs
  • Demo Videos

Ready to get started?

Join Today!

© 2019 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Refund Policy