Plugin Directory

Changeset 1120783


Ignore:
Timestamp:
03/25/2015 08:31:07 PM (11 years ago)
Author:
ShopSite
Message:

Improve compatibility with other TinyMCE plugins; improve image display

Location:
shopsite-plugin/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • shopsite-plugin/trunk/readme.txt

    r1105356 r1120783  
    2626
    2727== Changelog ==
     28= 1.5.4 =
     29* Improve compatibility with other TinyMCE plugins; improve image display
     30
    2831= 1.5.3 =
    2932* Fix for PHP versions less than 5.4.
  • shopsite-plugin/trunk/shopsite.php

    r1105356 r1120783  
    22/**
    33 * @package ShopSite
    4  * @version 1.5.3
     4 * @version 1.5.4
    55 */
    66/*
     
    99Description: ShopSite plugin to put products into your WordPress blog
    1010Author: ShopSite
    11 Version: 1.5.3
     11Version: 1.5.4
    1212Author URI: http://shopsite.com/
    1313*/
     
    5858
    5959function load_plugin() {
    60     $version = "1.5.3";
     60    $version = "1.5.4";
    6161    if ( is_admin() ) { 
    6262      $running_version = get_option('ss_version');
     
    118118}
    119119
     120function link_ss_path() {
     121  echo "<script>var ss_path='".plugin_dir_url(__FILE__)."';</script>";
     122}
     123
    120124
    121125//add_action( 'admin_enqueue_scripts', 'link_jquery' );
    122126add_action( 'admin_head', 'link_tutorial' );
     127add_action( 'admin_head', 'link_ss_path' );
    123128add_action( 'admin_init', 'load_plugin' );
    124129add_action( 'wp_enqueue_scripts', 'add_scripts' );
     
    153158    update_option('ss_config_type', $config_type);
    154159    $state = 'settings_saved';
     160   
     161    delete_option('ss_media_url');
    155162   
    156163    if ($config_type == 'ss_12') {
     
    310317 
    311318// Load the TinyMCE plugin : editor_plugin.js (wp2.5)
    312 function add_shopsite_tinymce_plugin($plugin_array) {
    313   echo
    314   "<script>
    315   var ss_path='".plugin_dir_url(__FILE__)."';
    316   </script>";
    317  
     319
     320
     321function add_shopsite_tinymce_plugin($plugin_array) {
    318322  $path = plugin_dir_url(__FILE__).'editor_plugin.js';
    319323  $plugin_array['shopsite'] = $path;
     
    369373  $extra_space = "";
    370374  $message = "";
    371   if (!get_option('ss_media_url'))
     375  $media_url = get_media_url();
     376  if (!$media_url)
    372377  {
    373378    $extra_space = " style='height:80px;'";
     
    382387}
    383388
    384 
    385 
    386 function get_product_list() {
    387   include_once "oauth.php";
    388   $limit = 1000;
    389   //echo ("in:|".$_REQUEST['search_string']."|<br>");
    390   $search_string = stripslashes(trim($_REQUEST['search_string']));
    391  
    392  
    393   $remember_search = $_REQUEST['remember_search'];
    394  
    395   ///debug_print("Updating remember_search to $remember_search");
    396   update_option('ss_remember_search', $remember_search);
    397  
    398   if ($remember_search == 'true') {
    399     update_option('ss_remembered_search_string', $search_string);
    400   }
    401 
    402  
    403   $shopsite_url = get_option('ss_shopsite_url');
    404 
    405  
    406   $media_url = false;//get_option('media_url');
     389function get_media_url() {
     390  $media_url = get_option('ss_media_url');
    407391  if (!$media_url) {
    408392    $shopsite_url = get_option('ss_shopsite_url');
     
    415399    }
    416400  }
     401  return $media_url;
     402}
     403
     404
     405function get_product_list() {
     406  include_once "oauth.php";
     407  $limit = 1000;
     408  //echo ("in:|".$_REQUEST['search_string']."|<br>");
     409  $search_string = stripslashes(trim($_REQUEST['search_string']));
     410 
     411 
     412  $remember_search = $_REQUEST['remember_search'];
     413 
     414  ///debug_print("Updating remember_search to $remember_search");
     415  update_option('ss_remember_search', $remember_search);
     416 
     417  if ($remember_search == 'true') {
     418    update_option('ss_remembered_search_string', $search_string);
     419  }
     420
     421 
     422  $shopsite_url = get_option('ss_shopsite_url');
     423
     424 
     425  $media_url = get_media_url();
    417426 
    418427 
Note: See TracChangeset for help on using the changeset viewer.