Add agenda items and notifications

The WordPress way to organize this is to create separate post types for the tournaments, the games, and the participants. Here is an example for the tournament post type registration: add_action( ‘wp_loaded’, function() { register_post_type( ‘tournament’, [ ‘label’ => __( ‘Tournaments’, ‘tournaments’ ), ‘labels’ => [ ‘name’ => __( ‘Tournaments’, ‘tournaments’ ), ‘singular_name’ => __( … Read more

Front-end update_post_meta with ajax

You should check out this document on WordPress.org: http://codex.wordpress.org/AJAX_in_Plugins It gives you everything you need to create front-facing XHR functionality. Make sure to set a nopriv hook for those who aren’t logged in. http://codex.wordpress.org/AJAX_in_Plugins#Ajax_on_the_Viewer-Facing_Side Also the JS variable ajaxurl is only set on the backend. You will need to define that yourself on the front-end. … Read more

Hook to be used when creating a database table

As mentioned, after_switch_theme should be a pretty good choice. Your table create/update function will only run when you switch themes, which should be roughly like activating a plugin. If you use dbDelta to create and/or update the table there should be no issue with table creation. From the Codex: global $wpdb; $installed_ver = get_option( “jal_db_version” … Read more

Most efficient way to get custom database records from 20 buttons and 20 tables?

I suppose the easiest way would be to have the action or other parameters in the button itself, i.e. <div class=”mybutton” data-action=”get_quote” data-type=”literary”>Get a literary quote</div> <div class=”mybutton” data-action=”get_quote” data-type=”political”>Get a political quote</div> data-foo=”bar” attributes can easily be accessed in jQuery with .data(“foo”), so you could change the jQuery around a bit to listen to … Read more

Is there any reason only 1 (my) IP would be added to this table using $wpdn->insert?

Are you using the same internet connection on multiple devices? Perhaps your mobile is connected to the same wifi network. Visit http://icanhazip.com in your mobile to see its IP. As for browserstack perhaps they aren’t accepting the cookie so their IP doesn’t get recorded. You should record the timestamp as well so you can correlate … Read more