is_add_new = $is_add_new; $this->slider_type = isset( $_REQUEST['rstype'] ) ? esc_html($_REQUEST['rstype']) : ''; $this->parsed_options = null; if(!$is_add_new && isset( $_REQUEST['id'] )) { global $wpdb; $this->slider_id = (int)$_REQUEST['id']; $table = NewRoyalSliderMain::get_sliders_table_name(); $this->res = $wpdb->get_results( $wpdb->prepare( " SELECT * FROM $table WHERE id=%d ", $this->slider_id ), ARRAY_A ); if( isset($this->res[0]) ) { $this->res = $this->res[0]; $this->parsed_options = json_decode($this->res['options'], ARRAY_A); } } $this->build_view(); } function get_slider_options() { require_once('NewRoyalSliderOptions.php'); NewRoyalSliderOptions::output_options( isset($this->res) ? $this->res['options'] : null, $this->slider_type); } function get_slider_items() { if(isset($this->res)) { if(!isset($this->res['slides']) ) { return; } $slides = json_decode($this->res['slides'], true); if(is_array($slides) ) { foreach ($slides as $slide) { echo NewRoyalSliderGallery::get_admin_slide_item($slide); } } } } function build_view() { ?>

slider_type != 'nextgen'): ?> is_add_new): if($this->slider_id) { echo sprintf(__('Editing %s RoyalSlider #', 'new_royalslider'), ucfirst($this->slider_type) ); echo ''; echo $this->slider_id; echo ''; } ?> slider_type) ); ?> slider_id) { echo ' #'; echo $this->slider_id; echo ''; } ?>

slider_id ? $this->slider_id : 123); ?>

res['template']) ? $this->res['template'] : 'default'; $template_obj = $newrs_templates[$value]; $template_html = isset($template_obj['template-html']) ? $template_obj['template-html'] : $newrs_templates['default']['template-html']; $col = 0; $row = 0; foreach ( $newrs_templates as $key => $args ) { $label = $args['label']; //$label echo sprintf( '
', $key, $key, checked( $value, $key, false ), '-'.$col * 89 . 'px -' . ($row * 65 + 100) . 'px', $key , '' ); $col++; if($col > 1) { $col = 0; $row ++; } } ?>


get_slider_options(); ?>
slider_type == 'custom') { ?>
or

introductory video.", 'new_royalslider'); ?>

get_slider_items(); ?>
slider_type === 'gallery') { ?>


Or follow these steps:

  1. royalslider="SLIDER_ID" attribute to gallery shortcode, where SLIDER_ID is id of slider that you\'re editing now.
    For example if ID of your slider is 3: [gallery ids="24,22"] should be changed to [gallery royalslider="3" ids="24,22"].', 'new_royalslider'); ?>

slider_type === '500px') { NewRoyalSlider500pxSource::show_admin_options($this->parsed_options); } else if($this->slider_type === 'posts') { NewRoyalSliderPostsSource::show_admin_options($this->parsed_options); } else if($this->slider_type === 'nextgen') { NewRoyalSliderNextGenSource::show_admin_options($this->parsed_options); } else if($this->slider_type === 'flickr') { NewRoyalSliderFlickrSource::show_admin_options($this->parsed_options); } else if($this->slider_type === 'instagram') { NewRoyalSliderInstagramSource::show_admin_options($this->parsed_options); } ?>