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 | |
$namespace = 'aBase\\'; | |
$classes = get_declared_classes(); | |
$keys = preg_grep('/ComposerAutoloaderInit*/', $classes); | |
foreach ($keys as $composerLoader) { | |
if (method_exists($composerLoader, 'getLoader')) { | |
$composer = $composerLoader::getLoader(); | |
if($composer && $composer->getPrefixesPsr4()){ | |
if(array_key_exists($namespace, $composer->getPrefixesPsr4())){ |
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 | |
add_filter('content_save_pre', 'cleanup_annoying_writers'); | |
function cleanup_annoying_writers($content) | |
{ | |
remove_filter('content_save_pre', array($this, 'cleanup_annoying_writers')); | |
$content =trim(stripslashes($content)); | |
//No JS |
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
For a single item (say, a single article) | |
In your Data: | |
<?php | |
$data = array('title' => 'My Single Title', 'content' => 'My Single Content'); | |
?> |
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
/** | |
* Converts a string that was serialized with jQuery.param back to the object. | |
* | |
* @param {String} str | |
* | |
* @return {Object} | |
*/ | |
function parseParams(str) { | |
var obj = {}, pair; | |
var pairs = decodeURIComponent(str).split( "&" ); |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+e"], "command": "open_folder_in_nautilus" } | |
] |