get_screenshot example

'version'      => 'Version',
        );

        foreach ( $plain_field_mappings as $field => $header ) {
            if ( rest_is_field_included( $field$fields ) ) {
                $data[ $field ] = $theme->get( $header );
            }
        }

        if ( rest_is_field_included( 'screenshot', $fields ) ) {
            // Using $theme->get_screenshot() with no args to get absolute URL.             $data['screenshot'] = $theme->get_screenshot() ? $theme->get_screenshot() : '';
        }

        $rich_field_mappings = array(
            'author'      => 'Author',
            'author_uri'  => 'AuthorURI',
            'description' => 'Description',
            'name'        => 'Name',
            'tags'        => 'Tags',
            'theme_uri'   => 'ThemeURI',
        );

        
'package'      => '',
                'requires'     => $theme->get( 'RequiresWP' ),
                'requires_php' => $theme->get( 'RequiresPHP' ),
            );
        }

        $auto_update_forced = wp_is_auto_update_forced_for_item( 'theme', null, $auto_update_filter_payload );

        $prepared_themes[ $slug ] = array(
            'id'             => $slug,
            'name'           => $theme->display( 'Name' ),
            'screenshot'     => array( $theme->get_screenshot() ), // @todo Multiple screenshots.             'description'    => $theme->display( 'Description' ),
            'author'         => $theme->display( 'Author', false, true ),
            'authorAndUri'   => $theme->display( 'Author' ),
            'tags'           => $theme->display( 'Tags' ),
            'version'        => $theme->get( 'Version' ),
            'compatibleWP'   => is_wp_version_compatible( $theme->get( 'RequiresWP' ) ),
            'compatiblePHP'  => is_php_version_compatible( $theme->get( 'RequiresPHP' ) ),
            'updateResponse' => array(
                'compatibleWP'  => is_wp_version_compatible( $update_requires_wp ),
                'compatiblePHP' => is_php_version_compatible( $update_requires_php ),
            ),
            
<?php                     /* translators: Hidden accessibility text. %s: Theme name. */
                    printf( __( 'Select %s' )$theme->display( 'Name' ) );
                    ?> </span> </label> <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" /> <?php endif; ?> </td> <td class="plugin-title"><p> <img src="<?php echo esc_url( $theme->get_screenshot() . '?ver=' . $theme->version ); ?>" width="85" height="64" class="updates-table-screenshot" alt="" /> <strong><?php echo $theme->display( 'Name' ); ?></strong> <?php             printf(
                /* translators: 1: Theme version, 2: New version. */
                __( 'You have version %1$s installed. Update to %2$s.' ),
                $theme->display( 'Version' ),
                $theme->update['new_version']
            );

            echo ' ' . $compat;

            
case 'parent_theme':
                return $this->parent() ? $this->parent()->get( 'Name' ) : '';
            case 'template_dir':
                return $this->get_template_directory();
            case 'stylesheet_dir':
                return $this->get_stylesheet_directory();
            case 'template':
                return $this->get_template();
            case 'stylesheet':
                return $this->get_stylesheet();
            case 'screenshot':
                return $this->get_screenshot( 'relative' );
            // 'author' and 'description' did not previously return translated data.             case 'description':
                return $this->display( 'Description' );
            case 'author':
                return $this->display( 'Author' );
            case 'tags':
                return $this->get( 'Tags' );
            case 'theme_root':
                return $this->get_theme_root();
            case 'theme_root_uri':
                return $this->get_theme_root_uri();
            

            }

            /** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */
            $actions = apply_filters( 'theme_action_links', $actions$theme, 'all' );

            /** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */
            $actions       = apply_filters( "theme_action_links_{$stylesheet}", $actions$theme, 'all' );
            $delete_action = isset( $actions['delete'] ) ? '<div class="delete-theme">' . $actions['delete'] . '</div>' : '';
            unset( $actions['delete'] );

            $screenshot = $theme->get_screenshot();
            ?> <span class="screenshot hide-if-customize"> <?php if ( $screenshot ) : ?> <img src="<?php echo esc_url( $screenshot . '?ver=' . $theme->version ); ?>" alt="" /> <?php endif; ?> </span> <a href="<?php echo wp_customize_url( $stylesheet ); ?>" class="screenshot load-customize hide-if-no-customize"> <?php if ( $screenshot ) : ?> <img src="<?php echo esc_url( $screenshot . '?ver=' . $theme->version ); ?>" alt="" /> <?php endif; ?>
Home | Imprint | This part of the site doesn't use cookies.