コード例 #1
0
ファイル: jaiminho.php プロジェクト: redelivre/jaiminho
 public function Init()
 {
     $sendpress_name = __('SendPress', 'sendpress');
     add_action('init', array($this, 'jaiminho_check_rewrite'));
     sendpress_register_sender('Jaiminho_Sender_RedeLivre');
     sendpress_register_sender('Jaiminho_Sender_Gmail');
     remove_action('in_admin_footer', array(SendPress_View::get_instance(), 'footer'), 10);
     wp_register_script('jaiminho_disable', JAIMINHO_URL . 'js/disable.js', '', JAIMINHO_VERSION);
     add_action('admin_menu', array($this, 'remove_menu'));
     add_action('admin_menu', array($this, 'admin_menu'));
     add_action('toplevel_page_sp-overview', array($this, 'render_view_jaiminho'));
     add_action('jaiminho_page_sp-settings', array($this, 'render_view_jaiminho'));
     add_filter('admin_footer_text', '__return_empty_string', 11);
     add_filter('update_footer', '__return_empty_string', 11);
     add_action('admin_print_styles', array($this, 'jaiminho_admin_footer_css_hide'));
     add_filter('tiny_mce_before_init', array($this, 'myformatTinyMCE'));
     if (is_multisite()) {
         add_action('network_admin_menu', array($this, 'jaiminho_network_settings'));
         sendpress_register_sender('Jaiminho_Sender_NetWork');
         add_action('wpmu_new_blog', array($this, 'jaiminho_set_settings_for_new_site'));
     }
     add_action('tgmpa_register', array($this, 'jaiminho_register_required_plugins'));
     remove_action('init', array(SPNL(), 'toplevel_page_sp-overview'));
     //add_filter( 'sendpress_notices', '__return_empty_string' );
     add_action('sendpress_notices', array($this, 'jaiminho_notices'));
     add_action('admin_enqueue_scripts', array($this, 'load_admin_script'));
 }
コード例 #2
0
 static function get_instance()
 {
     if (!isset(self::$instance)) {
         $class_name = __CLASS__;
         self::$instance = new $class_name();
     }
     return self::$instance;
 }