| @@ -74,29 +74,12 @@ | ||
| 74 | 74 | // Provide path to Javascript bundle if theme supports it. |
| 75 | 75 | if ( version_compare( $plugin['version'], '2.0', '>=' ) ) { |
| 76 | 76 | |
| 77 | 77 | if ( defined('VIMEOGRAPHY_DEV') && VIMEOGRAPHY_DEV ) { |
| 78 | - $slug = strtolower($plugin['name']); | |
| 79 | - $port = $slug === 'harvestone' ? "8153" : "8346"; | |
| 80 | - $bundle = $slug === 'harvestone' ? "scripts.js" : "vimeography-$slug/dist/$slug.js"; | |
| 81 | - | |
| 82 | - // Use the gitpod env vars if they are defined | |
| 83 | - if (defined('VIMEOGRAPHY_THEME_BUNDLE_JS_URL') && $port === "8346") { | |
| 84 | - $plugin['app_path'] = VIMEOGRAPHY_THEME_BUNDLE_JS_URL . "/"; | |
| 85 | - $plugin['app_js'] = VIMEOGRAPHY_THEME_BUNDLE_JS_URL . '/' . $bundle; | |
| 86 | - $plugin['app_css'] = VIMEOGRAPHY_THEME_BUNDLE_JS_URL . "/styles.css"; | |
| 87 | - } elseif (defined('VIMEOGRAPHY_HARVESTONE_JS_URL') && $port === "8153") { | |
| 88 | - $plugin['app_path'] = VIMEOGRAPHY_HARVESTONE_JS_URL . "/"; | |
| 89 | - $plugin['app_js'] = VIMEOGRAPHY_HARVESTONE_JS_URL . '/' . $bundle; | |
| 90 | - $plugin['app_css'] = VIMEOGRAPHY_HARVESTONE_JS_URL . "/styles.css"; | |
| 91 | - } else { | |
| 92 | - $plugin['app_path'] = "http://localhost:$port/"; | |
| 93 | - $plugin['app_js'] = "http://localhost:$port/$bundle"; | |
| 94 | - $plugin['app_css'] = "http://localhost:8080/styles.css"; | |
| 95 | - } | |
| 78 | + $plugin['app_path'] = 'https://localhost:8080/'; | |
| 79 | + $plugin['app_js'] = 'https://localhost:8080/scripts.js'; | |
| 80 | + $plugin['app_css'] = 'https://localhost:8080/styles.css'; | |
| 96 | 81 | } else { |
| 97 | - // note: can use $plugin['version'] for cachebusting. | |
| 98 | - | |
| 99 | 82 | $manifest = $plugin['plugin_path'] . 'dist/manifest.json'; |
| 100 | 83 | $manifest = file_get_contents( $manifest ); |
| 101 | 84 | $manifest = (array) json_decode( $manifest ); |
| 102 | 85 | |
| @@ -156,9 +139,9 @@ | ||
| 156 | 139 | } |
| 157 | 140 | |
| 158 | 141 | if ( ! $this->active_theme ) { |
| 159 | 142 | throw new Vimeography_Exception( |
| 160 | - esc_html__('The Vimeography theme you are trying to use is not installed or activated.', 'vimeography') | |
| 143 | + __('The Vimeography theme you are trying to use is not installed or activated.', 'vimeography') | |
| 161 | 144 | ); |
| 162 | 145 | } |
| 163 | 146 | |
| 164 | 147 | return $this; |