wp_is_mobile example

<?php if ( current_user_can( 'delete_term', $tag->term_id ) ) : ?> <span id="delete-link"> <a class="delete" href="<?php echo esc_url( admin_url( wp_nonce_url( "edit-tags.php?action=delete&taxonomy=$taxonomy&tag_ID=$tag->term_id", 'delete-tag_' . $tag->term_id ) ) ); ?>"><?php _e( 'Delete' ); ?></a> </span> <?php endif; ?> </div> </form> </div> <?php if ( ! wp_is_mobile() ) : ?> <script type="text/javascript"> try{document.forms.edittag.name.focus();}catch(e){} </script> <?php endif;


    unset( $check_users );
}

wp_enqueue_script( 'post' );

$_wp_editor_expand   = false;
$_content_editor_dfw = false;

if ( post_type_supports( $post_type, 'editor' )
    && ! wp_is_mobile()
    && ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) )
) {
    /** * Filters whether to enable the 'expand' functionality in the post editor. * * @since 4.0.0 * @since 4.1.0 Added the `$post_type` parameter. * * @param bool $expand Whether to enable the 'expand' functionality. Default true. * @param string $post_type Post type. */
    

if ( $can_edit_terms ) {
    ?> </div> </div><!-- /col-right --> </div><!-- /col-container --> <?php } ?> </div><!-- /wrap --> <?php if ( ! wp_is_mobile() ) : ?> <script type="text/javascript"> try{document.forms.addtag['tag-name'].focus();}catch(e){} </script> <?php endif;

$wp_list_table->inline_edit();

require_once ABSPATH . 'wp-admin/admin-footer.php';
'url'              => $upload_action_url,
        'filters'          => array( 'max_file_size' => $max_upload_size . 'b' ),
        'multipart_params' => $post_params,
    );

    /* * Currently only iOS Safari supports multiple files uploading, * but iOS 7.x has a bug that prevents uploading of videos when enabled. * See #29602. */
    if (
        wp_is_mobile() &&
        str_contains( $_SERVER['HTTP_USER_AGENT'], 'OS 7_' ) &&
        str_contains( $_SERVER['HTTP_USER_AGENT'], 'like Mac OS X' )
    ) {
        $plupload_init['multi_selection'] = false;
    }

    // Check if WebP images can be edited.     if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ) ) {
        $plupload_init['webp_upload_error'] = true;
    }

    

do_action( 'customize_controls_enqueue_scripts' );

// Let's roll. header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );

wp_user_settings();
_wp_admin_html_begin();

$body_class = 'wp-core-ui wp-customizer js';

if ( wp_is_mobile() ) :
    $body_class .= ' mobile';
    add_filter( 'admin_viewport_meta', '_customizer_mobile_viewport_meta' );
endif;

if ( $wp_customize->is_ios() ) {
    $body_class .= ' ios';
}

if ( is_rtl() ) {
    $body_class .= ' rtl';
}


/** * Tests if the current device has the capability to upload files. * * @since 3.4.0 * @access private * * @return bool Whether the device is able to upload files. */
function _device_can_upload() {
    if ( ! wp_is_mobile() ) {
        return true;
    }

    $ua = $_SERVER['HTTP_USER_AGENT'];

    if ( str_contains( $ua, 'iPhone' )
        || str_contains( $ua, 'iPad' )
        || str_contains( $ua, 'iPod' ) ) {
            return preg_match( '#OS ([\d_]+) like Mac OS X#', $ua$version ) && version_compare( $version[1], '6', '>=' );
    }

    
'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
        '<p>' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '</p>',
        403
    );
}

// Used in the HTML title tag. $title = __( 'Menus' );

wp_enqueue_script( 'nav-menu' );

if ( wp_is_mobile() ) {
    wp_enqueue_script( 'jquery-touch-punch' );
}

// Container for any messages displayed to the user. $messages = array();

// Container that stores the name of the active menu. $nav_menu_selected_title = '';

// The menu id of the current menu being edited. $nav_menu_selected_id = isset( $_REQUEST['menu'] ) ? (int) $_REQUEST['menu'] : 0;


    }

    /** * Determines whether the user agent is iOS. * * @since 4.4.0 * * @return bool Whether the user agent is iOS. */
    public function is_ios() {
        return wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] );
    }

    /** * Gets the template string for the Customizer pane document title. * * @since 4.4.0 * * @return string The template string for the document title. */
    public function get_document_title_template() {
        if ( $this->is_theme_active() ) {
            
/** * Adds settings for the customize-loader script. * * @since 3.4.0 */
function _wp_customize_loader_settings() {
    $admin_origin = parse_url( admin_url() );
    $home_origin  = parse_url( home_url() );
    $cross_domain = ( strtolower( $admin_origin['host'] ) !== strtolower( $home_origin['host'] ) );

    $browser = array(
        'mobile' => wp_is_mobile(),
        'ios'    => wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] ),
    );

    $settings = array(
        'url'           => esc_url( admin_url( 'customize.php' ) ),
        'isCrossDomain' => $cross_domain,
        'browser'       => $browser,
        'l10n'          => array(
            'saveAlert'       => __( 'The changes you made will be lost if you navigate away from this page.' ),
            'mainIframeTitle' => __( 'Customizer' ),
        ),
    );


// Used in the HTML title tag. $title       = __( 'Add New Link' );
$parent_file = 'link-manager.php';

wp_reset_vars( array( 'action', 'cat_id', 'link_id' ) );

wp_enqueue_script( 'link' );
wp_enqueue_script( 'xfn' );

if ( wp_is_mobile() ) {
    wp_enqueue_script( 'jquery-touch-punch' );
}

$link = get_default_link_to_edit();
require ABSPATH . 'wp-admin/edit-link-form.php';

require_once ABSPATH . 'wp-admin/admin-footer.php';
<?php echo $step_1; ?>" class="button button-large"><?php _e( 'Let&#8217;s go!' ); ?></a></p> <?php         break;

    case 1:
        load_default_textdomain( $language );
        $GLOBALS['wp_locale'] = new WP_Locale();

        setup_config_display_header();

        $autofocus = wp_is_mobile() ? '' : ' autofocus';
        ?> <h1 class="screen-reader-text"> <?php         /* translators: Hidden accessibility text. */
        _e( 'Set up your database connection' );
        ?> </h1> <form method="post" action="setup-config.php?step=2"> <p><?php _e( 'Below you should enter your database connection details. If you are not sure about these, contact your host.' ); ?></p> <table class="form-table" role="presentation"> <tr> <th scope="row"><label for="dbname">
wp_enqueue_script( 'dashboard' );

if ( current_user_can( 'install_plugins' ) ) {
    wp_enqueue_script( 'plugin-install' );
    wp_enqueue_script( 'updates' );
}
if ( current_user_can( 'upload_files' ) ) {
    wp_enqueue_script( 'media-upload' );
}
add_thickbox();

if ( wp_is_mobile() ) {
    wp_enqueue_script( 'jquery-touch-punch' );
}

// Used in the HTML title tag. $title       = __( 'Dashboard' );
$parent_file = 'index.php';

$help  = '<p>' . __( 'Welcome to your WordPress Dashboard!' ) . '</p>';
$help .= '<p>' . __( 'The Dashboard is the first place you will come to every time you log into your site. It is where you will find all your WordPress tools. If you need help, just click the &#8220;Help&#8221; tab above the screen title.' ) . '</p>';

$screen = get_current_screen();

'bullist',
                    'numlist',
                    'blockquote',
                    'alignleft',
                    'aligncenter',
                    'alignright',
                    'link',
                    'wp_more',
                    'spellchecker',
                );

                if ( ! wp_is_mobile() ) {
                    if ( $set['_content_editor_dfw'] ) {
                        $mce_buttons[] = 'wp_adv';
                        $mce_buttons[] = 'dfw';
                    } else {
                        $mce_buttons[] = 'fullscreen';
                        $mce_buttons[] = 'wp_adv';
                    }
                } else {
                    $mce_buttons[] = 'wp_adv';
                }

                
/** * @since 3.3.0 * * @param object $root */
    final protected function _render( $root ) {
        /* * Add browser classes. * We have to do this here since admin bar shows on the front end. */
        $class = 'nojq nojs';
        if ( wp_is_mobile() ) {
            $class .= ' mobile';
        }

        ?> <div id="wpadminbar" class="<?php echo $class; ?>"> <?php if ( ! is_admin() && ! did_action( 'wp_body_open' ) ) { ?> <a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1"><?php _e( 'Skip to toolbar' ); ?></a> <?php } ?> <div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="<?php esc_attr_e( 'Toolbar' ); ?>"> <?php                 foreach ( $root->children as $group ) {
                    
check_admin_referer( 'delete-bookmark_' . $link_id );

        wp_delete_link( $link_id );

        wp_redirect( $this_file );
        exit;

    case 'edit':
        wp_enqueue_script( 'link' );
        wp_enqueue_script( 'xfn' );

        if ( wp_is_mobile() ) {
            wp_enqueue_script( 'jquery-touch-punch' );
        }

        $parent_file  = 'link-manager.php';
        $submenu_file = 'link-manager.php';
        // Used in the HTML title tag.         $title = __( 'Edit Link' );

        $link_id = (int) $_GET['link_id'];

        $link = get_link_to_edit( $link_id );
        
Home | Imprint | This part of the site doesn't use cookies.