'; $soz .=''; $soz .='

'.$AhmetiSoz; if ($row['aciklama']==''){ }else{ $soz .=''.$AhmetiAciklama.''; } $soz .='

'; $soz .='

'.$AhmetiYazar.'

'; $soz.=''; return $soz; } function ahmeti_wp_guzel_sozler_ayri() { $ahmetiPre=AHMETI_WP_PREFIX; $row=mysql_fetch_assoc(mysql_query("SELECT soz,aciklama,wp_soz_author_name,wp_soz_author_slug FROM {$ahmetiPre}soz_view ORDER BY RAND() LIMIT 0,1")); $AhmetiSoz=htmlspecialchars(strip_tags($row['soz']), ENT_QUOTES, 'UTF-8'); $AhmetiYazar=htmlspecialchars(strip_tags($row['wp_soz_author_name']), ENT_QUOTES, 'UTF-8'); $AhmetiAciklama=htmlspecialchars(strip_tags($row['aciklama']), ENT_QUOTES, 'UTF-8'); $dondur=array('Soz'=>$AhmetiSoz,'Yazar'=>$AhmetiYazar,'Aciklama'=>$AhmetiAciklama); return $dondur; } /* Special Page Functions */ function my_flush_rules(){ $rules = get_option('rewrite_rules'); if ( ! isset( $rules['('.AHMETI_SOZ_LIST_SLUG.')/([a-zA-Z0-9-]+)$'] ) || ! isset( $rules['('.AHMETI_SOZ_LIST_SLUG.')/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)$'] ) ) { global $wp_rewrite; $wp_rewrite->flush_rules(); } } function my_insert_rewrite_rules( $rules ){ $newrules = array(); $newrules['('.AHMETI_SOZ_LIST_SLUG.')/([a-zA-Z0-9-]+)$'] = 'index.php?pagename=$matches[1]&soz_sahibi=$matches[2]'; $newrules['('.AHMETI_SOZ_LIST_SLUG.')/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)$'] = 'index.php?pagename=$matches[1]&soz_sahibi=$matches[2]&soz_sayfa=$matches[3]'; return $newrules + $rules; } function my_insert_query_vars( $vars ){ array_push($vars, 'soz_sahibi'); array_push($vars, 'soz_sayfa'); return $vars; } /* Special Page Functions */ if ( AHMETI_SOZ_LIST_SLUG != '' ){ add_action( 'wp_loaded','my_flush_rules' ); add_filter( 'rewrite_rules_array','my_insert_rewrite_rules' ); add_filter( 'query_vars','my_insert_query_vars' ); } function ahmeti_wp_guzel_sozler_in_page(){ if ( is_page() && AHMETI_SOZ_LIST_SLUG == get_query_var('pagename') ){ // Ahmeti Wp Güzel Sözler Listesi İçin Url'den Gelen Talep Varsa... $aa_soz_sayfa=get_query_var('soz_sayfa'); $sozSahibiSef=get_query_var('soz_sahibi'); if (!empty($sozSahibiSef)){ ahmeti_wp_guzel_sozler_author_soz_list($sozSahibiSef); }else{ ahmeti_wp_guzel_sozler_author_list(); } } } function ahmeti_wp_guzel_sozler_author_list(){ ?>

Harika Sözler

'; while($row_ahmeti=mysql_fetch_object($sql_ahmeti)){ echo '
  • '.$row_ahmeti->wp_soz_author_name.'
  • '; } echo ''; } function ahmeti_wp_guzel_sozler_author_soz_list($sozSahibiSef){ // SOZ SAHIBI SAYFASI $ahmetiPre=AHMETI_WP_PREFIX; $sql_author=mysql_fetch_object(mysql_query("SELECT wp_soz_author_id,wp_soz_author_name FROM {$ahmetiPre}soz_author WHERE wp_soz_author_slug='$sozSahibiSef'")); if (empty($sql_author->wp_soz_author_id)){ echo 'Bu kişi hakkında söz eklenmemiş.'; }else{ ?> < Harika Sözler

    wp_soz_author_name; ?> Sözleri

    wp_soz_author_id' "); $i=true; while($row_soz_list=mysql_fetch_object($sql_soz_list)){ if ($i==true && !empty($row_soz_list->author_content)){ preg_match('/\[gallery.*ids=.(.*).\]/', $row_soz_list->author_content, $ids); if (!empty($ids)){ $array_ids=explode(',',$ids[1]); $i_foreach=0; foreach($array_ids as $thumb_id){ echo ''; $i_foreach++; if ($i_foreach==3){$i_foreach=0; echo '
    ';} } if(@!empty($thumb_id)){ echo '
    '; } //echo jqlb_apply_lightbox(do_shortcode($ids[0])); $row_soz_list->author_content=str_replace($ids[0],'',$row_soz_list->author_content); $row_soz_list->author_content=str_replace('

    ','',$row_soz_list->author_content); } echo $row_soz_list->author_content; } if ($i==true){ echo ''; } } ?>