Je suis en train de faire un site pour ma team, et a l'utilisation de mon theme, une erreur apparais (FUUUUUU).
Voici le script:
<?php
require_once('themeOptions/functions.php');
require_once('smartmetabox/SmartMetaBox.php');
require_once('post_templates.php');
require_once('bootstrap-carousel.php');
require_once('pricetable/pricetable.php');
require_once('widgets/portfoliowidget/portfoliowdg.php');
require_once('widgets/latest_twitter/latest_twitter_widget.php');
require_once('themeOptions/rating.php');
require_once('chat/wp-wall.php');
require_once('widgets/rating/popular-widget.php');
require_once('heart/love/heart-love.php');
/*add page builder*/add_action('after_setup_theme', 'oblivion_page_builder');
function oblivion_page_builder()
{
include_once(get_template_directory().'/pagebuilder/page-builder.php');
}
add_action( 'after_setup_theme', 'oblivion_register_sidebars' );
function oblivion_register_sidebars()
{
if ( function_exists('register_sidebar') )register_sidebar(array('name' => __( 'Home sidebar', 'oblivion' ),'id' => 'one','description' => __( 'Widgets in this area will be shown in the home page.' , 'oblivion'),'before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>', ));if ( function_exists('register_sidebar') )register_sidebar(array('name' => __( 'General sidebar', 'oblivion' ),'id' => 'two','description' => __( 'General sidebar for use with page builder.' , 'oblivion'),'before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>', ));
if ( function_exists('register_sidebar') )register_sidebar(array('name' => __( 'Blog sidebar', 'oblivion' ),'id' => 'three','description' => __( 'Widgets in this area will be shown in the blog sidebar.' , 'oblivion'),'before_widget' => '<div class="widget">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>', ));if ( function_exists('register_sidebar') )register_sidebar(array('name' => __( 'Footer area widgets', 'oblivion' ),'id' => 'four','description' => __( 'Widgets in this area will be shown in the footer.' , 'oblivion'),'before_widget' => '<div class="footer_widget span3">','after_widget' => '</div>','before_title' => '<h3>','after_title' => '</h3>', ));
}
add_theme_support( 'menus' );
add_action( 'admin_menu', 'oblivion_create_menu' );
function oblivion_create_menu()
{
$themeicon1 = get_template_directory_uri()."/img/theme_barracks.png";
add_menu_page("Theme Options", "Theme Options", 'edit_theme_options', 'options-framework', 'optionsframework_page',$themeicon1,1800 );
}
add_action( 'after_setup_theme', 'oblivion_theme_tweak' );
function oblivion_theme_tweak()
{
?>
<li class="comment">
<div class="wcontainer">
<?php commenter_avatar() ?>
<?php if ($comment->comment_approved == '0') _e("\t\t\t\t\t<span class='unapproved'>Your comment is awaiting moderation.</span>\n", 'oblivion') ?>
<div class="comment-body">
<div class="comment-author">
<?php commenter_link() ?>
</div>
<i><small><?php comment_time('M j, Y @ G:i a'); ?></small> </i><br />
<?php comment_text() ?>
<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
</div>
<div class="clear">
</div>
</div>
</li>
<?php }
function custom_pings($comment, $args, $depth)
{ $GLOBALS['comment'] = $comment;
?>
<div class="project-comment row">
<div class="comment-author">
<?php printf(__('By %1$s on %2$s at %3$s', 'oblivion'), get_comment_author_link(), get_comment_date(), get_comment_time() ); edit_comment_link(__('Edit', 'oblivion'), ' <span class="meta-sep">|</span> <span class="edit-link">', '</span>'); ?>
</div>
<?php
if ($comment->comment_approved == '0') _e('\t\t\t\t\t<span class="unapproved">Your trackback is awaiting moderation.</span>\n', 'oblivion')
?>
<div class="comment-content span6">
<?php comment_text()
?>
</div>
</div>
<?php }
function commenter_link()
{
$commenter = get_comment_author_link();
if ( preg_match( '/<a[^>]* class=[^>]+>/', $commenter ) )
{
$commenter = preg_replace( '/(<a[^>]* class=[\'"]?)/', '\\1url ' , $commenter );
}
else
{
$commenter = preg_replace( '/(<a )/', '\\1class="url "/' , $commenter );
}
echo ' <span class="comment-info">' . $commenter . '</span>';}/*Commenter avatar*/function commenter_avatar()
{
$avatar_email = get_comment_author_email(); $avatar = str_replace( "class='avatar", "class='photo avatar", get_avatar( $avatar_email, 80 ) );
echo $avatar;
}/*register portfolio post types*/
add_action('init', 'oblivion_portfolio_register');function oblivion_portfolio_register()
{
$labels = array( 'name' => _x('My Portfolio', 'post type general name','oblivion'), 'singular_name' => _x('Portfolio Item', 'post type singular name','oblivion'), 'add_new' => _x('Add New', 'portfolio item' ,'oblivion'), 'add_new_item' => __('Add New Portfolio Item','oblivion'), 'edit_item' => __('Edit Portfolio Item','oblivion'), 'new_item' => __('New Portfolio Item','oblivion'), 'view_item' => __('View Portfolio Item','oblivion'), 'search_items' => __('Search Portfolio','oblivion'), 'not_found' => __('Nothing found','oblivion'), 'not_found_in_trash' => __('Nothing found in Trash','oblivion'), 'parent_item_colon' => '' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'menu_icon' => get_template_directory_uri() . '/img/portfolio.png', 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title','editor','thumbnail'), 'taxonomies' => array('post_tag') ); register_post_type( 'portfolio' , $args );
}
/*register portfolio categories*/
add_action( 'init', 'oblivion_custom_taxonomies', 0 );
function oblivion_custom_taxonomies()
{
?>
<style type="text/css" media="screen">
#icon-edit.icon32-posts-portfolio {background: url(<?php echo get_template_directory_uri(); ?>/img/portfolio_big.jpg) no-repeat;}
</style>
<?php }
/*remove gallery from portfolio*/
add_filter( 'the_content', 'oblivion_remove_gallery_from_portfolio' );
function oblivion_remove_gallery_from_portfolio( $content = null )
{
global $post; if( $post->post_type == 'portfolio' )
{
$pattern = get_shortcode_regex(); preg_match('/'.$pattern.'/s', $content, $matches);
?>
?>
Et j'obtient cette MAGNIFIQUE erreur: Je n'y comprend absolument rien ! J'ai déjà régler une ou deux erreur présente de le script, mais bon, la, je ne sait pas !Parse error: syntax error, unexpected end of file in /home/u759662522/public_html/wp-content/themes/oblivion/functions.php on line 107
D'où viens cette erreur ?
Comment ne plus la reproduire ?
Comment reconnaitre et trouver d'où viens cette erreur ?
- Cordialement.