Plugin Directory

Changeset 1951087


Ignore:
Timestamp:
10/03/2018 08:27:57 PM (8 years ago)
Author:
thrivehive
Message:

v2.201

Location:
thrivehive/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • thrivehive/trunk/README.md

    r1951084 r1951087  
    8080
    8181## Changelog
    82 * V 2.2 - Added endpoint to expose the website vertical/template
     82* V 2.201 Bugfix for newly spun up Changeling sites data not loading
     83* V 2.2 Added endpoint to expose the website vertical/template
    8384* V 2.1 Added endpoint to search for Global Styling categories and values
    8485* V 2.0 Enable support for new ThriveHive website editor
  • thrivehive/trunk/controllers/changeling.php

    r1951084 r1951087  
    7979    global $json_api;
    8080    if(isset($_REQUEST['css'])) {
    81       $stylesheet_directory = get_stylesheet_directory();
    82       $compiled_bootstrap_css_file_location = $stylesheet_directory.'/css/child-theme.css';
    83       $compiled_bootstrap_minified_css_file_location = $stylesheet_directory.'/css/child-theme.min.css';
    84       $compiled_bootstrap_sourcemap_file_location = $stylesheet_directory.'/css/child-theme.css.map';
     81      // We must save custom CSS files to the uploads directory, otherwise they would be destroyed by theme updates
     82      $upload_dir = wp_upload_dir();
     83      $changeling_css_dir = $upload_dir['basedir'] . '/changeling-css';
     84      $compiled_bootstrap_css_file_location = $changeling_css_dir .'/theme-user-custom.css';
     85      $compiled_bootstrap_minified_css_file_location = $changeling_css_dir .'/theme-user-custom.min.css';
     86      $compiled_bootstrap_sourcemap_file_location = $changeling_css_dir .'/theme-user-custom.css.map';
    8587
    8688      $css = $_REQUEST['css'];
    8789      $minified = $_REQUEST['minified'];
    8890      $map = $_REQUEST['sourceMap'];
     91
     92      if (!file_exists($changeling_css_dir)) {
     93        wp_mkdir_p($changeling_css_dir);
     94      }
    8995
    9096      file_put_contents($compiled_bootstrap_css_file_location, $css);
     
    108114    global $json_api;
    109115
    110     $compiled_minified_css_path =  get_stylesheet_directory().'/css/child-theme.min.css';
     116    $stylesheet_dir = get_stylesheet_directory();
     117    $upload_dir = wp_upload_dir();
     118    $changeling_css_dir = $upload_dir['basedir'] . '/changeling-css';
     119    $user_css = $changeling_css_dir . '/theme-user-custom.min.css';
     120    $default_css = $stylesheet_dir . '/css/theme-default.min.css';
     121
     122    $compiled_minified_css_path = (file_exists($user_css) ? $user_css : $default_css);
    111123    $compiled_minified_css = file_get_contents($compiled_minified_css_path);
    112124
     
    121133  public function get_bootstrap_assets(){
    122134    global $json_api;
    123     $theme_dir_uri = get_stylesheet_directory_uri();
     135    $theme_dir_uri = get_stylesheet_directory();
    124136
    125137    $bootstrap_files = $theme_dir_uri . '/config/virtual-file-system.json';
     
    140152  public function get_bootstrap_theme_config(){
    141153    global $json_api;
    142     $theme_dir_uri = get_stylesheet_directory_uri();
     154    $theme_dir_uri = get_stylesheet_directory();
    143155    $category = $_REQUEST['category'];
    144156    $query = $_REQUEST['query'];
     
    182194  public function get_bootstrap_theme_config_settings(){
    183195    global $json_api;
    184     $theme_dir_uri = get_stylesheet_directory_uri();
     196    $theme_dir_uri = get_stylesheet_directory();
    185197
    186198    $theme_config_settings_full_path = $theme_dir_uri . '/config/theme-config-settings.json';
     
    197209  public function filter_bootstrap_categories(){
    198210    global $json_api;
    199     $theme_dir_uri = get_stylesheet_directory_uri();
     211    $theme_dir_uri = get_stylesheet_directory();
    200212    $theme_config_path = '/config/theme-config.json';
    201213    $query = $_REQUEST['query'];
  • thrivehive/trunk/controllers/menus.php

    r1951084 r1951087  
    815815                $this->set_theme_logo($image_data[1], $image_data[2], $image_data[0]);
    816816                $this->set_theme_logo2($image_data[0], $image_data[1], $image_data[2], $logo_id);
    817             }
    818         }
    819         $this->set_footer();
     817      }
     818    }
     819
     820    if( !is_thrivehive_wysiwyg() )
     821    {
     822      $this->set_footer();
     823    }
    820824
    821825        return array();
    822826    }
    823 
    824827
    825828    private function set_footer() {
  • thrivehive/trunk/lib/snippet_display.php

    r1918447 r1951087  
    7777function th_map(){
    7878    $address = urlencode(str_replace("<br/>", " ", get_option('th_company_address')));
    79     return "<a target='_blank' href='//maps.google.com/maps?daddr=$address'><img src='//maps.google.com/maps/api/staticmap?size=375x205&amp;maptype=roadmap&amp;markers=size:mid%7Ccolor:red%7C$address&amp;sensor=false&key=AIzaSyByDkkUYhIDAQ4zc5DuG6_5FG3rYyncRrE'></a>";
     79    return "<iframe frameborder='0' allowfullscreen width='375' height='205' src='//www.google.com/maps/embed/v1/place?&q=$address&key=AIzaSyACA63DJmSWnuOJ62QZYLF2bYShQeiu68Q'></iframe>";
    8080}
    8181
  • thrivehive/trunk/thrivehive.php

    r1951084 r1951087  
    55   *Plugin URI: http://thrivehive.com
    66   *Description: A plugin to include ThriveHive's tracking code
    7    *Version: 2.2
     7   *Version: 2.201
    88   *Author: ThriveHive
    99   *Author URI: http://thrivehive.com
Note: See TracChangeset for help on using the changeset viewer.