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
<p class="results"></p> | |
<ol> | |
<li> | |
<p>Name: Alabama</p> | |
<p>Capital Name: Montgomery</p> | |
<p>Capital Latitude: 32.361538</p> | |
<p>Capital Longitude: -86.279118</p> | |
</li> | |
<li> | |
<p>Name: Alaska</p> |
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 | |
if (!function_exists('get_translated_media_or_original')) { | |
function get_translated_media_or_original($media_file_id) { | |
global $wpdb; | |
// check language of media file | |
$custom_query = "SELECT * FROM ".$wpdb->postmeta." WHERE meta_key='wpml_media_lang' AND post_id=".$wpdb->escape($media_file_id); | |
$meta = $wpdb->get_results( $custom_query ); | |
$media_file_language = $meta[0]->meta_value; | |
// if language of media file equals current language, return that id | |
if($media_file_language == ICL_LANGUAGE_CODE) { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<title>Auto play html audio in iOS WeChat InAppBrowser the right way</title> | |
</head> | |
<body> | |
<h1>在 iOS 微信浏览器中自动播放 HTML5 audio(音乐) 的正确方式</h1> | |
<p>核心原理: 在微信的JS-API 中 play 一下 audio 即可达到自动播放的目的(应该是微信自己做了处理)</p> |
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
module.exports = function (grunt) { | |
// show elapsed time at the end | |
require('time-grunt')(grunt); | |
// load all grunt tasks | |
require('load-grunt-tasks')(grunt); | |
//MODIFIED: add require for connect-modewrite | |
var modRewrite = require('connect-modrewrite'); | |
grunt.initConfig({ |