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 | |
/** | |
* Remove unnecessary details from `body_class()` | |
* | |
* @param string $classes | |
* @param string $class | |
* | |
* @uses get_query_var() | |
* @uses get_user_by() |
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
/*! | |
* SHORTCODE | |
* | |
* Plugin Name: Shortcode | |
* Version: 1.0.0 | |
* Description: Add shortcode button with title, list and image contents. | |
* | |
* Author: Achraf Chouk | |
* Author URI: https://github.com/crewstyle | |
* License: The MIT License (MIT) |
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 | |
/** | |
* Close database connections | |
* | |
* It's very dangerous to let connections opened. In a website | |
* with high traffic volume, you can kill your database just | |
* because of unclosed DB connections. | |
* This little snippet prevent that drama ;) | |
* |
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 what to clean from the theme header frontend, via the "remove_action" hook. | |
* | |
* @see https://github.com/GetOlympus/Zeus-Core | |
*/ | |
$optims = [ | |
'adjacent_posts_rel', // Removes the next and previous post links from the header |
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
{% macro recursiveCategory(category) %} | |
{% import _self as self %} | |
<li> | |
<h4><a href="{{ path(category.route, category.routeParams) }}">{{ category }}</a></h4> | |
{% if category.children|length %} | |
<ul> | |
{% for child in category.children %} | |
{{ self.recursiveCategory(child) }} | |
{% endfor %} |
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
/** | |
* This script has been especially made for a particular context. | |
* So use it with caution, and do not forget to customize it before any use. | |
*/ | |
//globals | |
var sheet = SpreadsheetApp.getActiveSpreadsheet(), | |
sheets = sheet.getSheets(); | |
/** |
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
/** | |
* This script has been especially made for a particular context. | |
* So use it with caution, and do not forget to customize it before any use. | |
*/ | |
//globals | |
var sheet = SpreadsheetApp.getActiveSpreadsheet(), | |
sheets = sheet.getSheets(); | |
/** |
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
/** | |
* Retrieve parameter from URL | |
*/ | |
function findParameter(param) { | |
var result = 0, tmp = [], BreakException = {}; | |
// Iterate on all and breaks when param is found | |
// @see http://stackoverflow.com/a/2641374 | |
try { | |
location.search |
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 | |
#################################################################### | |
# WordPress updater script | |
# | |
# This script has been made to update WordPress sites quickly | |
# and works on remote server. | |
# | |
# It works with this simple command line: | |
# /path/to/wp-update.sh folder_name user:group |
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 | |
/** | |
* Sets up WP version check for admin role only. | |
* | |
* @uses current_user_can() To know if current user has permissions. | |
* @uses add_action() To add a hook action. | |
* @uses add_filter() To add a hook filter. | |
* @see https://github.com/crewstyle/clean-wordpress | |
*/ |
NewerOlder