PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
jetpack
/
modules
/
shortcodes
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Wordads shortcode. * * Examples: * [wordads] * * @package automattic/jetpack */ /** * Embed WordAds 'ad' in post */ class Jetpack_WordAds_Shortcode { /** * Used to determine whether scripts and styles have been enqueued already. * * @var bool false Should we enqueue scripts and styles. */ private $scripts_and_style_included = false; /** * Initialize. */ public function __construct() { add_action( 'init', array( $this, 'action_init' ) ); } /** * Register our shortcode and enqueue necessary files. */ public function action_init() { global $wordads; if ( empty( $wordads ) ) { return null; } add_shortcode( 'wordads', array( $this, 'wordads_shortcode' ) ); } /** * Our [wordads] shortcode. * Prints a WordAds Ad. * * @param array $atts Array of shortcode attributes. * @param string $content Post content. * * @return string HTML for WordAds shortcode. */ public static function wordads_shortcode( $atts, $content = '' ) { $atts = shortcode_atts( array(), $atts, 'wordads' ); return self::wordads_shortcode_html( $atts, $content ); } /** * The shortcode output * * @param array $atts Array of shortcode attributes. * @param string $content Post content. * * @return string HTML output */ private static function wordads_shortcode_html( $atts, $content = '' ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable global $wordads; if ( empty( $wordads ) ) { return '<div>' . __( 'The WordAds module is not active', 'jetpack' ) . '</div>'; } $html = '<div class="jetpack-wordad" itemscope itemtype="https://schema.org/WPAdBlock"></div>'; $html = $wordads->insert_inline_ad( $html ); return $html; } } new Jetpack_WordAds_Shortcode();
[-] class.filter-embedded-html-objects.php
[edit]
[-] vimeo.php
[edit]
[-] inline-pdfs.php
[edit]
[+]
js
[-] vine.php
[edit]
[-] getty.php
[edit]
[-] twitter-timeline.php
[edit]
[-] codepen.php
[edit]
[-] upcoming-events.php
[edit]
[-] archiveorg-book.php
[edit]
[-] archiveorg.php
[edit]
[-] tweet.php
[edit]
[-] videopress.php
[edit]
[+]
..
[-] youtube.php
[edit]
[-] dailymotion.php
[edit]
[-] mixcloud.php
[edit]
[-] untappd-menu.php
[edit]
[-] crowdsignal.php
[edit]
[+]
img
[-] cartodb.php
[edit]
[-] presentations.php
[edit]
[-] others.php
[edit]
[-] recipe.php
[edit]
[-] unavailable.php
[edit]
[-] flickr.php
[edit]
[-] vr.php
[edit]
[-] gist.php
[edit]
[-] twitchtv.php
[edit]
[-] pinterest.php
[edit]
[-] quiz.php
[edit]
[+]
css
[-] bandcamp.php
[edit]
[-] wufoo.php
[edit]
[-] hulu.php
[edit]
[-] ustream.php
[edit]
[-] slideshare.php
[edit]
[-] kickstarter.php
[edit]
[-] soundcloud.php
[edit]
[-] sitemap.php
[edit]
[-] scribd.php
[edit]
[-] googleapps.php
[edit]
[-] houzz.php
[edit]
[-] facebook.php
[edit]
[+]
images
[-] instagram.php
[edit]
[-] mailchimp.php
[edit]
[-] archives.php
[edit]
[-] spotify.php
[edit]
[-] googleplus.php
[edit]
[-] googlemaps.php
[edit]
[-] slideshow.php
[edit]
[-] ted.php
[edit]
[-] wordads.php
[edit]
[-] gravatar.php
[edit]
[-] brightcove.php
[edit]
[-] flatio.php
[edit]
[-] medium.php
[edit]