Changeset 1951087
- Timestamp:
- 10/03/2018 08:27:57 PM (8 years ago)
- Location:
- thrivehive/trunk
- Files:
-
- 5 edited
-
README.md (modified) (1 diff)
-
controllers/changeling.php (modified) (6 diffs)
-
controllers/menus.php (modified) (1 diff)
-
lib/snippet_display.php (modified) (1 diff)
-
thrivehive.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
thrivehive/trunk/README.md
r1951084 r1951087 80 80 81 81 ## 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 83 84 * V 2.1 Added endpoint to search for Global Styling categories and values 84 85 * V 2.0 Enable support for new ThriveHive website editor -
thrivehive/trunk/controllers/changeling.php
r1951084 r1951087 79 79 global $json_api; 80 80 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'; 85 87 86 88 $css = $_REQUEST['css']; 87 89 $minified = $_REQUEST['minified']; 88 90 $map = $_REQUEST['sourceMap']; 91 92 if (!file_exists($changeling_css_dir)) { 93 wp_mkdir_p($changeling_css_dir); 94 } 89 95 90 96 file_put_contents($compiled_bootstrap_css_file_location, $css); … … 108 114 global $json_api; 109 115 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); 111 123 $compiled_minified_css = file_get_contents($compiled_minified_css_path); 112 124 … … 121 133 public function get_bootstrap_assets(){ 122 134 global $json_api; 123 $theme_dir_uri = get_stylesheet_directory _uri();135 $theme_dir_uri = get_stylesheet_directory(); 124 136 125 137 $bootstrap_files = $theme_dir_uri . '/config/virtual-file-system.json'; … … 140 152 public function get_bootstrap_theme_config(){ 141 153 global $json_api; 142 $theme_dir_uri = get_stylesheet_directory _uri();154 $theme_dir_uri = get_stylesheet_directory(); 143 155 $category = $_REQUEST['category']; 144 156 $query = $_REQUEST['query']; … … 182 194 public function get_bootstrap_theme_config_settings(){ 183 195 global $json_api; 184 $theme_dir_uri = get_stylesheet_directory _uri();196 $theme_dir_uri = get_stylesheet_directory(); 185 197 186 198 $theme_config_settings_full_path = $theme_dir_uri . '/config/theme-config-settings.json'; … … 197 209 public function filter_bootstrap_categories(){ 198 210 global $json_api; 199 $theme_dir_uri = get_stylesheet_directory _uri();211 $theme_dir_uri = get_stylesheet_directory(); 200 212 $theme_config_path = '/config/theme-config.json'; 201 213 $query = $_REQUEST['query']; -
thrivehive/trunk/controllers/menus.php
r1951084 r1951087 815 815 $this->set_theme_logo($image_data[1], $image_data[2], $image_data[0]); 816 816 $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 } 820 824 821 825 return array(); 822 826 } 823 824 827 825 828 private function set_footer() { -
thrivehive/trunk/lib/snippet_display.php
r1918447 r1951087 77 77 function th_map(){ 78 78 $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&maptype=roadmap&markers=size:mid%7Ccolor:red%7C$address&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>"; 80 80 } 81 81 -
thrivehive/trunk/thrivehive.php
r1951084 r1951087 5 5 *Plugin URI: http://thrivehive.com 6 6 *Description: A plugin to include ThriveHive's tracking code 7 *Version: 2.2 7 *Version: 2.201 8 8 *Author: ThriveHive 9 9 *Author URI: http://thrivehive.com
Note: See TracChangeset
for help on using the changeset viewer.