William
Forum Replies Created
-
I deleted a reinstalled a few times. I’m using the wp cli to install fwiw. The error is indeed bizarre. It points to line 28 which doesn’t have anything that could trigger the error.
The function is a wp core function, so it makes even less sense.
I did get some hits on google that referred to other plugins that also placed a db.php file in wp_content/ so maybe that’s something?
Forum: Networking WordPress
In reply to: Network Theme activation yields "Object Moved" 302Sorry, didnt click the “change” button when i switched it to resolved :/
Forum: Networking WordPress
In reply to: Network Theme activation yields "Object Moved" 302I was using a custom query param called theme for switching between a mobile and full size version of my site. The network install uses theme as a query param.
Moral of the story:
When adding custom querystring parameters to wordpress, be sure to use some sort of namespace nomenclature, e.g. foo_queryparam.
you’re pissed? That’s quite a way to start a post asking for help ??
Nonetheless, I will help ??
open sitemap-core.php.
Go to line 284.
You see this:
$r.= "\t\t<loc>" . $this->EscapeXML($this->_url) . "</loc>\n";
Change this one line to the following two lines:
$hack_url = substr($this->_url,-1,1) == '/' ? substr($this->_url,0,-1) : $this->_url; $r.= "\t\t<loc>" . $this->EscapeXML( $hack_url ) . "</loc>\n";
Hopefully this solution works and you won’t be “pissed” at me too. ??
Forum: Plugins
In reply to: filter hook for built-in oEmbed providers (e.g. youtube)Just by posting my question, i was somehow able to figure this out.
Here’s an example.
$foo = new ExampleWrapper_Oembed; class ExampleWrapper_Oembed { /* Here's our filter function. */ function add_wrapper( $return, $data, $url ) { /* $data is an object created by the xml/json returned from the original oEmbed request. Some other youtube fields: https://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3D-UUx10KOWIE&format=xml Each oembed provider will have different fields here, so check oembed.com for specifics: https://www.oembed.com/ */ /* So lets check for the youtube video title. */ if( strlen($data->title) > 0 ) return $titlebar = '<div class="title">' . $data->title . '</div>' . $return; // we found one, so create some html and prepend it to $result which is the resulting html output. return $return; } /* adding the filter function to the oembed_dataparse filter hook */ function ExampleWrapper_Oembed() { add_filter('oembed_dataparse', array(&$this,'add_wrapper'), 10, 3); } }
Forum: Fixing WordPress
In reply to: PHP Function date() being manipulated by WP?This is still an active bug in wordpress. It’s been hauting me since 2.9 and im frankly surprised at the lack of information regarding the bug, and how to fix it properly.
To fix it, I would *NOT* recommend editing wp-settings.php. Here’s what I did instead. Please offer advice if this is considered a poor fix:
Add the following to your functions.php file in your theme directory:
function op_fix_timezone() { date_default_timezone_set('America/New_York'); } add_action('init', 'op_fix_timezone', 1);
Change the timezone to your own timezone.
Replace “op” with your own namespace if you wish.
Notes: I hooked into init, not sure if there’s a better tag. Also, I set priority to “1” and I’m not sure if that’s a good idea either.
Cheers