appthemes_add_submenu_page_content

This action hook is triggered within the WordPress admin theme option pages. It provides no parameters but must be used in conjunction with theappthemes_add_submenu_page function in order to work properly.

appthemes_add_submenu_page_content();

Usage

This example sets up your new admin theme page with one drop-down option value. You will need to paste this code within your functions.php theme file. For a full example, see appthemes_add_submenu_page function.

<?php
 
// create the actual page and new field(s)
function my_custom_appthemes_admin_page_content() { 
	global $app_abbr;
 
$my_options = array( 
		array(  'type' => 'tab',
			'tabname' => __('Tab Title', 'appthemes')),
 
		array(	'name' => __('Section Title', 'appthemes'),
			'type' => 'title',
			'desc' => '',
			'id' => ''),
 
		array(  'name' => __('Option Name','appthemes'),
			'desc' => '',
			'tip' => __('Enter your tooltip text here.','appthemes'),
			'id' => $app_abbr.'_custom_field_name',
			'css' => 'min-width:100px;',
			'std' => 'yes',
			'vis' => '',
			'req' => '',
			'js' => '',
			'min' => '',
			'type' => 'select',
			'options' => array(  'yes' => __('Yes', 'appthemes'),
					     'no'  => __('No', 'appthemes'))),
 
		array(  'type' => 'tabend'),						 
);
 
// update and save the options in the WordPress database on form submit
appthemes_update_options( $my_options );
?>
 
	<div>
        <div id="icon-tools"><br/></div>
        <h2><?php _e('Testing','cp') ?></h2>
 
        <form method="post" id="mainform" action="">
            <p><input name="save" type="submit" value="<?php _e('Save changes','appthemes') ?>" /></p>            
 
	<?php appthemes_admin_fields($options_testing); ?>
 
            <p><input name="save" type="submit" value="<?php _e('Save changes','appthemes') ?>" /></p>
            <input name="submitted" type="hidden" value="yes" />
        </form>
    </div>
 
<?php
}
add_action('appthemes_add_submenu_page_content', 'my_custom_appthemes_admin_page_content', 10);
 
?>

Changelog

  • since appthemes-functions.php version 1.2

Source File

appthemes_add_submenu_page() is located in includes/admin/admin-options.php.

Your rating: none
Rating: 5 - 1 vote

Popular Add-ons

Ads By Category or Ad Tag

Display ads from specific category or categories by using a filter widget.


(5)
$12

Logic Widgets for Vantage

Quickly and easily add conditional content to your Vantage site including…


(4)
$29

Coups

A clean and advanced clipper child theme with extended features.


(10)
$39