This repository has been archived by the owner on Jan 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #53
- Loading branch information
Eduardo Campaña
committed
Nov 5, 2018
1 parent
d7a3e8f
commit 9ea3150
Showing
11 changed files
with
11,195 additions
and
6,694 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
|
||
const App = () => <div>Frontity</div>; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
import { render } from 'react-dom'; | ||
import App from './components'; | ||
|
||
render(<App />, window.document.getElementById('root')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
global $wp_pwa; | ||
|
||
$settings = get_option('wp_pwa_settings'); | ||
//var_dump($settings); | ||
//delete_option('wp_pwa_settings'); | ||
$current_user = wp_get_current_user(); | ||
|
||
if (isset($settings["synced_with_wp_pwa"])) { | ||
$synced_with_wp_pwa = $settings["synced_with_wp_pwa"]; | ||
} else { | ||
$synced_with_wp_pwa = false; | ||
} | ||
|
||
if (isset($settings["wp_pwa_status"])) { | ||
$wp_pwa_status = $settings["wp_pwa_status"]; | ||
} else { | ||
$wp_pwa_status = 'disabled'; | ||
} | ||
|
||
if (isset($settings["wp_pwa_amp"])) { | ||
$wp_pwa_amp = $settings["wp_pwa_amp"]; | ||
} else { | ||
$wp_pwa_amp = 'disabled'; | ||
} | ||
|
||
/* step & progress */ | ||
$progress = 0; | ||
$step = 0; | ||
$wp_version = get_bloginfo('version'); | ||
$rest_api_installed = $wp_pwa->rest_api_installed; | ||
$rest_api_active = $wp_pwa->rest_api_active; | ||
$rest_api_compatible = true; | ||
|
||
if (version_compare($wp_version, '4.7', '>=')) { //From WP 4.7, the REST API is already installed. | ||
$rest_api_installed = true; | ||
$rest_api_active = true; | ||
} | ||
|
||
if (version_compare($wp_version, '4.4', '<')) { //REST API Plugin is only compatible from WP 4.4 ahead | ||
$rest_api_compatible = false; | ||
} else if (!$rest_api_installed) { | ||
$step = 1; | ||
} else if ($rest_api_installed && !$rest_api_active) { | ||
$step = 2; | ||
$progress = 33; | ||
} else if ( $rest_api_installed && $rest_api_active && !$synced_with_wp_pwa) { | ||
$step = 3; | ||
$progress = 66; | ||
} else if ( $rest_api_installed && $rest_api_active && $synced_with_wp_pwa) { | ||
$step = 4; | ||
$progress = 100; | ||
} | ||
?> | ||
<div id='root'></div> | ||
|
Oops, something went wrong.