https://github.com/tomm-tomm/wp-init-db-tables
Create default database tables for a WordPress (WP) theme after loading WP. The function uses "wpdb class" to create the required table if it doesn't exist. Function is fired by "init hook".
https://github.com/tomm-tomm/wp-init-db-tables
mysql php wordpress wp-theme wp-theme-starter wpdb
Last synced: about 2 months ago
JSON representation
Create default database tables for a WordPress (WP) theme after loading WP. The function uses "wpdb class" to create the required table if it doesn't exist. Function is fired by "init hook".
- Host: GitHub
- URL: https://github.com/tomm-tomm/wp-init-db-tables
- Owner: tomm-tomm
- Created: 2024-11-18T11:06:29.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-11-19T09:47:14.000Z (6 months ago)
- Last Synced: 2025-01-27T10:43:38.810Z (4 months ago)
- Topics: mysql, php, wordpress, wp-theme, wp-theme-starter, wpdb
- Language: PHP
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.MD
Awesome Lists containing this project
README
This file contains one function which creates default database tables for a WordPress (WP) theme after loading WP. The function uses "wpdb class" to create the required table if it doesn't exist. Function is fired by "init hook".
The function provides an option to add one preset row to the table. This is useful for tables where multiple rows are not needed (e.g. when editing settings, etc.).