This file contains 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 | |
class Term extends QueryRecord { | |
protected $vocabulary; // set by child classes to indicate which vocabulary your term relates to | |
// these two would be emulated by __get() and __set() so that they're actually stored in $this->fields | |
// for QueryRecord to work but this would be the public API | |
public $term; // the slugified version of the term name | |
public $display; // the raw term name for display |
This file contains 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 | |
$file = $argv[1]; | |
$type = isset( $argv[2] ) ? $argv[2] : 'php'; | |
$contents = file_get_contents( $file ); | |
$url = 'http://localhost/test/post.php'; | |
$options = array( |
This file contains 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 | |
$results = $db->get_results( 'select name, value from options' ); | |
$options = new stdClass(); | |
foreach ( $results as $result ) { | |
$options->{$result->name} = $result->value; | |
} |
This file contains 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 | |
define('UNIT_TEST', true); | |
include('index.php'); | |
header( 'Content-Type: text/html;charset=utf-8' ); | |
$url = 'http://пример.испытание'; | |
$url = html_entity_decode( $url, null, 'UTF-8' ); | |
Utils::debug($url); |
This file contains 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 | |
// connect | |
$connect_start = microtime(true); | |
try { | |
$pdo = new PDO('sqlite:test.db'); | |
} | |
catch ( PDOException $e ) { | |
die('Unable to connect: ' . $e->getMessage()); | |
} |
This file contains 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
public function filter_rewrite_rules ( $rules ) { | |
$rule = new RewriteRule( array( | |
'name' => 'cwm_display_archives', | |
'parse_regex' => '#^archives(?:/page/(?P<page>\d+))?/?$#i', | |
'build_str' => 'archives(/page/{$page})', | |
'handler' => 'UserThemeHandler', | |
'action' => 'display_archives', | |
'rule_class' => RewriteRule::RULE_THEME, | |
'is_active' => true, |
This file contains 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
HASH COMMIT | |
00a6 00a69b35173d5ac367ca282c167cddab8b554064 | |
00a6 00a6c567eaa288de9d94dee8f251e2e99920a75c | |
02cf 02cf229b82fda17f59c6170f4a5d3ba41c220573 | |
02cf 02cf91971a90548235bef7d31cba058db3a5c716 | |
07ac 07ac368b59b33a537ec793fec086f986e3473d47 | |
07ac 07acb13b737f2bdabc23ed9a07b20a4e1a18729d | |
0906 090646ee533cd1fc5fae39581df88b934458a059 | |
0906 0906bff20ecc9b8fa66f4d248c76f223d357e2f5 | |
0dd8 0dd80abcf189ec35eca7bc8d2ae6abcb05600e34 |
This file contains 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
HASH COMMIT COUNT | |
00a6 00a69b35173d5ac367ca282c167cddab8b554064 2 | |
02cf 02cf229b82fda17f59c6170f4a5d3ba41c220573 2 | |
07ac 07ac368b59b33a537ec793fec086f986e3473d47 2 | |
0906 090646ee533cd1fc5fae39581df88b934458a059 2 | |
0dd8 0dd80abcf189ec35eca7bc8d2ae6abcb05600e34 2 | |
0f97 0f976c555c29cf420537c63e0334a54c76543c65 2 | |
1303 13036656fb6289706a059ea15f3e969cb066138d 2 | |
136f 136f9e0778bde254ca9bad8c52ad3a05138ad0e8 2 | |
1462 146286403f696bb344be4ac2ae6adbd43b9b13f8 2 |
This file contains 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
HASH COMMIT COUNT | |
43154 43154137f351ee531a9711cdbb34c5408f98ff5a 2 | |
88d57 88d5724e70318501536db8f82a228585a41b0535 2 | |
b6533 b6533328308a402cea339a05c5a538a539a0207f 2 | |
cbb41 cbb41110ba0244d592255be1a83f4c2871d0e05f 2 |
This file contains 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( $_GET['type'] ) ) { | |
$type = 'json'; | |
} | |
else { | |
$type = $_GET['type']; | |
} | |
switch ( $type ) { |
OlderNewer