0) {$width = get_option('crossslideshowwidth');} else {$width=800;}
if(get_option('crossslideshowheight') > 0) {$height = get_option('crossslideshowheight');} else {$height=200;}
if(strlen(get_option('crossslideshowpic1')) > 1) {$pics[] = trim(get_option('crossslideshowpic1'));}
if(strlen(get_option('crossslideshowpic2')) > 1) {$pics[] = trim(get_option('crossslideshowpic2'));}
if(strlen(get_option('crossslideshowpic3')) > 1) {$pics[] = trim(get_option('crossslideshowpic3'));}
if(strlen(get_option('crossslideshowpic4')) > 1) {$pics[] = trim(get_option('crossslideshowpic4'));}
if(strlen(get_option('crossslideshowpic5')) > 1) {$pics[] = trim(get_option('crossslideshowpic5'));}
shuffle($pics);
foreach ($pics as $pic) {
$piclist .= "{ src: '".$pic."' },";
if($count == 0) {$first = $pic; $count++;}
}
$piclist = substr($piclist, 0, strlen($piclist)-1);
echo "
";
//echo "
echo ";
";
?>
";
}
function cr_wp_crossslide_header_code() {
}
function cr_wp_crossslide_activate() {
if (!(get_option('crossslideshowwidth'))) {update_option('crossslideshowwidth','800');}
if (!(get_option('crossslideshowheight'))) {update_option('crossslideshowheight','200');}
if (!(get_option('crossslideshowpic1'))) {update_option('crossslideshowpic1','http://thisismyurl.com/images/crossslide/sample1.jpg');}
if (!(get_option('crossslideshowpic2'))) {update_option('crossslideshowpic2','http://thisismyurl.com/images/crossslide/sample2.jpg');}
if (!(get_option('crossslideshowpic3'))) {update_option('crossslideshowpic3','http://thisismyurl.com/images/crossslide/sample3.jpg');}
if (!(get_option('crossslideshowpic4'))) {update_option('crossslideshowpic4','http://thisismyurl.com/images/crossslide/sample4.jpg');}
if (!(get_option('crossslideshowpic5'))) {update_option('crossslideshowpic5','http://thisismyurl.com/images/crossslide/sample5.jpg');}
}
function cr_wp_crossslide_footer_code($options='') {
echo "";
}
function cr_wp_crossslide_plugin_actions($links, $file){
static $this_plugin;
if( !$this_plugin ) $this_plugin = plugin_basename(__FILE__);
if( $file == $this_plugin ){
$links[] = "
Help";
$links[] = "
Donate";
$links[] = "
Settings";
}
return $links;
}
add_action('admin_menu', 'crossslideoptions_add_pages');
function crossslideoptions_add_pages() {
add_management_page('Crossslide', 'Crossslide', 10, 'crossslideoptions', 'cr_wp_crossslide_options');
}
function cr_wp_crossslide_options($options='') {
?>