Cincopa video and media plug-in Shortcodes

Below, you’ll find a detailed guide on how to add the Cincopa video and media plug-in Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Cincopa video and media plug-in Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Cincopa video and media plug-in Plugin and the shortcodes it provides:

Plugin Icon
Cincopa video and media plug-in

"Cincopa Video and Media Plugin is a comprehensive tool for adding dynamic video playlists and media galleries to your WordPress site, enhancing the multimedia experience."

★★✩✩✩ (18) Active Installs: 2000+ Tested with: 6.0.6 PHP Version: false
Included Shortcodes:
  • [cincopa]
  • [cincopa_gallery_widget]

Cincopa video and media plug-in [cincopa] Shortcode

The Cincopa plugin shortcode manages content display based on user settings and server requests. It controls whether to load content asynchronously or in plain mode, and manages RSS feed display.

Shortcode: [cincopa]

Examples and Usage

Basic example – Embeds a Cincopa video playlist on your webpage using the ‘cincopa’ shortcode.

[cincopa 12345 /]

This shortcode will display the Cincopa video playlist with ID 12345 on your webpage. Replace ‘12345’ with the ID of your own Cincopa video playlist.

Advanced examples

Embeds a Cincopa video playlist on your webpage with asynchronous loading. The ‘tcapc’ attribute is set to ‘true’ to enable asynchronous loading, which can improve page load speed.

[cincopa 12345 tcapc=true /]

This shortcode will display the Cincopa video playlist with ID 12345 on your webpage and load the playlist asynchronously. Replace ‘12345’ with the ID of your own Cincopa video playlist.

Disables the Cincopa video playlist on your webpage. The ‘cpdisable’ attribute is set to ‘true’ to disable the playlist.

[cincopa 12345 cpdisable=true /]

This shortcode will disable the Cincopa video playlist with ID 12345 on your webpage. Replace ‘12345’ with the ID of your own Cincopa video playlist that you want to disable.

PHP Function Code

In case you have difficulties debugging what causing issues with [cincopa] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('cincopa', 'cincopa_plugin_shortcode');

Shortcode PHP function:

function cincopa_plugin_shortcode($atts, $content, $tag)
{
	global $opengraph_meta;

	$cincopa_rss = get_site_option('CincopaRss');

	$cincopa_async = get_site_option('CincopaAsync');
	if (strpos($_SERVER['REQUEST_URI'], 'tcapc=true'))
		$cincopa_async = 'async';
	else if (strpos($_SERVER['REQUEST_URI'], 'tcapc=false'))
		$cincopa_async = 'plain';

	if (strpos($_SERVER['REQUEST_URI'], 'cpdisable=true'))
		return $content;

	$cincopa_excerpt_rt = get_site_option('CincopaExcerpt');

	if ($cincopa_excerpt_rt == 'remove' && (is_search() || is_category() || is_archive() || is_home()))
		return '';
	else if (is_feed()) {
		if ($cincopa_rss == 'full') {
			if ($cincopa_async == 'async') {
				return cincopa_mp_async_plugin_callback($atts, true);
			} else {
				cincopa_mp_opengraph_meta_tags_callback($atts, true);
				return cincopa_mp_plugin_callback($atts, true);
			}
		} else {
			return cincopa_mp_feed_plugin_callback($atts, true);
		}
	} else if ($cincopa_async == 'async') {
		return cincopa_mp_async_plugin_callback($atts, true);
	} else {
		cincopa_mp_opengraph_meta_tags_callback($atts, true);
		return cincopa_mp_plugin_callback($atts, true);
	}
}

Code file location:

video-playlist-and-gallery-plugin/video-playlist-and-gallery-plugin/wp-media-cincopa.php

Cincopa video and media plug-in [cincopa_gallery_widget] Shortcode

The Cincopa Gallery Widget shortcode allows you to embed a video playlist and gallery into your WordPress site. Shortcode Name: Cincopa Gallery Widget. This shortcode generates a unique identifier, displays a loading GIF while the gallery loads, and then renders the specified gallery.

Shortcode: [cincopa_gallery_widget]

Parameters

Here is a list of all possible cincopa_gallery_widget shortcode parameters and attributes:

  • cincopa-input-insert – identifier for the specific Cincopa gallery to display

Examples and Usage

Basic example – The shortcode is used to display a Cincopa gallery widget by referencing the gallery’s unique ID.

[cincopa_gallery_widget cincopa-input-insert="unique-gallery-id"]

Advanced examples

Using the shortcode to display a Cincopa gallery widget by referencing the gallery’s unique ID. If the ID is not found, the shortcode will generate a random ID and use that instead.

[cincopa_gallery_widget cincopa-input-insert="unique-gallery-id" random="random-generated-id"]

Using the shortcode to display a Cincopa gallery widget without specifying the gallery’s unique ID. In this case, the shortcode will generate a random ID and use that to display the widget.

[cincopa_gallery_widget]

Please note that in the above examples, “unique-gallery-id” and “random-generated-id” should be replaced with the actual unique ID of the gallery and a randomly generated ID, respectively.

PHP Function Code

In case you have difficulties debugging what causing issues with [cincopa_gallery_widget] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('cincopa_gallery_widget','cincopa_gallery_widget_add');

Shortcode PHP function:

function cincopa_gallery_widget_add($atts){
		$random = generateRandomFidClass(10);
		if(isset($atts['cincopa-input-insert']))$fid=esc_html($atts['cincopa-input-insert']); else $fid='';
		if($fid !=''){
		?>
			<div class="cincopa-gallery-video">
				<div id="cp_widget_<?php echo $random; ?>"><img src="//www.cincopa.com/media-platform/runtime/loading.gif" style="border:0;" alt="Cincopa WPBakery Addon" /></div>
				<script src="//www.cincopa.com/media-platform/runtime/libasync.js" type="text/javascript"></script>
				<script type="text/javascript">
					cp_load_widget('<?php echo $fid; ?>', "cp_widget_<?php echo $random; ?>");
				</script>
			</div>
		<?php
		}
	}

Code file location:

video-playlist-and-gallery-plugin/video-playlist-and-gallery-plugin/wp-media-cincopa.php

Conclusion

Now that you’ve learned how to embed the Cincopa video and media plug-in Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *