init(); if(!function_exists("ButtonizerLicense")) { function ButtonizerLicense() { global $oButtonizer; return $oButtonizer->get(); } } /* * Installation, removing and initiallization */ $oButtonizerMaintain = new Buttonizer\Maintain(true, 'init'); /* * Buttonizer admin stuff or button */ if(is_admin()) { // Load admin page new Buttonizer\Admin\InitializeAdmin(); } else { // Buttonizer button new Buttonizer\Button($oButtonizerMaintain->isMobile()); } /* LAST FEW FUNCTIONS */ if(!function_exists("buttonizer_custom_connect_message_on_update")) { function buttonizer_custom_connect_message_on_update( $message, $user_first_name, $plugin_title, $user_login, $site_link, $freemius_link ) { return sprintf( __fs( 'hey-x' ) . '
' . __( 'Hey %2$s! We want to ask you to help us to improve Buttonizer! If you opt-in, some data about your usage of %2$s will be sent to %5$s. If you skip this, that\'s no problem! %2$s will still be improved!', 'buttonizer' ), $user_first_name, '' . $plugin_title . '', '' . $user_login . '', $site_link, $freemius_link ); } } $oButtonizer->get()->add_action('after_uninstall', 'buttonizer_uninstall_cleanup'); // System, buttonizer is loaded do_action('buttonizer_loaded'); if(defined("BUTTONIZER_DEFINED")) { echo "
Hey, looks like you try to install me (Buttonizer), while you already have an older version (or the free version) installed and activated? Deactivate all older Buttonizer plugins before trying again.
"; trigger_error("Error", E_USER_ERROR); exit; } // Ok, define define('BUTTONIZER_DEFINED','1.0');