30 lines
709 B
PHP
30 lines
709 B
PHP
<?php
|
|
|
|
/*
|
|
Plugin Name: Simple Location
|
|
Plugin URI: http://www.danballard.com/
|
|
Description: Auto tags posts with city, country info
|
|
Version: 0.1
|
|
Author: Dan Ballard
|
|
Author URI: http://www.danballard.com
|
|
Minimum WordPress Version Required: 3.8
|
|
Tested up to: 3.8
|
|
*/
|
|
|
|
if ( is_admin() ) {
|
|
add_action( 'admin_menu', 'add_options_menu' );
|
|
add_action( 'admin_init', 'reg_settings' );
|
|
}
|
|
|
|
function add_options_menu() {
|
|
add_options_page('Simple Location Options', 'Simple Location', 'manage_options', 'simple-location', 'options_page');
|
|
}
|
|
|
|
function options_page() {
|
|
include( plugin_dir_path(__FILE__) . 'options.php');
|
|
}
|
|
|
|
function reg_settings() {
|
|
register_setting( 'simple-location-options', 'gapi-key' );
|
|
}
|