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
#!/bin/bash | |
# Change directory to /home | |
cd /home | |
# Iterate through all users directories | |
for user in * ; do | |
# For every webapp under the user directory | |
# Count wp-config files to make sure its Wordpess |
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
{{ path('entity.node.canonical', {'node': node.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
<?php | |
/** | |
* Sample use: | |
* WordPres Customizer is dependant on functionality in the theme. Just in case | |
* the current theme doesn't support WordPress Customizer we'll use a theme | |
* that supports it. | |
*/ | |
class NN { | |
private $theme_name = 'twentysixteen'; |
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
// Requires jQuery of course. | |
$(document).ready(function() { | |
$('.show-comments').on('click', function(){ | |
var disqus_shortname = 'YOUR-DISQUS-USERNAME'; // Replace this value with *your* username. | |
// ajax request to load the disqus javascript | |
$.ajax({ | |
type: "GET", | |
url: "http://" + disqus_shortname + ".disqus.com/embed.js", | |
dataType: "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
# all php files :: disallow direct access of file | |
# between <?php and ?> | |
defined('_JEXEC') or die; | |
# index.php :: define variable with application | |
# between <?php and ?> | |
$app = JFactory::getApplication(); | |
# index.php :: define variable with document | |
# between <?php and ?> |
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
#!/bin/bash | |
# Regolith aka Un-Bedrock | |
# "But what if we need to hand it off to another agency?" No more! | |
# This script converts a Bedrock site to a normal WordPress structure. | |
# Run it from the root of a Bedrock project. | |
# Created by Nathan Knowler and Daniel Roe | |
echo "Converting Bedrock to a normal WordPress file structure..." |
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
#!/bin/sh | |
# jfindfiles -- Find used and unused content files in your Joomla website | |
# | |
# This scripts supports Joomla versions 2.5 - 3.x | |
# | |
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl | |
# | |
# This program is free software; you may redistribute it and/or modify it. | |
# |
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 register_watermarked_size() { | |
add_image_size( 'watermarked', 550, 550, true ); // This is what should be uploaded | |
} | |
add_action( 'init', 'register_watermarked_size' ); | |
class Watermark_Image { | |
// The attachment meta array | |
public $meta = 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
<!-- wp:heading --> | |
<h2>Heading Block (H2)</h2> | |
<!-- /wp:heading --> | |
<!-- wp:heading --> | |
<h3>You are looking at one. (H3)</h3> | |
<!-- /wp:heading --> | |
<!-- wp:heading --> | |
<h2>Subhead Block</h2> |
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 | |
return array( | |
'JAccess' => 'Joomla\\Access\\Access', | |
'JAccessRule' => 'Joomla\\Access\\Rule', | |
'JAccessRules' => 'Joomla\\Access\\Rules', | |
'JApplicationBase' => 'Joomla\\Application\\Base', | |
'JApplicationCli' => 'Joomla\\Application\\Cli', | |
'JApplicationDaemon' => 'Joomla\\Application\\Daemon', | |
'JRoute' => 'Joomla\\Application\\Route', |