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 | |
class UTCW_Test_Data extends WP_UnitTestCase { | |
protected $utcw; | |
protected $wpdb; | |
function setUp() | |
{ | |
$this->utcw = UTCW_Plugin::get_instance(); |
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
INSERT INTO wp_comments (comment_ID, comment_post_ID, comment_date, comment_content, comment_parent, comment_author, comment_author_email, comment_author_url, comment_approved) | |
SELECT | |
cid AS comment_ID, | |
nid AS comment_post_ID, | |
FROM_UNIXTIME(TIMESTAMP) AS comment_date, | |
comment AS comment_content, | |
IF( LENGTH(thread) = 3, 0, ( SELECT cid | |
FROM drupal.comments c2 | |
WHERE c2.nid = c1.nid | |
AND c2.thread = CONCAT( SUBSTR( c1.thread, 1, LENGTH(c1.thread) - 4 ), '/' ) |
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
function fetchData( $elements ) { | |
var data = {}; | |
$elements.each(function() { | |
var $this = $(this), | |
name = $this.attr('name'), | |
value = $this.val(); | |
if ( name.substr(-2, 2) === '[]' ) { |
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
<Directory ~ "/www/example.com/webroot/(media|generated)/"> | |
php_flag engine off | |
<FilesMatch "\.(php|inc)$"> | |
Order allow,deny | |
Deny from all | |
</FilesMatch> | |
</Directory> |
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
RewriteEngine On | |
RewriteRule .? - [F,L] |
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
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p> | |
<hr /> | |
<h1>Heading 1</h1> | |
<h2>Heading 2</h2> | |
<h3>Heading 3</h3> | |
<h4>Heading 4</h4> | |
<h5>Heading 5</h5> | |
<h6>Heading 6</h6> | |
<p><small><a href="#wrapper">[top]</a></small></p> | |
<hr /> |
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
// Works just fine | |
$(document).on('click', '#print', function() { window.print() }); | |
// Doesnt work | |
$(document).on('click', '#print', window.print ); | |
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
window.App = Ember.Application.create({}); | |
Item = Ember.Object.extend({ | |
}); | |
App.ListController = Ember.ArrayController.create({ | |
content: [], | |
currentItem: null, |
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 | |
interface iA { | |
function a(); | |
} | |
class Alpha implements iA { |
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
$email = isset($comment->comment_author_email) ? $comment->comment_author_email : null; | |
if ( !$email && !is_integer($id_or_email) ) { | |
$email = $id_or_email; | |
} | |
if ( !$email && is_integer($id_or_email) ) { | |
$user = get_userdata($id_or_email); | |
$email = $user->user_email; | |
} |