Visualizzazione dei risultati da 1 a 2 su 2

Discussione: custom_header_support

  1. #1

    custom_header_support

    Questa funzione serve ad impostare la figura dell'header.

    codice:
    function twentyten_setup() {
    
        // The custom header business starts here.
        
        $custom_header_support = array(
            // The default image to use.
            // The %s is a placeholder for the theme template directory URI.
            'default-image' => '%s/images/headers/path.jpg',
            // The height and width of our custom header.
            'width' => apply_filters( 'twentyten_header_image_width', 940 ),
            'height' => apply_filters( 'twentyten_header_image_height', 198 ),
            // Support flexible heights.
            'flex-height' => true,
            // Don't support text inside the header image.
            'header-text' => false,
            // Callback for styling the header preview in the admin.
            'admin-head-callback' => 'twentyten_admin_header_style',
        );
    
        add_theme_support( 'custom-header', $custom_header_support );
    la riga:

    codice:
      'default-image' => '%s/images/headers/path.jpg',
    imposta l'immagine; se si cancella l'immagine scompare.

    Mi aspettavo che le due righe:

    codice:
           
     'width' => apply_filters( 'twentyten_header_image_width', 940 ),
    'height' => apply_filters( 'twentyten_header_image_height', 198 ),
    servissero ad impostare altezza e larghezza dell'immagine ma, modificando le cifre 940 e 198 non accade assolutamente nulla. Anzi...potrei cancellare proprio tutta la parte sotto la riga che carica l'immagine che non accadrebbe assolutamente nulla.

    Che accidenti ci stanno a fare le righe sotto?

    P.s.: sto analizzando i codici dei template e ne trovo buona parte completamente inutili. Codici di compatibilità con WP precedenti per esempio... molte funzioni messe che non appaiono usate da nessuna parte. Mah. Vedremo il seguito.

  2. #2
    Utente di HTML.it L'avatar di m4rko80
    Registrato dal
    Aug 2008
    residenza
    Milano
    Messaggi
    2,655
    Ciao, domanda forse stupida ma... usi wordpress col tema twentyten? Queste opzioni dovrebbero essere i settaggi di base per il tema.
    Se modificate poi da area admim potrebbe essere che non vengano calcolate perchè altre opzioni sono state create nel tema.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.