https://www.youtube.com/watch?v=-jzbgz0bINE Prevent activation (and also auto deactivation) of certain plugins function enym_restrict_plugin_activation() { $restricted_plugins =…
Simple Self Closing Shortcode Example
//self enclosing shortcode use as [subtitle class="css-class"]TEXT[/subtitle]
//https://www.hostinger.com/tutorials/create-a-shortcode-in-wordpress
function subtitle_link_att($atts, $content = null) {
$default = array(
'class' => '',
);
$a = shortcode_atts($default, $atts);
$content = do_shortcode($content);
return '<div class="'.($a['class']).'">'.$content.'</div>';
}
add_shortcode('subtitle', 'subtitle_link_att'); //[subtitle class="subtitle"]Link[/subtitle]
Dieser Beitrag hat 0 Kommentare