sudo docker pull marksteve/pagekit
Firstly, go to a directory where scripts from gir repo should be stored.
if (version_compare(JVERSION, '3.0.0', '>')) | |
{ | |
// code for J!3.0.0 and newer | |
} | |
else | |
{ | |
// code for older J! versions | |
} |
<html> | |
<head></head> | |
<body> | |
<div id="cronfig-wrapper"> | |
Loading... | |
</div> | |
<script type="text/javascript"> | |
document.cronfigConfig = { | |
platform: 'app_name', | |
tasks: { |
Here is solution for Easy Digital Downloads WP plugin to disable downloads one year after purchase.
Place these 3 functions to /wp-content/themes/{your_theme}/functions.php:
/**
* Function returns expiration date based on post / payment date.
* Replace '365 day' with your time period.
*
* @param string date of post / payment
Mautic has API to interact with other systems. There is PHP API library for faster integration to PHP projects.
API library isn't at Packagist in time of writing this article. Good chance is the library is at Packagist in time of reading, so install it from there and skip this.
Install from GitHub repo. So to use the library as Composer package from GitHub repo your composer.json should contain:
...
<?php | |
/** | |
* A helper class to log and get the Mautic webhook request | |
*/ | |
class webhookTest { | |
/** | |
* Log a message to a file | |
* |
<?php | |
/** | |
* Push data to a Mautic form | |
* | |
* @param array $data The data submitted by your form | |
* @param integer $formId Mautic Form ID | |
* @param string $ip IP address of the lead | |
* @return boolean | |
*/ |
<?php | |
if (!isset($_GET['ILoveMauticReallyIDo'])) { | |
echo 'The secret phrase is wrong.'; | |
die; | |
} | |
$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
$allowedTasks = array( | |
'cache:clear', |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Mautic Form Test</title> | |
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | |
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | |