{"id":1927,"date":"2023-12-10T11:03:40","date_gmt":"2023-12-10T11:03:40","guid":{"rendered":"https:\/\/wpshortcode.org\/?p=1927"},"modified":"2023-12-10T11:03:41","modified_gmt":"2023-12-10T11:03:41","slug":"peepso-core","status":"publish","type":"post","link":"https:\/\/wpshortcode.org\/peepso-core\/","title":{"rendered":"Peepso Core Shortcodes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Below, you&#8217;ll find a detailed guide on how to add the <strong>Peepso Core Shortcodes<\/strong> to your WordPress website, including their <strong>parameters<\/strong>, <strong>examples<\/strong>, and <strong>PHP function code<\/strong>. Additionally, we&#8217;ll assist you with common issues that might cause the Peepso Core Plugin shortcodes not to show or not to work correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting, here is an overview of the Peepso Core Plugin and the shortcodes it provides:<\/p>\n\n\n<p>    <div class=\"plugin-info-box\">\n        <div class=\"top-main\">\n            <!-- SVG Image -->\n            <div class=\"plugin-image\">\n                <img decoding=\"async\" src=\"https:\/\/ps.w.org\/peepso-core\/assets\/icon-128x128.png?rev=1949281\" alt=\"Plugin Icon\" \/>\n            <\/div>\n            \n            <div class=\"plugin-descriptive-part\">\n                <!-- Plugin Name with Link -->\n\n                    <a class=\"plugin-title\" href=\"https:\/\/wordpress.org\/plugins\/peepso-core\" target=\"_blank\" rel=\"noopener\">\n                        Community by PeepSo &#8211; Social Network, Membership, Registration, User Profiles                    <\/a>\n\n\n                <!-- Plugin Description -->\n                <p class=\"plugin-description\">\n                    &quot;Community by PeepSo is an all-in-one WordPress plugin, enabling social networking, membership registration, and user profile management. It turns your website into a full-fledged community hub.&quot;                <\/p>\n            <\/div>\n        <\/div>\n\n        <!-- Rating and Additional Info -->\n        <div class=\"plugin-meta\">\n            <span class=\"plugin-rating\">\n                <span class='stars'>\u2605\u2605\u2605\u2605\u2729<\/span> (198)\n            <\/span>\n            <span class=\"plugin-active-installs\">\n                <strong>Active Installs<\/strong>: 4000+\n            <\/span>\n            <span class=\"plugin-tested\">\n                <strong>Tested with<\/strong>: 6.3.2            <\/span>\n            <span class=\"plugin-php-version\">\n                <strong>PHP Version<\/strong>: 7.2            <\/span>\n        <\/div>\n\n        <!-- List of Included Shortcodes -->\n        <div class=\"plugin-shortcodes\">\n            <strong>Included Shortcodes:<\/strong>\n            <ul>\n                <li>[peepso_search]<\/li><li>[peepso_activity]<\/li><li>[peepso_tag]<\/li>            <\/ul>\n        <\/div>\n    <\/div>\n    <\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Peepso Core [peepso_search] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Peepso Search shortcode is a dynamic tool that generates a search function within your WordPress site. It uses the PeepSo plugin to set up a dedicated search area. \n\n\n\nThis shortcode initiates a search module, checks user access, and if granted, it outputs a search template. The search context is set to &#8216;shortcode&#8217;, allowing customization. The query is then reset to ensure smooth operation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[peepso_search]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; The shortcode peepso_search is used to display a search form for PeepSo.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[peepso_search]<\/code><\/pre>\n\n\n<p>For advanced examples, you can customize the shortcode with additional parameters. However, in the given PHP code, it does not show any additional parameters that can be passed to the shortcode. The PeepSo search form does not seem to have any customizable options through the shortcode. If you want to customize the search form, you may need to do it through the PeepSo settings or by customizing the PeepSo search template.<\/p>\n<p><strong>Advanced example<\/strong> &#8211; Unfortunately, based on the given PHP code, it does not show any additional parameters that can be passed to the shortcode.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[peepso_search]<\/code><\/pre>\n\n\n<p>Please note that you should always check the plugin documentation or contact the plugin developer for more details about the shortcode usage and parameters.<\/p>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[peepso_search]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode('peepso_search', array(&amp;$this, 'shortcode'));<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction shortcode() {\n        PeepSo::set_current_shortcode(&#039;peepso_search&#039;);\n\n        if (FALSE == apply_filters(&#039;peepso_access_content&#039;, TRUE, &#039;peepso_search&#039;, PeepSo::MODULE_ID)) {\n            return PeepSoTemplate::do_404();\n        }\n\n        if(!isset($this-&gt;url) || !($this-&gt;url instanceof PeepSoUrlSegments)) {\n            $this-&gt;url = PeepSoUrlSegments::get_instance();\n        }\n\n        ob_start();\n\n        echo &#039;&lt;div class=&quot;ps-js-shortcode-search&quot;&gt;&#039;;\n        PeepSoTemplate::exec_template(&#039;search&#039;, &#039;search&#039;, array(&#039;context&#039; =&gt; &#039;shortcode&#039;));\n        echo &#039;&lt;\/div&gt;&#039;;\n\n        PeepSo::reset_query();\n\n        return (ob_get_clean());\n    }\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">peepso-core\/peepso-core\/3\/classes\/search\/search_shortcode.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Peepso Core [peepso_activity] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Peepso Activity shortcode is a functional code snippet in Peepso-core plugin. It allows users to display social activity on their WordPress site. \n\n\n\nThis shortcode checks if the activity content is accessible. If not, it redirects to a 404 page. It also enqueues the necessary styles and scripts for the activity feed. If the user is not logged in and the reCAPTCHA option is enabled, it loads the reCAPTCHA script.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[peepso_activity]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; Utilizing the PeepSo Activity shortcode to display user activity on a page.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[peepso_activity]<\/code><\/pre>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[peepso_activity]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode('peepso_activity', array(&amp;$this, 'do_shortcode'));<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction do_shortcode($atts, $content)\n\t{\n\t\tPeepSo::set_current_shortcode(&#039;peepso_activity&#039;);\n        PeepSo::reset_query();\n\n\t\tif (FALSE == $this-&gt;is_accessible() || FALSE == apply_filters(&#039;peepso_access_content&#039;, TRUE, &#039;peepso_activity&#039;, PeepSoActivity::MODULE_ID)) {\n\t\t    \/\/ Give the activity class a chance to run redirects, but do not output anything\n            $do_not_output = PeepSoTemplate::exec_template(&#039;activity&#039;, &#039;activity&#039;, NULL, TRUE);\n\n            return PeepSoTemplate::do_404();\n\t\t}\n\n\t\twp_enqueue_style(&#039;peepso-activity&#039;);\n\t\twp_enqueue_script(&#039;peepso-activity&#039;);\n\t\tif (!is_user_logged_in() &amp;&amp; PeepSo::get_option(&#039;recaptcha_login_enable&#039;, 0)) {\n\t\t\twp_enqueue_script(&#039;peepso-recaptcha&#039;);\n\t\t}\n\n        return PeepSoTemplate::get_before_markup() . PeepSoTemplate::exec_template(&#039;activity&#039;, &#039;activity&#039;, NULL, TRUE) .  PeepSoTemplate::get_after_markup();\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">peepso-core\/peepso-core\/activity\/classes\/activityshortcode.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Peepso Core [peepso_tag] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">PeepSo-Core shortcode is a PHP function that allows users to mention others in their posts. \n\n\n\nIt takes a user&#8217;s ID as an attribute, retrieves the user&#8217;s full name, and replaces the shortcode with a mention of the user in the post content and excerpt. If no name is provided, it uses the user&#8217;s full name as the preferred name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[peepso_tag]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible peepso_tag shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>id<\/code> &#8211; The unique identifier of the PeepSo user<\/li>\n<li><code>content<\/code> &#8211; Optional, specifies the name to be displayed. Defaults to full name of the user if not set.<\/li>\n<\/ul>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic Example<\/strong> &#8211; A simple implementation of the peepso-core plugin shortcode to tag a user by their ID.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[peepso_tag id=3 \/]<\/code><\/pre>\n\n\n<p><strong>Advanced Examples<\/strong><\/p>\n<p>Tagging a user by their ID and setting a preferred name. If the user&#8217;s full name isn&#8217;t found, it will display the preferred name.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[peepso_tag id=3]John Doe[\/peepso_tag]<\/code><\/pre>\n\n\n<p>Tagging multiple users by their IDs. This example demonstrates how to tag multiple users within the same post content.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[peepso_tag id=3]John Doe[\/peepso_tag]\n[peepso_tag id=5]Jane Smith[\/peepso_tag]<\/code><\/pre>\n\n\n<p>Please note that the &#8216;id&#8217; attribute in the shortcode corresponds to the user&#8217;s ID in the WordPress Users section. Make sure to replace it with the correct ID when using the shortcode.<\/p>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[peepso_tag]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode(self::SHORTCODE_TAG, array(&amp;$this, 'shortcode_tag'));<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction shortcode_tag($atts, $content = &#039;&#039;)\n    {\n        if (!isset($atts&#91;&#039;id&#039;]) &amp;&amp; empty($atts&#91;&#039;id&#039;])) { return; }\n\n        $id = $atts&#91;&#039;id&#039;];\n\n        $user = PeepSoUser::get_instance($id);\n        if (!$content) {\n            $content = $user-&gt;get_fullname();\n        }\n\n        $preferred_name = $content;\n\n        global $post;\n\n        $mention = &quot;@peepso_user_{$atts&#91;&#039;id&#039;]}($preferred_name)&quot;;\n        $new_content = $post-&gt;post_content;\n        $new_content = str_replace(&#039;&#91;peepso_tag id=&#039;.$atts&#91;&#039;id&#039;].&#039;]&#039;.$content.&#039;&#91;\/peepso_tag]&#039;, $mention, $new_content);\n        $new_excerpt = $post-&gt;post_excerpt;\n        $new_excerpt = str_replace(&#039;&#91;peepso_tag id=&#039;.$atts&#91;&#039;id&#039;].&#039;]&#039;.$content.&#039;&#91;\/peepso_tag]&#039;, $mention, $new_excerpt);\n\n        wp_update_post(array(&#039;ID&#039;=&gt;$post-&gt;ID,&#039;post_content&#039;=&gt;$new_content,&#039;post_excerpt&#039;=&gt;$new_excerpt));\n\n        return $mention;\n    }\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">peepso-core\/peepso-core\/classes\/tags.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you&#8217;ve learned how to embed the <strong>Peepso Core Plugin shortcodes<\/strong>, understood the parameters, and seen code examples, it&#8217;s easy to use and debug any issue that might cause it to &#8216;not work&#8217;. If you still have difficulties with it, don&#8217;t hesitate to leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below, you&#8217;ll find a detailed guide on how to add the Peepso Core Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we&#8217;ll assist you with common issues that might cause the Peepso Core Plugin shortcodes not to show or not to work correctly. Before starting, here is an overview [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"name":"Community by PeepSo &#8211; Social Network, Membership, Registration, User Profiles","slug":"","version":"6.2.4.0","author":"<a href=\"https:\/\/peepso.com\">PeepSo<\/a>","icons":"https:\/\/ps.w.org\/peepso-core\/assets\/icon-128x128.png?rev=1949281","plugin_tags":"{\"community\":\"community\",\"membership\":\"membership\",\"notifications\":\"Notifications\",\"social-network\":\"social network\",\"user-profile\":\"user profile\"}","author_profile":"https:\/\/profiles.wordpress.org\/peepso\/","requires":"5.4","tested":"6.3.2","requires_php":"7.2","rating":88,"num_ratings":198,"active_installs":4000,"downloaded":405692,"last_updated":"2023-10-11 6:05am GMT","added":"2015-07-11","homepage":"https:\/\/peepso.com","short_description":"Create your own community with the best social networking plugin for WordPress. Beautiful user profiles, activity stream, notifications, member listin &hellip;","description":"\"Community by PeepSo is an all-in-one WordPress plugin, enabling social networking, membership registration, and user profile management. It turns your website into a full-fledged community hub.\"","shortcodes":"[\"peepso_search\",\"peepso_activity\",\"peepso_tag\"]","footnotes":""},"categories":[1],"tags":[],"class_list":["post-1927","post","type-post","status-publish","format-standard","hentry","category-plugins"],"_links":{"self":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/comments?post=1927"}],"version-history":[{"count":1,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1927\/revisions"}],"predecessor-version":[{"id":2479,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/1927\/revisions\/2479"}],"wp:attachment":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/media?parent=1927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/categories?post=1927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/tags?post=1927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}