Skip to content

Snippet: Alter Editor Shortcodes Insert Button Default Value

add_filter( 'wpex_shortcodes_tinymce_json', function( $data ) {

	// Alter the default insert code for the button shortcode
	$data['shortcodes']['vcex_button']['insert'] = '[vcex_button url="" title="Visit Site" style="graphical" align="left" color="black" size="small" target="self" rel="none"]Button Text[/vcex_button]';

	// Return data
	return $data;

}, 40 );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top