Parse error: syntax error, unexpected $end in…
-
I was trying to adjust some code on my site (but had been saving any changes I did in case an error occured) when all of a sudden I got the error “Parse error: syntax error, unexpected $end in /hermes/bosoraweb136/b1866/dom.catrinabaileycom/public_html/wp-content/themes/panaroma/functions.php on line 243”.
I hadn’t even gotten anywhere near line 243 while editing, so nothing from that was changed.
Below is lines 190-243:
/**
* Load custom functions file.
*/
require get_template_directory() . ‘/inc/custom-functions.php’;function panaroma_custom_blogpost_pagination( $wp_query ){
$big = 999999999; // need an unlikely integer
if ( get_query_var(‘paged’) ) { $pageVar = ‘paged’; }
elseif ( get_query_var(‘page’) ) { $pageVar = ‘page’; }
else { $pageVar = ‘paged’; }
$pagin = paginate_links( array(
‘base’ => str_replace( $big, ‘%#%’, esc_url( get_pagenum_link( $big ) ) ),
‘format’ => ‘?’.$pageVar.’=%#%’,
‘current’ => max( 1, get_query_var($pageVar) ),
‘total’ => $wp_query->max_num_pages,
‘prev_text’ => ‘« Prev’,
‘next_text’ => ‘Next »’,
‘type’ => ‘array’
) );
if( is_array($pagin) ) {
$paged = ( get_query_var(‘paged’) == 0 ) ? 1 : get_query_var(‘paged’);
echo ‘<div class=”pagination”><div>- ‘;
- <span>’. $paged . ‘ of ‘ . $wp_query->max_num_pages .'</span>
- $page
echo ‘‘;
foreach ( $pagin as $page ) {
echo ”“;
}
echo ‘</div></div>’;
}
}function panaroma_get_slug_by_id($id) {
$post_data = get_post($id, ARRAY_A);
$slug = $post_data[‘post_name’];
return $slug;
}// Add support for Vertical Featured Images
if ( ! function_exists( ‘panaroma_vertical_check’ ) ) :
function panaroma_vertical_check( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
$image_data = wp_get_attachment_image_src( $post_thumbnail_id , ‘large’ );
//Get the image width and height from the data provided by wp_get_attachment_image_src()
$width = $image_data[1];
$height = $image_data[2];
if ( $height > $width ) {
$html = str_replace( ‘attachment-‘, ‘vertical-image attachment-‘, $html );
}
return $html;
}
endif;
add_filter( ‘post_thumbnail_html’, ‘panaroma_vertical_check’, 10, 5 );Any idea what’s wrong? I’m not very fluent in code so I cannot tell much. Anything would help.
The topic ‘Parse error: syntax error, unexpected $end in…’ is closed to new replies.