How do I register a new settings page? [closed]

you can try a code like this <?php function theme_settings_init(){ register_setting( ‘theme_settings’, ‘theme_settings’ ); } î This is used to reserve a name for a custom settings array //Add settings to page menu function add_settings_page() { add_menu_page( __( ‘Contenu éditable’ ), __( ‘Contenu éditable’ ), ‘manage_options’, ‘settings’, ‘theme_settings_page’); } î This will create the page … Read more

Store plugin page content in wp_options?

Answering short: it’s legit and proper solution. Answering in details: 1. About the table capacity Considering _options table structure option_id | bigint(20) option_name | varchar(64) option_value | longtext autoload | varchar(20) and the fact that option_value (which is going to contain your HTML), is longtext – it can store L + 4 bytes, where L … Read more

Getting all the settings for a plugin

Setting aren’t registered in the database by plugin, though a plugin should be using an identifying prefix. That is, there is no specific queryable cross-linking in the database between plugin and setting. The only way to way to pull all settings for a plugin is to know what keys the plugin has used to save … Read more

Save Image in wp_options-Table

After some time I found out how to solve my Problem. In short, I have to use Javascript to open the WP-Media Uploader. And in my options I only save the attachment ID. Here is my code: HTML / PHP: <?php $options = get_option( ‘mysettings’ ); $image_id = esc_attr__( $options[‘image_id’]); ?> <div id=”logo”> <?php $hasImage … Read more

WP Page Options Array

After much experimentation I resolved my own question and this answer might help somebody. function mmm_select_field( ) { $options = get_option( ‘mmm_settings’ ); $buttons = array( ‘Bold’ => ‘bold’, ‘Italic’ => ‘italic’, ‘Underline’ => ‘underline’, ‘Superscript’ => ‘superscript’, ‘Align Left’ => ‘alignleft’, ‘Align Center’ => ‘aligncenter’, ‘Align Right’ => ‘alignright’, ‘Bullet List’ => ‘bulletlist’, ‘Number … Read more

How (or where) do I get wordpress plugin update download link?

The latest plugin update information is available by print_r(get_site_transient(‘update_plugins’)); or if you want to filter out wordpress.org plugins and make it more readable… $pluginupdates = get_site_transient(‘update_plugins’); foreach ($pluginupdates->response as $pluginupdate => $values) { if (!stristr($values->package,’wordpress.org’)) { echo “Plugin Name: “.$values->slug.” — “; echo “Update Package: “.$values->package.”<br>”.PHP_EOL; } } Of course, this will just return blank … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)