芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/clients/_syntaxis.fr/wp-content/plugins/jonradio-private-site/admin/main.php
'my_private_site_tab_main_page', 'title' => 'My Private Site', // page title 'menu_title' => 'My Private Site', // title on left sidebar 'tab_title' => 'My Private Site', // title displayed on the tab 'object_types' => array('options-page'), 'option_key' => 'my_private_site_tab_main', 'tab_group' => 'my_private_site_tab_set', 'icon_url' => 'dashicons-lock', ); // 'tab_group' property is supported in > 2.4.0. if (version_compare(CMB2_VERSION, '2.4.0')) { $args['display_cb'] = 'my_private_site_cmb_options_display_with_tabs'; } do_action('my_private_site_tab_main_before', $args); // call on button hit for page save add_action('admin_post_my_private_site_tab_main', 'my_private_site_tab_main_process_buttons'); $args = apply_filters ( 'my_private_site_tab_main_menu', $args ); $main_options = new_cmb2_box($args); my_private_site_admin_main_section_data($main_options); do_action('my_private_site_tab_main_after', $main_options); } // Remove primary Save button // derived from https://github.com/CMB2/CMB2-Snippet-Library/blob/master/filters-and-actions/custom-css-for-specific-metabox.php function my_private_site_delete_welcome_button($post_id, $cmb) { ?> add_field(array( 'name' => 'Welcome to My Private Site Donations', 'id' => 'my_private_site_welcome_area', 'type' => 'text', 'savetxt' => '', 'render_row_cb' => 'my_private_site_render_main_tab_html', // this builds static text as provided )); $section_options = apply_filters('my_private_site_tab_main_section_data_options', $section_options ); } function my_private_site_render_main_tab_html($field_args, $field) { $html_folder = dirname(dirname(__FILE__)) . '/html/'; $html_file = $html_folder . 'admin-main.html'; $html_readme = file_get_contents($html_file); $html_readme = apply_filters('my_private_site_admin_main_section_data_options', $html_readme); echo $html_readme; } //// ADDONS - PROCESS FORM SUBMISSIONS function my_private_site_tab_main_process_buttons() { // Process Save changes button $_POST = apply_filters('validate_page_slug_my_private_site_tab_main', $_POST); }