<?php
define('SHORTINIT', true);
require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' );
add_action('init', start());
function start()
{
if( current_user_can('manage_options') ){
if (isset($_POST['name'])) {
global $wpdb;
$result = $wpdb->query('INSERT INTO `wp_buttons_menu`(`name`) VALUES (' . $_POST['name'] . ')');
if ($result) {
header('Location: /wp-admin/admin.php?page=menu_custom');
}
}
}
}