get_home_url example

network_admin_url( 'sites.php?action=confirm&action2=deleteblog&id=' . $blog['blog_id'] ),
                            'deleteblog_' . $blog['blog_id']
                        )
                    ),
                    __( 'Delete' )
                );
            }
        }

        $actions['visit'] = sprintf(
            '<a href="%1$s" rel="bookmark">%2$s</a>',
            esc_url( get_home_url( $blog['blog_id'], '/' ) ),
            __( 'Visit' )
        );

        /** * Filters the action links displayed for each site in the Sites list table. * * The 'Edit', 'Dashboard', 'Delete', and 'Visit' links are displayed by * default for each site. The site's status determines whether to show the * 'Activate' or 'Deactivate' link, 'Unarchive' or 'Archive' links, and * 'Not Spam' or 'Spam' link for each site. * * @since 3.1.0 * * @param string[] $actions An array of action links to be displayed. * @param int $blog_id The site ID. * @param string $blogname Site path, formatted depending on whether it is a sub-domain * or subdirectory multisite installation. */
'min' => 200,
            'max' => 600,
        )
    );

    $width  = min( max( $min_max_width['min']$width )$min_max_width['max'] );
    $height = max( ceil( $width / 16 * 9 ), 200 );

    $data = array(
        'version'       => '1.0',
        'provider_name' => get_bloginfo( 'name' ),
        'provider_url'  => get_home_url(),
        'author_name'   => get_bloginfo( 'name' ),
        'author_url'    => get_home_url(),
        'title'         => get_the_title( $post ),
        'type'          => 'link',
    );

    $author = get_userdata( $post->post_author );

    if ( $author ) {
        $data['author_name'] = $author->display_name;
        $data['author_url']  = get_author_posts_url( $author->ID );
    }
$title = sprintf( __( 'Edit Site: %s' )esc_html( $details->blogname ) );

$parent_file  = 'sites.php';
$submenu_file = 'sites.php';

require_once ABSPATH . 'wp-admin/admin-header.php';

?> <div class="wrap"> <h1 id="edit-site"><?php echo $title; ?></h1> <p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p> <?php
network_edit_site_nav(
    array(
        'blog_id'  => $id,
        'selected' => 'site-info',
    )
);

if ( ! empty( $messages ) ) {
    foreach ( $messages as $msg ) {
        
if ( ! $post_type_obj ) {
        return false;
    }

    if ( 'post' === $post_type ) {
        $show_on_front  = get_option( 'show_on_front' );
        $page_for_posts = get_option( 'page_for_posts' );

        if ( 'page' === $show_on_front && $page_for_posts ) {
            $link = get_permalink( $page_for_posts );
        } else {
            $link = get_home_url();
        }
        /** This filter is documented in wp-includes/link-template.php */
        return apply_filters( 'post_type_archive_link', $link$post_type );
    }

    if ( ! $post_type_obj->has_archive ) {
        return false;
    }

    if ( get_option( 'permalink_structure' ) && is_array( $post_type_obj->rewrite ) ) {
        $struct = ( true === $post_type_obj->has_archive ) ? $post_type_obj->rewrite['slug'] : $post_type_obj->has_archive;
        
/** * Display JavaScript on the page. * * @since 3.5.0 */
function options_general_add_js() {
    ?> <script type="text/javascript"> jQuery( function($) { var $siteName = $( '#wp-admin-bar-site-name' ).children( 'a' ).first(), homeURL = ( <?php echo wp_json_encode( get_home_url() ); ?> || '' ).replace( /^(https?:\/\/)?(www\.)?/, '' ); $( '#blogname' ).on( 'input', function() { var title = $.trim( $( this ).val() ) || homeURL; // Truncate to 40 characters. if ( 40 < title.length ) { title = title.substring( 0, 40 ) + '\u2026'; } $siteName.text( title ); }); $( 'input[name="date_format"]' ).on( 'click', function() { if ( 'date_format_custom_radio' !== $(this).attr( 'id' ) ) $( 'input[name="date_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() ); }); $( 'input[name="date_format_custom"]' ).on( 'click input', function() { $( '#date_format_custom_radio' ).prop( 'checked', true ); }); $( 'input[name="time_format"]' ).on( 'click', function() { if ( 'time_format_custom_radio' !== $(this).attr( 'id' ) ) $( 'input[name="time_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() ); }); $( 'input[name="time_format_custom"]' ).on( 'click input', function() { $( '#time_format_custom_radio' ).prop( 'checked', true ); }); $( 'input[name="date_format_custom"], input[name="time_format_custom"]' ).on( 'input', function() { var format = $( this ), fieldset = format.closest( 'fieldset' ), example = fieldset.find( '.example' ), spinner = fieldset.find( '.spinner' ); // Debounce the event callback while users are typing. clearTimeout( $.data( this, 'timer' ) ); $( this ).data( 'timer', setTimeout( function() { // If custom date is not empty. if ( format.val() ) { spinner.addClass( 'is-active' ); $.post( ajaxurl, { action: 'date_format_custom' === format.attr( 'name' ) ? 'date_format' : 'time_format', date : format.val() }, function( d ) { spinner.removeClass( 'is-active' ); example.text( d ); } ); } }, 500 ) ); } ); var languageSelect = $( '#WPLANG' ); $( 'form' ).on( 'submit', function() { /* * Don't show a spinner for English and installed languages, * as there is nothing to download. */ if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) { $( '#submit', this ).after( '<span class="spinner language-install-spinner is-active" />' ); } }); } ); </script>
// populate_roles() clears previous role definitions so we start over.     $wp_roles = new WP_Roles();

    $siteurl = $home = untrailingslashit( $url );

    if ( ! is_subdomain_install() ) {

        if ( 'https' === parse_url( get_site_option( 'siteurl' ), PHP_URL_SCHEME ) ) {
            $siteurl = set_url_scheme( $siteurl, 'https' );
        }
        if ( 'https' === parse_url( get_home_url( get_network()->site_id ), PHP_URL_SCHEME ) ) {
            $home = set_url_scheme( $home, 'https' );
        }
    }

    update_option( 'siteurl', $siteurl );
    update_option( 'home', $home );

    if ( get_site_option( 'ms_files_rewriting' ) ) {
        update_option( 'upload_path', UPLOADBLOGSDIR . "/$blog_id/files" );
    } else {
        update_option( 'upload_path', get_blog_option( get_network()->site_id, 'upload_path' ) );
    }
switch_to_blog( $site->id );
    }

    require_once ABSPATH . 'wp-admin/includes/upgrade.php';

    // Set up the database tables.     make_db_current_silent( 'blog' );

    $home_scheme    = 'http';
    $siteurl_scheme = 'http';
    if ( ! is_subdomain_install() ) {
        if ( 'https' === parse_url( get_home_url( $network->site_id ), PHP_URL_SCHEME ) ) {
            $home_scheme = 'https';
        }
        if ( 'https' === parse_url( get_network_option( $network->id, 'siteurl' ), PHP_URL_SCHEME ) ) {
            $siteurl_scheme = 'https';
        }
    }

    // Populate the site's options.     populate_options(
        array_merge(
            array(
                

    public function initialize() {
        $this->user = new stdClass();

        if ( is_user_logged_in() ) {
            /* Populate settings we need for the menu based on the current user. */
            $this->user->blogs = get_blogs_of_user( get_current_user_id() );
            if ( is_multisite() ) {
                $this->user->active_blog    = get_active_blog_for_user( get_current_user_id() );
                $this->user->domain         = empty( $this->user->active_blog ) ? user_admin_url() : trailingslashit( get_home_url( $this->user->active_blog->blog_id ) );
                $this->user->account_domain = $this->user->domain;
            } else {
                $this->user->active_blog    = $this->user->blogs[ get_current_blog_id() ];
                $this->user->domain         = trailingslashit( home_url() );
                $this->user->account_domain = $this->user->domain;
            }
        }

        add_action( 'wp_head', 'wp_admin_bar_header' );

        add_action( 'admin_head', 'wp_admin_bar_header' );

        

            if ( 1 === (int) $site->mature ) {
                $class .= 'site-mature ';
            }
            if ( 1 === (int) $site->deleted ) {
                $class .= 'site-deleted ';
            }
            if ( 1 === (int) $site->archived ) {
                $class .= 'site-archived ';
            }

            $actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $site->userblog_id ) ) . '">' . __( 'View' ) . '</a>';

            /** * Filters the action links displayed next the sites a user belongs to * in the Network Admin Users list table. * * @since 3.1.0 * * @param string[] $actions An array of action links to be displayed. Default 'Edit', 'View'. * @param int $userblog_id The site ID. */
            $actions = apply_filters( 'ms_user_list_site_actions', $actions$site->userblog_id );

            
</p> <?php     $blogs = get_blogs_of_user( $current_user->ID );
    if ( ! empty( $blogs ) ) {
        ?> <p><?php _e( 'Sites you are already a member of:' ); ?></p> <ul> <?php                 foreach ( $blogs as $blog ) {
                    $home_url = get_home_url( $blog->userblog_id );
                    echo '<li><a href="' . esc_url( $home_url ) . '">' . $home_url . '</a></li>';
                }
                ?> </ul> <?php } ?> <p><?php _e( 'If you are not going to use a great site domain, leave it for a new user. Now have at it!' ); ?></p> <form id="setupform" method="post" action="wp-signup.php"> <input type="hidden" name="stage" value="gimmeanotherblog" /> <?php         /** * Fires when hidden sign-up form fields output when creating another site or user. * * @since MU (3.0.0) * * @param string $context A string describing the steps of the sign-up process. The value can be * 'create-another-site', 'validate-user', or 'validate-site'. */
require_once ABSPATH . 'wp-admin/admin-header.php';
?> <script type="text/javascript"> var current_site_id = <?php echo absint( $id ); ?>; </script> <div class="wrap"> <h1 id="edit-site"><?php echo $title; ?></h1> <p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p> <?php
network_edit_site_nav(
    array(
        'blog_id'  => $id,
        'selected' => 'site-users',
    )
);

if ( isset( $_GET['update'] ) ) :
    switch ( $_GET['update'] ) {
        

            }
            echo '</p>';
        } elseif ( null === $result || is_wp_error( $result ) ) {
            ?> <h2><?php _e( 'An error occurred during the activation' ); ?></h2> <?php if ( is_wp_error( $result ) ) : ?> <p><?php echo $result->get_error_message(); ?></p> <?php endif; ?> <?php         } else {
            $url  = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
            $user = get_userdata( (int) $result['user_id'] );
            ?> <h2><?php _e( 'Your account is now active!' ); ?></h2> <div id="signup-welcome"> <p><span class="h3"><?php _e( 'Username:' ); ?></span> <?php echo $user->user_login; ?></p> <p><span class="h3"><?php _e( 'Password:' ); ?></span> <?php echo $result['password']; ?></p> </div> <?php             if ( $url && network_home_url( '', 'http' ) !== $url ) :
                
return;
    }

    // Show only when the user is a member of this site, or they're a super admin.     if ( ! is_user_member_of_blog() && ! current_user_can( 'manage_network' ) ) {
        return;
    }

    $blogname = get_bloginfo( 'name' );

    if ( ! $blogname ) {
        $blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() );
    }

    if ( is_network_admin() ) {
        /* translators: %s: Site title. */
        $blogname = sprintf( __( 'Network Admin: %s' )esc_html( get_network()->site_name ) );
    } elseif ( is_user_admin() ) {
        /* translators: %s: Site title. */
        $blogname = sprintf( __( 'User Dashboard: %s' )esc_html( get_network()->site_name ) );
    }

    $title = wp_html_excerpt( $blogname, 40, '&hellip;' );

    
/* translators: %s: Site title. */
$title = sprintf( __( 'Edit Site: %s' )esc_html( $details->blogname ) );

$parent_file  = 'sites.php';
$submenu_file = 'sites.php';

require_once ABSPATH . 'wp-admin/admin-header.php';
?> <div class="wrap"> <h1 id="edit-site"><?php echo $title; ?></h1> <p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p> <?php
network_edit_site_nav(
    array(
        'blog_id'  => $id,
        'selected' => 'site-themes',
    )
);

if ( isset( $_GET['enabled'] ) ) {
    $enabled = absint( $_GET['enabled'] );
    
$title = sprintf( __( 'Edit Site: %s' )esc_html( $details->blogname ) );

$parent_file  = 'sites.php';
$submenu_file = 'sites.php';

require_once ABSPATH . 'wp-admin/admin-header.php';

?> <div class="wrap"> <h1 id="edit-site"><?php echo $title; ?></h1> <p class="edit-site-actions"><a href="<?php echo esc_url( get_home_url( $id, '/' ) ); ?>"><?php _e( 'Visit' ); ?></a> | <a href="<?php echo esc_url( get_admin_url( $id ) ); ?>"><?php _e( 'Dashboard' ); ?></a></p> <?php
network_edit_site_nav(
    array(
        'blog_id'  => $id,
        'selected' => 'site-settings',
    )
);

if ( ! empty( $messages ) ) {
    
Home | Imprint | This part of the site doesn't use cookies.