hooks_exist() ) { return $plugins; } $plugins[] = 'adsensei_shortcode'; return $plugins; } /** * Add the plugin to array of external TinyMCE plugins * * @param array $plugin_array array with TinyMCE plugins. * * @return array */ public function print_shortcode_plugin( ) { static $printed = null; if ( $printed !== null ) { return; } $printed = true; if ( ! $this->hooks_exist() ) { return; } echo "\n"; } /** * Add button to tinyMCE window. * * @param array $buttons array with existing buttons. * * @return array */ public function adsensei_register_buttons( $buttons ) { if ( ! is_array( $buttons ) ) { $buttons = array(); } $buttons[] = 'adsensei_shortcode_button'; return $buttons; } } new adsensei_Welcome();