Changeset 1949915
- Timestamp:
- 10/01/2018 07:41:55 PM (8 years ago)
- Location:
- thrivehive/trunk
- Files:
-
- 4 edited
-
README.md (modified) (5 diffs)
-
controllers/changeling.php (modified) (8 diffs)
-
controllers/menus.php (modified) (1 diff)
-
thrivehive.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
thrivehive/trunk/README.md
r1921080 r1949915 34 34 ## Deployment 35 35 36 1. Zip the contents of the repo into a zip named `thrivehive.zip`. So if you are inside the warp-prism folder you can select everything inside and put that into a zip.36 1. Zip the contents of the repo into a zip named `thrivehive.zip`. If you are inside the warp-prism folder you can select everything inside and put that into a zip. 37 37 2. Now you need to initiate an SFTP connection to all of the wordpress servers: 38 38 - customers.thrivehivesite.com … … 47 47 3. Copy the thrivehive.zip file into `/root/plugins` folder on each of the servers. 48 48 4. Also on each of the servers copy the contents of the repo (sans `thrivehive.zip`) into `/root/cpanel3-skel/public_html/wp-content/plugins/thrivehive` 49 5. Now that we have all the files on the servers, on each server we can run the script `/scripts/update_thrivehive_ plugin.py`49 5. Now that we have all the files on the servers, on each server we can run the script `/scripts/update_thrivehive_addins.py --plugin` 50 50 6. These scripts may run for a while, but once they are done, all plugins should be up to date! 51 51 … … 56 56 git pull 57 57 zip -r /tmp/thrivehive.zip . 58 for c in customers 2 customers3 customers4; do58 for c in customers customers2 customers3 customers4; do 59 59 server="${c}.thrivehivesite.com" 60 60 scp /tmp/thrivehive.zip $server:/tmp/ … … 72 72 rm -rf thrivehive/trunk/.git 73 73 rm -rf thrivehive/trunk/.gitignore 74 cd thrivehive 74 75 svn commit -m "mygitbranch" 75 76 ``` … … 79 80 80 81 ## Changelog 81 * 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 82 84 * V 2.1 Added endpoint to search for Global Styling categories and values 83 85 * V 2.0 Enable support for new ThriveHive website editor -
thrivehive/trunk/controllers/changeling.php
r1914280 r1949915 34 34 /** 35 35 *@api 36 * WARNING: This could fail silently if the user has permission issues 36 37 **/ 37 38 public function set_bootstrap_sass_settings() { … … 40 41 $settings = stripslashes($_REQUEST['settings']); 41 42 $resp = update_option('user_defined_bootstrap_sass_settings', $settings); 42 if($resp === false) {43 return $json_api->error('Settings were not changed or were unable to update');44 }45 43 return array('settings' => $settings); 46 44 } else { … … 81 79 global $json_api; 82 80 if(isset($_REQUEST['css'])) { 83 $stylesheet_directory = get_stylesheet_directory(); 84 $compiled_bootstrap_css_file_location = $stylesheet_directory.'/css/child-theme.css'; 85 $compiled_bootstrap_minified_css_file_location = $stylesheet_directory.'/css/child-theme.min.css'; 86 $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'; 87 87 88 88 $css = $_REQUEST['css']; 89 89 $minified = $_REQUEST['minified']; 90 90 $map = $_REQUEST['sourceMap']; 91 92 if (!file_exists($changeling_css_dir)) { 93 wp_mkdir_p($changeling_css_dir); 94 } 91 95 92 96 file_put_contents($compiled_bootstrap_css_file_location, $css); … … 110 114 global $json_api; 111 115 112 $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); 113 123 $compiled_minified_css = file_get_contents($compiled_minified_css_path); 114 124 … … 123 133 public function get_bootstrap_assets(){ 124 134 global $json_api; 125 $theme_dir_uri = get_stylesheet_directory _uri();135 $theme_dir_uri = get_stylesheet_directory(); 126 136 127 137 $bootstrap_files = $theme_dir_uri . '/config/virtual-file-system.json'; … … 142 152 public function get_bootstrap_theme_config(){ 143 153 global $json_api; 144 $theme_dir_uri = get_stylesheet_directory _uri();154 $theme_dir_uri = get_stylesheet_directory(); 145 155 $category = $_REQUEST['category']; 146 156 $query = $_REQUEST['query']; … … 184 194 public function get_bootstrap_theme_config_settings(){ 185 195 global $json_api; 186 $theme_dir_uri = get_stylesheet_directory _uri();196 $theme_dir_uri = get_stylesheet_directory(); 187 197 188 198 $theme_config_settings_full_path = $theme_dir_uri . '/config/theme-config-settings.json'; … … 199 209 public function filter_bootstrap_categories(){ 200 210 global $json_api; 201 $theme_dir_uri = get_stylesheet_directory _uri();211 $theme_dir_uri = get_stylesheet_directory(); 202 212 $theme_config_path = '/config/theme-config.json'; 203 213 $query = $_REQUEST['query']; -
thrivehive/trunk/controllers/menus.php
r1896065 r1949915 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/thrivehive.php
r1921080 r1949915 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.