John Huebner
Forum Replies Created
-
Forum: Hacks
In reply to: Prevent update to 4.0 from altering a table columnComplete example here: https://github.com/Hube2/wp-update-prevent-db-changes
Forum: Hacks
In reply to: Prevent update to 4.0 from altering a table columnWell, after much searching and testing the answer is to create a mu-plugin file that hooks ‘dbdelta_queries’
For anyone else that’s looking for this.
add_filter(‘dbdelta_queries’, ‘alter_dbdelta_queries’);
The value passed to your function will be an array of table create queries. Loop through the queries to find the ones you want to alter and alter them.
Forum: Hacks
In reply to: Custom TaxonomyNM, figured it out, setting capabilities for manage, edit and delete terms to false.
@adriano, I just saw this because if smcdonal’s reply, don’t know why I wasn’t notified of your reply.
As soon as I have some time to kill I will attempt to do the auto update with the new version and see what happens. I just want to make sure I have some time free, just in case.
Tried rolling back the plugin and database twice, still failed. Tried deleting the plugin and installing new from the dashboard, same failure. finally had to resort to downloading from here, unpacking locally and uploading with FTP.
Forum: Plugins
In reply to: [Root Relative URLs] Not compatible with "Use Google Libraries" pluginThe code that actually checks the url in the blacklist is:
if (stripos($url, trim($x)) !== false)
And it only compares the url without the domain name.You should be able to blacklist all of the google scripts by just including the common beginning portion, without the domain name:
example:
/ajax/libs/Forum: Plugins
In reply to: [Root Relative URLs] Not compatible with "Use Google Libraries" pluginI have a hacked version of this plugin on GitHub that includes the following changes.
- Fixed PHP error in wp_mail() function
- Do not run plugin on .xml sitemap requests
- PHP warning split() depricated
- Blacklist external JS files
The hacks I have put in place are taken from some of the issues posted here.
No guarantee it will help, but you’ll need to blacklist all the scripts that are loaded from google. Try them with and without the domain name, don’t remember at the moment which.
Forum: Plugins
In reply to: [Root Relative URLs] My working version of this pluginMy altered script only changed the ability to blacklist scripts loaded using wp_enqueue_script(). You must put the full url in rather than the relative path.
for example: http://www.google.com/whatever.js
This was the way it was built to begin with and I did not alter that part so I’m guessing you need to have the absolute path (including protocol and domain) for any script you want to blacklist.
Forum: Plugins
In reply to: [Blunt AJAX] parametes not escaped before requestAdded escaping to parameters, added ability to use multidimensional parameters, corrected other problems, see documentation.
Forum: Plugins
In reply to: [Root Relative URLs] My working version of this pluginThanks, I’m just happy that it helped someone besides myself 🙂 Seriously, I’m hoping that Marcus returns at some point.
Forum: Plugins
In reply to: [Root Relative URLs] Unable to enqueue/register external filesOr try the second method here: http://wordpress.org/support/topic/blacklist-urls-not-working?replies=8
place the code at about line 120, just before:
if (self::$massage) {enter urls in the blacklist as root relative urls so you’d add this to the blacklist for jquery
/ajax/libs/jquery/2.1.0/jquery.min.jsForum: Plugins
In reply to: [Root Relative URLs] Unable to enqueue/register external filesAs far as I can see, to get your script to load correctly you need to comment out the add_filter() call located at about line 333 of the plugin. It looks like this:
add_filter( 'script_loader_src', array( 'MP_WP_Root_Relative_URLS', 'proper_root_relative_url' ) );Forum: Plugins
In reply to: [Root Relative URLs] Does this plugin cause issues with external links?I have not had any problem linking urls on other sites or including scripts and files from other sites. The plugin only effect urls of the posts, pages, files and whathaveyou that is on your own site.
There are a few issues with it that have been brought up in the support formum with some other combinations, so you’ll want to check if there’s any incompatibility with specific plugins you’re using and maybe apply a few tweaks.
Forum: Plugins
In reply to: [Root Relative URLs] Using Root Relative With Yoast SitemapsHere’s a hack that’ll make this work with Yoast, but please note that this will only work if the only files with .xml extensions are your sitemap files.
At the very top of plugin (sb_root_relative_urls.php) find this:
add_action('plugins_loaded', array('MP_WP_Root_Relative_URLS', 'init'), 1);Change it to:
if (!preg_match('/\.xml$/', $_SERVER['REQUEST_URI'])) { add_action('plugins_loaded', array('MP_WP_Root_Relative_URLS', 'init'), 1); }Basically it’s disabling the plugin if the requested URL ends with .xml
Forum: Plugins
In reply to: [Blunt AJAX] ExampleI’ll give it some thought, and if I find some time look at fixing the typos.