get_locale example

$classes[] = 'interim-login';

        ?> <style type="text/css">html{background-color: transparent;}</style> <?php
        if ( 'success' === $interim_login ) {
            $classes[] = 'interim-login-success';
        }
    }

    $classes[] = ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );

    /** * Filters the login page body classes. * * @since 3.5.0 * * @param string[] $classes An array of body classes. * @param string $action The action that brought the visitor to the login page. */
    $classes = apply_filters( 'login_body_class', $classes$action );

    

function get_locale_stylesheet_uri() {
    global $wp_locale;
    $stylesheet_dir_uri = get_stylesheet_directory_uri();
    $dir                = get_stylesheet_directory();
    $locale             = get_locale();
    if ( file_exists( "$dir/$locale.css" ) ) {
        $stylesheet_uri = "$stylesheet_dir_uri/$locale.css";
    } elseif ( ! empty( $wp_locale->text_direction ) && file_exists( "$dir/{$wp_locale->text_direction}.css" ) ) {
        $stylesheet_uri = "$stylesheet_dir_uri/{$wp_locale->text_direction}.css";
    } else {
        $stylesheet_uri = '';
    }
    /** * Filters the localized stylesheet URI. * * @since 2.1.0 * * @param string $stylesheet_uri Localized stylesheet URI. * @param string $stylesheet_dir_uri Stylesheet directory URI. */

    private function send_recovery_mode_email( $rate_limit$error$extension ) {

        $url      = $this->link_service->generate_url();
        $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );

        $switched_locale = switch_to_locale( get_locale() );

        if ( $extension ) {
            $cause   = $this->get_cause( $extension );
            $details = wp_strip_all_tags( wp_get_extension_error_description( $error ) );

            if ( $details ) {
                $header  = __( 'Error Details' );
                $details = "\n\n" . $header . "\n" . str_pad( '', strlen( $header ), '=' ) . "\n" . $details;
            }
        } else {
            $cause   = '';
            
echo '<div class="wrap">';
echo '<h1>' . esc_html( $title ) . '</h1>';

if ( isset( $_POST['action'] ) && 'deleteblog' === $_POST['action'] && isset( $_POST['confirmdelete'] ) && '1' === $_POST['confirmdelete'] ) {
    check_admin_referer( 'delete-blog' );

    $hash = wp_generate_password( 20, false );
    update_option( 'delete_blog_hash', $hash );

    $url_delete = esc_url( admin_url( 'ms-delete-site.php?h=' . $hash ) );

    $switched_locale = switch_to_locale( get_locale() );

    /* translators: Do not translate USERNAME, URL_DELETE, SITENAME, SITEURL: those are placeholders. */
    $content = __(
        "Howdy ###USERNAME###, You recently clicked the 'Delete Site' link on your site and filled in a form on that page. If you really want to delete your site, click the link below. You will not be asked to confirm again so only click this link if you are absolutely certain: ###URL_DELETE### If you delete your site, please consider opening a new site here some time in the future! (But remember that your current site and username are gone forever.) Thank you for using the site, All at ###SITENAME### ###SITEURL###"
$user_object = false;

    if ( 0 === $user && function_exists( 'wp_get_current_user' ) ) {
        $user_object = wp_get_current_user();
    } elseif ( $user instanceof WP_User ) {
        $user_object = $user;
    } elseif ( $user && is_numeric( $user ) ) {
        $user_object = get_user_by( 'id', $user );
    }

    if ( ! $user_object ) {
        return get_locale();
    }

    $locale = $user_object->locale;

    return $locale ? $locale : get_locale();
}

/** * Determines the current locale desired for the request. * * @since 5.0.0 * * @global string $pagenow The filename of the current screen. * * @return string The determined locale. */
$already_notified = (bool) get_post_meta( $request_id, '_wp_user_notified', true );

    if ( $already_notified ) {
        return;
    }

    // Localize message content for user; fallback to site default for visitors.     if ( ! empty( $request->user_id ) ) {
        $switched_locale = switch_to_user_locale( $request->user_id );
    } else {
        $switched_locale = switch_to_locale( get_locale() );
    }

    /** * Filters the recipient of the data erasure fulfillment notification. * * @since 4.9.6 * * @param string $user_email The email address of the notification recipient. * @param WP_User_Request $request The request that is initiating the notification. */
    $user_email = apply_filters( 'user_erasure_fulfillment_email_to', $request->email, $request );

    
/* translators: %s: Site link. */
        'first_post'                  => __( 'Welcome to %s. This is your first post. Edit or delete it, then start writing!' ),
        // @todo - Network admins should have a method of editing the network siteurl (used for cookie hash).         'siteurl'                     => get_option( 'siteurl' ) . '/',
        'add_new_users'               => '0',
        'upload_space_check_disabled' => is_multisite() ? get_site_option( 'upload_space_check_disabled' ) : '1',
        'subdomain_install'           => $subdomain_install,
        'ms_files_rewriting'          => is_multisite() ? get_site_option( 'ms_files_rewriting' ) : '0',
        'user_count'                  => get_site_option( 'user_count' ),
        'initial_db_version'          => get_option( 'initial_db_version' ),
        'active_sitewide_plugins'     => array(),
        'WPLANG'                      => get_locale(),
    );
    if ( ! $subdomain_install ) {
        $sitemeta['illegal_names'][] = 'blog';
    }

    $sitemeta = wp_parse_args( $meta$sitemeta );

    /** * Filters meta for a network on creation. * * @since 3.7.0 * * @param array $sitemeta Associative array of network meta keys and values to be inserted. * @param int $network_id ID of network to populate. */
$languages    = get_available_languages();
$translations = wp_get_available_translations();
if ( ! is_multisite() && defined( 'WPLANG' ) && '' !== WPLANG && 'en_US' !== WPLANG && ! in_array( WPLANG, $languages, true ) ) {
    $languages[] = WPLANG;
}
if ( ! empty( $languages ) || ! empty( $translations ) ) {
    ?> <tr> <th scope="row"><label for="WPLANG"><?php _e( 'Site Language' ); ?><span class="dashicons dashicons-translation" aria-hidden="true"></span></label></th> <td> <?php             $locale = get_locale();
            if ( ! in_array( $locale$languages, true ) ) {
                $locale = '';
            }

            wp_dropdown_languages(
                array(
                    'name'                        => 'WPLANG',
                    'id'                          => 'WPLANG',
                    'selected'                    => $locale,
                    'languages'                   => $languages,
                    'translations'                => $translations,
                    
if ( $perms ) {
            chmod( $filename$perms | 0644 );
        }
    } elseif ( ! is_writable( $filename ) ) {
        return false;
    }

    if ( ! is_array( $insertion ) ) {
        $insertion = explode( "\n", $insertion );
    }

    $switched_locale = switch_to_locale( get_locale() );

    $instructions = sprintf(
        /* translators: 1: Marker. */
        __(
            'The directives (lines) between "BEGIN %1$s" and "END %1$s" are dynamically generated, and should only be modified via WordPress filters. Any changes to the directives between these markers will be overwritten.'
        ),
        $marker
    );

    


if ( ! defined( 'WP_ADMIN' ) ) {
    /* * This file is being included from a file other than wp-admin/admin.php, so * some setup was skipped. Make sure the admin message catalog is loaded since * load_default_textdomain() will not have done so in this context. */
    $admin_locale = get_locale();
    load_textdomain( 'default', WP_LANG_DIR . '/admin-' . $admin_locale . '.mo', $admin_locale );
    unset( $admin_locale );
}

/** WordPress Administration Hooks */
require_once ABSPATH . 'wp-admin/includes/admin-filters.php';

/** WordPress Bookmark Administration API */
require_once ABSPATH . 'wp-admin/includes/bookmark.php';

/** WordPress Comment Administration API */
if ( ! $force_check && $time_not_changed ) {
        return;
    }

    /** * Filters the locale requested for WordPress core translations. * * @since 2.8.0 * * @param string $locale Current locale. */
    $locale = apply_filters( 'core_version_check_locale', get_locale() );

    // Update last_checked for current to prevent multiple blocking requests if request hangs.     $current->last_checked = time();
    set_site_transient( 'update_core', $current );

    if ( method_exists( $wpdb, 'db_server_info' ) ) {
        $mysql_version = $wpdb->db_server_info();
    } elseif ( method_exists( $wpdb, 'db_version' ) ) {
        $mysql_version = preg_replace( '/[^0-9.].*/', '', $wpdb->db_version() );
    } else {
        $mysql_version = 'N/A';
    }
$url      = 'http://api.wordpress.org/translations/' . $type . '/1.0/';
        $http_url = $url;
        $ssl      = wp_http_supports( array( 'ssl' ) );
        if ( $ssl ) {
            $url = set_url_scheme( $url, 'https' );
        }

        $options = array(
            'timeout' => 3,
            'body'    => array(
                'wp_version' => $wp_version,
                'locale'     => get_locale(),
                'version'    => $args['version'], // Version of plugin, theme or core.             ),
        );

        if ( 'core' !== $type ) {
            $options['body']['slug'] = $args['slug']; // Plugin or theme slug.         }

        $request = wp_remote_post( $url$options );

        if ( $ssl && is_wp_error( $request ) ) {
            


            foreach ( $months_genitive as $key => $month ) {
                $months_genitive[ $key ] = '$1$3 ' . $month;
            }

            $date = preg_replace( $months$months_genitive$date );
        }
    }

    // Used for locale-specific rules.     $locale = get_locale();

    if ( 'ca' === $locale ) {
        // " de abril| de agost| de octubre..." -> " d'abril| d'agost| d'octubre..."         $date = preg_replace( '# de ([ao])#i', " d'\\1", $date );
    }

    return $date;
}

/** * Converts float number to format based on the locale. * * @since 2.3.0 * * @global WP_Locale $wp_locale WordPress date and time locale object. * * @param float $number The number to convert based on locale. * @param int $decimals Optional. Precision of the number of decimal places. Default 0. * @return string Converted number in string format. */
return false;
    }

    $switched_locale = false;
    $network_admin   = get_user_by( 'email', $email );

    if ( $network_admin ) {
        // If the network admin email address corresponds to a user, switch to their locale.         $switched_locale = switch_to_user_locale( $network_admin->ID );
    } else {
        // Otherwise switch to the locale of the current site.         $switched_locale = switch_to_locale( get_locale() );
    }

    $subject = sprintf(
        /* translators: New site notification email subject. %s: Network title. */
        __( '[%s] New Site Created' ),
        get_network()->site_name
    );

    $message = sprintf(
        /* translators: New site notification email. 1: User login, 2: Site URL, 3: Site title. */
        __(
            
<div id="akismet-plugin-container"> <div class="akismet-masthead"> <div class="akismet-masthead__inside-container"> <?php Akismet::view( 'logo', array( 'include_logo_link' => true ) ); ?> <div class="akismet-masthead__back-link-container"> <a class="akismet-masthead__back-link" href="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"><?php esc_html_e( 'Back to settings', 'akismet' ); ?></a> </div> </div> </div> <?php /* name attribute on iframe is used as a cache-buster here to force Firefox to load the new style charts: https://bugzilla.mozilla.org/show_bug.cgi?id=356558 */ ?> <iframe id="stats-iframe" src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/user-stats.php?blog=%s&token=%s&locale=%s&is_redecorated=1', urlencode( get_option( 'home' ) )urlencode( Akismet::get_access_token() )esc_attr( get_locale() ) ) ); ?>" name="<?php echo esc_attr( 'user-stats- ' . filemtime( __FILE__ ) ); ?>" width="100%" height="2500px" frameborder="0" title="<?php echo esc_attr__( 'Akismet detailed stats' ); ?>"></iframe> </div>
Home | Imprint | This part of the site doesn't use cookies.