/** * Loads the admin javascript and css files. * * @since 2.5.1 * @deprecated 3.0.6 Replaced by wpmem_admin_enqueue_scripts(). */ function wpmem_load_admin_js() { wpmem_write_log("wpmem_load_admin_js() is deprecated as of WP-Members 3.0.6"); // Queue up admin ajax and styles. wp_enqueue_script('wpmem-admin-js', WPMEM_DIR . 'admin/js/admin.js', '', WPMEM_VERSION); wp_enqueue_style('wpmem-admin-css', WPMEM_DIR . 'admin/css/admin.css', '', WPMEM_VERSION); }
/** * Displays the sidebar. * * This function is a wrapper for wpmem_do_sidebar(). * * @since 2.0.0 * @deprecated Unknown */ function wpmem_inc_sidebar() { wpmem_write_log("WP-Members function wpmem_inc_sidebar() is deprecated. No alternative function exists"); /** * Load the sidebar functions. */ include_once WPMEM_PATH . 'inc/sidebar.php'; // Render the sidebar. wpmem_do_sidebar(); }
/** * Executes various shortcodes. * * This function executes shortcodes for pages (settings, register, login, user-list, * and tos pages), as well as login status and field attributes when the wp-members tag * is used. Also executes shortcodes for login status with the wpmem_logged_in tags * and fields when the wpmem_field tags are used. * * @since 2.4.0 * @deprecated 3.1.2 * * @global object $wpmem The WP_Members object. * * @param array $attr page|url|status|msg|field|id * @param string $content * @param string $tag * @return string Returns the result of wpmem_do_sc_pages|wpmem_list_users|wpmem_sc_expmessage|$content. */ function wpmem_shortcode($attr, $content = null, $tag = 'wp-members') { $error = "wpmem_shortcode() is deprecated as of WP-Members 3.1.2. The [wp-members] shortcode tag should be replaced. "; $error .= 'See replacement shortcodes: http://rkt.bz/logsc '; $error .= "post ID: " . get_the_ID() . " "; $error .= "page url: " . wpmem_current_url(); wpmem_write_log($error); global $wpmem; // Set all default attributes to false. $defaults = array('page' => false, 'redirect_to' => null, 'url' => false, 'status' => false, 'msg' => false, 'field' => false, 'id' => false, 'underscores' => 'off'); // Merge defaults with $attr. $atts = shortcode_atts($defaults, $attr, $tag); // Handles the 'page' attribute. if ($atts['page']) { if ($atts['page'] == 'user-list') { if (function_exists('wpmem_list_users')) { $content = do_shortcode(wpmem_list_users($attr, $content)); } } elseif ($atts['page'] == 'tos') { return $atts['url']; } else { $content = do_shortcode(wpmem_do_sc_pages($atts, $content, $tag)); } // Resolve any texturize issues. if (strstr($content, '[wpmem_txt]')) { // Fixes the wptexturize. remove_filter('the_content', 'wpautop'); remove_filter('the_content', 'wptexturize'); add_filter('the_content', 'wpmem_texturize', 999); } return $content; } // Handles the 'status' attribute. if ($atts['status'] || $tag == 'wpmem_logged_in') { return wpmem_sc_logged_in($atts, $content, $tag); } // Handles the 'field' attribute. if ($atts['field'] || $tag == 'wpmem_field') { return wpmem_sc_fields($atts, $content, $tag); } }
/** * Tests $content for the presence of the [wp-members] shortcode. * * @since 2.6.0 * @deprecated 3.1.2 Use has_shortcode() instead. * * @global string $shortcode_tags * @return bool * * @example http://codex.wordpress.org/Function_Reference/get_shortcode_regex */ function wpmem_test_shortcode($content, $tag) { wpmem_write_log("wpmem_test_shortcode() is deprecated as of WP-Members 3.1.2. Use has_shortcode() instead."); global $shortcode_tags; if (array_key_exists($tag, $shortcode_tags)) { preg_match_all('/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER); if (empty($matches)) { return false; } foreach ($matches as $shortcode) { if ($tag === $shortcode[2]) { return true; } } } return false; }