This file contains 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 | |
$pdo = new PDO('mysql:host=hostname;dbname=defaultDbName', 'username', 'p@55w0rd'); | |
$sql = 'INSERT INTO author (first_name, last_name, date_of_birth, email) VALUES (?, ?, ?, ?)'; | |
$stmt = $pdo->prepare($sql); | |
$faker = \Faker\Factory::create(); | |
$insertedPKs = array(); | |
for ($i=0; $i < 100; $i++) { | |
$stmt->bindValue(1, $faker->firstName, PDO::PARAM_STR); | |
$stmt->bindValue(2, $faker->lastName, PDO::PARAM_STR); | |
$stmt->bindValue(1, $faker->date, PDO::PARAM_STR); |
This file contains 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 | |
// Add to functions.php | |
add_action( 'wp_enqueue_scripts', 'add_recaptcha_js', 5, 1 ); | |
function add_recaptcha_js() { | |
// Registration reCAPTHCA api.js, version - null, in footer - false | |
wp_register_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js?hl=en', array(), null, false ); | |
// Include reCAPTHCA api.js | |
wp_enqueue_script( 'recaptcha' ); | |
} |
This file contains 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
<? | |
//amo | |
//ПРЕДОПРЕДЕЛЯЕМЫЕ ПЕРЕМЕННЫЕ | |
$responsible_user_id = 7292136; //id ответственного по сделке, контакту, компании | |
$lead_name = 'Заявка с сайта'; //Название добавляемой сделки | |
$lead_status_id = '11331793'; //id этапа продаж, куда помещать сделку | |
$contact_name = $cname; //Название добавляемого контакта | |
$contact_phone = $cphone; //Телефон контакта |
This file contains 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
/* CSS Mini Reset */ | |
html, body, div, form, fieldset, legend, label | |
{ | |
margin: 0; | |
padding: 0; | |
} | |
table | |
{ |
This file contains 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 | |
define('DISALLOW_FILE_MODS', true); |
This file contains 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
var script = document.createElement("script"); | |
script.setAttribute("src", "https://code.jquery.com/jquery-3.2.1.min.js"); | |
script.addEventListener('load', function() { | |
var script = document.createElement("script"); | |
document.body.appendChild(script); | |
}, false); | |
document.body.appendChild(script); |
This file contains 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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @salcode | |
# ver 20160309 | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. |
This file contains 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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
*/ | |
$args = array( |