';
$html .= str_replace('
',' ',do_shortcode($content));
$html .= '';
return $html;
}
add_shortcode('feature_list','feature_list_callback');
function feature_list_callback($args , $content)
{
$html ='
';
$html .='-
';
$html .= do_shortcode($content);
$html .= '
';
return $html;
}
add_shortcode('feature_row','feature_row_callback');
function feature_row_callback($args ,$content='')
{
global $feature_row;
if($feature_row == '')
{
$feature_row = 1;
}
$html = '';
$html .= $content;
$html .= '';
$feature_row++;
return $html;
}
add_shortcode('table_column','table_column_callback');
function table_column_callback($args ,$content='')
{
extract(shortcode_atts(array(
'title' => 'coloum title',
'class' => 'apple'
), $args));
$html = '';
$html .=''.$title.'
';
$html .= do_shortcode($content);
$html .= '
';
return $html;
}
add_shortcode('row_data','row_data_callback');
function row_data_callback($args ,$content='')
{
global $row_counter;
if($row_counter == '')
{
$row_counter = 1 ;
}
$html = '';
$html .='';
$row_counter++;
if($content == 'yes')
{
$html .= '
';
}
else
{
$html .= ''.$content.'
';
}
$html .='';
return $html;
}
function add_pricetable_button() {
if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
return;
if ( get_user_option('rich_editing') == 'true') {
add_filter('mce_external_plugins', 'add_pricetable_tinymce_plugin');
add_filter('mce_buttons', 'register_pricetable_button');
}
}
/* init*/
add_action('init', 'add_pricetable_button');
function register_pricetable_button($buttons) {
array_push($buttons, "|", "pricetable");
return $buttons;
}
function add_pricetable_tinymce_plugin($plugin_array) {
$plugin_array['pricetable'] = get_template_directory_uri().'/shortcode/pricetable/price_table_plugin.js';
return $plugin_array;
}
?>