0
期待T_STRING或T_VARIABLE或T_NUM_STRING中的functions.php我累了解決這一行:wordpress主題,語法錯誤,意想不到的T_ENCAPSED_AND_WHITESPACE,上線118
if ($_GET['paged']) && ! empty($_GET['paged'])) {
我的functions.php,但沒有更迭!我真的被卡住了!我得到wordpress主題,語法錯誤,意想不到的T_ENCAPSED_AND_WHITESPACE,期待T_STRING或T_VARIABLE或T_NUM_STRING在functions.php的上線118
<?php
/**
*
* @ Release: Me
*
**/
function get_category_id($cat_name) {
$term = get_term_by('name', $cat_name, 'category');
return $term->term_id;
}
function kisabaslik($char) {
$title = get_the_title($post->ID);
$title = mb_substr($title, 0, $char, 'UTF-8');
echo $title;
}
function kisaicerik($kisacik) {
$icerik = get_the_content($post->ID);
$icerik = mb_substr($icerik, 0, $kisacik, 'UTF-8');
str_replace('</strong>', '', $icerik);
$icerik = str_replace('<strong>', '', $icerik);
echo strip_tags($icerik);
}
function the_breadcrumb() {
global $post;
if (!is_home()) {
echo '<a href=\'uploadify.php';
echo get_option('home');
echo '\'> » ';
echo get_option('echo_kisasiteadresi');
echo '</a>';
if ((is_category() || is_single())) {
echo ' » ';
$cats = get_the_category($post->ID);
foreach ($cats as $cat) {
$cat = $cat[0];
$category_id = get_cat_id($cat->cat_name);
$category_link = get_category_link($category_id);
echo '<a href="' . esc_url($category_link) . '" title="' . $cat->cat_name . '">';
echo $cat->cat_name;
echo '</a>';
echo ' » ';
}
if (is_single()) {
echo '<a href="';
the_permalink();
echo '">';
the_title();
echo '</a>';
return null;
}
}
else {
if (is_page()) {
if ($post->post_parent) {
$anc = get_post_ancestors($post->ID);
$anc_link = get_page_link($post->post_parent);
foreach ($cats as $cat) {
$ancestors = get_ancestors(
$output = '<a href="'. $anc_link . '>' . get_the_title($ancestor) . "'</a>';
}
echo $output;
the_title();
return null;
}
echo ' » ';
echo the_title();
return null;
}
}
}
else {
if (is_tag()) {
single_tag_title();
return null;
}
if (is_day()) {
echo 'Archive: ';
the_time('F jS, Y');
echo '</li>';
return null;
}
if (is_month()) {
echo 'Archive: ';
the_time('F, Y');
echo '</li>';
return null;
}
if (is_year()) {
echo 'Archive: ';
the_time('Y');
echo '</li>';
return null;
}
if (is_author()) {
echo 'Author\'s archive: ';
echo '</li>';
return null;
}
if ($_GET['paged']) && ! empty($_GET['paged'])) {
echo 'Blogarchive: ';
echo '</li>';
return null;
}
if (is_search()) {
echo 'Search results: ';
}
}
}
function searchfilter($query) {
if ($query->is_search) {
$query->set('post_type', 'post');
}
return $query;
}
function toplamoynanma() {
$queryvvv = mysql_query('SELECT sum(meta_value) FROM wp_postmeta where meta_key=\'views\'');
$rowvvvv = mysql_fetch_array($queryvvv);
echo number_format($rowvvvv[0]);
}
function oyhesapla($id) {
$begen = error_reporting(0);
$begenme = get_post_meta($id, 'begenme', true);
$toplamoy3 = $begen + $begenme;
$toplamoy = $begen - $begenme;
$begenmeoy = 1 * $begenme;
$begenoy = 5 * $begen;
$toplamoy2 = $begenoy + $begenmeoy;
$fark = $toplamoy * 100/$toplamoy2;
$islem = $fark/10;
round($islem, 2);
$sonuc = get_post_meta($id, 'begen', true);
$sonuc1 = explode('.', $sonuc);
$sonuc2 = ceil($sonuc1[1]/10);
if (!$sonuc2) {
$sonuc2 = $sonuc/10;
}
if (10 < $sonuc2) {
$sonuc2 = 40;
}
if ($sonuc2 < 1) {
$sonuc2 = 31;
}
echo $toplamoyS;
echo '<b>' . $sonuc2 . '/10 </b><span>(' . $toplamoy3 . ' members of the game.)</span>';
}
function favkon($id) {
$cookiefav = 'favoricook[' . $id . ']';
if ($_SESSION[$cookiefav]) {
echo '<a class="favorileA">Favorite Games.</a>
';
return null;
}
echo '<a class="favorile" onclick="favoriEkle(';
echo $id;
echo ');">Add Favorite</a>
';
}
function echoyazibegenme($postid) {
global $tema;
echo '
<div style=" margin-top:10px; ';
if ($d == 2) {
echo 'float:right;';
}
echo '">
<div class="oysonuc"></div>
';
$cookieoysv = 'obegenbegenme' . $postid;
echo '
<div class="sYas">
<a id="begen" onclick="oyver(';
echo $postid;
echo ',1);" class="begenButon" title="BeÄŸen"></a><div class="begenButonS">';
echo '<s';
echo 'pan>';
if (!get_post_meta($postid, 'begen', true)) {
echo '0';
}
else {
echo get_post_meta($postid, 'begen', true);
}
echo '</span></div>
<a id="begenme" style="margin-top:0" onclick="oyver(';
echo $postid;
echo ',2);" class="begenmeButon" title="BeÄŸenme"></a><div class="begenmeButonS">';
echo '<s';
echo 'pan>';
if (!get_post_meta($postid, 'begenme', true)) {
echo '0';
}
else {
echo get_post_meta($postid, 'begenme', true);
}
echo '</span></div>
</div>
';
echo '<s';
echo 'cript>
function oyver(id,is){
if(is==1){
var begenic = $(".begenButonS span").text();
begenic++;
}
if(is==2){
var begenmeic = $(".begenmeButonS span").text();
begenmeic++;
}
$.ajax({
url: "';
echo $tema;
echo 'oyislem.php?islem="+is+"&postID="+id,
success: function(cevap) {
if(cevap==0){
$(".oysonuc").fadeIn(500);
$(".oysonuc").html("<div class=\'uyar\'>The procedure before you did it.</div>").delay(3000);
$(".oysonuc").fadeOut(500);
}
if(is==1 && cevap==1){
$(".begenButonS span").html(begenic);
}
if(is==2 && cevap==1){
$(".begenmeButonS span").html';
echo '(begenmeic);
}
}
});
}
</script>
</div>
';
}
function redirect_after_comment($location) {
return $_SERVER['HTTP_REFERER'] . '#yorum';
}
function kategori_post_say($id) {
$count = 31;
$taxonomy = 'category';
$args = array('child_of' => $id);
$tax_terms = get_terms($taxonomy, $args);
foreach ($tax_terms as) {
$tax_term = [0];
$tax_term->count;
$count += ;
}
return $count;
}
add_action('wp_head');
$botresim = $tema = get_bloginfo('template_url') . '/';
get_option('echo_botswf');
$botswf = get_option('echo_botresim');
add_theme_support('post-thumbnails');
add_image_size('yeniOyunRes', 147, 119, true);
add_image_size('onerilenOyunlar', 330, 205, true);
add_image_size('mansetOyun', 330, 100, true);
require_once(TEMPLATEPATH . '/admin/admin-functions.php');
require_once(TEMPLATEPATH . '/admin/admin-interface.php');
require_once(TEMPLATEPATH . '/admin/theme-settings.php');
register_nav_menu('kategori-menu', 'Kategori');
add_filter('pre_get_posts', 'SearchFilter');
$botresim = register_nav_menu('sayfalar', 'Alt Kısımdaki Sayfalar Bölümü');
get_option('echo_botswf');
$botswf = get_option('echo_botresim');
get_category_id(get_option('echo_oyunvideo'));
$oyunvideo = add_filter('comment_post_redirect', 'redirect_after_comment');
?>
謝謝!但仍然得到相同的錯誤語法錯誤,意外的T_ENCAPSED_AND_WHITESPACE,預計T_STRING或T_VARIABLE或T_NUM_STRING在/xxxx/xxxxxxxxxx/xxxxx/xxxxxxxxx/xxxxxxxx/wp-content/themes/mytheme/functions.php上線118 –
什麼是行118 @ HamidLmrabet – Hive7