WP_LIST_TABLE bulk action

When call $synchronizationList->display() every thing about table created, pagination,sort and bulk action but when its create bulk action its just create 2 input one is dropbox that contains all of bulk action and a submit button for apply button so it doesn’t create from tag and when a submit button doesn’t be in a form … Read more

Fatal error: Call to undefined function add_action() – an untouched problem

get_stylesheet_directory_uri() returns an URL. The requested file is called like any other publicly available resource: without the context of the include statement. This is like opening the PHP file in a browser directly. There is no WordPress context, and the functions add_action() or add_filter() are not defined. Use get_template_directory() in parent themes and get_stylesheet_directory() in … Read more

Form submit in admin does not set is_admin() true

Ok, here is what I found out to solve the issue: First of all, the form should be posted to admin-post.php 2nd, there should be a hidden variable “action” so the form should be like: <form method=”post” action=”<?php echo esc_url( admin_url(‘admin-post.php’) ); ?>”> <input type=”hidden” name=”action” value=”my_settings_save”> …. </form> Now the is_admin() is true and … Read more

Track write actions to the database

Seems like there’s a plugin out there that does quite this! It’s VersionPress! In this blog post is explained what they used to track all the complicated changes. Instead of using the ‘query’ filter they use the option to create a db.php file in the wp-contents directory to extend $wpdb like explained in this post: … Read more