This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
*/ |
This file contains hidden or 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 dashboard menus to editor role. | |
* | |
* @uses current_user_can() To know if current user has permissions. | |
* @uses remove_menu_page() To remove a menu page. | |
* @uses remove_submenu_page() To remove a submenu page. | |
* @see https://github.com/crewstyle/clean-wordpress | |
*/ |
This file contains hidden or 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 menu items from WordPress admin bar. | |
* | |
* @uses remove_menu() To remove specific menu. | |
* @see https://github.com/crewstyle/clean-wordpress | |
*/ | |
add_action('wp_before_admin_bar_render', '_cw_remove_bar_icons'); | |
function _cw_remove_bar_icons() |
NewerOlder