Exemple #1
0
function wpml_load_post_translation($is_admin, $settings)
{
    global $wpml_post_translations, $wpdb;
    if ($is_admin === true) {
        $wpml_post_translations = new WPML_Admin_Post_Actions($settings, $wpdb);
    } else {
        $wpml_post_translations = new WPML_Frontend_Post_Actions($settings, $wpdb);
        wpml_load_frontend_tax_filters();
    }
    $wpml_post_translations->init();
}
Exemple #2
0
function wpml_load_post_translation($admin, $settings, $active_language_codes, $default_lang_code)
{
    global $wpml_slug_filter, $wpml_post_translations;
    if ($admin === true) {
        $wpml_post_translations = new WPML_Admin_Post_Actions($settings);
    } else {
        $wpml_post_translations = new WPML_Frontend_Post_Actions($settings);
        wpml_load_frontend_tax_filters();
    }
    require ICL_PLUGIN_PATH . '/inc/url-handling/wpml-slug-filter.class.php';
    $wpml_slug_filter = new WPML_Slug_Filter($active_language_codes, $default_lang_code);
    $wpml_post_translations->init();
}