Visualizzazione risultati 1 fino 5 di 5

Discussione: help! ricevo messaggio di errore " unexpected $end "

  1. #1
    money4good non è connesso Neofita
    Data registrazione
    11-04-2016
    Messaggi
    5

    Predefinito help! ricevo messaggio di errore " unexpected $end "

    Ricevo questo messaggio:
    Parse error: syntax error, unexpected $end in /membri/money4good/wp-content/themes/wp_medi5-v1.3.3/functions.php on line 69

    Questo è il file functions php ma non vedo dove è l'errore, mi potete aiutare?

    Codice PHP:
    <?php
    get_template_part
    ('panel/constants');

    load_theme_textdomain( 'ci_theme', get_template_directory() . '/lang' );

    // This is the main options array. Can be accessed as a global in order to reduce function calls.
    $ci = get_option(THEME_OPTIONS);
    $ci_defaults = array();

    // The $content_width needs to be before the inclusion of the rest of the files, as it is used inside of some of them.
    if ( ! isset( $content_width ) ) $content_width = 1040;

    //
    // Let's bootstrap the theme.
    //
    get_template_part('panel/bootstrap');
    get_template_part('functions/shortcodes');

    //
    // Use HTML5 on galleries
    //
    add_theme_support( 'html5', array( 'gallery' ) );

    //
    // Define our various image sizes.
    //
    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 480, 480, true );
    add_image_size( 'ci_thumb', 780, 780, true);
    add_image_size( 'ci_slider', 1920, 550, true);

    // Let the user choose a color scheme on each post individually.
    add_ci_theme_support('post-color-scheme', array('page', 'post', 'service', 'personnel'));

    // Let the theme know that we have WP-PageNavi styled.
    add_ci_theme_support('wp_pagenavi');


    // Since it's a responsive theme, remove width and height attributes from the <img> tag.
    // Remove also when an image is sent to the editor. When the user resizes the image from the handles, width and height
    // are re-inserted, so expected behaviour is not lost.
    add_filter('post_thumbnail_html', 'ci_remove_thumbnail_dimensions');
    add_filter('image_send_to_editor', 'ci_remove_thumbnail_dimensions');
    if( !
    function_exists('ci_remove_thumbnail_dimensions') ):
    function
    ci_remove_thumbnail_dimensions($html)
    {
    $html = preg_replace('/(width|height)="\d*"\s/', "", $html);
    return
    $html;
    }
    endif;

    // Add prettyphoto support for inline content images
    add_filter('the_content', 'ci_prettyPhotoRel', 12);
    add_filter('get_comment_text', 'ci_prettyPhotoRel');
    add_filter('wp_get_attachment_link', 'ci_prettyPhotoRel');
    if( !
    function_exists('ci_prettyPhotoRel') ):
    function
    ci_prettyPhotoRel($content)
    {
    global
    $post;
    $pattern = "/<a(.*?)href=('|")([^>]*).(bmp|gif|jpeg|jpg|png)('|")(.*?)>(.*?)<\/a>/i";

    $replacement = '
    <a$1href=$2$3.$4$5 data-rel="prettyPhoto['.$post->ID.']"$6>$7</a>';

    $content = preg_replace($pattern, $replacement, $content);
    return $content;
    }
    endif;
    Ultima modifica di karl94 : 11-04-2016 alle ore 18.30.30 Motivo: Formattazione

  2. #2
    karl94 non è connesso Staff AV
    Data registrazione
    03-10-2005
    Messaggi
    17,744

    Predefinito

    C'è un problema nella riga in cui viene assegnato il valore alla variabile $pattern: la stringa è scritta male. Hai apportato modifiche manuali? Quali?

  3. #3
    money4good non è connesso Neofita
    Data registrazione
    11-04-2016
    Messaggi
    5

    Predefinito

    Sì effettivamente ho aggiunto la stringa di codice:
    add_post_type_support( 'service', 'woosidebars' )
    ma quando ho visto che non funzionava l'ho rimossa. non credo di aver modificato il file.

  4. #4
    karl94 non è connesso Staff AV
    Data registrazione
    03-10-2005
    Messaggi
    17,744

    Predefinito

    Non hai il file originale con il codice corretto?

  5. #5
    money4good non è connesso Neofita
    Data registrazione
    11-04-2016
    Messaggi
    5

    Predefinito

    sì, ho provato a sostituirlo ma non è cambiato nulla. Alla fine ho disinstallato/reinstallato il tema dal ftp. adesso tutto okay. grazie!

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •