$ cd /path/to/your/website
$ rm -Rf ./lib
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
// only for CakePHP 2.x | |
$lastquery = end($this->getDatasource()->getLog()['log'])['query']; | |
debug($lastquery); |
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 | |
require_once('simpleimage.class.php'); | |
// Usage: | |
// Load the original image | |
$image = new SimpleImage('lemon.jpg'); | |
// Resize the image to 600px width and the proportional height | |
$image->resizeToWidth(600); |
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 | |
/** | |
* Retrieve a page given its slug. | |
* | |
* @global wpdb $wpdb WordPress database abstraction object. | |
* | |
* @param string $page_slug Page slug | |
* @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A. | |
* Default OBJECT. | |
* @param string|array $post_type Optional. Post type or array of post types. Default 'page'. |