Modify featured image path to Amazon S3

You can hook into the output and modify the URL there. add_filter( ‘post_thumbnail_html’, ‘my_post_image_html’, 10, 5 ); function my_post_image_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) { $upload_dir = wp_upload_dir(); $base_url = $upload_dir[‘baseurl’]; // Change the default upload directory to AWS Bucket link $AWSBucket=”http://s3.amazonaws.com/bucket”; $html = str_replace($base_url, $AWSBucket, $html); return $html; } Output the image echo … Read more

How does W3 Total Cache CDN URL rewrites work? [closed]

The W3 Total Cache plugin changes the URL of various files in /w3-total-cache/lib/W3/Plugin/Cdn.php in the function *ob_callback*. It uses a series of callbacks to modify an output buffer. The code runs like this: w3_total_cache.php calls $root->run(); W3_Root::run calls $plugin->run() for each plugin in $this->_loaded_plugins W3_Plugin_TotalCache::run starts an output buffer which calls W3_Plugin_TotalCache::ob_callback W3_Plugin_TotalCache::ob_callback calls w3tc_do_ob_callbacks() … Read more

Emulator for Amazon Kindle

Quoting the documentation: It is possible to configure a standard Android emulator to simulate the Kindle Fire device platform. You should configure your emulator with the following characteristics: Width: 600px Height: 1024px (note that the device will reserve 20px of the height to display a soft key menu, yielding a height of 1004px when in full-screen … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)