'string', 'sanitize_callback' => 'pupop_sanitize_site_key', 'default' => '', ) ); } add_action( 'admin_init', 'pupop_register_settings' ); /** * Adds Settings → Pupop. */ function pupop_add_settings_page() { add_options_page( __( 'Pupop', 'pupop' ), __( 'Pupop', 'pupop' ), 'manage_options', 'pupop', 'pupop_render_settings_page' ); } add_action( 'admin_menu', 'pupop_add_settings_page' ); /** * Renders the settings page. Core prints the "Settings saved" message and * any errors for pages under Settings. */ function pupop_render_settings_page() { if ( ! current_user_can( 'manage_options' ) ) { return; } $key = pupop_site_key(); $host = wp_parse_url( home_url(), PHP_URL_HOST ); ?>

  1. ' . esc_html__( 'Create a Pupop account', 'pupop' ) . '' ); ?>
  2. ' . esc_html( (string) $host ) . '' ); ?>

' . esc_html( $key ) . '' ); ?>

' . esc_html( (string) $host ) . '' ); ?>