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 get_property_1_listings() { | |
$args = array('post_type' => 'listing'); | |
$loop = new WP_Query($args); | |
$content = '<ul class="listings">'; | |
$count = 0; | |
while ($loop->have_posts()) { | |
$loop->the_post(); | |
$address = get_field('address'); | |
if ($address == 'Property 1') { | |
$count++; |
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
SELECT u.uid, u.name, u.mail as email, u.status, | |
EXISTS ( | |
SELECT n.nid nid, NULL as uid FROM node n | |
WHERE n.type = 'manual' AND n.status = 1 AND nid NOT IN ( | |
SELECT fc.content_id nid FROM flag_content as fc | |
RIGHT JOIN node n ON (fc.content_type = 'node' AND fc.fid = 3 | |
AND fc.content_id = n.nid AND n.type = 'manual' AND n.status = 1) | |
WHERE fc.uid = u.uid | |
) | |
) as read_manuals |
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 | |
// At top of template_preprocess_table function for test | |
$colgroups = array( | |
// COLGROUP with one COL element. | |
array( | |
'data' => array( | |
array( | |
'class' => array('test1-1'), // Attribute for the COL element. | |
), |
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
# Make sure the domain always removes the www | |
RewriteCond %{HTTP_HOST} ^www\.pittet\.ca$ | |
RewriteRule (.*) http://pittet.ca/$1 [R=301,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
<?php | |
$form['links'] = array( | |
'#type' => 'table', | |
'#attributes' => array('id' => 'menu-overview'), | |
'#header' => array( | |
t('Menu link'), | |
array('data' => t('Enabled'), 'class' => array('checkbox')), | |
t('Weight'), | |
t('Operations'), |
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 | |
array ( | |
0 => array( | |
'label' => 'Drupal core', | |
'projects' => array( | |
'drupal' => array( | |
'attributes' => | |
Drupal\Core\Template\Attribute::__set_state(array( | |
'storage' => array( |
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
Warning: Must specify directory location for XHProf runs. Trying /tmp as default. You can either pass the directory location as an argument to the constructor for XHProfRuns_Default() or set xhprof.output_dir ini param. | |
=== 8.x..8.x compared (5198078e48bc9..519807e737082): | |
ct : 37,804|37,806|2|0.0% | |
wt : 284,085|277,540|-6,545|-2.3% | |
cpu : 253,007|248,977|-4,030|-1.6% | |
mu : 11,494,656|11,494,656|0|0.0% | |
pmu : 11,669,976|11,669,976|0|0.0% | |
<a href="http://d8prof.dev/xhprof-kit/xhprof/xhprof_html/index.php?source=drupal-perf&url=%2F&run1=5198078e48bc9&run2=519807e737082&extra=8.x..8.x">Profiler output</a> |
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
# aggregator/sources/1 | |
# BBC Feeds 82 articles, 20 per page shown. | |
$ bbranches 5198078e48bc9 1896060-twig-aggregator | |
=== 8.x..8.x compared (5198078e48bc9..519807e737082): | |
ct : 37,804|37,806|2|0.0% | |
wt : 284,085|277,540|-6,545|-2.3% | |
cpu : 253,007|248,977|-4,030|-1.6% | |
mu : 11,494,656|11,494,656|0|0.0% |
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
# aggregator/sources/1 | |
# BBC Feeds 82 articles, 20 per page shown. | |
[ 8.x ] $ bbranches 51981a3a6232a 1896060-twig-aggregator | |
=== 8.x..8.x compared (51981a3a6232a..51981a807e11e): | |
ct : 38,281|38,281|0|0.0% | |
wt : 278,813|278,935|122|0.0% | |
cpu : 249,691|250,819|1,128|0.5% |
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
# Creates a baseline from your 8.x branch. | |
alias bbranch='./xhprof-kit/benchmark-branch.sh `git rev-parse --abbrev-ref HEAD`' | |
# Using the baseline xhprof identifier from the bbranch command above will benchmark 8.x against the baseline and your patched branch. | |
# e.g. | |
# bbranches [XHPROF-IDENTIFIED] [twig-branch-name-here-1234456] | |
function bbranches() { | |
originalbranch="$(git rev-parse --abbrev-ref HEAD)" | |
base=$1 | |
shift |