Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sites.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function jquery_sites() {
'body_class' => 'jquery',
'options' => array(
'blogname' => 'jQuery',
'description' => 'jQuery: The Write Less, Do More, JavaScript Library',
'stylesheet' => 'jquery.com',
'active_plugins' => array(
'jquery-static-index.php',
Expand Down Expand Up @@ -66,6 +67,7 @@ function jquery_sites() {
'body_class' => 'jquery-ui',
'options' => array(
'blogname' => 'jQuery UI',
'description' => 'jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you\'re building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.',
'stylesheet' => 'jqueryui.com',
'active_plugins' => array(
'jquery-static-index.php',
Expand Down Expand Up @@ -133,6 +135,7 @@ function jquery_sites() {
'body_class' => 'qunitjs',
'options' => array(
'blogname' => 'QUnit',
'description' => 'QUnit: A JavaScript Unit Testing framework.',
'stylesheet' => 'qunitjs.com',
'active_plugins' => array(
'jquery-static-index.php',
Expand Down
16 changes: 16 additions & 0 deletions themes/jquery/functions.jquery.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,19 @@ function jq_logo_link() {
return empty( $sites[ JQUERY_LIVE_SITE ][ 'logo_link' ] ) ? '/' :
$sites[ JQUERY_LIVE_SITE ][ 'logo_link' ];
}

/**
* Meta description about current site
* Setup descriptions in 'sites.php'
*
* @return [String] description
*/
function jq_meta_description() {
if ( !function_exists( 'jquery_sites' ) ) {
return '';
}

$sites = jquery_sites();
return empty( $sites[ JQUERY_LIVE_SITE ][ 'options' ][ 'description' ] ) ? '' :
$sites[ JQUERY_LIVE_SITE ][ 'options' ][ 'description' ];
}
2 changes: 1 addition & 1 deletion themes/jquery/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
?></title>

<meta name="author" content="jQuery Foundation - jquery.org">
<meta name="description" content="jQuery: The Write Less, Do More, JavaScript Library">
<meta name="description" content="<?php echo jq_meta_description(); ?>">

<meta name="viewport" content="width=device-width">

Expand Down