Skip to content

Instantly share code, notes, and snippets.

View PCianes's full-sized avatar
🏠
Working from home

Pablo Cianes PCianes

🏠
Working from home
View GitHub Profile
@PCianes
PCianes / namespace-2.php
Created July 5, 2017 09:39
Migrate from prefixing convention to PHP namespacing
<?php
/**
* Description
*
* @package ${NAMESPACE}
* @since 1.0.0
* @author hellofromTonya
* @link https://KnowTheCode.io
* @license GNU-2.0+
*/
@PCianes
PCianes / UTF-8.php
Created July 4, 2017 15:26
PHP Notes
<?php
namespace PCianes;
// use str_replace all the time instead of Regex instructions.
add_filter( 'the_content', __NAMESPACE__ . '\filter_the_content', 99 );
function filter_the_content( $content ) {
$encoding = 'UTF-8';
$needle = 'verlängert';
@PCianes
PCianes / _breakpoints.scss
Last active July 3, 2017 11:02
Neat Breakpoints
// Native CSS breakpoint
@media screen and (max-width: 1023px) {
// styles
}
// Device size breakpoint
@media screen and (max-width: $screen-size--medium) {
// styles
}
@PCianes
PCianes / GENESIS.php
Last active July 1, 2017 21:27
Genesis Utilities
<?php
/**
* Change the read more link -> post.php
*
* @package PCianes\GenesisUtilities
* @since 1.0.0
* @author Pablo Cianes
* @license GNU General Public License 2.0+
*/
@PCianes
PCianes / strings_utilities.php
Last active June 30, 2017 11:16
Some example snippets for the control of strings
<?php
/**
* Some snippets for the control of strings
*
* @package PCianes\StringsUtilities
* @since 1.0.0
* @author PCianes
* @license GNU General Public License 2.0+
*/
@PCianes
PCianes / admin_notice.php
Last active January 11, 2019 08:22
Admin notices (avisos panel administración)
<?php
/**
* Some example snippets for the control of notices in WordPress admin panel
*
* @package PCianes\AdminUtilities
* @since 1.0.0
* @author PCianes
* @license GNU General Public License 2.0+
*/
namespace PCianes\AdminUtilities;