Can’t create tables with my plugin
All of your create table commands must be in uppercase in order for it to work with dbDelta(). It’s “picky”.
All of your create table commands must be in uppercase in order for it to work with dbDelta(). It’s “picky”.
You could target the ID of the page in the database. It is also passed as a 2nd parameter to the function. Assuming your ID to be “1234”, the code becomes add_filter( ‘the_title’, ai1ec_remove_title, 10, 2 ); function ai1ec_remove_title( $title, $id ) { if( 1234 == $id ) { return ”; } else { return … Read more
I ran into this issue recently on a site that I was modifying for a client. The solution that worked for me was to set a ridiculously high priority for my action hook, like so: add_action( ‘add_meta_boxes’, ‘mjp_edit_meta_boxes’, 999 ); This ensures that the action is executed at the very end of the chain after … Read more
First of all I want to reference you to the WP codex article about Creating or Updating the Table with Plugin. Note that the dbDelta function is rather picky, however. For instance: You must put each field on its own line in your SQL statement. You must have two spaces between the words PRIMARY KEY … Read more
You have to encode the string you store in UTF-8 or whatever the site is using as encoding. If you don’t store valid UTF-8 you get the famous diamonds. In websites, these are not girls best friends, they just break your output. 🙂 See this answer for some code to encode text as UTF-8 in … Read more
You shouldn’t inject postinfo() in the <head> section (that’s what happens when you use the wp_head hook). If you do not want to edit templates, I’d suggest you use the wp_footer hook instead, and append the postinfo to your header div with jQuery, e.g.: $(‘.post-info’).appendTo(‘#header’);
Are your database tables using the InnoDB engine? If so, and the plugin is just for your website, start a transaction, run the inserts, commit the transaction (or rollback on error). global $wpdb; $wpdb->query(‘start transaction’); // do the inserts $wpdb->query(‘commit’);
There was an attack yesterday on WP servers, make a small push and try again. First, run the readme validator and make sure yours matches as much as possible the official example.
If your AJAX is a ‘post’, or for that matter any protocol, to URL2PNG the client is doing so directly. The client isn’t aware of, nor would it honor you server’s proxy configuration. Considering the brief read of URL2PNG docs, placing your API key and password in your JavaScript/jQuery is risky at best since you’d … Read more
I figured it out. The window which was opened had to call the tinyMCEPopup.close() in its own scope. Which also meant I had to include the tiny_mce_popup.js script as well.