summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/untappd-menu.php')
-rw-r--r--plugins/jetpack/modules/shortcodes/untappd-menu.php22
1 files changed, 18 insertions, 4 deletions
diff --git a/plugins/jetpack/modules/shortcodes/untappd-menu.php b/plugins/jetpack/modules/shortcodes/untappd-menu.php
index f8f62f0b..612df9af 100644
--- a/plugins/jetpack/modules/shortcodes/untappd-menu.php
+++ b/plugins/jetpack/modules/shortcodes/untappd-menu.php
@@ -1,4 +1,4 @@
-<?php
+<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* Untappd Shortcodes
*
@@ -8,22 +8,36 @@
* @since 4.1.0
* @param location int Location ID for the Untappd venue. Required.
* @param theme int Theme ID for the Untappd menu. Required.
+ *
+ * @package Jetpack
*/
+/**
+ * Display Untappd data in posts and pages.
+ */
class Jetpack_Untappd {
- function __construct() {
+ /**
+ * Constructor
+ */
+ public function __construct() {
add_action( 'init', array( $this, 'action_init' ) );
}
- function action_init() {
+ /**
+ * Register our shortcodes.
+ */
+ public function action_init() {
add_shortcode( 'untappd-menu', array( $this, 'menu_shortcode' ) );
}
/**
* [untappd-menu] shortcode.
+ *
+ * @param array $atts Shortocde attributes.
+ * @param string $content Post content.
*/
- static function menu_shortcode( $atts, $content = '' ) {
+ public static function menu_shortcode( $atts, $content = '' ) {
// Let's bail if we don't have location or theme.
if ( ! isset( $atts['location'] ) || ! isset( $atts['theme'] ) ) {
if ( current_user_can( 'edit_posts' ) ) {