{"id":466,"date":"2023-10-21T06:43:35","date_gmt":"2023-10-21T06:43:35","guid":{"rendered":"https:\/\/wpshortcode.org\/?p=466"},"modified":"2023-10-21T06:43:36","modified_gmt":"2023-10-21T06:43:36","slug":"embedpress","status":"publish","type":"post","link":"https:\/\/wpshortcode.org\/embedpress\/","title":{"rendered":"Embedpress Shortcodes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Below, you&#8217;ll find a detailed guide on how to add the <strong>Embedpress 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 Embedpress 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 Embedpress 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\/embedpress\/assets\/icon-128x128.gif?rev=2775365\" 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\/embedpress\" target=\"_blank\" rel=\"noopener\">\n                        EmbedPress &#8211; Embed PDF, YouTube, Google Docs, Vimeo, Wistia Videos, Audios, Maps &amp; Any Documents in Gutenberg &amp; Elementor                    <\/a>\n\n\n                <!-- Plugin Description -->\n                <p class=\"plugin-description\">\n                    &quot;EmbedPress is a dynamic plugin that allows easy embedding of PDFs, YouTube, Google Docs, Vimeo, Wistia Videos, Audios, Maps &amp; more in Gutenberg &amp; Elementor on your WordPress site.&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\u2606<\/span> (171)\n            <\/span>\n            <span class=\"plugin-active-installs\">\n                <strong>Active Installs<\/strong>: 80000+\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>: 5.6            <\/span>\n        <\/div>\n\n        <!-- List of Included Shortcodes -->\n        <div class=\"plugin-shortcodes\">\n            <strong>Included Shortcodes:<\/strong>\n            <ul>\n                <li>[EMBEDPRESS_SHORTCODE]<\/li><li>[embedpress_pdf]<\/li><li>[embedpress_calendar]<\/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\">Embedpress [EMBEDPRESS_SHORTCODE] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The EmbedPress shortcode is a powerful tool that dynamically resizes embedded content. It uses plugin settings to define default width and height while also allowing for custom dimensions. \n\n \n\nThis shortcode also includes a &#8216;powered_by&#8217; attribute, which can be toggled on or off based on the plugin settings. It then parses the content and returns the embedded object.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[EMBEDPRESS_SHORTCODE]<\/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 EMBEDPRESS_SHORTCODE shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>width<\/code> &#8211; sets the width of the embedded content<\/li>\n<li><code>height<\/code> &#8211; sets the height of the embedded content<\/li>\n<li><code>powered_by<\/code> &#8211; displays a &#8216;powered by&#8217; message if set to &#8216;yes&#8217;<\/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; In the following example, we are using the EmbedPress shortcode to embed a content. The content to be embedded is passed as a parameter within the shortcode.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[EMBEDPRESS_SHORTCODE url=\"https:\/\/www.youtube.com\/watch?v=dQw4w9WgXcQ\" \/]<\/code><\/pre>\n\n\n<p><strong>Advanced examples<\/strong><\/p>\n<p>In this example, we are using the EmbedPress shortcode to embed a content, but with additional parameters. Here, we are specifying the width and height of the embedded content. If the global embed resize setting is enabled in the plugin, these width and height values will override the default values set in the plugin settings.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[EMBEDPRESS_SHORTCODE url=\"https:\/\/www.youtube.com\/watch?v=dQw4w9WgXcQ\" width=\"500\" height=\"300\" \/]<\/code><\/pre>\n\n\n<p>In the next example, we are using the EmbedPress shortcode to embed a content, but with an additional &#8216;powered_by&#8217; parameter. This parameter will display a &#8216;powered by EmbedPress&#8217; message at the bottom of the embedded content, if it is set to &#8216;yes&#8217;.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[EMBEDPRESS_SHORTCODE url=\"https:\/\/www.youtube.com\/watch?v=dQw4w9WgXcQ\" powered_by=\"yes\" \/]<\/code><\/pre>\n\n\n<p>Remember, these shortcodes can be used in any post or page within your WordPress site to embed content using the EmbedPress plugin.<\/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>[EMBEDPRESS_SHORTCODE]<\/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(EMBEDPRESS_SHORTCODE, ['\\\\EmbedPress\\\\Shortcode', '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($attributes = &#91;], $subject = null)\n    {\n        $plgSettings = Core::getSettings();\n\n\n        $default = &#91;];\n        if ($plgSettings-&gt;enableGlobalEmbedResize) {\n            $default = &#91;\n                &#039;width&#039;  =&gt; $plgSettings-&gt;enableEmbedResizeWidth,\n                &#039;height&#039; =&gt; $plgSettings-&gt;enableEmbedResizeHeight,\n                &#039;powered_by&#039; =&gt; !empty($plgSettings-&gt;embedpress_document_powered_by) ? $plgSettings-&gt;embedpress_document_powered_by : &#039;no&#039;,\n            ];\n        }\n        $attributes = wp_parse_args($attributes, $default);\n        $embed = self::parseContent($subject, true, $attributes);\n\n        return is_object($embed) ? $embed-&gt;embed : $embed;\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\">embedpress\/embedpress\/EmbedPress\/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\">Embedpress [embedpress_pdf] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The EmbedPress PDF shortcode enables the embedding of PDF files in WordPress posts. It adjusts the width and height based on plugin settings and supports custom color themes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[embedpress_pdf]<\/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 embedpress_pdf shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>width<\/code> &#8211; Defines the width of the embedded PDF.<\/li>\n<li><code>height<\/code> &#8211; Determines the height of the embedded PDF.<\/li>\n<li><code>powered_by<\/code> &#8211; If set to &#8216;yes&#8217;, shows &#8216;Powered by EmbedPress&#8217; text.<\/li>\n<li><code>theme_mode<\/code> &#8211; If set to &#8216;custom&#8217;, uses custom color settings.<\/li>\n<li><code>custom_color<\/code> &#8211; Sets the color of the PDF embed if theme_mode is &#8216;custom&#8217;.<\/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; Display a PDF file using the EmbedPress PDF shortcode.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[embedpress_pdf url=\"https:\/\/example.com\/sample.pdf\" \/]<\/code><\/pre>\n\n\n<p>Here, we have used the &#8217;embedpress_pdf&#8217; shortcode to embed a PDF document from a specified URL.<\/p>\n<p><strong>Advanced examples<\/strong><\/p>\n<p>Embedding a PDF file with custom width and height:<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[embedpress_pdf url=\"https:\/\/example.com\/sample.pdf\" width=\"600\" height=\"800\" \/]<\/code><\/pre>\n\n\n<p>In this example, we have used the &#8216;width&#8217; and &#8216;height&#8217; attributes to specify the dimensions of the embedded PDF document.<\/p>\n<p>Embedding a PDF file with a custom color theme and a &#8216;Powered by EmbedPress&#8217; footer:<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[embedpress_pdf url=\"https:\/\/example.com\/sample.pdf\" theme_mode=\"custom\" custom_color=\"#ff0000\" powered_by=\"yes\" \/]<\/code><\/pre>\n\n\n<p>This example demonstrates the use of &#8216;theme_mode&#8217;, &#8216;custom_color&#8217;, and &#8216;powered_by&#8217; attributes. The &#8216;theme_mode&#8217; attribute is set to &#8216;custom&#8217; to allow the use of a custom color scheme, defined by the &#8216;custom_color&#8217; attribute. The &#8216;powered_by&#8217; attribute is set to &#8216;yes&#8217; to display a &#8216;Powered by EmbedPress&#8217; footer below the embedded document.<\/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>[embedpress_pdf]<\/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('embedpress_pdf', ['\\\\EmbedPress\\\\Shortcode', 'do_shortcode_pdf']);<\/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_pdf($attributes = &#91;], $subject = null)\n    {\n        $plgSettings = Core::getSettings();\n\n        $default = &#91;\n            &#039;width&#039;  =&gt; $plgSettings-&gt;enableEmbedResizeWidth,\n            &#039;height&#039; =&gt; $plgSettings-&gt;enableEmbedResizeHeight, \n            &#039;powered_by&#039; =&gt; !empty($plgSettings-&gt;embedpress_document_powered_by) ? $plgSettings-&gt;embedpress_document_powered_by : &#039;no&#039;,\n        ];\n\n        if(!empty($plgSettings-&gt;pdf_custom_color_settings)){\n             $default&#91;&#039;theme_mode&#039;] = &#039;custom&#039;;\n        }\n        if(isset($default&#91;&#039;theme_mode&#039;]) &amp;&amp; $default&#91;&#039;theme_mode&#039;] == &#039;custom&#039; ){\n            $default&#91;&#039;custom_color&#039;] = $plgSettings-&gt;custom_color;\n        }\n\n        $attributes = wp_parse_args($attributes, $default);\n\n        $url = preg_replace(\n            &#039;\/(\\&#91;&#039; . EMBEDPRESS_SHORTCODE . &#039;(?:\\]|.+?\\])|\\&#91;\\\/&#039; . EMBEDPRESS_SHORTCODE . &#039;\\])\/i&#039;,\n            &quot;&quot;,\n            $subject\n        );\n\n        ob_start();\n\n        $id = &#039;embedpress-pdf-shortcode&#039;;\n        $dimension = &quot;width: {$attributes&#91;&#039;width&#039;]}px;height: {$attributes&#91;&#039;height&#039;]}px&quot;;\n        ?&gt;\n            &lt;div class=&quot;embedpress-document-embed ose-document &lt;?php echo &#039;ep-doc-&#039; . md5($id); ?&gt;&quot; style=&quot;&lt;?php echo esc_attr($dimension); ?&gt;; max-width:100%; display: block&quot;&gt;\n                &lt;?php if ($url != &#039;&#039;) {\n                            if (self::is_pdf($url) &amp;&amp; !self::is_external_url($url)) {\n                                $renderer = Helper::get_pdf_renderer();\n                                $src = $renderer . ((strpos($renderer, &#039;?&#039;) == false) ? &#039;?&#039; : &#039;&amp;&#039;) . &#039;file=&#039; . urlencode($url).self::getParamData($attributes);\n                                ?&gt;\n                        &lt;iframe title=&quot;&lt;?php echo esc_attr(Helper::get_file_title($url)); ?&gt;&quot; allowfullscreen=&quot;true&quot; mozallowfullscreen=&quot;true&quot; webkitallowfullscreen=&quot;true&quot; title=&quot;&quot; style=&quot;&lt;?php echo esc_attr($dimension); ?&gt;; max-width:100%; display: inline-block&quot; data-emsrc=&quot;&lt;?php echo esc_attr($url); ?&gt;&quot; data-emid=&quot;&lt;?php echo esc_attr($id); ?&gt;&quot; class=&quot;embedpress-embed-document-pdf &lt;?php echo esc_attr($id); ?&gt;&quot; src=&quot;&lt;?php echo esc_attr($src); ?&gt;&quot; frameborder=&quot;0&quot;&gt;&lt;\/iframe&gt;\n                    &lt;?php\n\n                                } else {\n                                    ?&gt;\n                        &lt;div&gt;\n                            &lt;iframe title=&quot;&lt;?php echo esc_attr(Helper::get_file_title($url)); ?&gt;&quot; allowfullscreen=&quot;true&quot; mozallowfullscreen=&quot;true&quot; webkitallowfullscreen=&quot;true&quot; style=&quot;&lt;?php echo esc_attr($dimension); ?&gt;; max-width:100%;&quot; src=&quot;&lt;?php echo esc_url($url); ?&gt;&quot; data-emsrc=&quot;&lt;?php echo esc_attr($url); ?&gt;&quot; data-emid=&quot;&lt;?php echo esc_attr($id); ?&gt;&quot; class=&quot;embedpress-embed-document-pdf &lt;?php echo esc_attr($id); ?&gt;&quot;&gt;&lt;\/iframe&gt;\n                        &lt;\/div&gt;\n\n                &lt;?php\n               \n                            }\n                            \n                            if (!empty($attributes&#91;&#039;powered_by&#039;]) &amp;&amp; $attributes&#91;&#039;powered_by&#039;] === &#039;yes&#039;) {\n                                printf(&#039;&lt;p class=&quot;embedpress-el-powered&quot;&gt;%s&lt;\/p&gt;&#039;, __(&#039;Powered By EmbedPress&#039;, &#039;embedpress&#039;));\n                            }\n                        }\n                        ?&gt;\n            &lt;\/div&gt;\n\n    &lt;?php\n\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\">embedpress\/embedpress\/EmbedPress\/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\">Embedpress [embedpress_calendar] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The EmbedPress Calendar shortcode is a powerful tool that allows you to embed a highly customizable calendar into your WordPress site. \n\n\n\nThis shortcode enqueues various styles and scripts, setting up the necessary environment for the calendar. It accepts a range of attributes, enabling users to customize the calendar&#8217;s appearance and functionality. \n\nThe attributes control elements such as event pop-ups, event descriptions, event locations, and more. The shortcode also handles calendar IDs and unchecked calendar IDs, allowing for further customization. The final output is a fully functional, customizable calendar embedded into your page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[embedpress_calendar]<\/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 embedpress_calendar shortcode parameters and attributes:<\/p>\n\n\n<ul>\n<li><code>public<\/code> &#8211; Skipped and not included in the shortcode output.<\/li>\n<li><code>filter<\/code> &#8211; Controls the position of the filter, &#8216;top&#8217; by default.<\/li>\n<li><code>eventpopup<\/code> &#8211; Determines if the event popup should be displayed.<\/li>\n<li><code>eventlink<\/code> &#8211; Determines if the event link should be displayed.<\/li>\n<li><code>hidepassed<\/code> &#8211; Determines if past events should be hidden.<\/li>\n<li><code>hidefuture<\/code> &#8211; Determines if future events should be hidden.<\/li>\n<li><code>eventdescription<\/code> &#8211; Determines if the event description should be displayed.<\/li>\n<li><code>eventlocation<\/code> &#8211; Determines if the event location should be displayed.<\/li>\n<li><code>eventattendees<\/code> &#8211; Determines if the event attendees should be displayed.<\/li>\n<li><code>eventattachments<\/code> &#8211; Determines if the event attachments should be displayed.<\/li>\n<li><code>eventcreator<\/code> &#8211; Determines if the event creator should be displayed.<\/li>\n<li><code>eventcalendarname<\/code> &#8211; Determines if the name of the event calendar should be displayed.<\/li>\n<li><code>calendarids<\/code> &#8211; Comma separated string of calendar ID&#8217;s to be displayed.<\/li>\n<li><code>uncheckedcalendarids<\/code> &#8211; Comma separated string of calendar ID&#8217;s not to be displayed.<\/li>\n<li><code>fullcalendarconfig<\/code> &#8211; A JSON string that configures the FullCalendar.<\/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; Embed a default calendar on your page using the &#8217;embedpress_calendar&#8217; shortcode.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[embedpress_calendar \/]<\/code><\/pre>\n\n\n<p>Advanced examples:<\/p>\n<p>Display calendar with a specific configuration, hiding passed events and showing future events.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[embedpress_calendar hidepassed=true hidefuture=false \/]<\/code><\/pre>\n\n\n<p>Customize calendar to show event popup, event link, event description, and event location.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[embedpress_calendar eventpopup=true eventlink=true eventdescription=true eventlocation=true \/]<\/code><\/pre>\n\n\n<p>Display specific calendars by specifying their ids.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[embedpress_calendar calendarids=\"1,2,3\" \/]<\/code><\/pre>\n\n\n<p>Display a calendar with a custom configuration, using JSON format for the &#8216;fullcalendarconfig&#8217; attribute.<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[embedpress_calendar fullcalendarconfig='{\"header\": {\"left\": \"prev,next today\", \"center\": \"title\", \"right\": \"dayGridMonth,timeGridWeek,listWeek\"}}' \/]<\/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>[embedpress_calendar]<\/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( 'embedpress_calendar', [Embedpress_Google_Helper::class, '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($atts = &#91;], $content = null) {\n\n\t\t\/\/ When we have no attributes, $atts is an empty string\n\t\tif (!is_array($atts)) {\n\t\t\t$atts = &#91;];\n\t\t}\n\t\twp_enqueue_style(&#039;dashicons&#039;);\n\t\twp_enqueue_style( &#039;fullcalendar&#039;);\n\t\twp_enqueue_style( &#039;fullcalendar_daygrid&#039;);\n\t\twp_enqueue_style( &#039;fullcalendar_timegrid&#039;);\n\t\twp_enqueue_style( &#039;fullcalendar_list&#039;);\n\t\twp_enqueue_style( &#039;epgc&#039;);\n\t\twp_enqueue_style( &#039;tippy_light&#039;);\n\n\n\t\twp_enqueue_script(&#039;popper&#039;);\n\t\twp_enqueue_script(&#039;tippy&#039;);\n\t\twp_enqueue_script(&#039;my_moment&#039;);\n\t\twp_enqueue_script(&#039;my_moment_timezone&#039;);\n\t\twp_enqueue_script(&#039;fullcalendar&#039;);\n\t\twp_enqueue_script(&#039;fullcalendar_moment&#039;);\n\t\twp_enqueue_script(&#039;fullcalendar_moment_timezone&#039;);\n\t\twp_enqueue_script(&#039;fullcalendar_daygrid&#039;);\n\t\twp_enqueue_script(&#039;fullcalendar_timegrid&#039;);\n\t\twp_enqueue_script(&#039;fullcalendar_list&#039;);\n\t\twp_enqueue_script(&#039;fullcalendar_locales&#039;);\n\t\twp_enqueue_script(&#039;epgc&#039;);\n\t\t$defaultConfig = &#91;\n\t\t\t&#039;header&#039; =&gt; &#91;\n\t\t\t\t&#039;left&#039; =&gt; &#039;prev,next today&#039;,\n\t\t\t\t&#039;center&#039; =&gt; &#039;title&#039;,\n\t\t\t\t&#039;right&#039; =&gt; &#039;dayGridMonth,timeGridWeek,listWeek&#039;\n\t\t\t]\n\t\t];\n\t\t$userConfig = $defaultConfig; \/\/ copy\n\t\t$userFilter = &#039;top&#039;;\n\t\t$userEventPopup = &#039;true&#039;;\n\t\t$userEventLink = &#039;true&#039;;\n\t\t$userHidePassed = &#039;false&#039;;\n\t\t$userHideFuture = &#039;false&#039;;\n\t\t$userEventDescription = &#039;true&#039;;\n\t\t$userEventLocation = &#039;true&#039;;\n\t\t$userEventAttendees = &#039;false&#039;;\n\t\t$userEventAttachments = &#039;false&#039;;\n\t\t$userEventCreator = &#039;false&#039;;\n\t\t$userEventCalendarname = &#039;false&#039;;\n\t\t$calendarIds = &#039;&#039;;\n\t\t$uncheckedCalendarIds = &#039;&#039;; \/\/ in filter\n\t\t\/\/ Get all non-fullcalendar known properties\n\t\tforeach ($atts as $key =&gt; $value) {\n\t\t\tif ($key === &#039;public&#039;) {\n\t\t\t\t\/\/ This existsed in old versions, but we don&#039;t want it in our shortcode output, so skip it.\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;filter&#039;) {\n\t\t\t\t$userFilter = $value === &#039;true&#039; ? &#039;top&#039; : $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;eventpopup&#039;) {\n\t\t\t\t$userEventPopup = $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;eventlink&#039;) {\n\t\t\t\t$userEventLink = $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;hidepassed&#039;) {\n\t\t\t\t$userHidePassed = $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;hidefuture&#039;) {\n\t\t\t\t$userHideFuture = $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;eventdescription&#039;) {\n\t\t\t\t$userEventDescription = $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;eventattachments&#039;) {\n\t\t\t\t$userEventAttachments = $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;eventattendees&#039;) {\n\t\t\t\t$userEventAttendees = $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;eventlocation&#039;) {\n\t\t\t\t$userEventLocation = $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;eventcreator&#039;) {\n\t\t\t\t$userEventCreator = $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;eventcalendarname&#039;) {\n\t\t\t\t$userEventCalendarname = $value;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;uncheckedcalendarids&#039; &amp;&amp; !empty($value)) {\n\t\t\t\t$uncheckedCalendarIds = $value; \/\/ comma separated string\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($key === &#039;calendarids&#039;) {\n\t\t\t\tif (!empty($value)) {\n\t\t\t\t\t$calendarIds = $value; \/\/ comma separated string\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($key === &#039;fullcalendarconfig&#039;) {\n\t\t\t\t\/\/ A JSON string that we can directly send to FullCalendar\n\t\t\t\t$userConfig = json_decode($value, true);\n\t\t\t} else {\n\t\t\t\t\/\/ Fullcalendar properties that get passed to fullCalendar instance.\n\t\t\t\t$parts = explode(&#039;-&#039;, $key);\n\t\t\t\t$partsCount = count($parts);\n\t\t\t\tif ($partsCount &gt; 1) {\n\t\t\t\t\t$currentUserConfigLayer = &amp;$userConfig;\n\t\t\t\t\tfor ($i = 0; $i &lt; $partsCount; $i++) {\n\t\t\t\t\t\t$part = $parts&#91;$i];\n\t\t\t\t\t\tif ($i + 1 === $partsCount) {\n\t\t\t\t\t\t\tif ($value === &#039;true&#039;) {\n\t\t\t\t\t\t\t\t$value = true;\n\t\t\t\t\t\t\t} elseif ($value === &#039;false&#039;) {\n\t\t\t\t\t\t\t\t$value = $value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$currentUserConfigLayer&#91;$part] = $value;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!array_key_exists($part, $currentUserConfigLayer)) {\n\t\t\t\t\t\t\t\t$currentUserConfigLayer&#91;$part] = &#91;];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$currentUserConfigLayer = &amp;$currentUserConfigLayer&#91;$part];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$userConfig&#91;$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$dataCalendarIds = &#039;&#039;;\n\t\tif (!empty($calendarIds)) {\n\t\t\t$dataCalendarIds = &#039;data-calendarids=\\&#039;&#039; . json_encode(array_map(&#039;trim&#039;, explode(&#039;,&#039;, $calendarIds))) . &#039;\\&#039;&#039;;\n\t\t} else {\n\t\t\t$privateSettingsSelectedCalendarListIds = get_option(&#039;epgc_selected_calendar_ids&#039;, &#91;]);\n\t\t\tif (!empty($privateSettingsSelectedCalendarListIds)) {\n\t\t\t\t$dataCalendarIds = &#039;data-calendarids=\\&#039;&#039; . json_encode($privateSettingsSelectedCalendarListIds) . &#039;\\&#039;&#039;;\n\t\t\t}\n\t\t}\n\n\t\t$dataUnchekedCalendarIds = &#039;&#039;;\n\t\tif (!empty($uncheckedCalendarIds)) {\n\t\t\t$dataUnchekedCalendarIds = &#039;data-uncheckedcalendarids=\\&#039;&#039; . json_encode(array_map(&#039;trim&#039;, explode(&#039;,&#039;, $uncheckedCalendarIds))) . &#039;\\&#039;&#039;;\n\t\t}\n\n\t\t$filterHTML = &#039;&lt;div class=&quot;epgc-calendar-filter&quot; &#039; . $dataUnchekedCalendarIds . &#039;&gt;&lt;\/div&gt;&#039;;\n\n\t\treturn &#039;&lt;div class=&quot;epgc-calendar-wrapper epgc-calendar-page&quot;&gt;&#039; . ($userFilter === &#039;top&#039; ? wp_kses_post($filterHTML) : &#039;&#039;) . &#039;&lt;div &#039;\n\t\t\t. esc_attr($dataCalendarIds) . &#039; data-filter=\\&#039;&#039;\n\t\t\t. esc_attr($userFilter) . &#039;\\&#039; data-eventpopup=\\&#039;&#039;\n\t\t\t. esc_attr($userEventPopup) . &#039;\\&#039; data-eventlink=\\&#039;&#039;\n\t\t\t. esc_attr($userEventLink) . &#039;\\&#039; data-eventdescription=\\&#039;&#039;\n\t\t\t. esc_attr($userEventDescription) . &#039;\\&#039; data-eventlocation=\\&#039;&#039;\n\t\t\t. esc_attr($userEventLocation) . &#039;\\&#039; data-eventattachments=\\&#039;&#039;\n\t\t\t. esc_attr($userEventAttachments) . &#039;\\&#039; data-eventattendees=\\&#039;&#039;\n\t\t\t. esc_attr($userEventAttendees) . &#039;\\&#039; data-eventcreator=\\&#039;&#039;\n\t\t\t. esc_attr($userEventCreator) . &#039;\\&#039; data-eventcalendarname=\\&#039;&#039;\n\t\t\t. esc_attr($userEventCalendarname) . &#039;\\&#039; data-hidefuture=\\&#039;&#039;\n\t\t\t. esc_attr($userHideFuture) . &#039;\\&#039; data-hidepassed=\\&#039;&#039;\n\t\t\t. esc_attr($userHidePassed) . &#039;\\&#039; data-config=\\&#039;&#039;\n\t\t\t. json_encode($userConfig) . &#039;\\&#039; data-locale=&quot;&#039;\n\t\t\t. esc_attr(get_locale())\n\t\t\t. &#039;&quot; class=&quot;epgc-calendar&quot;&gt;&lt;\/div&gt;&#039;\n\t\t\t. ($userFilter === &#039;bottom&#039; ? wp_kses_post($filterHTML) : &#039;&#039;)\n\t\t. &#039;&lt;\/div&gt;&#039;;\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\">embedpress\/embedpress\/EmbedPress\/ThirdParty\/Googlecalendar\/Embedpress_Google_Helper.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>Embedpress 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 Embedpress 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 Embedpress Plugin shortcodes not to show or not to work correctly. Before starting, here is an overview of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"name":"EmbedPress &#8211; Embed PDF, YouTube, Google Docs, Vimeo, Wistia Videos, Audios, Maps &amp; Any Documents in Gutenberg &amp; Elementor","slug":"","version":"3.9.0","author":"<a href=\"https:\/\/wpdeveloper.com\">WPDeveloper<\/a>","icons":"https:\/\/ps.w.org\/embedpress\/assets\/icon-128x128.gif?rev=2775365","plugin_tags":"{\"doc\":\"doc\",\"embed\":\"embed\",\"embed-youtube\":\"Embed youtube\",\"gutenberg-embed\":\"gutenberg embed\",\"pdf\":\"pdf\"}","author_profile":"https:\/\/profiles.wordpress.org\/wpdevteam\/","requires":"4.6","tested":"6.3.2","requires_php":"5.6","rating":96,"num_ratings":171,"active_installs":80000,"downloaded":1805661,"last_updated":"2023-10-05 8:50am GMT","added":"2016-09-06","homepage":"https:\/\/embedpress.com\/","short_description":"EmbedPress lets you embed videos, images, posts, audio, maps and upload PDF, DOC, PPT &amp; all other types of content into your WordPress site with o &hellip;","description":"\"EmbedPress is a dynamic plugin that allows easy embedding of PDFs, YouTube, Google Docs, Vimeo, Wistia Videos, Audios, Maps & more in Gutenberg & Elementor on your WordPress site.\"","shortcodes":"[\"EMBEDPRESS_SHORTCODE\",\"embedpress_pdf\",\"embedpress_calendar\"]","footnotes":""},"categories":[1],"tags":[],"class_list":["post-466","post","type-post","status-publish","format-standard","hentry","category-plugins"],"_links":{"self":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/466","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=466"}],"version-history":[{"count":1,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/466\/revisions"}],"predecessor-version":[{"id":609,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/466\/revisions\/609"}],"wp:attachment":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/media?parent=466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/categories?post=466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/tags?post=466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}