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
| # http://jvalenzuela.es/robots-txt-para-wordpress/ | |
| User-agent: * | |
| Disallow: /wp-login | |
| Disallow: /wp-admin | |
| Disallow: //wp-includes/ | |
| Disallow: /*/feed/ | |
| Disallow: /*/trackback/ | |
| Disallow: /*/attachment/ | |
| Disallow: /author/ | |
| Disallow: /*/page/ |
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 wp_bootstrap_pagination() | |
| { | |
| if( is_singular() ) { | |
| return; | |
| } | |
| global $wp_query; | |
| if( $wp_query->max_num_pages <= 1 ) { |
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 | |
| function wpml_languages_list() { | |
| $languages = icl_get_languages('skip_missing=0'); | |
| if(!empty($languages)){ | |
| echo '<div id="icl_lagunage_menu"><ul>'; | |
| foreach($languages as $l){ | |
| echo '<li>'; | |
| if($l['active']) { | |
| $class = ' class="active"'; | |
| } |
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
| <cfargument name="testua" default="0"> | |
| <cfloop index="intChar" from="1" to="#Len( testua )#" step="1"> | |
| <cfset strChar = Mid( testua, intChar, 1 ) /> | |
| <cfdump var="[#intChar#:#asc(strChar)#:#strChar#]"> | |
| </cfloop> | |
| <cfabort> |
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 | |
| error_reporting(E_ALL); | |
| ini_set('display_errors', 1); |
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 | |
| add_action( 'phpmailer_init', 'phpmailer_disable_self_signed' ); | |
| function phpmailer_disable_self_signed( PHPMailer $phpmailer ) { | |
| $phpmailer->SMTPOptions = ['ssl'=> ['allow_self_signed' => 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
Show hidden characters
| { | |
| "folders": | |
| [ | |
| { | |
| "path": "project/path/here" | |
| } | |
| ], | |
| "settings": { | |
| "phpcs": { | |
| "phpcs_execute_on_save": false, |
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 | |
| // your custom code... | |
| add_filter('embed_oembed_html', 'my_embed_oembed_html', 10, 4); | |
| function my_embed_oembed_html($html, $url, $attr, $post_ID) { | |
| $iframe = str_replace('<iframe', '<iframe class="embed-responsive-item"', $html); | |
| $newHtml = '<div class="embed-responsive embed-responsive-16by9">%s</iframe></div>'; | |
| $html = sprintf($newHtml, $iframe); | |
| return $html; |
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 | |
| // API access key from Google API's Console | |
| define('API_ACCESS_KEY', 'your-key'); | |
| function pushMessage($title, $body, $sound = true) | |
| { | |
| $msg = array ( | |
| 'body' => substr($body,0,40), // limit body | |
| 'title' => $title, | |
| 'click_action' => 'FCM_PLUGIN_ACTIVITY', |
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
| var gulp = require('gulp'); | |
| var shell = require('gulp-shell'); | |
| var prompt = require('gulp-prompt'); | |
| var init = { | |
| ssh: { | |
| user: "", | |
| host: "", | |
| port: "22", | |
| path: "" |