-
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.
Merge pull request #213 from moderntribe/feature/SITE-288/google-anal…
…ytics-card Setting up Site Settings screen and Google Analytics card
- Loading branch information
Showing
34 changed files
with
1,048 additions
and
608 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
packages/sitedetails/package.json → packages/site-settings/package.json
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,7 @@ | ||
export const SITE_SETTINGS = window?.site_settings; | ||
|
||
export const ASSETS_URL = SITE_SETTINGS?.assets_url; | ||
|
||
export const IMAGE_DIR = `${ ASSETS_URL }images/`; | ||
|
||
export const CARDS: SetupCardAccordionInterface[] = SITE_SETTINGS?.cards || []; |
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,3 @@ | ||
import SiteSettings from './SiteSettings'; | ||
export default SiteSettings; | ||
|
File renamed without changes.
File renamed without changes.
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
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,16 @@ | ||
import { Box, Typography } from '@mui/material'; | ||
import { SetupCards } from '@site/setup'; | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
const SetupScreen = () => { | ||
return ( | ||
<Box pt={ 4 } pl={ '12px' } pr={ 4 }> | ||
<Typography variant="h3" textAlign="center"> | ||
{ __('Site Settings', 'moderntribe-sitebuilder') } | ||
</Typography> | ||
<SetupCards /> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default SetupScreen; |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -108,7 +108,7 @@ | |
}, | ||
"include": [ | ||
"src/**/*", | ||
"sitedetails.d.ts" | ||
"site-settings.d.ts" | ||
], | ||
"exclude": [ | ||
"build", | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
/** | ||
* Scripting for the SiteBuilder React App | ||
*/ | ||
import SiteSettings from '@moderntribe/site-settings'; | ||
|
||
wp.element.render( | ||
wp.element.createElement(SiteSettings), | ||
document.getElementById('site-settings-react'), | ||
); |
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
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
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
41 changes: 41 additions & 0 deletions
41
plugins/wme-sitebuilder/wme-sitebuilder/Cards/GoogleAnalytics.php
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,41 @@ | ||
<?php | ||
|
||
namespace Tribe\WME\Sitebuilder\Cards; | ||
|
||
class GoogleAnalytics extends Card { | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $admin_page_slug = 'site-settings'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $card_slug = 'google-analytics'; | ||
|
||
|
||
/** | ||
* Construct. | ||
* | ||
*/ | ||
public function __construct() { | ||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* Get properties. | ||
* | ||
* @return array | ||
*/ | ||
public function props() { | ||
$details = [ | ||
'id' => 'google-analytics', | ||
'navTitle' => __( 'Google Analytics', 'wme-sitebuilder' ), | ||
'title' => __( 'Google Analytics', 'wme-sitebuilder' ), | ||
'intro' => __( 'Google Analytics enables you to track the visitors to your site and generate reports.', 'wme-sitebuilder' ), | ||
]; | ||
|
||
return $details; | ||
} | ||
} |
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
Oops, something went wrong.