Source of file class-pages.php
Size: 1,851 Bytes - Last Modified: 2016-01-08T15:31:08-05:00
../src/lib/class-pages.php
123456789101112131415161718192021222324252627282930313233343536373839
Covered by 1 test(s):
40
Covered by 1 test(s):
414243444546474849
Covered by 1 test(s):
50515253545556
Covered by 1 test(s):
57
Covered by 1 test(s):
58
Covered by 1 test(s):
59
Covered by 1 test(s):
60
Covered by 1 test(s):
6162
Covered by 1 test(s):
6364
Covered by 1 test(s):
65
Covered by 1 test(s):
66
Covered by 1 test(s):
67
Covered by 1 test(s):
68
Covered by 1 test(s):
69
Covered by 1 test(s):
7071
Covered by 1 test(s):
72
Covered by 1 test(s):
7374
Covered by 1 test(s):
7576
Covered by 1 test(s):
77
Covered by 1 test(s):
78
Covered by 1 test(s):
79
Covered by 1 test(s):
8081
| <?php /** * Pages Class * * @category PHP * @package WpWodify * @subpackage Pages * @since File available since release 1.0.x * @author Cory Collier <corycollier@corycollier.com> */ namespace WpWodify; /** * Pages Class * * @category PHP * @package WpWodify * @subpackage Pages * @since Class available since release 1.0.x * @author Cory Collier <corycollier@corycollier.com> */ class Pages { /** * Holds an instance of a WpWodify\Template class. * * @var WpWodify\Template */ protected $template; /** * Setter for the $template var. * * @param WpWodify\Template $template The Template instance. * * @return WpWodify\Pages Returns $this, for object-chaining. */ public function set_template($template) { $this->template = $template; return $this; } /** * Getter for the $template property. * * @return WpWodify\Template The template instance. */ public function get_template() { return $this->template; } /** * Page to display admin settings */ public function admin_settings() { $fields = new Fields; add_settings_section( 'section-one', 'Section One', null, 'wp-wodify-administer' ); add_settings_field( 'wp-wodify-api-key', 'Api Key', array($fields, 'input_field'), 'wp-wodify-administer', 'section-one', array( '!name' => 'wp-wodify-api-key', '!value' => get_option( 'wp-wodify-api-key' ), ) ); $template = $this->get_template(); $template->set_script('admin-settings-template.php'); $template->render(); } } |