Wordpress plugin setting data

点点圈 提交于 2019-11-30 09:00:48
Sudar

All settings of the Plugin will be saved in the db.

Your Plugin can choose which table they wanted to store the setting into. Check the source code of your Plugin.

  • If your Plugins uses get_options(), then it will stored in the wp_options table
  • If your Plugins uses get_post_meta(), then it will be stored in the wp_postmeta table
  • If your Plugins uses get_comment_meta(), then it will be stored in the wp_commentmeta table

Your Plugin might also have created its own table to store the settings.

Inside WordPress database you will look a table like 'wp_options'. During wp install ,If you use your table prefix 'xyz'. Inside database your table name will 'xyz_options'. If you use WP Setting API and options.php, your plugin data will save in this table.

<?php
$data= $GLOBALS['wpdb']->get_results( 'SELECT * FROM xyz_options', OBJECT );
echo '<pre>';
print_r($data);
echo '</pre>';
?>



https://codex.wordpress.org/Options_API
https://codex.wordpress.org/Database_Description#Table:_wp_options
https://codex.wordpress.org/Class_Reference/wpdb
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!