Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Commit

Permalink
Move menu location and add an icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
abscondment committed Jun 11, 2012
1 parent 2b69abe commit 44158d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions admin.php
Expand Up @@ -22,23 +22,19 @@
*/

require_once dirname( __FILE__ ) . '/db.php';
add_action( 'admin_menu', 'praywithus_menu' );
add_action( 'admin_menu', 'load_praywithus_menu' );
add_action( 'admin_enqueue_scripts', 'praywithus_load_js_and_css' );

function praywithus_menu() {
add_options_page( 'Prayer Options', 'Pray With Us', 'manage_options', 'praywithus', 'praywithus_options' );
function load_praywithus_menu() {
add_menu_page( 'Prayer Options', 'Pray With Us', 'edit_posts', 'praywithus_menu', 'praywithus_menu', plugin_dir_url( __FILE__ ) . 'praywithus.png', 37 );
}

function praywithus_load_js_and_css() {
wp_register_style( 'praywithus.css', PRAYWITHUS_PLUGIN_URL . 'praywithus.css', array(), PRAYWITHUS_VERSION );
wp_enqueue_style( 'praywithus.css');
}

function praywithus_options() {
if ( !current_user_can( 'manage_options' ) ) {
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
}

function praywithus_menu() {
// insert new post
if ( isset($_POST['title']) && isset($_POST['description']) ) {
praywithus_create_request($_POST['title'], $_POST['description']);
Expand Down
Binary file added praywithus.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 44158d3

Please sign in to comment.