Skip to content

Commit

Permalink
Added Bing UETQ events, IndexNow support, Bing Ad ID option
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisblakley committed Jan 7, 2025
1 parent cf7e3b7 commit 9cd29c8
Show file tree
Hide file tree
Showing 30 changed files with 264 additions and 102 deletions.
82 changes: 41 additions & 41 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,57 @@

1. **Conditionals**:
- Always add spaces inside the parentheses of conditionals.
```
//Correct
if ( condition ){
// code
}

//Incorrect
if(condition){
// code
}
```
```
//Correct
if ( condition ){
// code
}

//Incorrect
if(condition){
// code
}
```

2. **Indentation**:
- Always use tabs instead of spaces for indentation.
```
//Correct
function example() {
let x = 1;
}

//Incorrect
function example() {
let x = 1;
}
```
```
//Correct
function example(){
let x = 1;
}

//Incorrect
function example(){
let x = 1;
}
```

3. **Comments**:
- Never put a space between the `//` and the first character of the comment.
```
//Correct
//This is a comment
```
//Correct
//This is a comment

// Incorrect
// This is a comment
```
// Incorrect
// This is a comment
```

4. **CSS and SASS**:
- Write CSS and SASS rules in a single line, but nesting is allowed.
```
//Correct
.container {display: flex; gap: 5px;
.item {margin: 10px;}
}

//Incorrect
.container {
display: flex;
.item {
margin: 10px;
```
//Correct
.container {display: flex; gap: 5px;
.item {margin: 10px;}
}

//Incorrect
.container {
display: flex;
.item {
margin: 10px;
}
}
```
}
```

Please follow these guidelines to ensure consistency and readability in the codebase.
2 changes: 1 addition & 1 deletion .github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nebula-wp",
"title": "Nebula",
"description": "Advanced Starter WordPress Theme for Developers",
"version": "12.5.30.636",
"version": "12.8.7.446",
"homepage": "https://gearside.com/nebula/",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion Nebula-Child/assets/css/admin.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Nebula-Child/assets/js/modules/usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function supplementalEventTracking(){
// event_action: 'Action',
// event_label: 'Label',
// text: jQuery(this).text(), //For example: the text of the clicked link
// link: jQuery(this).attr('href'). //For example: the href of the clicked link
// link: jQuery(this).attr('href'), //For example: the href of the clicked link
// something_extra: 'Extra', //Feel free to send additional custom parameters to help identify this event
// non_interaction: true //If this action is not significant (or if not initiated by the user explicitly)
// });
Expand Down
2 changes: 1 addition & 1 deletion Nebula-Child/resources/sw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//BEGIN automated edits. These will be automatically overwritten.
const THEME_NAME = 'nebula-child';
const NEBULA_VERSION = 'v12.5.30.636'; //Wednesday, October 30, 2024 3:15:21 PM
const NEBULA_VERSION = 'v12.8.7.446'; //Tuesday, January 7, 2025 10:41:40 AM
const OFFLINE_URL = 'https://nebula.gearside.com/offline/';
const OFFLINE_IMG = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/offline.svg';
const META_ICON = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/meta/android-chrome-512x512.png';
Expand Down
4 changes: 2 additions & 2 deletions Nebula-Child/style.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/css/admin.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/css/critical.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/login.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions assets/css/pre.css

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions assets/js/admin-modules/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ nebula.checkWindowHeightForStickyNav = function(){
nebula.checkDependents = function(inputObject){
if ( inputObject ){ //Check a single option's dependents
if ( nebula.isCheckedOrHasValue(inputObject) ){
jQuery('[dependent-of=' + inputObject.attr('id') + ']').removeClass('inactive').find('.dependent-note').addClass('hidden');
jQuery('[dependent-or~=' + inputObject.attr('id') + ']').removeClass('inactive').find('.dependent-note').addClass('hidden');
jQuery("[dependent-of='" + jQuery.escapeSelector(inputObject.attr('id')) + "']").removeClass('inactive').find('.dependent-note').addClass('hidden');
jQuery("[dependent-or~='" + jQuery.escapeSelector(inputObject.attr('id')) + "']").removeClass('inactive').find('.dependent-note').addClass('hidden');

//The dependent-and attribute must have ALL checked
jQuery('[dependent-and~=' + inputObject.attr('id') + ']').each(function(){
jQuery("[dependent-and~='" + jQuery.escapeSelector(inputObject.attr('id')) + "']").each(function(){
var $oThis = jQuery(this);
var dependentOrs = $oThis.attr('dependent-and').split(' ');
var totalDependents = dependentAnds.length;
Expand All @@ -219,11 +219,11 @@ nebula.checkDependents = function(inputObject){
}
});
} else {
jQuery('[dependent-of=' + inputObject.attr('id') + ']').addClass('inactive').find('.dependent-note').removeClass('hidden');
jQuery('[dependent-and~=' + inputObject.attr('id') + ']').addClass('inactive').find('.dependent-note').removeClass('hidden');
jQuery("[dependent-of='" + jQuery.escapeSelector(inputObject.attr('id')) + "']").addClass('inactive').find('.dependent-note').removeClass('hidden');
jQuery("[dependent-or~='" + jQuery.escapeSelector(inputObject.attr('id')) + "']").addClass('inactive').find('.dependent-note').removeClass('hidden');

//The dependent-or attribute can have ANY checked
jQuery('[dependent-or~=' + inputObject.attr('id') + ']').each(function(){
jQuery("[dependent-and~='" + jQuery.escapeSelector(inputObject.attr('id')) + "']").each(function(){
var $oThis = jQuery(this);
var dependentOrs = $oThis.attr('dependent-or').split(' ');
var totalDependents = dependentOrs.length;
Expand Down
3 changes: 1 addition & 2 deletions assets/js/modules/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ nebula.cf7Functions = async function(){
nebula.dom.document.trigger('nebula_event', thisEvent);
gtag('event', thisEvent.event_name, nebula.gaEventObject(thisEvent)); //This event is required for the notable form metric!
window.dataLayer.push(Object.assign(thisEvent, {'event': 'nebula_form_submit_attempt'})); //This is the event name to use in the GTM custom event trigger
//nebula.fbq('track', 'Lead', {content_name: 'Form Submit (Attempt)'});
nebula.clarity('set', thisEvent.event_category, thisEvent.event_action);
} catch {
gtag('event', 'exception', {
Expand Down Expand Up @@ -216,7 +215,6 @@ nebula.cf7Functions = async function(){
nebula.dom.document.trigger('nebula_event', thisEvent);
gtag('event', thisEvent.event_name, nebula.gaEventObject(thisEvent)); //This event is required for the notable form metric!
window.dataLayer.push(Object.assign(thisEvent, {'event': 'nebula_form_submit_processing'})); //This is the event name to use in the GTM custom event trigger
//nebula.fbq('track', 'Lead', {content_name: 'Form Submit (Processing)'});
nebula.clarity('track', 'Lead', {content_name: 'Form Submit (Processing)'});

jQuery('#' + e.detail.unitTag).find('button#submit').removeClass('active');
Expand Down Expand Up @@ -443,6 +441,7 @@ nebula.cf7Functions = async function(){
});
window.dataLayer.push(Object.assign(thisEvent, {'event': 'nebula_form_submit_success'})); //This is the event name to use in the GTM custom event trigger
nebula.fbq('track', 'Lead', {content_name: 'Form Submit (Success)'});
nebula.uetq({ec: thisEvent.event_name, ea: 'Form Submit Success', el: thisEvent.event_label});
nebula.clarity('set', thisEvent.event_category, thisEvent.event_action);
nebula.crm('identify', {'form_contacted': 'CF7 (' + thisEvent.unit_tag + ') Submit Success'}, false);
nebula.crm('event', 'Contact Form (' + thisEvent.unit_tag + ') Submit Success');
Expand Down
38 changes: 19 additions & 19 deletions assets/js/modules/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,30 +131,30 @@ nebula.sanitizeGooglePlaceData = function(place = false, uniqueID = 'unnamed'){
for ( let component of place.address_components ){
//Lots of different address types. This function uses only the common ones: https://developers.google.com/maps/documentation/geocoding/#Types
switch ( component.types[0] ){
case "street_number":
case 'street_number':
nebula.user.address[uniqueID].street.number = component.short_name; //123
break;
case "route":
case 'route':
nebula.user.address[uniqueID].street.name = component.long_name; //Street Name Rd.
break;
case "locality":
case 'locality':
nebula.user.address[uniqueID].city = component.long_name; //Liverpool
break;
case "administrative_area_level_2":
case 'administrative_area_level_2':
nebula.user.address[uniqueID].county = component.long_name; //Onondaga County
break;
case "administrative_area_level_1":
case 'administrative_area_level_1':
nebula.user.address[uniqueID].state.name = component.long_name; //New York
nebula.user.address[uniqueID].state.abbr = component.short_name; //NY
break;
case "country":
case 'country':
nebula.user.address[uniqueID].country.name = component.long_name; //United States
nebula.user.address[uniqueID].country.abbr = component.short_name; //US
break;
case "postal_code":
case 'postal_code':
nebula.user.address[uniqueID].zip.code = component.short_name; //13088
break;
case "postal_code_suffix":
case 'postal_code_suffix':
nebula.user.address[uniqueID].zip.suffix = component.short_name; //4725
break;
default:
Expand Down Expand Up @@ -272,15 +272,15 @@ function geoErrorCallback(error){
geoErrorNote = 'Denied';
break;
case error.POSITION_UNAVAILABLE:
geolocationErrorMessage = "Data from location services is currently unavailable.";
geolocationErrorMessage = 'Data from location services is currently unavailable.';
geoErrorNote = 'Unavailable';
break;
case error.TIMEOUT:
geolocationErrorMessage = "Location could not be determined within a specified timeout period.";
geolocationErrorMessage = 'Location could not be determined within a specified timeout period.';
geoErrorNote = 'Timeout';
break;
default:
geolocationErrorMessage = "An unknown error has occurred.";
geolocationErrorMessage = 'An unknown error has occurred.';
geoErrorNote = 'Error';
break;
}
Expand Down Expand Up @@ -311,14 +311,14 @@ nebula.addressLookup = function(lat, lng){
if ( status === google.maps.GeocoderStatus.OK ){
if ( results ){
nebula.session.geolocation.address = {
number: nebula.extractFromAddress(results[0].address_components, "street_number"),
street: nebula.extractFromAddress(results[0].address_components, "route"),
city: nebula.extractFromAddress(results[0].address_components, "locality"),
town: nebula.extractFromAddress(results[0].address_components, "administrative_area_level_3"),
county: nebula.extractFromAddress(results[0].address_components, "administrative_area_level_2"),
state: nebula.extractFromAddress(results[0].address_components, "administrative_area_level_1"),
country: nebula.extractFromAddress(results[0].address_components, "country"),
zip: nebula.extractFromAddress(results[0].address_components, "postal_code"),
number: nebula.extractFromAddress(results[0].address_components, 'street_number'),
street: nebula.extractFromAddress(results[0].address_components, 'route'),
city: nebula.extractFromAddress(results[0].address_components, 'locality'),
town: nebula.extractFromAddress(results[0].address_components, 'administrative_area_level_3'),
county: nebula.extractFromAddress(results[0].address_components, 'administrative_area_level_2'),
state: nebula.extractFromAddress(results[0].address_components, 'administrative_area_level_1'),
country: nebula.extractFromAddress(results[0].address_components, 'country'),
zip: nebula.extractFromAddress(results[0].address_components, 'postal_code'),
formatted: results[0].formatted_address,
place: {
id: results[0].place_id,
Expand Down
Loading

0 comments on commit 9cd29c8

Please sign in to comment.