You Don't Know JS (book series)
[javascript.ru] (https://learn.javascript.ru/intro)
| jQuery(document).ready(function () { | |
| // calendar | |
| uikit_jcalendar(); | |
| // button | |
| uikit_jcalendar_btn('#news_created_btn', 'uk-button-primary', 'calendar'); | |
| uikit_jcalendar_btn('#news_publish_up_btn', 'uk-button-secondary', 'future'); | |
| }); | |
| // calendar |
| <?php | |
| /** | |
| * Sample use: | |
| * WordPres Customizer is dependant on functionality in the theme. Just in case | |
| * the current theme doesn't support WordPress Customizer we'll use a theme | |
| * that supports it. | |
| */ | |
| class NN { | |
| private $theme_name = 'twentysixteen'; |
| {{ path('entity.node.canonical', {'node': node.id }) }} |
You Don't Know JS (book series)
[javascript.ru] (https://learn.javascript.ru/intro)
| #!/usr/bin/env sh | |
| ------------------------------------------ | |
| openssl genrsa -out jbzoo-com-ca.key 2048 | |
| openssl req -x509 -new -key jbzoo-com-ca.key -days 10000 -out jbzoo-com-ca.crt | |
| openssl genrsa -out jbzoo-com-server.key 2048 | |
| openssl req -new -key jbzoo-com-server.key -out jbzoo-com-server.csr | |
| openssl x509 -req -in jbzoo-com-server.csr -CA jbzoo-com-ca.crt -sha256 -CAkey jbzoo-com-ca.key -CAcreateserial -out jbzoo-com-server.crt -days 5000 |
| <?php | |
| add_action('admin_init', function () { | |
| // Redirect any user trying to access comments page | |
| global $pagenow; | |
| if ($pagenow === 'edit-comments.php') { | |
| wp_redirect(admin_url()); | |
| exit; | |
| } |
Here is a list of scopes to use in Sublime Text 2/3 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
| function register_watermarked_size() { | |
| add_image_size( 'watermarked', 550, 550, true ); // This is what should be uploaded | |
| } | |
| add_action( 'init', 'register_watermarked_size' ); | |
| class Watermark_Image { | |
| // The attachment meta array | |
| public $meta = array(); |
| <?php | |
| //Do not copy the above php tag | |
| // Stop JetPacks Minified/Concatention CSS file | |
| add_filter( 'jetpack_implode_frontend_css', '__return_false' ); | |
| //Remove JepPack CSS | |
| function themeprefix_remove_jetpack_css() { | |
| wp_deregister_style( 'AtD_style' ); // After the Deadline | |
| wp_deregister_style( 'jetpack_likes' ); // Likes |