jquery document ready function not being called [closed]
Try using jQuery instead of jquery. (Note the capital “Q”.) Edit: Upon viewing your source, you have an extra });. Working example
Try using jQuery instead of jquery. (Note the capital “Q”.) Edit: Upon viewing your source, you have an extra });. Working example
Not shure if this isn´t a general php question… Use the WP_Error Class. // http://php.net/manual/de/function.is-float.php // http://php.net/manual/de/function.is-int.php // inside your save_post/update_post hooks callback function, // just type cast to float. You could also do a check if it contains non numeric chars // and then simply return; $check = ! is_float( $value ) OR ! … Read more
If you’re manually installing a plugin, you need to disable and delete the old version. However, WordPress does allow you to update your plugin programatically. If your plugin is hosted on the WordPress.org repository, it will prompt the users to install updates for you. You’ve likely seen this with Akismet and other plugins already. If … Read more
I wouldn’t cause the plugin to die like that. Just check for cURL each time you need to make a call or fall back on wp_remote_(post|get) (eg. write a wrapper function that takes care of the check and send the data/headers you want). BUT, if you really really want to disable the plugin if cURL … Read more
Now I’ve found a solution [to issue 2 above]: I prefixed the external PHP command with: XDEBUG_CONFIG=”remote_enable=Off” and then it didn’t attempt to connect to the debugger. So, in wordpress-tests/init.php I changed from: system( WP_PHP_BINARY . ‘ ‘ . escapeshellarg( dirname( __FILE__ ) . ‘/bin/install.php’ ) . ‘ ‘ . escapeshellarg( $config_file_path ) ); to: … Read more
Themes, anyone? I don’t test »against« or »with« themes. Just with some other plugins that might conflict (but I normally leave that open until something happens – you’ll never figure out all edge cases). At least, you’re intercepting/extending/altering stuff via filters. So why test against themes, when you’re modifying core functions? If you’re intercepting the_content … Read more
Its best practice to always use internal WordPress API functions that already exist in place of external scripts. You would need to regenerate the thumbnails yourself, which is not overly difficult, if for instance you give yourself a head start and study the source code of existing and similar solutions; Regenerate Thumbnails Plugin http://wordpress.org/extend/plugins/regenerate-thumbnails/ browse … Read more
I would wrap the whole thing in a class and put your data into a class var. class WPA69616_Plugin { private $data=””; public function __construct() { add_shortcode(‘my_shortcode’, array($this, ‘add_content’)); add_action(‘wp_footer’, array($this, ‘output_content’)); } public function add_content($atts) { extract( shortcode_atts( array( ‘content’ => ” ), $atts ) ); $this->data .= $content; } public function output_content() { … Read more
Lets take the nicer form of what you have as posted in another answer $args = array( ‘s’ => ‘the’, ‘posts_per_page’ => 5, ‘paged’ => 1 ); $custom_query = new WP_Query($args); I strongly recommend you use WP_Query with an argument array and pass in via the constructor like this. Lets look at your arguments closer. … Read more
This took a bit to sort out. 🙂 You are trying to use $instance[‘post_types’] in your update() function but are not setting that value at all in the form. I altered a couple of things so that the two match up. Leaving your form (mostly) as it is, your update() needs to be… // save … Read more