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
---Test A (TestClassA - hook:send_headers)--- | |
Can't retrieve test var | |
Can't retrieve error var | |
---Test C (TestClassA - hook:send_header) --- | |
A Test | |
Can't retrieve error var <-- wordpress even blocks people from using $_GET['error']?? |
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
class ParentTest{ | |
private $log; | |
public function __construct(){ | |
$this->log=fopen('test.log','a+'); | |
add_action('send_headers',array($this,'testA')); | |
add_filter('the_content',array($this,'testB')); | |
add_action('send_headers',array($this,'testC')); | |
add_filter('the_content',array($this,'testD')); |
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 | |
//assumes file already downloaded! | |
$local_file='feed.xml'; | |
$result = file_get_contents($local_file); | |
$xml = simplexml_load_string($result); | |
$xml->registerXPathNamespace('yweather', 'http://xml.weather.yahoo.com/ns/rss/1.0'); | |
$location = $xml->channel->xpath('yweather:location'); |