This file contains hidden or 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
/* | |
Plugin Name: Auto Login | |
Plugin URI: http://hbt.io/ | |
Version: 1.0.0 | |
Author: Harri Bell-Thomas | |
Author URI: http://hbt.io/ | |
*/ | |
function autologin() { | |
// PARAMETER TO CHECK FOR |
This file contains hidden or 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
add_action('init', 'add_my_user'); | |
function add_my_user() { | |
$username = 'username123'; | |
$email = '[email protected]'; | |
$password = 'pasword123'; | |
$user_id = username_exists( $username ); | |
if ( !$user_id && email_exists($email) == false ) { | |
$user_id = wp_create_user( $username, $password, $email ); | |
if( !is_wp_error($user_id) ) { |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>test</title> | |
<link rel="stylesheet" href="style.css" /> | |
</head> | |
<body> | |
<div class="container"> |
This file contains hidden or 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
.auto { cursor: auto; } | |
.default { cursor: default; } | |
.none { cursor: none; } | |
.context-menu { cursor: context-menu; } | |
.help { cursor: help; } | |
.pointer { cursor: pointer; } | |
.progress { cursor: progress; } | |
.wait { cursor: wait; } | |
.cell { cursor: cell; } | |
.crosshair { cursor: crosshair; } |
This file contains hidden or 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
// You can also use the .is() method along with an appropriate selector for more advanced matching: | |
if ( $( "#myDiv" ).is( ".pretty.awesome" ) ) { | |
$( "#myDiv" ).show(); | |
} |
This file contains hidden or 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
/** | |
* | |
* Gulpfile setup | |
* | |
* @since 1.0.0 | |
* @authors Ahmad Awais, @digisavvy, @desaiuditd, @jb510, @dmassiani and @Maxlopez | |
* @package neat | |
* @forks _s & some-like-it-neat | |
*/ |
This file contains hidden or 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
<?php | |
$phone_cleaned = do_shortcode('[phone]'); // phone number or var that contains the phone number | |
$phone_formatted = preg_replace("/[^0-9,.]/", "", $phone_cleaned); | |
?> | |
$(document).ready(function() { | |
function getCookie(name) { | |
var dc = document.cookie; | |
var prefix = name + "="; | |
var begin = dc.indexOf("; " + prefix); | |
if (begin == -1) { |
This file contains hidden or 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
wget https://download.suhosin.org/suhosin-0.9.38.tar.gz | |
tar -xvf suhosin-0.9.38.tgz | |
cd suhosin-0.9.38 | |
phpize | |
./configure | |
make | |
make install | |
sudo rm /etc/php.d/suhosin.ini |
This file contains hidden or 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
<a id="buy" href="#">Buy this!</a> | |
<script> | |
$('#buy').click(function(e) { | |
e.preventDefault(); | |
addToCart(19); | |
return false; | |
}); | |
function addToCart(p_id) { | |
$.get('/wp/?post_type=product&add-to-cart=' + p_id, function() { |
This file contains hidden or 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
<?php | |
// Get the WooCommerce Shop URL | |
$store_url = get_site_url(); | |
// Action to perform: lets add product to cart | |
$action = "/?add-to-cart="; | |
// The product ID that we want to add. | |
$productID = "375"; |
OlderNewer