我是制作插件的新手..基本上我想在我的插件选项页面中有一个更新按钮,它将从我的插件页面调用一些功能..
我的选项页面看起来像这样
<div class="wrap">
<?php screen_icon(); ?>
<form action="options.php" method="post" id="<?php echo $plugin_id; ?>_options_form" name="<?php echo $plugin_id; ?>_options_form">
<?php settings_fields($plugin_id.'_options'); ?>
<h2>Plugin Options » Settings</h2>
<table class="widefat">
<thead>
<tr>
<th><input type="submit" name="submit" value="Save Settings" class="button-primary" style="padding:8px;" /></th>
</tr>
</thead>
<tfoot>
<tr>
</table>
</form>
</div>
我的插件页面包含以下几个功能
function get_images(){
global $post;
global $wpdb;
$query_images_args = array(
'post_type' => 'attachment' , 'post_mime_type' =>'image','post_status' => 'published', 'posts_per_page' => -1,'numberposts' => 1
);
$query_images = new WP_Query( $query_images_args );
$images = array();
$abc=($images);
$count = count($images);
for ($i = 0; $i < $count; $i++)
{
$final[]= $images[$i];
}
if(count($abc)>1){
$_SESSION['arrayImg']=$abc;
}
$noofpics= count($image);
}
register_activation_hook(__FILE__, 'get_images');
以及我的插件页面中的另外两个功能。所以点击更新按钮我想调用这几个函数..请帮帮我。