예제 #1
0
/** register activation/deactivation hooks */
function qtranxf_register_activation_hooks()
{
    $qtx_plugin_basename = qtranxf_plugin_basename();
    register_activation_hook($qtx_plugin_basename, 'qtranxf_activation_hook');
    register_deactivation_hook($qtx_plugin_basename, 'qtranxf_deactivation_hook');
}
function qtranxf_admin_load()
{
    //qtranxf_dbg_log('qtranxf_admin_load:');
    qtranxf_admin_loadConfig();
    $bnm = qtranxf_plugin_basename();
    add_filter('plugin_action_links_' . $bnm, 'qtranxf_links', 10, 4);
    add_action('qtranslate_init_language', 'qtranxf_load_admin_page_config', 20);
    //should be excuted after all plugins loaded their *-admin.php
    qtranxf_add_admin_filters();
}
예제 #3
0
/**
 * @since 3.3.2
 */
function qtranxf_plugin_dirname()
{
    static $s;
    if (!$s) {
        $b = qtranxf_plugin_basename();
        $s = dirname($b);
    }
    return $s;
}
예제 #4
0
function qtranxf_admin_load()
{
    //qtranxf_dbg_log('qtranxf_admin_load:');
    qtranxf_admin_loadConfig();
    $page_configs = qtranxf_get_admin_page_config();
    if (!empty($page_configs['']['filters'])) {
        qtranxf_add_filters($page_configs['']['filters']);
    }
    $bnm = qtranxf_plugin_basename();
    add_filter('plugin_action_links_' . $bnm, 'qtranxf_links', 10, 4);
    qtranxf_add_admin_filters();
}