Skip to content

Commit

Permalink
prepare for submission
Browse files Browse the repository at this point in the history
  • Loading branch information
zizzfizzix committed Jul 22, 2023
1 parent 924c24d commit 28f1b41
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 29 deletions.
6 changes: 3 additions & 3 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards based ruleset for divi-form-tracking"><!--
<ruleset name="WordPress Coding Standards based ruleset for tracking-for-divi"><!--
Prevent errors caused by WordPress Coding Standards not supporting PHP 8.0+.
See https://github.com/WordPress/WordPress-Coding-Standards/issues/2035#issuecomment-1325532520
-->
Expand Down Expand Up @@ -38,12 +38,12 @@
<rule ref="WordPress" />
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array" value="digitallstudio\diviformtracking" />
<property name="prefixes" type="array" value="digitallstudio\trackingfordivi" />
</properties>
</rule>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
<properties>
<property name="blank_line_check" value="true" />
</properties>
</rule>
</ruleset>
</ruleset>
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"port": 9000,
"pathMappings": {
"/var/www/html": "${workspaceRoot}/wp",
"/var/www/html/wp-content/plugins/divi-form-tracking": "${workspaceRoot}",
"/var/www/html/wp-content/plugins/tracking-for-divi": "${workspaceRoot}",
}
}
]
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Divi Form Tracking
# Tracking for Divi

**Contributors:** kubawtf
**Tags:** divi, dataLayer, tracking, tag manager
Expand Down
16 changes: 8 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ mkdir -p ./build_logs
exec > >(tee "./build_logs/build.$(date +%Y-%m-%d-%H-%M-%S).log") 2>&1

package() {
if [[ -e ./divi-form-tracking.zip ]]; then
rm ./divi-form-tracking.zip
if [[ -e ./tracking-for-divi.zip ]]; then
rm ./tracking-for-divi.zip
fi

case $1 in
Expand All @@ -27,7 +27,7 @@ package() {

case $1 in
production)
zip -r divi-form-tracking/divi-form-tracking.zip ./divi-form-tracking/ \
zip -r tracking-for-divi/tracking-for-divi.zip ./tracking-for-divi/ \
-x "*/.*" \
-x "**/*.zip" \
-x "*/docker/*" \
Expand All @@ -41,7 +41,7 @@ package() {
-x "*/package*.json"
;;
develop)
zip -r divi-form-tracking/divi-form-tracking.zip ./divi-form-tracking/ \
zip -r tracking-for-divi/tracking-for-divi.zip ./tracking-for-divi/ \
-x "*/.*" \
-x "**/*.zip" \
-x "*/docker/*" \
Expand Down Expand Up @@ -71,12 +71,12 @@ deploy() {

mkdir -p ./wp

unzip -d ./wp/ ./divi-form-tracking.zip
unzip -d ./wp/ ./tracking-for-divi.zip

cp -R ./wp/divi-form-tracking "./wp/wp-content/plugins/"
cp -R ./wp/tracking-for-divi "./wp/wp-content/plugins/"

rm -r ./wp/divi-form-tracking
rm ./divi-form-tracking.zip
rm -r ./wp/tracking-for-divi
rm ./tracking-for-divi.zip
}

case $1 in
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "digitallstudio/divi-form-tracking",
"name": "digitallstudio/tracking-for-divi",
"description": "Track only successful Divi contact form submits through the dataLayer.",
"type": "wordpress-plugin",
"require": {
Expand All @@ -8,7 +8,7 @@
"license": "Apache-2.0",
"autoload": {
"psr-4": {
"DigitallStudio\\DiviFormTracking\\": "src/"
"DigitallStudio\\TrackingForDivi\\": "src/"
}
},
"authors": [
Expand Down
16 changes: 8 additions & 8 deletions divi-form-tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
/**
* WordPress plugin to send tracking events on successful Divi form submission.
*
* @package diviformtracking
* @package trackingfordivi
* @license Apache-2.0
* @author Kuba Serafinowski
*
* Plugin Name: Divi Form Tracking
* Plugin URI: https://kuba.wtf/
* Plugin Name: Tracking for Divi
* Plugin URI: https://github.com/zizzfizzix/tracking-for-divi
* Description: Track only successful Divi contact form submits through the dataLayer.
* Author: Kuba Serafinowski
* Author URI: https://kuba.wtf/
* Text Domain: divi-form-tracking
* Text Domain: tracking-for-divi
* Domain Path: /languages
* Version: 0.1.0
*/

namespace DigitallStudio\DiviFormTracking;
namespace DigitallStudio\TrackingForDivi;

require plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';

Expand All @@ -25,7 +25,7 @@
/**
* Main function to avoid global variables
*/
function add_divi_form_tracking_code(): void {
function add_divi_form_tracking_script(): void {
$theme = wp_get_theme();

if ( 'Divi' === $theme->name || 'Divi' === $theme->parent_theme ) {
Expand All @@ -36,7 +36,7 @@ function (): void {
__DIR__ . '/js/dist',
'js/src/main.ts',
array(
'handle' => 'divi-form-tracking',
'handle' => 'tracking-for-divi',
'in-footer' => true,
)
);
Expand All @@ -45,4 +45,4 @@ function (): void {
}
}

add_divi_form_tracking_code();
add_divi_form_tracking_script();
2 changes: 1 addition & 1 deletion js/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Based on https://gist.github.com/Maximoo/e42c0ac114d12873ab511b7a097e669e
// Inspired by https://gist.github.com/Maximoo/e42c0ac114d12873ab511b7a097e669e
import { findKeyInObject, findFormId } from "./lib";

// TODO: get this from plugin settings with a default
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "divi-form-tracking",
"name": "tracking-for-divi",
"description": "Track only successful Divi contact form submits through the dataLayer.",
"version": "0.1.0",
"main": "Gruntfile.js",
"main": "./js/src/main.ts",
"author": "Kuba Serafinowski",
"license": "Apache-2.0",
"scripts": {
Expand Down

0 comments on commit 28f1b41

Please sign in to comment.