diff --git a/super-simple-slideshow.php b/super-simple-slideshow.php index 83e14cc..ed3426b 100644 --- a/super-simple-slideshow.php +++ b/super-simple-slideshow.php @@ -3,34 +3,34 @@ Plugin Name: Super Simple Slideshow Description: Super simple slideshow plugin for Wordpress. Version: 1.0 -Author: Sondre Olav +Author: ai-bot */ if (!defined('ABSPATH')) exit; add_action('admin_menu', function(){ - add_menu_page('NTKF Slideshow','NTKF Slideshow','manage_options','ntkf-slideshow','ntkf_slideshow_admin'); + add_menu_page('Super Simple Slideshow','Super Simple Slideshow','manage_options','super-simple-slideshow','super_simple_slideshow_admin'); }); add_action('admin_enqueue_scripts', function($hook){ - if($hook !== 'toplevel_page_ntkf-slideshow') return; + if($hook !== 'toplevel_page_super-simple-slideshow') return; wp_enqueue_media(); wp_enqueue_script('jquery'); }); -function ntkf_slideshow_admin(){ - if(isset($_POST['ntkf_ids'])){ - update_option('ntkf_slideshow_ids', sanitize_text_field($_POST['ntkf_ids'])); +function super_simple_slideshow_admin(){ + if(isset($_POST['super_simple_ids'])){ + update_option('super_simple_slideshow_ids', sanitize_text_field($_POST['super_simple_ids'])); echo '

Lagra.

'; } - $ids = get_option('ntkf_slideshow_ids',''); + $ids = get_option('super_simple_slideshow_ids',''); ?>
-

NTKF Slideshow

+

Super Simple Slideshow

- + -

+

jQuery(function($){ - $('#ntkf_select').on('click', function(e){ + $('#super_simple_select').on('click', function(e){ e.preventDefault(); var frame = wp.media({ @@ -72,7 +72,7 @@ jQuery(function($){ } }); - $('#ntkf_ids').val(ids.join(',')); + $('#super_simple_ids').val(ids.join(',')); $('#preview').html(html); }); @@ -83,9 +83,9 @@ jQuery(function($){ -
+
$id): ?> $i === 0 ? 'ntkf-slide active' : 'ntkf-slide' + 'class' => $i === 0 ? 'super-simple-slide active' : 'super-simple-slide' )); ?>