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 | |
/** | |
* Plugin Name: AMP Google Tag Manager | |
* | |
* @package AMP_Google_Tag_Manager | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2019 Google Inc. | |
* | |
* @wordpress-plugin |
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 | |
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored) | |
// http://youtu.be/dQw4w9WgXcQ | |
// http://www.youtube.com/embed/dQw4w9WgXcQ | |
// http://www.youtube.com/watch?v=dQw4w9WgXcQ | |
// http://www.youtube.com/?v=dQw4w9WgXcQ | |
// http://www.youtube.com/v/dQw4w9WgXcQ | |
// http://www.youtube.com/e/dQw4w9WgXcQ | |
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ |
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
<form name="artist_basic_profile" id="artist_basic_profile" action="" method="post" enctype="multipart/form-data"> | |
<?php if($user->ID){ ?> | |
<input type="file" id="userProfileImage" name="userProfileImage" > | |
<input id="submit" type="submit" name="submit" value="Save" > | |
<?php } ?> | |
</form> |
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
{ | |
"type": "email", | |
"customer": { | |
"email": "{{customer.email}}", | |
"firstName":"{{customer.firstName}}", | |
"lastName":"{{customer.lastName}}" | |
}, | |
"subject": "Low NPS rating from customer {{customer.firstName}} {{customer.lastName}}", | |
"mailbox": { | |
"id": MAILBOX-ID |
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
/* (320x480) iPhone (Original, 3G, 3GS) */ | |
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) { | |
/* insert styles here */ | |
} | |
/* (320x480) Smartphone, Portrait */ | |
@media only screen and (device-width: 320px) and (orientation: portrait) { | |
/* insert styles here */ | |
} | |
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
DELETE a,b,c | |
FROM {PREFIX}_posts a | |
LEFT JOIN {PREFIX}_term_relationships b ON (a.ID = b.object_id) | |
LEFT JOIN {PREFIX}_postmeta c ON (a.ID = c.post_id) | |
WHERE a.post_type = 'POST_TYPE' AND a.post_date < '2014-01-01' |
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 | |
/** | |
* @file | |
* Install, update and uninstall functions for the d8module module. | |
*/ | |
function d8module_schema_otherdb() { | |
$schema['mytable'] = array( | |
'description' => 'My table description', |
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
<? | |
/** | |
* Repeatable Custom Fields in a Metabox | |
* Author: Helen Hou-Sandi | |
* | |
* From a bespoke system, so currently not modular - will fix soon | |
* Note that this particular metadata is saved as one multidimensional array (serialized) | |
*/ | |
function hhs_get_sample_options() { |
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
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName example.com | |
ServerAlias www.example.com | |
DocumentRoot /var/www/example.com/public_html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
</VirtualHost> |
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
// update_option( 'siteurl', 'http://dev.enl/environmental-leader-v3/' ); | |
// update_option( 'home', 'http://dev.enl/environmental-leader-v3/' ); | |
// function wpb_admin_account(){ | |
// $user = 'admin'; | |
// $pass = 'admin'; | |
// $email = '[email protected]'; | |
// if ( !username_exists( $user ) && !email_exists( $email ) ) { | |
// $user_id = wp_create_user( $user, $pass, $email ); |
NewerOlder