Wallogit.com
2017 © Pedro Peláez
Some DB tools for WP
Some tools for working with the DB in WordPress., (*1)
Simple base model for modeling custom DB tables in WordPress. Using this class will allow you to;, (*2)
create_table() method (via WP's built-in dbDelta() function)To use, extend \Mishterk\WP\Tools\DB\Model with your own model and implement required methods. You can then call the
$model->create_table() method on your instance to create/update the database with your new table., (*3)
See the following test classes for a look at how your custom class will look;, (*4)
tests/resources/class-test-model.php
tests/resources/class-test-model-composite-key.php, (*5)
Currently, the class will set itself up with the necessary dependencies ($wpdb and a built in adaptor), but these can
be overridden using a constructor arg array., (*6)