1. Home
  2. Arconix Shortcodes
  3. Shortcode Plugin Code Snippets

Shortcode Plugin Code Snippets

Unless noted otherwise, place these snippets in your theme’s functions.php file or site-specific plugin

Add the goolemap shortcode back

 

<?php // DO NOT include the opening php tag
add_filter( 'arconix_shortcodes_list', 'add_gmap' );
function add_gmap( $list ) {
$list[] = 'googlemap';
return $list;
}

Remove the Shortcode List metabox from display

 

<?php // DO NOT include the opening php tag
// Remove Shortcodes Metabox from all post types
add_filter( 'arconix_shortcodes_meta_box_post_types', '__return_empty_array' );

Change the default box style

 

<?php // DO NOT include the opening php tag
add_filter( 'arconix_box_shortcode_args', 'my_box_args' );
function my_box_args( $defaults ) {
$defaults['color'] = 'blue';
return $defaults;
}

Change the default button color and size

 

<?php // DO NOT include the opening php tag
add_filter( 'arconix_button_shortcode_args', 'my_button_args' );
function my_button_args( $defaults ) {
$defaults['color'] = 'green';
$defaults['size'] = 'large';
return $defaults;
}

Change the jQuery Tools script url and version

 

<?php // DO NOT include the opening php tag
add_filter( 'arconix_jquerytools_reg', 'my_jquerytools_reg' );
function my_jquerytools_reg( $args ) {
$args['url'] = 'http://cdn.jquerytools.org/1.2.6/tiny/jquery.tools.min.js';
$args['ver'] = '1.2.6';
return $args;
}

Was this article helpful to you? Yes 1 No

How can we help?