Before start
- Screenshots and PageSpeed / GTMetic old ratings
WordPress Environment
- Comment Spam Protector
- Client users are created
<?php | |
$curl = curl_init('http://www.livescore.com/soccer/england/'); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10'); | |
$html = curl_exec($curl); | |
curl_close($curl); | |
if (!$html) { |
<div class="col6"> | |
<div class="group">[text* full-name placeholder "*Insert Full Name"]</div> | |
<div class="group">[email* the-email placeholder "*Insert Email"]</div> | |
</div> | |
<div class="col6"> | |
<div class="group">[textarea* the-message placeholder "*Write your message here"]</div> | |
</div> | |
<div class="col12"> |
# Apache configuration file | |
# httpd.apache.org/docs/2.2/mod/quickreference.html | |
# Note .htaccess files are an overhead, this logic should be in your Apache | |
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html | |
# Techniques in here adapted from all over, including: | |
# Kroc Camen: camendesign.com/.htaccess | |
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ | |
# Sample .htaccess file of CMS MODx: modxcms.com | |
# This is the free sample of .htaccess from 6GO s.r.l. | |
# @author Claudio Ludovico Panetta (@Ludo237) |
<?php | |
// {{{ license | |
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */ | |
// | |
// +----------------------------------------------------------------------+ | |
// | This library is free software; you can redistribute it and/or modify | | |
// | it under the terms of the GNU Lesser General Public License as | | |
// | published by the Free Software Foundation; either version 2.1 of the | | |
// | License, or (at your option) any later version. | |
$.trackEvents({ | |
'/ #header #nav #nav-item-1 a ': ['Header', 'Nav Click', 'Section Name'], | |
'/ #header #nav #nav-item-2 a ': ['Header', 'Nav Click', 'Section Name'], | |
'/ #header #nav #nav-item-3 a ': ['Header', 'Nav Click', 'Section Name'], | |
'/ #header #nav #nav-item-4 a ': ['Header', 'Nav Click', 'Section Name'], | |
'/ #header #nav #nav-item-5 a ': ['Header', 'Nav Click', 'Section Name'], | |
'/ #header #nav #nav-item-7 a ': ['Header', 'Nav Click', 'Section Name' | |
]}); | |
jQuery.trackEvents = (function ($) { |
$(document).ready(function() { | |
// Select all links with hashes | |
$('a[href*="#"]') | |
// Remove links that don't actually link to anything | |
.not('[href="#"]') | |
.not('[href="#0"]') | |
.click(function(event) { | |
// On-page links | |
if ( | |
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') |
var $body = jQuery('body'); | |
$body.on('click', 'a', function() { | |
var $this = $(this), | |
thisHref = $this.attr('href'); | |
if (thisHref.length | |
&& thisHref.substring(0, 1) === '#' | |
&& typeof ga === 'function' | |
) { | |
ga('send', 'event', { |
<?php | |
/** | |
* Plugin Name: Disable ACF on Frontend | |
* Description: Provides a performance boost if ACF frontend functions aren't being used | |
* Version: 1.0 | |
* Author: Bill Erickson | |
* Author URI: http://www.billerickson.net | |
* License: MIT | |
* License URI: http://www.opensource.org/licenses/mit-license.php | |
*/ |
<?php | |
class ModelCatalogProduct extends Model | |
{ | |
public function updateViewed($product_id) | |
{ | |
$this->db->query("UPDATE " . DB_PREFIX . "product SET viewed = (viewed + 1) WHERE product_id = '" . (int)$product_id . "'"); | |
} | |
public function getProduct($product_id) |