This file contains hidden or 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
| const cors = (req, res, next) => { | |
| res.header("Access-Control-Allow-Origin", "*"); | |
| res.header("Access-Control-Allow-Methods", "GET, PUT, POST, PATCH, DELETE"); | |
| res.header("Access-Control-Allow-Headers", "Content-Typer"); | |
| next(); | |
| } | |
| module.exports = cors; |
This file contains hidden or 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
| add_filter( 'wp_mail_content_type','set_content_type' ); | |
| function contact_ajax(){ | |
| wp_verify_nonce( 'my-special-string', 'security' ); | |
| $name = htmlspecialchars(stripslashes(trim($_POST['name']))); | |
| $email = htmlspecialchars(stripslashes(trim($_POST['email']))); | |
| $message = htmlspecialchars(stripslashes(trim($_POST['message']))); | |
| $options = get_option('feedback-page',array()); |
This file contains hidden or 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
| @mixin respond-to($media) { | |
| @if $media == phone { | |
| @media only screen and (max-width: $small) { @content; } | |
| } | |
| @else if $media == tablet { | |
| @media only screen and (min-width: $small + 1) and (max-width: $large - 1) { @content; } | |
| } | |
| @else if $media == notebook { | |
| @media only screen and (min-width: $large) and (max-width: $slarge - 1) { @content; } | |
| } |
This file contains hidden or 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
| /** | |
| * | |
| * Реинициализируем shortcode [gallery] | |
| * | |
| */ | |
| add_action( 'after_setup_theme', 'wfs_reinit_gallery_shortcode' ); | |
| function wfs_reinit_gallery_shortcode() { | |
| remove_shortcode( 'gallery' ); | |
| add_shortcode( 'gallery', 'wfs_shortcode_gallery' ); |
This file contains hidden or 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
| { | |
| "auto_complete_commit_on_tab": true, | |
| "auto_indent": true, | |
| "bold_folder_labels": true, | |
| "caret_extra_bottom": 2, | |
| "caret_extra_top": 2, | |
| "caret_extra_width": 1, | |
| "caret_style": "phase", | |
| "color_scheme": "Packages/User/Afterglow (SublimePythonIDE).tmTheme", | |
| "draw_minimap_border": true, |
This file contains hidden or 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
| { | |
| // The tab key will cycle through the settings when first created | |
| // Visit http://wbond.net/sublime_packages/sftp/settings for help | |
| // sftp, ftp or ftps | |
| "type": "ftp", | |
| "save_before_upload": true, | |
| "upload_on_save": true, |
This file contains hidden or 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
| // function to display number of posts. | |
| function getPostViews($postID){ | |
| $count_key = 'post_views_count'; | |
| $count = get_post_meta($postID, $count_key, true); | |
| if($count==''){ | |
| delete_post_meta($postID, $count_key); | |
| add_post_meta($postID, $count_key, '0'); | |
| return "0"; | |
| } |
This file contains hidden or 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
| function do_excerpt($post_id, $word_limit = 80) { | |
| $temp = $post; | |
| $post = get_post($post_id); | |
| setup_postdata($post); | |
| $excerpt = get_the_content(); | |
| wp_reset_postdata(); | |
| $post = $temp; | |
| $words = explode(' ', $excerpt, ($word_limit + 1)); | |
| if (count($words) > $word_limit) | |
| array_pop($words); |
This file contains hidden or 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 echo date('Y'); ?> <?php bloginfo( 'name' ); ?>. All rights reserved. |
NewerOlder