/** * @covers tfrommen\DefaultPostDate\Setting\Option::get_group * * @return void */ public function test_get_group() { $testee = new Testee(); $this->assertSame('writing', $testee->get_group()); }
/** * Adds the settings field to the Writing Settings. * * @wp-hook admin_init * * @return void */ public function add() { $title = esc_html_x('Default Post Date', 'Settings field title', 'default-post-date'); $title = sprintf('<label for="%2$s">%1$s</label>', $title, $this->id); add_settings_field($this->option->get_name(), $title, array($this, 'render'), $this->option->get_group()); }