$wp_filesystem returns NULL. What are the dependencies?

$wp_filesystem is a global variable containing the instance of the (auto-)configured filesystem object after the filesystem “factory” has been run. To run the factory “over” the global variable (so to set it), just call the WP_Filesystem() function which is, guess what, undocumented in codex. At least the docblock contains some information and you can read … Read more

Set number of article per number of page

Pagination is result of combining two factors: page size and offset. In common case page size is constant and offset is page size times current page. Is it possible to build highly elaborate pagination you describe? Technically yes. That would be matter to adjusting page size and offset in a more elaborate fashion. However specific … Read more

Settings API – Undefined Index when unchecking checkbox

Managed to fix this by doing the following: function dat_checkbox_field_0_render( ) { $options = get_option( ‘dat_settings’ ); $a = $options; if (array_key_exists(“dat_checkbox_field_0″,$a)) { } else { $options[‘data_checkbox_field_0’] = false; } ?> <input type=”checkbox” name=”dat_settings[dat_checkbox_field_0]” <?php checked( $options[‘dat_checkbox_field_0’], 1 ); ?> value=”1″> <?php }