parent_slug, $this->page_title, $this->menu_title, $this->capability, $this->menu_slug, [$this, 'callback'], ); }); } function add_menu_page() { add_action('admin_menu', function () { add_menu_page( $this->page_title, $this->menu_title, $this->capability, $this->menu_slug, [$this, 'callback'], 'dashicons-admin-generic', $this->position ); }); } function callback() { ?>
"; print_r($quiz_data); echo ""; $google_calc_link = "https://www.google.com/search?q=" . urlencode($quiz_data['question']); // Hiển thị câu hỏi echo << #adminz_quiz_login { display: flex; align-items: center; padding: 10px; border: .0625rem solid #8c8f94; border-radius: 5px; background-color: #d6d8d978; } #adminz_quiz_login strong { width: 100%; font-size:1.3em; text-align: center; } #adminz_quiz_login input { text-align: center; } #adminz_quiz_login_helper { margin-bottom: 15px; }
Sed ut perspiciatis unde omnis iste natus...
'; // }, // $this->field_group // ); // // Thêm 1 option và 1 field mới // $option_name = 'test_field_1'; // register_setting( $this->field_group, $option_name ); // add_settings_field( // wp_rand(), // 'Field Example 1', // function () use ($option_name) { // $value = get_option( $option_name ); // echo << // HTML; // }, // $this->field_group, // $section_id // ); // // Thêm 1 option và 2 field mới // $option_name = 'test_field_2'; // register_setting( $this->field_group, $option_name ); // add_settings_field( // wp_rand(), // 'Field Example 2', // function () use ($option_name) { // $value = get_option( $option_name )['xxx'] ?? ''; // echo << // HTML; // }, // $this->field_group, // $section_id // ); // add_settings_field( // wp_rand(), // 'Field Example 2.2', // function () use ($option_name) { // $value = get_option( $option_name )['yyy'] ?? ''; // echo << // HTML; // }, // $this->field_group, // $section_id // ); // } ); // $page = new \Adminz\Helper\WordpressAdmin(); // $page->field_group = $this->field_group; // $page->page_title = 'PopoDoo Settings'; // $page->menu_title = 'PopoDoo Settings'; // $page->menu_slug = 'ppd-settings'; // $page->add_menu_page(); // add_action('admin_init', function () { // $section_id = 'pages'; // // Register main option array // register_setting( // $this->field_group, // $this->field_group // ); // // Add section // add_settings_section( // $section_id, // 'Pages', // function () { // // Section description (optional) // }, // $this->field_group // ); // $option_name = 'page_he_thong_chi_nhanh'; // add_settings_field( // $option_name, // 'Page Hệ thống chi nhánh', // function () use ($option_name) { // // Get saved value safely // $value = $this->options[$option_name] ?? ''; // echo adminz_field([ // 'field' => 'select', // 'attribute' => [ // // Field name as requested // 'name' => $this->field_group . '[' . $option_name . ']', // ], // 'post_select' => [ // 'post_type' => 'page', // ], // 'value' => $value, // ]); // }, // $this->field_group, // $section_id // ); // });