Пример #1
0
<?php

get_header();
the_post();
$versions = jq_mobile_api_versions();
$latestVersion = jq_mobile_api_version_latest();
$thisVersion = jq_mobile_api_version_current();
$rootUrl = $thisVersion === $latestVersion ? '' : "/{$thisVersion}";
?>

<div class="content-right twelve columns">
	<div id="content">
		<h1 class="entry-title">jQuery Mobile <?php 
echo $thisVersion;
?>
 API Documentation</h1>
		<hr>

		<?php 
if (!$rootUrl) {
    ?>

		<p>jQuery Mobile is the easiest way to build sites and apps that are accessible on all
			popular smartphone, tablet and desktop devices.</p>

		<p>If you are new to jQuery Mobile, the introduction to the framework in the 
			<a href="http://demos.jquerymobile.com/">Demos</a>
			would be a good place to start.</p>

		<p>This site provides API documentation for jQuery Mobile <?php 
    echo $thisVersion;
Пример #2
0
function jq_mobile_api_version_current()
{
    $thisVersion = explode("/", JQUERY_LIVE_SITE);
    return count($thisVersion) === 2 ? $thisVersion[1] : jq_mobile_api_version_latest();
}