@ericnkatz
<?php
/**
* Plugin Name: Name Of The Plugin
* Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
* Description: A brief description of the Plugin.
* Version: The Plugin's Version Number, e.g.: 1.0
* Author: Name Of The Plugin Author
* Author URI: http://URI_Of_The_Plugin_Author
* License: A "Slug" license name e.g. GPL2
*/
<?php
//do something when.... wp_head runs
add_action('wp_head','plugin_hook_head');
function plugin_hook_head()
{
$output="<script>alert('BOOM HEADSHOT!');</script>";
echo $output;
}
?>
<?php
//when the_content runs... manipulate the output
add_filter( 'the_content', 'plugin_filter_content' );
function plugin_filter_content( $content ) {
return $content . ' The End';
}
?>
wikipedia.org/wiki/Application_programming_interface#Web_APIs
<?php
add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function);
?>
<?php
add_action('admin_menu', 'amazon_products_menu');
function amazon_products_menu() {
add_options_page( 'Amazon Products', 'Amazon Products', 'manage_options', 'amazon-products', 'amazon_products_page');
}
?>
<?php
add_action('admin_menu', 'amazon_products_menu');
function amazon_products_menu() {
add_options_page( 'Amazon Products', 'Amazon Products', 'manage_options', 'amazon-products', '
amazon_products_page
');
}
?>
<?php function amazon_products_page() { ?> <div class="wrap">
<h2>Amazon Products Options</h2>
<p>Yay!!</p>
</div>
<?php
}
<?php
function amazon_products_page() { ?>
<div class="wrap">
<h2>Amazon Products Options</h2>
<form method="POST" action="options.php">
<?php
settings_fields( 'amazon_product_options' );
do_settings_sections( 'amazon-products' );
submit_button();
?>
</form>
</div>
<?php
}
<?php
function amazon_products_page() { ?>
<div class="wrap">
<h2>Amazon Products Options</h2>
<form method="POST" action="options.php">
<?php
settings_fields( 'amazon_product_options' );
do_settings_sections( 'amazon-products' );
submit_button();
?>
</form>
</div>
<?php
}
<?php
function amazon_products_page() { ?>
<div class="wrap">
<h2>Amazon Products Options</h2>
<form method="POST" action="options.php">
<?php
settings_fields( 'amazon_product_options' );
do_settings_sections( 'amazon-products' );
submit_button();
?>
</form>
</div>
<?php
}
<?php
add_action( 'admin_init', 'amazon_product_settings' );
function amazon_product_settings() {
register_setting( 'amazon_product_options', 'amazon_product_country' );
add_settings_section( 'amazon_required_section', 'Amazon Settings', 'amazon_section_text_callback', 'amazon-products' );
add_settings_field( 'amazon_fields', 'Country', 'amazon_fields_callback', 'amazon-products', 'amazon_required_section' );
}