Skip to content

Commit

Permalink
Add wpdb_prefix_table function
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Newcomer committed May 15, 2019
1 parent 17db241 commit 314cafc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/wpdb.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@

namespace Zeek\WP_Util;

/**
* Prefix the given table name with the table prefix.
*
* @param string $table_name
*
* @return string
*/
function wpdb_prefix_table( string $table_name ) {
global $wpdb;

return $wpdb->prefix . $table_name;
}

/**
* Delete a row in the table
*
Expand Down

0 comments on commit 314cafc

Please sign in to comment.