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
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.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
/* | |
Türkiye İl ve İlçelerin enlem boylam bilgileri (dörtgen olarak sınır pozisyonlarıyla birlikte) kaynak : google maps (başarsoft) | |
twitter : http://twitter.com/tserpico | |
*/ | |
DROP TABLE IF EXISTS `pk_il`; | |
CREATE TABLE `pk_il` ( | |
`il_id` int(2) NOT NULL COMMENT 'plaka kodu', | |
`il_adi` varchar(255) NOT NULL, | |
`lat` double(20,8) DEFAULT NULL COMMENT 'enlem', |
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://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 | |
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ | |
/** | |
* WordPress Replace Image URL | |
* | |
* Replaces image url content of the WordPress post content. | |
* | |
* PHP version 5 | |
* WordPress version 3.5 |
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> |
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://darklaunch.com/2010/09/01/http-status-codes-in-php-http-header-response-code-function | |
http://snipplr.com/view/68099/ | |
*/ | |
function HTTPStatus($num) { | |
$http = array( |
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>AutoEmbed Examples</title> | |
</head> | |
<body> | |
<h1>AutoEmbed Examples</h1> | |
<?php | |
$content = " | |
<p>Have a laugh...</p> |
OlderNewer