i am currently building a plugin using reduxframework. in the file config.php under the $opt_name = "string", i don't want to hardcode the "String" part instead something like $opt_name = $user_data so i can have multiple option names of which each having it's own set of values. but unfortunately when trying to save it says "There was a problem with your action. Please try again or reload the page". is there something perhaps in the framework.php that is preventing this or the framework itself doesn't support this? thanks in advance..
my config.php looks something like this,
<?php $user_data = $_GET['user_id'];
//how its done
//$opt_name = "youroptionname";
//what i want
$opt_name = (string)$user_data;
$pluginname = "fego_cpanel";
$textdomain = "$textdomain";
$args = array(
'opt_name' => $opt_name,
'menu_type' => 'submenu',
'allow_sub_menu' => true,
'menu_title' => esc_html__('Search Result', $textdomain),
'page_title'=> esc_html__('UserSearch', $textdomain) ,
'google_api_key' => '',
'google_update_weekly' => false,
'async_typography' => true,
'admin_bar' => true,
'admin_bar_icon' => '',
'admin_bar_priority' => 50,
'global_variable' => $opt_name,
'dev_mode' => false,
'update_notice' => false,
'customizer' => true,
'page_priority' => null,
'page_parent' => 'fego-edu',
'page_permissions' => 'manage_options',
'menu_icon' => '',
'last_tab' => '',
'page_icon' => 'icon-themes',
'page_slug' => 'fego-edu-search-result',
'save_defaults' => true,
'default_show' => false,
'default_mark' => '',
'show_import_export' => true
);
Redux::setArgs( $opt_name, $args );
Redux::setSection("$opt_name", array(
'title' => esc_html__("Section", $textdomain) ,
'id' => esc_html__('section-unique-id', $textdomain) ,
'icon' => 'icon-name',
'fields' => array()
));
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745377515a4625068.html
评论列表(0条)