What Triggers a Plugin Update Alert

Basically it sends a list of your plugins to the wordpress.org API server, which does some black magic to try to figure out if any of the plugins you have match the ones it has, then it returns version info back for them. The API uses a rather elaborate mechanism to match plugins against plugins … Read more

Multi step form, custom plugin

The process can be done by posting the form to the current page, and then using those values from the $_POST object to determine the next form. In the simplest example, a hidden input named “page” can increase its value on each step. Set the value of additional hidden inputs with the data from $_POST … Read more

Can I ignore caching of a plugin in W3 Total Cache? [closed]

You can try fragment caching, from plugin’s FAQ: Edit your templates to with the following syntax to ensure that dynamic features remain so: Example 1: <!– mfunc any PHP code –><!– /mfunc –> Example 2: <!– mfunc –>any PHP code<!– /mfunc –> Example 3: <!–MFUNC –> echo rand(); <!–/mfunc –> Example 4: <!– mclude path/to/file.php … Read more

How to attach Links into page/post or custom post type?

This is a simple and quick Metabox + jQuery + Plain Text solution. If you’d like to split the dropdown into categories, then check the documentation for get_bookmarks. This may also be useful: add_meta_box. This is the result: And the code: add_action( ‘add_meta_boxes’, ‘wpse_42440_add_custom_box’ ); add_action( ‘admin_head’, ‘wpse_42440_script_direct_print’ ); function wpse_42440_add_custom_box() { add_meta_box( ‘wpse_42440_sectionid’, __( … Read more

Custom database table for plugin not creating on activation

Here’s an updated version of pf_rb_install(). In the table creation SQL, $table_name should not be in quotes. The quotes should have triggered an error which would appear in PHP’s error.log file. Also, there should be two spaces after the PRIMARY KEY (id) portion of the SQL statement. register_activation_hook( __FILE__, ‘pf_rb_install’ ); function pf_rb_install() { global … Read more

Leverage browser caching not working after updating .htaccess

This should do it if ( !is_admin() || !is_admin_bar_showing() ){ add_filter( ‘script_loader_src’, ‘_remove_script_version’, 15, 1 ); add_filter( ‘style_loader_src’, ‘_remove_script_version’, 15, 1 ); } function _remove_script_version( $src ){ if (preg_match(“(\?ver=)”, $src )){ $parts = explode( ‘?’, $src ); return $parts[0]; }else{ return $src; } } This will remove the ?ver= from the file url. There’s a … Read more

Advanced custom field plugin not showing in admin sidebar

The author wrote that “Due to the new terms and conditions governing WordPress plugins, ACF has been relocated to github. This will allow the plugin to be accessible whilst the new version is being built.” (Refer to the notes under “description” before you installed the plugin or if you go into your plugins folder via … Read more