Skip to content

Commit

Permalink
Update Shortcode.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakiboy committed Oct 25, 2021
1 parent 34457c0 commit 4be586e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/inc/Shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,24 @@ public static function hasAttribute($atts = [], $attr = '')
return isset($atts[$attr]) ? true : false;
}

/**
* Check shortcode has flag attribute.
*
* @access public
* @param array $atts
* @param string $attr
* @return bool
*/
public static function hasFlag($atts = [], $attr = '')
{
if ( Arrayify::hasKey(0,$atts) ) {
if ( $atts[0] == $attr ) {
return true;
}
}
return false;
}

/**
* Get shortcode attribute value.
*
Expand Down

0 comments on commit 4be586e

Please sign in to comment.