How can I include a setting that has a variable number of values in a settings page using register_setting?

If you are using the Settings API correctly, you should be using the add_settings_field function. The 3rd argument in this function is for the callback function that will generate the HTML for the form field for the individual setting. The Codex states: Function that fills the field with the desired inputs as part of the … Read more

Does releasing a plugin under the AGPL force people to open source their whole WordPress installation?

I did cast a close-vote, since this question is a duplicate of the indicated question. (A Theme and a Plugin are functionally interchangeable as extensions of WordPress; therefore, any licensing implications of one would apply equally to the other.) That said, I will offer some thoughts. Caveats: The official WordPress Foundation stance is that PHP … Read more

Run function on plugin upgrade

global $myplugin_db_version; $myplugin_db_version = “1.0”; function myplugin_install() { global $wpdb; global $myplugin_db_version; $table_name = $wpdb->prefix . “myplugin”; $installed_ver = get_option( “myplugin_db_version” ); if( $installed_ver != $myplugin_db_version ) { $sql = “CREATE TABLE $table_name ( id mediumint(9) NOT NULL AUTO_INCREMENT, time datetime DEFAULT ‘0000-00-00 00:00:00’ NOT NULL, name tinytext NOT NULL, text text NOT NULL, url … Read more

Setting up WordPress plugin’s page

Interesting bug you provoked out there 🙂 The only thing I see missing is the “short description” located between the License URI and the ==Description== block. It is used in the Header area: While you are at it, take a look at this article: The Plugins directory and readme.txt files. And also this one about … Read more

What is the proper filter to add html to a post / page title?

the_title is the correct hook. You can confirm that by checking the source. What you are doing is a bit odd, but it makes sense. Clever solution but I don’t think it was expected. The problem you having seems to be with this line: http://core.trac.wordpress.org/browser/tags/3.5/wp-includes/default-widgets.php#L574 <a href=”<?php the_permalink() ?>” title=”<?php echo esc_attr( get_the_title() ? get_the_title() … Read more