First thing I learned out of roaming around Coderwall. Original post here. Don't miss out the fun experiments on the comments!
Simply copy and paste the contents of editor.html on your browser's address bar.
Have fun experimenting!
| <?php | |
| /* | |
| Plugin Name: Latest Posts | |
| Description: An extension of Wordpress' Recent Posts Widget | |
| Author: Jubal Mabaquiao | |
| Version: 1.0 | |
| Author URI: http://behance.net/jubal | |
| */ | |
| class WP_Widget_Latest_Posts extends WP_Widget { |
| <?php | |
| // Disable admin bar from non administrators | |
| add_filter( 'show_admin_bar' , 'disable_admin_bar'); | |
| function disable_admin_bar($content) { | |
| return ( current_user_can("administrator") ) ? $content : false; | |
| } | |
| ?> |
| <?php | |
| add_action('gform_enable_password_field', '__return_true'); | |
| ?> |
| <?php | |
| // google fonts with ssl support | |
| wp_enqueue_style( 'lato', (is_ssl() ? 'https://' : 'http://') . 'fonts.googleapis.com/css?family=Lato:300,400,700','', '1.0' ); | |
| ?> |
| <?php | |
| function is_ssl() { | |
| if ( isset($_SERVER['HTTPS']) ) { | |
| if ( 'on' == strtolower($_SERVER['HTTPS']) ) | |
| return true; | |
| if ( '1' == $_SERVER['HTTPS'] ) | |
| return true; | |
| } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) { | |
| return true; | |
| } |
| if (!(window.console && console.log)) { | |
| (function() { | |
| var noop = function() {}; | |
| var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn']; | |
| var length = methods.length; | |
| var console = window.console = {}; | |
| while (length--) { | |
| console[methods[length]] = noop; | |
| } | |
| }()); |
| <reference name="head"> | |
| <block type="core/text" name="google.cdn.jquery"> | |
| <action method="setText"> | |
| <text> | |
| <![CDATA[ | |
| <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
| <script type="text/javascript">jQuery.noConflict()</script> | |
| ]]> | |
| </text> | |
| </action> |
| // drop this line on the browser's console (developer tools) | |
| delete window['console']; |
| # watch only modules you handle | |
| guard 'livereload' do | |
| watch(%r{.modman/.+\.(css|js|jpg|png|gif|php|phtml|xml|csv)}) | |
| end |
First thing I learned out of roaming around Coderwall. Original post here. Don't miss out the fun experiments on the comments!
Simply copy and paste the contents of editor.html on your browser's address bar.
Have fun experimenting!