'; _e( 'WP Super Edit Plugin Required! Activate WP Super Edit before using. Plugin Deactivated.', 'wp-super-edit' ); echo '

'; } /** * WP Super Emoticon function to register items in WP Super Edit * Use $wp_super_edit primary object instance to add settings to database using register_tinymce_plugin() and register_tinymce_button() as many times as needed. * @global object $wp_super_edit */ function wp_super_emoticons_activate() { global $wp_super_edit; if ( empty( $wp_super_edit ) || !is_object( $wp_super_edit ) ) return false; // WP Super Edit options for this plugin $wp_super_edit->register_tinymce_plugin( array( 'name' => 'superemotions', 'nicename' => __( 'Super Emoticon / Icon Plugin', 'wp-super-edit' ), 'description' => __( 'Wordpress Emoticon / Icon images. Uses Wordpress icon set. Provides the Emoticon / Icons Button. Uses WordPress shortcodes API.', 'wp-super-edit' ), 'provider' => 'wp-se-emotions', 'status' => 'no', 'callbacks' => '' )); // Tiny MCE Buttons provided by this plugin $wp_super_edit->register_tinymce_button( array( 'name' => 'superemotions', 'nicename' => __( 'Super Emoticon / Icons', 'wp-super-edit' ), 'description' => __( 'Interface for Wordpress Emoticon / Icon images. Uses Wordpress icon set. Uses WordPress shortcodes API.', 'wp-super-edit' ), 'provider' => 'wp-se-emotions', 'plugin' => 'superemotions', 'status' => 'no' )); } register_activation_hook( __FILE__, 'wp_super_emoticons_activate' ); /** * WP Super Emoticon function to unregister items in WP Super Edit * Use $wp_super_edit primary object instance to remove settings from database using unregister_tinymce_plugin() and unregister_tinymce_button() for the registered items. * @global object $wp_super_edit */ function wp_super_emoticons_deactivate() { global $wp_super_edit; if ( empty( $wp_super_edit ) || !is_object( $wp_super_edit ) ) return false; // Unregister WP Super Edit options for this plugin $wp_super_edit->unregister_tinymce_plugin( 'superemotions'); // Unregister Tiny MCE Buttons provided by this plugin $wp_super_edit->unregister_tinymce_button( 'superemotions' ); } register_deactivation_hook( __FILE__, 'wp_super_emoticons_deactivate' ); /** * WP Super Emoticons to add shortcode to WordPress editor */ function wp_super_emoticons_shortcode ($attr, $content = null ) { $attr = shortcode_atts(array( 'file' => 'file', 'title' => 'title' ), $attr); return ''  . $attr['title'] . ''; } add_shortcode('superemotions', 'wp_super_emoticons_shortcode');