예제 #1
0
파일: admin.php 프로젝트: uoyknaht/kc
 function __construct()
 {
     parent::__construct();
     // adds screen options and the about box in the languages admin panel
     add_action('load-settings_page_mlang', array(&$this, 'load_page'));
     // saves per-page value in screen option
     add_filter('set-screen-option', create_function('$s, $o, $v', 'return $v;'), 10, 3);
 }
예제 #2
0
 function __construct()
 {
     parent::__construct();
     // additionnal filters and actions
     add_action('admin_init', array(&$this, 'admin_init'));
     // remove the customize menu section as it is unusable with Polylang
     add_action('customize_register', array(&$this, 'customize_register'), 20);
     // since WP 3.4
     // refresh rewrite rules if the 'page_on_front' option is modified
     add_action('update_option_page_on_front', 'flush_rewrite_rules');
     // adds a 'settings' link in the plugins table
     add_filter('plugin_action_links_' . basename(POLYLANG_DIR) . '/polylang.php', array(&$this, 'plugin_action_links'));
     // ugrades languages files after a core upgrade (timing is important)
     // FIXME private action ? is there a better way to do this ?
     add_action('_core_updated_successfully', array(&$this, 'upgrade_languages'), 1);
     // since WP 3.3
 }