settings_slug . '-page-options' ); // function wpgancio_update_options ($old_value, $instance_url) { $redirect_uri = network_admin_url('settings.php?page=wpgancio'); $query = join('&', array( 'response_type=code', 'redirect_uri=' . esc_url($redirect_uri), 'scope=event:write', 'client_id=' . get_site_option('wpgancio_client_id'), )); wp_redirect("${instance_url}/oauth/authorize?${query}"); exit; } function wpgancio_network_options_page () { add_submenu_page('settings.php', 'Gancio', 'Gancio', 'manage_options', 'wpgancio', 'wpgancio_network_options_page_html'); } // function wpgancio_options_page() { // // add top level menu page // add_options_page( // 'Gancio', // 'Gancio', // 'manage_options', // 'wpgancio', // 'wpgancio_options_page_html' // ); // } // instance url field cb // field callbacks can accept an $args parameter, which is an array. // $args is defined at the add_settings_field() function. // wordpress has magic interaction with the following keys: label_for, class. // the "label_for" key value is used for the "for" attribute of the