Skip to content

Commit

Permalink
Options page display callback.
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewAPicture committed Jul 16, 2014
1 parent 3a03295 commit 17f7d1b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions inc/class.rda-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,46 @@ public function activate() {
}
}

/**
* Options page: Remove Access
*
* @since 1.1.1
*
* @uses add_options_page() to add a sub-menu under 'Settings'
*/
function options_page() {
add_options_page(
__( 'Dashboard Access Settings', 'remove_dashboard_access' ),
__( 'Dashboard Access', 'remove_dashboard_access' ),
'manage_options',
'dashboard-access',
array( $this, 'options_page_cb' )
);
}

/**
* Options page: callback
*
* Outputs the form for the 'Remove Access' submenu
*
* @since 1.1.1
*/
function options_page_cb() {
?>
<div class="wrap">
<?php screen_icon(); ?>
<h2><?php _e( 'Dashboard Access Settings', 'remove_dashboard_access' ); ?></h2>
<form action="options.php" method="POST" id="rda-options-form">
<?php
settings_fields( 'dashboard-access' );
do_settings_sections( 'dashboard-access' );
submit_button();
?>
</form>
</div><!-- .wrap -->
<?php
}

/**
* Register settings and settings sections.
*
Expand Down

0 comments on commit 17f7d1b

Please sign in to comment.