<?php
// 经典编辑器短代码按钮
add_action('init', 'ppo_mce_button');
function ppo_mce_button() {
    add_filter('mce_external_plugins', 'ppo_shortcode_plugin');
    add_filter('mce_buttons', 'ppo_register_button');
    //add_filter('mce_buttons_2', 'ppo_register_button_2');
}

function ppo_register_button($buttons) {
    $buttons[] = 'ppo_hide';
    return $buttons;
}

function ppo_shortcode_plugin($plugin_array)
{
    $plugin_array['ppo_hide']   = THEME_URL . '/inc/assets/js/ppo-shortcode.js?ver=' . PIX_VERSION . '';
    return $plugin_array;
}