'', 'code' => true, 'click_to_copy' => true ], $atts ); $wrapper = ( strtolower( sanitize_text_field( $atts[ 'code' ] ) ) == 'false' ) ? 'span' : 'code'; $click_to_copy = ( strtolower( sanitize_text_field( $atts[ 'click_to_copy' ] ) ) == 'false' ) ? false : true; // Support legacy method of passing content as an attribute with curly braces instead of square brackets if ( empty( $content ) && ! empty( $atts[ 'content' ] ) ) { $content = $atts[ 'content' ]; $content = str_replace( '{', '[[', $content ); $content = str_replace( '}', ']]', $content ); } $click_to_copy_class = $click_to_copy ? ' helpdocs-click-to-copy' : ''; return '<' . $wrapper . ' class="helpdocs_dont_do_shortcode' . $click_to_copy_class . '">' . $content . ''; } // End dont_do_shortcode() /** * Add custom CSS (External or Inline) to the document * * @deprecated Add CSS to main docs page from the settings page now. * @return string */ public function helpdocs_css() : string { _deprecated_function( __FUNCTION__, '2.0', 'Add CSS to main docs page from the settings page now.' ); return ''; } // End helpdocs_css() } Shortcodes::instance();