Plugin Directory

Changeset 2769451


Ignore:
Timestamp:
08/11/2022 04:41:31 PM (4 years ago)
Author:
simonpedge
Message:

Version 2.4.6

Location:
slide-anything/trunk
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • slide-anything/trunk/css/slide-anything-admin.css

    r2763796 r2769451  
    16121612    padding:15px 10px 10px !important;
    16131613}
     1614.ui-dialog[aria-describedby='sa_dialog_box'] .ui-dialog-titlebar button {
     1615    color:transparent;
     1616    border-width:1px;
     1617    padding:5px;
     1618}
     1619.ui-dialog[aria-describedby='sa_dialog_box'] .ui-dialog-buttonset button {
     1620    border-width:1px;
     1621    padding:5px;
     1622}
    16141623
    16151624/* ### JQUERY UI - PREVIEW SLIDER DIALOG BOX ### */
  • slide-anything/trunk/php/slide-anything-admin.php

    r2767174 r2769451  
    235235        wp_register_style( 'sa-slider-admin-css', SA_PLUGIN_PATH . 'css/slide-anything-admin.css', array(), $plugin_ver );
    236236        wp_enqueue_style( 'sa-slider-admin-css' );
    237         // load 'magnific popup' script and css.
    238         wp_register_script( 'magnific-popup_js', SA_PLUGIN_PATH . 'magnific-popup/jquery.magnific-popup.min.js', array( 'jquery' ), '1.1.0', true );
    239         wp_enqueue_script( 'magnific-popup_js' );
    240         wp_register_style( 'magnific-popup_css', SA_PLUGIN_PATH . 'magnific-popup/magnific-popup.css', array(), '1.1.0' );
    241         wp_enqueue_style( 'magnific-popup_css' );
    242         // DISABLE AUTOSAVE FOR THIS CUSTOM POST TYPE (causes issues with preview modal popup).
    243         wp_dequeue_script( 'autosave' );
    244237    }
    245238    if ( 'settings_page_sa-settings-page' === $screen->id ) {
     
    13121305        echo "<a class='button button-secondary popup_image_add' href='" . esc_attr( $upload_popup_frame_url ) . "' ";
    13131306        echo "title='Set the background image for this slide'>Set Image</a>\n";
    1314         // slide popup image - 'preview' button.
    1315         $preview_button = 'slide' . esc_attr( $slide_data[ $i ]['slide_no'] ) . '_popup_image_preview';
    1316         echo "<div id='" . esc_attr( $preview_button ) . "' class='slide_popup_image_preview'>";
    1317         if ( $image_exists ) {
    1318             echo "<a class='button button-secondary' href='" . esc_attr( $popup_image_full[0] ) . "' title='" . esc_attr( $popup_imagetitle ) . "'>Preview</a>";
    1319         } else {
    1320             echo "<a class='button button-secondary' href='" . esc_attr( $placeholder ) . "' title='" . esc_attr( $popup_imagetitle ) . "'>Preview</a>";
    1321         }
    1322         echo "</div>\n";
    1323         // slide popup image - jquery code to generate 'magnific popup' preview.
    1324         echo "<script type='text/javascript'>\n";
    1325         echo "jQuery(document).ready(function() {\n";
    1326         echo "  jQuery('#" . esc_attr( $preview_button ) . " a').magnificPopup({\n";
    1327         echo "      mainClass: 'sa_popup',\n";
    1328         echo "      closeBtnInside: true,\n";
    1329         echo "      type: 'image'\n";
    1330         echo "  });\n";
    1331         echo "});\n";
    1332         echo "</script>\n";
    13331307        // slide popup image - popup image id hidden field.
    13341308        echo "<input type='hidden' id='" . esc_attr( $slide_data[ $i ]['popup_imageid'] ) . "' name='" . esc_attr( $slide_data[ $i ]['popup_imageid'] );
     
    13901364        echo "<a class='button button-secondary' title='Update popup video using the above video URL' ";
    13911365        echo "onClick='update_popup_video(" . esc_attr( $sl_num ) . ");'>Set Video</a>\n";
    1392 
    1393         // slide popup video - 'preview' button.
    1394         $video_preview_url = SA_PLUGIN_PATH . 'images/video_placeholder_admin.jpg';
    1395         if ( '' !== $popup_video_id ) {
    1396             if ( 'youtube' === $popup_video_type ) {
    1397                 $video_preview_url = 'http://www.youtube.com/watch?v=' . $popup_video_id;
    1398             } elseif ( 'vimeo' === $popup_video_type ) {
    1399                 $video_preview_url = 'http://vimeo.com/' . $popup_video_id;
    1400             }
    1401         }
    1402         $preview_button = 'slide' . esc_attr( $slide_data[ $i ]['slide_no'] ) . '_popup_video_preview';
    1403         echo "<div id='" . esc_attr( $preview_button ) . "' class='slide_popup_video_preview'>";
    1404         echo "<a class='button button-secondary' href='" . esc_attr( $video_preview_url ) . "'>Preview</a>";
    1405         echo "</div>\n";
    1406         // slide popup image - jquery code to generate 'magnific popup' preview.
    1407         echo "<script type='text/javascript'>\n";
    1408         echo "jQuery(document).ready(function() {\n";
    1409         echo "  jQuery('#" . esc_attr( $preview_button ) . " a').magnificPopup({\n";
    1410         echo "      mainClass: 'sa_popup',\n";
    1411         echo "      closeBtnInside: true,\n";
    1412         echo "      type: 'iframe'\n";
    1413         echo "  });\n";
    1414         echo "});\n";
    1415         echo "</script>\n";
    14161366        // invalid url error message.
    14171367        echo "<div id='sa_slide" . esc_attr( $sl_num ) . "_video_invalid_url' class='sa_popup_video_invalid_url'>";
     
    15321482 */
    15331483function cpt_slider_shortcode_content( $post ) {
    1534     // CHECK IF YOAST SEO PLUGIN IS INSTALLED.
    1535     $yoast = 0;
    1536     if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' ) ) {
    1537         $yoast = 1;
    1538     }
    15391484    $post_status      = get_post_status( $post->ID );
    15401485    $allow_shortcodes = get_post_meta( $post->ID, 'sa_shortcodes', true );
     
    15421487    echo "<div id='sa_slider_shortcode'>" . esc_html( $shortcode ) . "</div>\n";
    15431488    echo "<div id='sa_shortcode_copy' class='button button-secondary'>Copy to Clipboard</div>\n";
    1544 
    1545     // get value of 'Disable Preview Feature' checkbox.
    1546     $disable_preview = '0';
    1547     $other_settings  = get_post_meta( $post->ID, 'sa_other_settings', true );
    1548     if ( '' !== $other_settings ) {
    1549         $other_settings_arr = explode( '|', $other_settings );
    1550     }
    1551     if ( isset( $other_settings_arr ) && ( '' !== $other_settings_arr[5] ) ) {
    1552         $disable_preview = $other_settings_arr[5];
    1553     }
    1554 
    1555     if ( ( 'publish' === $post_status ) && ( '0' === $disable_preview ) && ( 0 === $yoast ) ) {
    1556         // CHECK IF THE PREVIEW PAGE ALREADY EXISTS.
    1557         // DISABLE THE PREVIEW FEATURE IF 'YOAST SEO' PLUGIN IS INSTALLED.
    1558         $preview_page_created = 1;
    1559         $preview_page         = get_page_by_title( 'Slide Anything Popup Preview' );
    1560         $preview_id           = $preview_page->ID;
    1561         if ( '' !== $preview_id ) {
    1562             // PREVIEW PAGE EXISTS - UPDATE PAGE CONTENT TO CONTAIN THIS SA SHORTCODE.
    1563             wp_untrash_post( $preview_id ); // remove preview page from trash (if applicable).
    1564             $page_content = "[slide-anything id='" . $post->ID . "']";
    1565             $page_data    = array(
    1566                 'ID'           => $preview_id,
    1567                 'post_content' => $page_content,
    1568             );
    1569             $page_id      = wp_update_post( $page_data );
    1570             if ( is_wp_error( $page_id ) ) {
    1571                 $preview_page_created = 0;
    1572             }
    1573         } else {
    1574             // PREVIEW PAGE DOES NOT EXIST - CREATE PREVIEW PAGE WITH SA SHORTCODE CONTENT.
    1575             $page_content = "[slide-anything id='" . $post->ID . "']";
    1576             $curr_user_id = get_current_user_id();
    1577             $page_data    = array(
    1578                 'post_title'   => 'Slide Anything Popup Preview',
    1579                 'post_content' => $page_content,
    1580                 'post_status'  => 'publish',
    1581                 'post_type'    => 'page',
    1582                 'post_author'  => $curr_user_id,
    1583                 'menu_order'   => 9999,
    1584             );
    1585             $page_id      = wp_insert_post( $page_data );
    1586             if ( is_wp_error( $page_id ) ) {
    1587                 $preview_page_created = 0;
    1588             }
    1589         }
    1590         if ( 1 === $preview_page_created ) {
    1591             // DISPLAY SLIDER PREVIEW BUTTON.
    1592             if ( 'publish' === $post_status ) {
    1593                 echo "<div id='sa_preview_slider' class='button button-secondary' ";
    1594                 echo "onClick='document.getElementById(\"sa_preview_popup\").style.display = \"block\";'>Preview Slider</div>\n";
    1595             }
    1596             // DISPLAY SLIDER PREVIEW POPUP.
    1597             $preview_page_url = get_page_link( $page_id );
    1598             echo "<div id='sa_preview_popup' style='display:none;'>\n";
    1599             echo "<div id='sa_preview_wrapper'>\n";
    1600             echo "<div id='sa_preview_close' title='Close Slider Preview' ";
    1601             echo "onClick='document.getElementById(\"sa_preview_popup\").style.display = \"none\";'>X</div>\n";
    1602             echo "<div id='sa_preview_content'>";
    1603             echo "<iframe src='" . esc_attr( $preview_page_url ) . "'></iframe>\n";
    1604             echo "</div>\n"; // #sa_preview_content
    1605             echo "</div>\n"; // #sa_preview_wrapper
    1606             echo "</div>\n";
    1607         }
    1608     }
    16091489}
    16101490
     
    21612041        $rtl_slider = '0';
    21622042    }
    2163     // setting 6 - sa_disable_preview.
    2164     if ( isset( $other_settings_arr ) && ( '' !== $other_settings_arr[5] ) ) {
    2165         $disable_preview = $other_settings_arr[5];
    2166     } else {
    2167         $disable_preview = '0';
    2168     }
    21692043    // setting 7 - bg_image_size.
    21702044    $bg_image_size = 'full';
     
    22172091    } else {
    22182092        echo "<input type='checkbox' id='sa_rtl_slider' name='sa_rtl_slider' value='1'/>";
    2219     }
    2220     echo "</div>\n";
    2221 
    2222     // Disable Preview Feature.
    2223     $tooltip = 'Disable the &quot;Preview Slider&quot; feature in this settings page - the &quot;Slide Anything Popup Preview&quot; page will no longer be auto generated.';
    2224     echo "<div class='sa_window_onload_line'>";
    2225     echo "<span class='sa_tooltip' title='" . esc_attr( $tooltip ) . "'></span><span style='min-width:160px;'>Disable Preview Feature:</span>";
    2226     if ( '1' === $disable_preview ) {
    2227         echo "<input type='checkbox' id='sa_disable_preview' name='sa_disable_preview' value='1' checked/>";
    2228     } else {
    2229         echo "<input type='checkbox' id='sa_disable_preview' name='sa_disable_preview' value='1'/>";
    22302093    }
    22312094    echo "</div>\n";
     
    31292992            $other_settings .= '|0';
    31302993        }
    3131         if ( isset( $_POST['sa_disable_preview'] ) && ( '1' === $_POST['sa_disable_preview'] ) ) {
    3132             $other_settings .= '|1';
    3133         } else {
    3134             $other_settings .= '|0';
    3135         }
     2994        // disable preview setting (now removed & permanently disabled).
     2995        $other_settings .= '|1';
    31362996        if ( isset( $_POST['bg_image_size'] ) && ( '' !== $_POST['bg_image_size'] ) ) {
    31372997            $other_settings .= '|' . sanitize_text_field( wp_unslash( $_POST['bg_image_size'] ) );
  • slide-anything/trunk/readme.txt

    r2767191 r2769451  
    55Requires at least: 4.0
    66Tested up to: 6.0
    7 Stable tag: 2.4.5
     7Stable tag: 2.4.6
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9191== Changelog ==
    9292
     93= 2.4.6 =
     94* Removed the 'Slider Preview' feature as it was causing issues on some installations of WordPress.
     95
    9396= 2.4.5 =
    9497* Lets try this again. The SVN commit process keeps corrupting the key 'lightGallery' JavaScript (minified) files. So I've re-minified the source code for 'lightGallery' and hopefully this will work.
     
    805808= 2.4.5 =
    806809* Lets try this again. The SVN commit process keeps corrupting the key 'lightGallery' JavaScript (minified) files. So I've re-minified the source code for 'lightGallery' and hopefully this will work.
     810
     811= 2.4.6 =
     812* Removed the 'Slider Preview' feature as it was causing issues on some installations of WordPress.
  • slide-anything/trunk/slide-anything.php

    r2767191 r2769451  
    44 * Plugin URI: https://wordpress.org/plugins/slide-anything/
    55 * Description: Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
    6  * Version: 2.4.5
     6 * Version: 2.4.6
    77 *
    88 * @package     WordPress_Slide_Anything
Note: See TracChangeset for help on using the changeset viewer.