Ajout et tests des modules Wordpress et Prestashop via un git clone

et un git checkout -b actual dev origin:last-version

Installation finalisée pour wordpress (avec des erreurs propre à wordpress)
Installation de la base de données en erreur pour Prestashop
This commit is contained in:
Emmanuel ROY 2019-12-06 17:47:44 +01:00
parent 21ec903fa9
commit 4e5dbc1e17
407 changed files with 225525 additions and 3 deletions

14
.gitignore vendored
View file

@ -1,3 +1,11 @@
vendor
_relicats
/composer.lock
/composer.lock
/vendor/*
/_relicats
/public/prestashop/install-dev/theme/*
/public/prestashop/js/*
/public/prestashop/themes/*
/public/wordpress/wp-admin/css/*
/public/wordpress/wp-admin/js/*
/public/wordpress/wp-content/themes/*
/public/wordpress/wp-includes/css/*
/public/wordpress/wp-includes/js/*

2
.idea/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
# Default ignored files
/workspace.xml

42
.idea/SAND-framework.iml Normal file
View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/../SAND-frameworkapplication/class" isTestSource="false" packagePrefix="MVC\Classe\" />
<sourceFolder url="file://$MODULE_DIR$/../SAND-frameworkapplication/objets" isTestSource="false" packagePrefix="MVC\Objets\" />
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/hybridauth/hybridauth" />
<excludeFolder url="file://$MODULE_DIR$/vendor/illuminate/container" />
<excludeFolder url="file://$MODULE_DIR$/vendor/illuminate/events" />
<excludeFolder url="file://$MODULE_DIR$/vendor/illuminate/filesystem" />
<excludeFolder url="file://$MODULE_DIR$/vendor/illuminate/support" />
<excludeFolder url="file://$MODULE_DIR$/vendor/illuminate/view" />
<excludeFolder url="file://$MODULE_DIR$/vendor/ircmaxell/password-compat" />
<excludeFolder url="file://$MODULE_DIR$/vendor/johnpbloch/wordpress" />
<excludeFolder url="file://$MODULE_DIR$/vendor/johnpbloch/wordpress-core-installer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/neitanod/forceutf8" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/cache" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/container" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/cache" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/cache-contracts" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/config" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/expression-language" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/filesystem" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/finder" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-foundation" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-ctype" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php54" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php55" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/routing" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/service-contracts" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/var-exporter" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/yaml" />
<excludeFolder url="file://$MODULE_DIR$/vendor/windwalker/renderer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/windwalker/structure" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

15
.idea/deployment.xml Normal file
View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" autoUpload="On explicit save action" serverName="SAND-Framework" exclude=".svn;.cvs;.idea;.DS_Store;.hg;*.hprof;*.pyc" autoUploadExternalChanges="true">
<serverData>
<paths name="SAND-Framework">
<serverdata>
<mappings>
<mapping deploy="/" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
<option name="myAutoUpload" value="ON_EXPLICIT_SAVE" />
</component>
</project>

6
.idea/misc.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>

8
.idea/modules.xml Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/SAND-framework.iml" filepath="$PROJECT_DIR$/.idea/SAND-framework.iml" />
</modules>
</component>
</project>

39
.idea/php.xml Normal file
View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/vendor/symfony/var-exporter" />
<path value="$PROJECT_DIR$/vendor/symfony/routing" />
<path value="$PROJECT_DIR$/vendor/symfony/service-contracts" />
<path value="$PROJECT_DIR$/vendor/symfony/http-foundation" />
<path value="$PROJECT_DIR$/vendor/symfony/finder" />
<path value="$PROJECT_DIR$/vendor/symfony/config" />
<path value="$PROJECT_DIR$/vendor/symfony/expression-language" />
<path value="$PROJECT_DIR$/vendor/symfony/cache-contracts" />
<path value="$PROJECT_DIR$/vendor/symfony/yaml" />
<path value="$PROJECT_DIR$/vendor/ircmaxell/password-compat" />
<path value="$PROJECT_DIR$/vendor/windwalker/structure" />
<path value="$PROJECT_DIR$/vendor/windwalker/renderer" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php55" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php54" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
<path value="$PROJECT_DIR$/vendor/symfony/filesystem" />
<path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/hybridauth/hybridauth" />
<path value="$PROJECT_DIR$/vendor/psr/log" />
<path value="$PROJECT_DIR$/vendor/psr/container" />
<path value="$PROJECT_DIR$/vendor/psr/cache" />
<path value="$PROJECT_DIR$/vendor/illuminate/container" />
<path value="$PROJECT_DIR$/vendor/illuminate/events" />
<path value="$PROJECT_DIR$/vendor/illuminate/support" />
<path value="$PROJECT_DIR$/vendor/illuminate/view" />
<path value="$PROJECT_DIR$/vendor/illuminate/filesystem" />
<path value="$PROJECT_DIR$/vendor/neitanod/forceutf8" />
<path value="$PROJECT_DIR$/vendor/symfony/cache" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
<path value="$PROJECT_DIR$/vendor/johnpbloch/wordpress-core-installer" />
<path value="$PROJECT_DIR$/vendor/johnpbloch/wordpress" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" />
</project>

7
.idea/vcs.xml Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/application/modules/prestashop" vcs="Git" />
</component>
</project>

View file

@ -0,0 +1,145 @@
192.168.1.254 - - [05/Dec/2019:15:29:46 +0100] "GET / HTTP/1.1" 200 1643 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:29:46 +0100] "GET /favicon.ico HTTP/1.1" 200 1450 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:29:56 +0100] "GET /foo HTTP/1.1" 500 836 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:30:04 +0100] "GET /acceuil HTTP/1.1" 500 836 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:30:13 +0100] "GET / HTTP/1.1" 200 1644 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:31:12 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 500 836 "-" "-"
192.168.1.254 - - [05/Dec/2019:15:31:12 +0100] "GET / HTTP/1.1" 200 1856 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:32:32 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 500 836 "-" "-"
192.168.1.254 - - [05/Dec/2019:15:32:32 +0100] "GET / HTTP/1.1" 200 551 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:37:18 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 500 836 "-" "-"
192.168.1.254 - - [05/Dec/2019:15:37:18 +0100] "GET / HTTP/1.1" 200 551 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:37:22 +0100] "GET /foo HTTP/1.1" 500 836 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:37:30 +0100] "GET /foo/15 HTTP/1.1" 500 836 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:41:12 +0100] "GET /foo/15 HTTP/1.1" 500 836 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:41:14 +0100] "GET /foo HTTP/1.1" 500 836 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:41:20 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 500 836 "-" "-"
192.168.1.254 - - [05/Dec/2019:15:41:20 +0100] "GET / HTTP/1.1" 200 551 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:44:57 +0100] "GET /foo HTTP/1.1" 200 207 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:54:18 +0100] "GET /foo HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:54:18 +0100] "GET /acceuil HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:15:54:28 +0100] "GET /foo HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 1450 "-" "-"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 1450 "-" "-"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 1450 "-" "-"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 1450 "-" "-"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 1450 "-" "-"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 1450 "-" "-"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 1450 "-" "-"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 1450 "-" "-"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 1450 "-" "-"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "GET /foo HTTP/1.1" 200 1126 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "GET /index.fphp HTTP/1.1" 200 1105 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "GET / HTTP/1.1" 200 1080 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:00:56 +0100] "GET /index.php HTTP/1.1" 200 1082 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:01:25 +0100] "GET /index.php HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:05:28 +0100] "GET /index.php HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:05:29 +0100] "GET /index.php HTTP/1.1" 200 360 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:05:30 +0100] "GET /index.php HTTP/1.1" 200 360 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:05:39 +0100] "GET /foo HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:07:19 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 1430 "-" "-"
192.168.1.254 - - [05/Dec/2019:16:07:19 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 1429 "-" "-"
192.168.1.254 - - [05/Dec/2019:16:07:19 +0100] "GET /foo HTTP/1.1" 200 1117 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:07:19 +0100] "GET /compte HTTP/1.1" 200 1098 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:07:19 +0100] "GET /foo HTTP/1.1" 200 1115 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:07:19 +0100] "GET /index.php HTTP/1.1" 200 1074 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:07:25 +0100] "GET /foo HTTP/1.1" 200 1116 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:08:42 +0100] "GET /foo HTTP/1.1" 200 1187 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:09:18 +0100] "GET /foo HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:09:33 +0100] "GET /foo HTTP/1.1" 200 1196 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:10:02 +0100] "GET /foo HTTP/1.1" 200 436 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:10:13 +0100] "GET /foo HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:12:43 +0100] "GET /css/ HTTP/1.1" 200 720 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:12:43 +0100] "GET /index.php HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:12:43 +0100] "GET /icons/blank.gif HTTP/1.1" 200 431 "http://www.sand-framework.infoartsmedia.org/css/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:12:45 +0100] "GET /icons/text.gif HTTP/1.1" 200 513 "http://www.sand-framework.infoartsmedia.org/css/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:12:45 +0100] "GET /icons/back.gif HTTP/1.1" 200 500 "http://www.sand-framework.infoartsmedia.org/css/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:13:32 +0100] "GET /css/ HTTP/1.1" 200 720 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:13:32 +0100] "GET /icons/blank.gif HTTP/1.1" 304 179 "http://www.sand-framework.infoartsmedia.org/css/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:13:32 +0100] "GET /icons/text.gif HTTP/1.1" 304 179 "http://www.sand-framework.infoartsmedia.org/css/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:16:13:34 +0100] "GET /icons/back.gif HTTP/1.1" 304 180 "http://www.sand-framework.infoartsmedia.org/css/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:17:46:25 +0100] "GET /robots.txt HTTP/1.1" 200 433 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:51:41 +0100] "GET /robots.txt HTTP/1.1" 200 433 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:51:41 +0100] "GET / HTTP/1.1" 200 551 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:51:41 +0100] "GET /index.php HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:51:43 +0100] "GET /index.php HTTP/1.1" 200 360 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:51:43 +0100] "GET /favicon.ico HTTP/1.1" 200 1450 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:51:47 +0100] "GET / HTTP/1.1" 200 550 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:52:28 +0100] "GET /foo HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:52:28 +0100] "GET /css HTTP/1.1" 301 592 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:52:28 +0100] "GET /acceuil HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:52:30 +0100] "GET / HTTP/1.1" 200 551 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:52:35 +0100] "GET /css HTTP/1.1" 301 591 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:52:35 +0100] "GET /css/ HTTP/1.1" 200 707 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:52:35 +0100] "GET /icons/blank.gif HTTP/1.1" 200 431 "http://local.sandframework/css/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:57:41 +0100] "GET /icons/back.gif HTTP/1.1" 200 500 "http://local.sandframework/css/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:57:41 +0100] "GET /icons/text.gif HTTP/1.1" 200 513 "http://local.sandframework/css/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:57:41 +0100] "GET /js/ HTTP/1.1" 200 707 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:57:41 +0100] "GET / HTTP/1.1" 200 1528 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:57:41 +0100] "GET /authentification HTTP/1.1" 200 937 "http://local.sandframework/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:17:59:44 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 4817 "-" "-"
192.168.1.254 - - [05/Dec/2019:17:59:44 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 4817 "-" "-"
192.168.1.254 - - [05/Dec/2019:17:59:44 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 5322 "-" "-"
192.168.1.254 - - [05/Dec/2019:17:59:44 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 5322 "-" "-"
192.168.1.254 - - [05/Dec/2019:17:59:44 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 5322 "-" "-"
192.168.1.254 - - [05/Dec/2019:17:59:44 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 5322 "-" "-"
192.168.1.254 - - [05/Dec/2019:17:59:44 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 5322 "-" "-"
192.168.1.254 - - [05/Dec/2019:17:59:44 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 5322 "-" "-"
192.168.1.156 - - [05/Dec/2019:17:59:44 +0100] "GET / HTTP/1.1" 200 551 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:17:59:44 +0100] "PUT /accueil/var10/val10 HTTP/1.1" 200 5322 "-" "-"
192.168.1.156 - - [05/Dec/2019:17:59:46 +0100] "GET / HTTP/1.1" 200 550 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:59:47 +0100] "GET / HTTP/1.1" 200 550 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:59:47 +0100] "GET / HTTP/1.1" 200 550 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:59:48 +0100] "GET / HTTP/1.1" 200 550 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:59:52 +0100] "GET /authentification HTTP/1.1" 200 936 "http://local.sandframework/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:17:59:57 +0100] "GET /authentification HTTP/1.1" 200 879 "http://local.sandframework/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:00:00 +0100] "GET /authentification HTTP/1.1" 200 878 "http://local.sandframework/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:00:01 +0100] "GET /control/authentification-callback-example/provider/GitHub HTTP/1.1" 302 537 "http://local.sandframework/authentification" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:00:09 +0100] "GET /foo HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:00:41 +0100] "GET /foo HTTP/1.1" 200 203 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:01:29 +0100] "GET /foo HTTP/1.1" 200 203 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:02:13 +0100] "GET /foo HTTP/1.1" 200 215 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:02:32 +0100] "GET /foo HTTP/1.1" 200 215 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:04:32 +0100] "GET /foo HTTP/1.1" 200 231 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:05:02 +0100] "GET /foo HTTP/1.1" 200 215 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:05:47 +0100] "GET /foo HTTP/1.1" 200 215 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:05:47 +0100] "GET /foo HTTP/1.1" 200 214 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:05:48 +0100] "GET /foo HTTP/1.1" 200 214 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:05:48 +0100] "GET /foo HTTP/1.1" 200 214 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:05:52 +0100] "GET /foo/15 HTTP/1.1" 200 202 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:06:45 +0100] "GET /foo HTTP/1.1" 200 215 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:07:14 +0100] "GET /foo HTTP/1.1" 200 331 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:09:13 +0100] "GET /foo HTTP/1.1" 200 253 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:09:42 +0100] "GET /foo HTTP/1.1" 200 248 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:10:17 +0100] "GET /foo HTTP/1.1" 200 258 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:10:49 +0100] "GET /foo HTTP/1.1" 200 441 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:10:59 +0100] "GET /foo HTTP/1.1" 200 270 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:11:53 +0100] "GET /foo HTTP/1.1" 200 248 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:12:13 +0100] "GET /foo HTTP/1.1" 200 231 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:14:56 +0100] "GET /foo HTTP/1.1" 200 215 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:16:30 +0100] "GET /foo/15 HTTP/1.1" 200 203 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:16:37 +0100] "GET /foo HTTP/1.1" 200 215 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:17:29 +0100] "GET /foo/15 HTTP/1.1" 200 215 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:17:48 +0100] "GET /foo/15 HTTP/1.1" 200 381 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:18:27 +0100] "GET /foo/15 HTTP/1.1" 200 381 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:18:30 +0100] "GET /foo/ HTTP/1.1" 200 360 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:18:32 +0100] "GET /foo HTTP/1.1" 200 1279 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:22:26 +0100] "GET /foo HTTP/1.1" 200 389 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:22:31 +0100] "GET /foo/15 HTTP/1.1" 200 385 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:18:22:52 +0100] "GET / HTTP/1.1" 200 551 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:18:22:52 +0100] "GET /favicon.ico HTTP/1.1" 200 1450 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:18:22:56 +0100] "GET /foo HTTP/1.1" 200 389 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:18:22:59 +0100] "GET / HTTP/1.1" 200 550 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:18:23:01 +0100] "GET /authentification HTTP/1.1" 200 936 "http://www.sand-framework.infoartsmedia.org/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:18:23:05 +0100] "GET /control/authentification-callback-example/provider/GitHub HTTP/1.1" 302 537 "http://www.sand-framework.infoartsmedia.org/authentification" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:18:23:11 +0100] "GET /control/authentification-callback-example/provider/Google HTTP/1.1" 302 714 "http://www.sand-framework.infoartsmedia.org/authentification" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:18:23:14 +0100] "GET /control/authentification-callback-example/provider/Facebook HTTP/1.1" 302 540 "http://www.sand-framework.infoartsmedia.org/authentification" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [05/Dec/2019:18:23:20 +0100] "GET /control/authentification-callback-example/provider/Twitter HTTP/1.1" 200 506 "http://www.sand-framework.infoartsmedia.org/authentification" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:33:21 +0100] "GET / HTTP/1.1" 200 552 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:33:26 +0100] "GET /foo/ HTTP/1.1" 200 361 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:33:29 +0100] "GET /foo HTTP/1.1" 200 470 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.156 - - [05/Dec/2019:18:33:35 +0100] "GET /foo/15 HTTP/1.1" 200 468 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
192.168.1.254 - - [06/Dec/2019:13:33:27 +0100] "GET / HTTP/1.1" 200 552 "-" "PhpStorm/192.6262.66"
192.168.1.156 - - [06/Dec/2019:13:42:33 +0100] "GET / HTTP/1.1" 200 552 "-" "PhpStorm/192.6262.66"
192.168.1.156 - - [06/Dec/2019:13:53:25 +0100] "GET / HTTP/1.1" 200 552 "-" "PhpStorm/192.6262.66"
192.168.1.254 - - [06/Dec/2019:13:53:45 +0100] "GET / HTTP/1.1" 200 552 "-" "PhpStorm/192.6262.66"

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

9060
application/logs/app.ok.log Normal file

File diff suppressed because it is too large Load diff

@ -0,0 +1 @@
Subproject commit d3bbb96d8f9dd507c7b9bd309c04cf451ba39476

View file

@ -0,0 +1,24 @@
{
"name": "johnpbloch/wordpress-core",
"description": "WordPress is web software you can use to create a beautiful website or blog.",
"keywords": ["wordpress", "blog", "cms"],
"type": "wordpress-core",
"homepage": "http://wordpress.org/",
"license": "GPL-2.0+",
"authors": [
{
"name": "WordPress Community",
"homepage": "http://wordpress.org/about/"
}
],
"support": {
"issues": "http://core.trac.wordpress.org/",
"forum": "http://wordpress.org/support/",
"wiki": "http://codex.wordpress.org/",
"irc": "irc://irc.freenode.net/wordpress",
"source": "http://core.trac.wordpress.org/browser"
},
"require": {
"php": ">=5.3.2"
}
}

View file

@ -0,0 +1,123 @@
/*
Press This TinyMCE editor styles :)
*/
/**
* Links
*/
@import url("//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,600,700");
a {
color: #0073aa;
}
a:visited {
color: #0073aa;
}
a:hover,
a:focus,
a:active {
color: #00a0d2;
}
/**
* Lists
*/
ul,
ol {
margin: 0 3em 1.5em 0;
}
ul {
list-style: disc;
}
ol {
list-style: decimal;
}
li > ul,
li > ol {
margin-bottom: 0;
margin-right: 1.5em;
}
dt {
font-weight: 700;
}
dd {
margin: 0 1.5em 1.5em;
}
/**
* Media
*
* Basic image and object styles
*/
img {
max-width: 100%;
height: auto;
}
/* Makes sure embeds and iframes fit inside their containers */
embed,
iframe,
object {
max-width: 100%;
}
/**
* TinyMCE styles
*
* Pretty dang good.
*/
body {
color: #404040;
font-family: "Open Sans", Helvetica, Arial, sans-serif;
font-size: 20px;
font-weight: 400;
line-height: 1.6;
}
@media (max-width: 900px) {
body#tinymce {
padding-top: 30px !important;
}
}
@media (max-width: 640px) {
body {
font-size: 16px;
}
}
@media (max-width: 320px) {
body {
margin: 0 15px;
}
}
#tinymce b,
#tinymce strong {
/* overrides TinyMCE's !important. Woohoo. */
font-weight: 700 !important;
}
blockquote {
margin: 1em 1.5em;
color: #9ea7af;
font-size: em(25px);
font-style: italic;
}
@media (max-width: 900px) {
blockquote {
margin: 1.5em 1em;
}
}
ul,
ol {
margin: 0 .75em 1.5em 0;
}

View file

@ -0,0 +1,123 @@
/*
Press This TinyMCE editor styles :)
*/
/**
* Links
*/
@import url("//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,600,700");
a {
color: #0073aa;
}
a:visited {
color: #0073aa;
}
a:hover,
a:focus,
a:active {
color: #00a0d2;
}
/**
* Lists
*/
ul,
ol {
margin: 0 0 1.5em 3em;
}
ul {
list-style: disc;
}
ol {
list-style: decimal;
}
li > ul,
li > ol {
margin-bottom: 0;
margin-left: 1.5em;
}
dt {
font-weight: 700;
}
dd {
margin: 0 1.5em 1.5em;
}
/**
* Media
*
* Basic image and object styles
*/
img {
max-width: 100%;
height: auto;
}
/* Makes sure embeds and iframes fit inside their containers */
embed,
iframe,
object {
max-width: 100%;
}
/**
* TinyMCE styles
*
* Pretty dang good.
*/
body {
color: #404040;
font-family: "Open Sans", Helvetica, Arial, sans-serif;
font-size: 20px;
font-weight: 400;
line-height: 1.6;
}
@media (max-width: 900px) {
body#tinymce {
padding-top: 30px !important;
}
}
@media (max-width: 640px) {
body {
font-size: 16px;
}
}
@media (max-width: 320px) {
body {
margin: 0 15px;
}
}
#tinymce b,
#tinymce strong {
/* overrides TinyMCE's !important. Woohoo. */
font-weight: 700 !important;
}
blockquote {
margin: 1em 1.5em;
color: #9ea7af;
font-size: em(25px);
font-style: italic;
}
@media (max-width: 900px) {
blockquote {
margin: 1.5em 1em;
}
}
ul,
ol {
margin: 0 0 1.5em .75em;
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,166 @@
( function( window, document, href, pt_url ) {
var encURI = window.encodeURIComponent,
form = document.createElement( 'form' ),
head = document.getElementsByTagName( 'head' )[0],
target = '_press_this_app',
canPost = true,
windowWidth, windowHeight, selection,
metas, links, content, images, iframes, img;
if ( ! pt_url ) {
return;
}
if ( href.match( /^https?:/ ) ) {
pt_url += '&u=' + encURI( href );
if ( href.match( /^https:/ ) && pt_url.match( /^http:/ ) ) {
canPost = false;
}
} else {
top.location.href = pt_url;
return;
}
if ( window.getSelection ) {
selection = window.getSelection() + '';
} else if ( document.getSelection ) {
selection = document.getSelection() + '';
} else if ( document.selection ) {
selection = document.selection.createRange().text || '';
}
pt_url += '&buster=' + ( new Date().getTime() );
if ( ! canPost ) {
if ( document.title ) {
pt_url += '&t=' + encURI( document.title.substr( 0, 256 ) );
}
if ( selection ) {
pt_url += '&s=' + encURI( selection.substr( 0, 512 ) );
}
}
windowWidth = window.outerWidth || document.documentElement.clientWidth || 600;
windowHeight = window.outerHeight || document.documentElement.clientHeight || 700;
windowWidth = ( windowWidth < 800 || windowWidth > 5000 ) ? 600 : ( windowWidth * 0.7 );
windowHeight = ( windowHeight < 800 || windowHeight > 3000 ) ? 700 : ( windowHeight * 0.9 );
if ( ! canPost ) {
window.open( pt_url, target, 'location,resizable,scrollbars,width=' + windowWidth + ',height=' + windowHeight );
return;
}
function add( name, value ) {
if ( typeof value === 'undefined' ) {
return;
}
var input = document.createElement( 'input' );
input.name = name;
input.value = value;
input.type = 'hidden';
form.appendChild( input );
}
if ( href.match( /\/\/(www|m)\.youtube\.com\/watch/ ) ||
href.match( /\/\/vimeo\.com\/(.+\/)?([\d]+)$/ ) ||
href.match( /\/\/(www\.)?dailymotion\.com\/video\/.+$/ ) ||
href.match( /\/\/soundcloud\.com\/.+$/ ) ||
href.match( /\/\/twitter\.com\/[^\/]+\/status\/[\d]+$/ ) ||
href.match( /\/\/vine\.co\/v\/[^\/]+/ ) ) {
add( '_embeds[]', href );
}
metas = head.getElementsByTagName( 'meta' ) || [];
for ( var m = 0; m < metas.length; m++ ) {
if ( m > 200 ) {
break;
}
var q = metas[ m ],
q_name = q.getAttribute( 'name' ),
q_prop = q.getAttribute( 'property' ),
q_cont = q.getAttribute( 'content' );
if ( q_cont ) {
if ( q_name ) {
add( '_meta[' + q_name + ']', q_cont );
} else if ( q_prop ) {
add( '_meta[' + q_prop + ']', q_cont );
}
}
}
links = head.getElementsByTagName( 'link' ) || [];
for ( var y = 0; y < links.length; y++ ) {
if ( y >= 50 ) {
break;
}
var g = links[ y ],
g_rel = g.getAttribute( 'rel' );
if ( g_rel === 'canonical' || g_rel === 'icon' || g_rel === 'shortlink' ) {
add( '_links[' + g_rel + ']', g.getAttribute( 'href' ) );
}
}
if ( document.body.getElementsByClassName ) {
content = document.body.getElementsByClassName( 'hfeed' )[0];
}
content = document.getElementById( 'content' ) || content || document.body;
images = content.getElementsByTagName( 'img' ) || [];
for ( var n = 0; n < images.length; n++ ) {
if ( n >= 100 ) {
break;
}
img = images[ n ];
// If we know the image width and/or height, check them now and drop the "uninteresting" images.
if ( img.src.indexOf( 'avatar' ) > -1 || img.className.indexOf( 'avatar' ) > -1 ||
( img.width && img.width < 256 ) || ( img.height && img.height < 128 ) ) {
continue;
}
add( '_images[]', img.src );
}
iframes = document.body.getElementsByTagName( 'iframe' ) || [];
for ( var p = 0; p < iframes.length; p++ ) {
if ( p >= 50 ) {
break;
}
add( '_embeds[]', iframes[ p ].src );
}
if ( document.title ) {
add( 't', document.title );
}
if ( selection ) {
add( 's', selection );
}
form.setAttribute( 'method', 'POST' );
form.setAttribute( 'action', pt_url );
form.setAttribute( 'target', target );
form.setAttribute( 'style', 'display: none;' );
window.open( 'about:blank', target, 'location,resizable,scrollbars,width=' + windowWidth + ',height=' + windowHeight );
document.body.appendChild( form );
form.submit();
} )( window, document, top.location.href, window.pt_url );

View file

@ -0,0 +1 @@
(function(a,b,c,d){function e(a,c){if("undefined"!=typeof c){var d=b.createElement("input");d.name=a,d.value=c,d.type="hidden",p.appendChild(d)}}var f,g,h,i,j,k,l,m,n,o=a.encodeURIComponent,p=b.createElement("form"),q=b.getElementsByTagName("head")[0],r="_press_this_app",s=!0;if(d){if(!c.match(/^https?:/))return void(top.location.href=d);if(d+="&u="+o(c),c.match(/^https:/)&&d.match(/^http:/)&&(s=!1),a.getSelection?h=a.getSelection()+"":b.getSelection?h=b.getSelection()+"":b.selection&&(h=b.selection.createRange().text||""),d+="&buster="+(new Date).getTime(),s||(b.title&&(d+="&t="+o(b.title.substr(0,256))),h&&(d+="&s="+o(h.substr(0,512)))),f=a.outerWidth||b.documentElement.clientWidth||600,g=a.outerHeight||b.documentElement.clientHeight||700,f=800>f||f>5e3?600:.7*f,g=800>g||g>3e3?700:.9*g,!s)return void a.open(d,r,"location,resizable,scrollbars,width="+f+",height="+g);(c.match(/\/\/(www|m)\.youtube\.com\/watch/)||c.match(/\/\/vimeo\.com\/(.+\/)?([\d]+)$/)||c.match(/\/\/(www\.)?dailymotion\.com\/video\/.+$/)||c.match(/\/\/soundcloud\.com\/.+$/)||c.match(/\/\/twitter\.com\/[^\/]+\/status\/[\d]+$/)||c.match(/\/\/vine\.co\/v\/[^\/]+/))&&e("_embeds[]",c),i=q.getElementsByTagName("meta")||[];for(var t=0;t<i.length&&!(t>200);t++){var u=i[t],v=u.getAttribute("name"),w=u.getAttribute("property"),x=u.getAttribute("content");x&&(v?e("_meta["+v+"]",x):w&&e("_meta["+w+"]",x))}j=q.getElementsByTagName("link")||[];for(var y=0;y<j.length&&!(y>=50);y++){var z=j[y],A=z.getAttribute("rel");("canonical"===A||"icon"===A||"shortlink"===A)&&e("_links["+A+"]",z.getAttribute("href"))}b.body.getElementsByClassName&&(k=b.body.getElementsByClassName("hfeed")[0]),k=b.getElementById("content")||k||b.body,l=k.getElementsByTagName("img")||[];for(var B=0;B<l.length&&!(B>=100);B++)n=l[B],n.src.indexOf("avatar")>-1||n.className.indexOf("avatar")>-1||n.width&&n.width<256||n.height&&n.height<128||e("_images[]",n.src);m=b.body.getElementsByTagName("iframe")||[];for(var C=0;C<m.length&&!(C>=50);C++)e("_embeds[]",m[C].src);b.title&&e("t",b.title),h&&e("s",h),p.setAttribute("method","POST"),p.setAttribute("action",d),p.setAttribute("target",r),p.setAttribute("style","display: none;"),a.open("about:blank",r,"location,resizable,scrollbars,width="+f+",height="+g),b.body.appendChild(p),p.submit()}})(window,document,top.location.href,window.pt_url);

View file

@ -0,0 +1,796 @@
/**
* PressThis App
*
*/
( function( $, window ) {
var PressThis = function() {
var editor, $mediaList, $mediaThumbWrap,
saveAlert = false,
editLinkVisible = false,
textarea = document.createElement( 'textarea' ),
sidebarIsOpen = false,
settings = window.wpPressThisConfig || {},
data = window.wpPressThisData || {},
smallestWidth = 128,
hasSetFocus = false,
catsCache = [],
isOffScreen = 'is-off-screen',
isHidden = 'is-hidden',
offscreenHidden = isOffScreen + ' ' + isHidden,
transitionEndEvent = ( function() {
var style = document.documentElement.style;
if ( typeof style.transition !== 'undefined' ) {
return 'transitionend';
}
if ( typeof style.WebkitTransition !== 'undefined' ) {
return 'webkitTransitionEnd';
}
return false;
}() );
/* ***************************************************************
* HELPER FUNCTIONS
*************************************************************** */
/**
* Emulates our PHP __() gettext function, powered by the strings exported in pressThisL10n.
*
* @param key string Key of the string to be translated, as found in pressThisL10n.
* @returns string Original or translated string, or empty string if no key.
*/
function __( key ) {
if ( key && window.pressThisL10n ) {
return window.pressThisL10n[key] || key;
}
return key || '';
}
/**
* Strips HTML tags
*
* @param string string Text to have the HTML tags striped out of.
* @returns string Stripped text.
*/
function stripTags( string ) {
string = string || '';
return string
.replace( /<!--[\s\S]*?(-->|$)/g, '' )
.replace( /<(script|style)[^>]*>[\s\S]*?(<\/\1>|$)/ig, '' )
.replace( /<\/?[a-z][\s\S]*?(>|$)/ig, '' );
}
/**
* Strip HTML tags and convert HTML entities.
*
* @param text string Text.
* @returns string Sanitized text.
*/
function sanitizeText( text ) {
var _text = stripTags( text );
try {
textarea.innerHTML = _text;
_text = stripTags( textarea.value );
} catch ( er ) {}
return _text;
}
/**
* Allow only HTTP or protocol relative URLs.
*
* @param url string The URL.
* @returns string Processed URL.
*/
function checkUrl( url ) {
url = $.trim( url || '' );
if ( /^(?:https?:)?\/\//.test( url ) ) {
url = stripTags( url );
return url.replace( /["\\]+/g, '' );
}
return '';
}
/**
* Show UX spinner
*/
function showSpinner() {
$( '.spinner' ).addClass( 'is-active' );
$( '.post-actions button' ).attr( 'disabled', 'disabled' );
}
/**
* Hide UX spinner
*/
function hideSpinner() {
$( '.spinner' ).removeClass( 'is-active' );
$( '.post-actions button' ).removeAttr( 'disabled' );
}
/**
* Replace emoji images with chars and sanitize the text content.
*/
function getTitleText() {
var $element = $( '#title-container' );
$element.find( 'img.emoji' ).each( function() {
var $image = $( this );
$image.replaceWith( $( '<span>' ).text( $image.attr( 'alt' ) ) );
});
return sanitizeText( $element.text() );
}
/**
* Prepare the form data for saving.
*/
function prepareFormData() {
var $form = $( '#pressthis-form' ),
$input = $( '<input type="hidden" name="post_category[]" value="">' );
editor && editor.save();
$( '#post_title' ).val( getTitleText() );
// Make sure to flush out the tags with tagBox before saving
if ( window.tagBox ) {
$( 'div.tagsdiv' ).each( function() {
window.tagBox.flushTags( this, false, 1 );
} );
}
// Get selected categories
$( '.categories-select .category' ).each( function( i, element ) {
var $cat = $( element );
if ( $cat.hasClass( 'selected' ) ) {
// Have to append a node as we submit the actual form on preview
$form.append( $input.clone().val( $cat.attr( 'data-term-id' ) || '' ) );
}
});
}
/**
* Submit the post form via AJAX, and redirect to the proper screen if published vs saved as a draft.
*
* @param action string publish|draft
*/
function submitPost( action ) {
var data,
keepFocus = $( document.activeElement ).hasClass( 'draft-button' );
saveAlert = false;
showSpinner();
if ( 'publish' === action ) {
$( '#post_status' ).val( 'publish' );
}
prepareFormData();
data = $( '#pressthis-form' ).serialize();
$.ajax( {
type: 'post',
url: window.ajaxurl,
data: data
}).always( function() {
hideSpinner();
clearNotices();
}).done( function( response ) {
var $link, $button;
if ( ! response.success ) {
renderError( response.data.errorMessage );
} else if ( response.data.redirect ) {
if ( window.opener && settings.redirInParent ) {
try {
window.opener.location.href = response.data.redirect;
} catch( er ) {}
window.self.close();
} else {
window.location.href = response.data.redirect;
}
} else if ( response.data.postSaved ) {
$link = $( '.edit-post-link' );
$button = $( '.draft-button' );
editLinkVisible = true;
$button.fadeOut( 200, function() {
$button.removeClass( 'is-saving' );
$link.fadeIn( 200, function() {
var active = document.activeElement;
// Different browsers move the focus to different places when the button is disabled.
if ( keepFocus && ( active === $button[0] || $( active ).hasClass( 'post-actions' ) || active.nodeName === 'BODY' ) ) {
$link.focus();
}
});
});
}
}).fail( function() {
renderError( __( 'serverError' ) );
});
}
function resetDraftButton() {
if ( editLinkVisible ) {
editLinkVisible = false;
$( '.edit-post-link' ).fadeOut( 200, function() {
$( '.draft-button' ).removeClass( 'is-saving' ).fadeIn( 200 );
});
}
}
/**
* Inserts the media a user has selected from the presented list inside the editor, as an image or embed, based on type
*
* @param type string img|embed
* @param src string Source URL
* @param link string Optional destination link, for images (defaults to src)
*/
function insertSelectedMedia( $element ) {
var src, link, newContent = '';
if ( ! editor ) {
return;
}
src = checkUrl( $element.attr( 'data-wp-src' ) || '' );
link = checkUrl( data.u );
if ( $element.hasClass( 'is-image' ) ) {
if ( ! link ) {
link = src;
}
newContent = '<a href="' + link + '"><img class="alignnone size-full" src="' + src + '" /></a>';
} else {
newContent = '[embed]' + src + '[/embed]';
}
if ( ! hasSetFocus ) {
editor.setContent( '<p>' + newContent + '</p>' + editor.getContent() );
} else {
editor.execCommand( 'mceInsertContent', false, newContent );
}
}
/**
* Save a new user-generated category via AJAX
*/
function saveNewCategory() {
var data,
name = $( '#new-category' ).val();
if ( ! name ) {
return;
}
data = {
action: 'press-this-add-category',
post_id: $( '#post_ID' ).val() || 0,
name: name,
new_cat_nonce: $( '#_ajax_nonce-add-category' ).val() || '',
parent: $( '#new-category-parent' ).val() || 0
};
$.post( window.ajaxurl, data, function( response ) {
if ( ! response.success ) {
renderError( response.data.errorMessage );
} else {
var $parent, $ul,
$wrap = $( 'ul.categories-select' );
$.each( response.data, function( i, newCat ) {
var $node = $( '<li>' ).append( $( '<div class="category selected" tabindex="0" role="checkbox" aria-checked="true">' )
.attr( 'data-term-id', newCat.term_id )
.text( newCat.name ) );
if ( newCat.parent ) {
if ( ! $ul || ! $ul.length ) {
$parent = $wrap.find( 'div[data-term-id="' + newCat.parent + '"]' ).parent();
$ul = $parent.find( 'ul.children:first' );
if ( ! $ul.length ) {
$ul = $( '<ul class="children">' ).appendTo( $parent );
}
}
$ul.prepend( $node );
} else {
$wrap.prepend( $node );
}
$node.focus();
} );
refreshCatsCache();
}
} );
}
/* ***************************************************************
* RENDERING FUNCTIONS
*************************************************************** */
/**
* Hide the form letting users enter a URL to be scanned, if a URL was already passed.
*/
function renderToolsVisibility() {
if ( data.hasData ) {
$( '#scanbar' ).hide();
}
}
/**
* Render error notice
*
* @param msg string Notice/error message
* @param error string error|notice CSS class for display
*/
function renderNotice( msg, error ) {
var $alerts = $( '.editor-wrapper div.alerts' ),
className = error ? 'is-error' : 'is-notice';
$alerts.append( $( '<p class="alert ' + className + '">' ).text( msg ) );
}
/**
* Render error notice
*
* @param msg string Error message
*/
function renderError( msg ) {
renderNotice( msg, true );
}
function clearNotices() {
$( 'div.alerts' ).empty();
}
/**
* Render notices on page load, if any already
*/
function renderStartupNotices() {
// Render errors sent in the data, if any
if ( data.errors ) {
$.each( data.errors, function( i, msg ) {
renderError( msg );
} );
}
}
/**
* Add an image to the list of found images.
*/
function addImg( src, displaySrc, i ) {
var $element = $mediaThumbWrap.clone().addClass( 'is-image' );
$element.attr( 'data-wp-src', src ).css( 'background-image', 'url(' + displaySrc + ')' )
.find( 'span' ).text( __( 'suggestedImgAlt' ).replace( '%d', i + 1 ) );
$mediaList.append( $element );
}
/**
* Render the detected images and embed for selection, if any
*/
function renderDetectedMedia() {
var found = 0;
$mediaList = $( 'ul.media-list' );
$mediaThumbWrap = $( '<li class="suggested-media-thumbnail" tabindex="0"><span class="screen-reader-text"></span></li>' );
if ( data._embeds ) {
$.each( data._embeds, function ( i, src ) {
var displaySrc = '',
cssClass = '',
$element = $mediaThumbWrap.clone().addClass( 'is-embed' );
src = checkUrl( src );
if ( src.indexOf( 'youtube.com/' ) > -1 ) {
displaySrc = 'https://i.ytimg.com/vi/' + src.replace( /.+v=([^&]+).*/, '$1' ) + '/hqdefault.jpg';
cssClass += ' is-video';
} else if ( src.indexOf( 'youtu.be/' ) > -1 ) {
displaySrc = 'https://i.ytimg.com/vi/' + src.replace( /\/([^\/])$/, '$1' ) + '/hqdefault.jpg';
cssClass += ' is-video';
} else if ( src.indexOf( 'dailymotion.com' ) > -1 ) {
displaySrc = src.replace( '/video/', '/thumbnail/video/' );
cssClass += ' is-video';
} else if ( src.indexOf( 'soundcloud.com' ) > -1 ) {
cssClass += ' is-audio';
} else if ( src.indexOf( 'twitter.com' ) > -1 ) {
cssClass += ' is-tweet';
} else {
cssClass += ' is-video';
}
$element.attr( 'data-wp-src', src ).find( 'span' ).text( __( 'suggestedEmbedAlt' ).replace( '%d', i + 1 ) );
if ( displaySrc ) {
$element.css( 'background-image', 'url(' + displaySrc + ')' );
}
$mediaList.append( $element );
found++;
} );
}
if ( data._images ) {
$.each( data._images, function( i, src ) {
var displaySrc, img = new Image();
src = checkUrl( src );
displaySrc = src.replace( /^(http[^\?]+)(\?.*)?$/, '$1' );
if ( src.indexOf( 'files.wordpress.com/' ) > -1 ) {
displaySrc = displaySrc.replace( /\?.*$/, '' ) + '?w=' + smallestWidth;
} else if ( src.indexOf( 'gravatar.com/' ) > -1 ) {
displaySrc = displaySrc.replace( /\?.*$/, '' ) + '?s=' + smallestWidth;
} else {
displaySrc = src;
}
img.onload = function() {
if ( ( img.width && img.width < 256 ) ||
( img.height && img.height < 128 ) ) {
return;
}
addImg( src, displaySrc, i );
};
img.src = src;
found++;
} );
}
if ( found ) {
$( '.media-list-container' ).addClass( 'has-media' );
}
}
/* ***************************************************************
* MONITORING FUNCTIONS
*************************************************************** */
/**
* Interactive navigation behavior for the options modal (post format, tags, categories)
*/
function monitorOptionsModal() {
var $postOptions = $( '.post-options' ),
$postOption = $( '.post-option' ),
$settingModal = $( '.setting-modal' ),
$modalClose = $( '.modal-close' );
$postOption.on( 'click', function() {
var index = $( this ).index(),
$targetSettingModal = $settingModal.eq( index );
$postOptions.addClass( isOffScreen )
.one( transitionEndEvent, function() {
$( this ).addClass( isHidden );
} );
$targetSettingModal.removeClass( offscreenHidden )
.one( transitionEndEvent, function() {
$( this ).find( '.modal-close' ).focus();
} );
} );
$modalClose.on( 'click', function() {
var $targetSettingModal = $( this ).parent(),
index = $targetSettingModal.index();
$postOptions.removeClass( offscreenHidden );
$targetSettingModal.addClass( isOffScreen );
if ( transitionEndEvent ) {
$targetSettingModal.one( transitionEndEvent, function() {
$( this ).addClass( isHidden );
$postOption.eq( index - 1 ).focus();
} );
} else {
setTimeout( function() {
$targetSettingModal.addClass( isHidden );
$postOption.eq( index - 1 ).focus();
}, 350 );
}
} );
}
/**
* Interactive behavior for the sidebar toggle, to show the options modals
*/
function openSidebar() {
sidebarIsOpen = true;
$( '.options' ).removeClass( 'closed' ).addClass( 'open' );
$( '.press-this-actions, #scanbar' ).addClass( isHidden );
$( '.options-panel-back' ).removeClass( isHidden );
$( '.options-panel' ).removeClass( offscreenHidden )
.one( transitionEndEvent, function() {
$( '.post-option:first' ).focus();
} );
}
function closeSidebar() {
sidebarIsOpen = false;
$( '.options' ).removeClass( 'open' ).addClass( 'closed' );
$( '.options-panel-back' ).addClass( isHidden );
$( '.press-this-actions, #scanbar' ).removeClass( isHidden );
$( '.options-panel' ).addClass( isOffScreen )
.one( transitionEndEvent, function() {
$( this ).addClass( isHidden );
// Reset to options list
$( '.post-options' ).removeClass( offscreenHidden );
$( '.setting-modal').addClass( offscreenHidden );
});
}
/**
* Interactive behavior for the post title's field placeholder
*/
function monitorPlaceholder() {
var $titleField = $( '#title-container' ),
$placeholder = $( '.post-title-placeholder' );
$titleField.on( 'focus', function() {
$placeholder.addClass( 'is-hidden' );
resetDraftButton();
}).on( 'blur', function() {
if ( ! $titleField.text() && ! $titleField.html() ) {
$placeholder.removeClass( 'is-hidden' );
}
}).on( 'keyup', function() {
saveAlert = true;
}).on( 'paste', function( event ) {
var text, range,
clipboard = event.originalEvent.clipboardData || window.clipboardData;
if ( clipboard ) {
try{
text = clipboard.getData( 'Text' ) || clipboard.getData( 'text/plain' );
if ( text ) {
text = $.trim( text.replace( /\s+/g, ' ' ) );
if ( window.getSelection ) {
range = window.getSelection().getRangeAt(0);
if ( range ) {
if ( ! range.collapsed ) {
range.deleteContents();
}
range.insertNode( document.createTextNode( text ) );
}
} else if ( document.selection ) {
range = document.selection.createRange();
if ( range ) {
range.text = text;
}
}
}
} catch ( er ) {}
event.preventDefault();
}
saveAlert = true;
setTimeout( function() {
$titleField.text( getTitleText() );
}, 50 );
});
if ( $titleField.text() || $titleField.html() ) {
$placeholder.addClass('is-hidden');
}
}
function toggleCatItem( $element ) {
if ( $element.hasClass( 'selected' ) ) {
$element.removeClass( 'selected' ).attr( 'aria-checked', 'false' );
} else {
$element.addClass( 'selected' ).attr( 'aria-checked', 'true' );
}
}
function monitorCatList() {
$( '.categories-select' ).on( 'click.press-this keydown.press-this', function( event ) {
var $element = $( event.target );
if ( $element.is( 'div.category' ) ) {
if ( event.type === 'keydown' && event.keyCode !== 32 ) {
return;
}
toggleCatItem( $element );
event.preventDefault();
}
});
}
/* ***************************************************************
* PROCESSING FUNCTIONS
*************************************************************** */
/**
* Calls all the rendring related functions to happen on page load
*/
function render(){
// We're on!
renderToolsVisibility();
renderDetectedMedia();
renderStartupNotices();
if ( window.tagBox ) {
window.tagBox.init();
}
}
/**
* Set app events and other state monitoring related code.
*/
function monitor() {
$( document ).on( 'tinymce-editor-init', function( event, ed ) {
editor = ed;
editor.on( 'nodechange', function() {
hasSetFocus = true;
resetDraftButton();
} );
}).on( 'click.press-this keypress.press-this', '.suggested-media-thumbnail', function( event ) {
if ( event.type === 'click' || event.keyCode === 13 ) {
insertSelectedMedia( $( this ) );
}
});
// Publish, Draft and Preview buttons
$( '.post-actions' ).on( 'click.press-this', function( event ) {
var $target = $( event.target ),
$button = $target.closest( 'button' );
if ( $button.length ) {
if ( $button.hasClass( 'draft-button' ) ) {
$button.addClass( 'is-saving' );
submitPost( 'draft' );
} else if ( $button.hasClass( 'publish-button' ) ) {
submitPost( 'publish' );
} else if ( $button.hasClass( 'preview-button' ) ) {
prepareFormData();
window.opener && window.opener.focus();
$( '#wp-preview' ).val( 'dopreview' );
$( '#pressthis-form' ).attr( 'target', '_blank' ).submit().attr( 'target', '' );
$( '#wp-preview' ).val( '' );
}
} else if ( $target.hasClass( 'edit-post-link' ) && window.opener ) {
window.opener.focus();
window.self.close();
}
});
monitorOptionsModal();
monitorPlaceholder();
monitorCatList();
$( '.options' ).on( 'click.press-this', function() {
if ( $( this ).hasClass( 'open' ) ) {
closeSidebar();
} else {
openSidebar();
}
});
// Close the sidebar when focus moves outside of it.
$( '.options-panel, .options-panel-back' ).on( 'focusout.press-this', function() {
setTimeout( function() {
var node = document.activeElement,
$node = $( node );
if ( sidebarIsOpen && node && ! $node.hasClass( 'options-panel-back' ) &&
( node.nodeName === 'BODY' ||
( ! $node.closest( '.options-panel' ).length &&
! $node.closest( '.options' ).length ) ) ) {
closeSidebar();
}
}, 50 );
});
$( '#post-formats-select input' ).on( 'change', function() {
var $this = $( this );
if ( $this.is( ':checked' ) ) {
$( '#post-option-post-format' ).text( $( 'label[for="' + $this.attr( 'id' ) + '"]' ).text() || '' );
}
} );
$( window ).on( 'beforeunload.press-this', function() {
if ( saveAlert || ( editor && editor.isDirty() ) ) {
return __( 'saveAlert' );
}
} );
$( 'button.add-cat-toggle' ).on( 'click.press-this', function() {
var $this = $( this );
$this.toggleClass( 'is-toggled' );
$this.attr( 'aria-expanded', 'false' === $this.attr( 'aria-expanded' ) ? 'true' : 'false' );
$( '.setting-modal .add-category, .categories-search-wrapper' ).toggleClass( 'is-hidden' );
} );
$( 'button.add-cat-submit' ).on( 'click.press-this', saveNewCategory );
$( '.categories-search' ).on( 'keyup.press-this', function() {
var search = $( this ).val().toLowerCase() || '';
// Don't search when less thasn 3 extended ASCII chars
if ( /[\x20-\xFF]+/.test( search ) && search.length < 2 ) {
return;
}
$.each( catsCache, function( i, cat ) {
cat.node.removeClass( 'is-hidden searched-parent' );
} );
if ( search ) {
$.each( catsCache, function( i, cat ) {
if ( cat.text.indexOf( search ) === -1 ) {
cat.node.addClass( 'is-hidden' );
} else {
cat.parents.addClass( 'searched-parent' );
}
} );
}
} );
return true;
}
function refreshCatsCache() {
$( '.categories-select' ).find( 'li' ).each( function() {
var $this = $( this );
catsCache.push( {
node: $this,
parents: $this.parents( 'li' ),
text: $this.children( '.category' ).text().toLowerCase()
} );
} );
}
// Let's go!
$( document ).ready( function() {
render();
monitor();
refreshCatsCache();
});
// Expose public methods?
return {
renderNotice: renderNotice,
renderError: renderError
};
};
window.wp = window.wp || {};
window.wp.pressThis = new PressThis();
}( jQuery, window ));

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,704 @@
/* global deleteUserSetting, setUserSetting, switchEditors, tinymce, tinyMCEPreInit */
/**
* Distraction-Free Writing
* (wp-fullscreen)
*
* Access the API globally using the window.wp.editor.fullscreen variable.
*/
( function( $, window ) {
var api, ps, s, toggleUI, uiTimer, PubSub,
uiScrollTop = 0,
transitionend = 'transitionend webkitTransitionEnd',
$body = $( document.body ),
$document = $( document );
/**
* PubSub
*
* A lightweight publish/subscribe implementation.
*
* @access private
*/
PubSub = function() {
this.topics = {};
this.subscribe = function( topic, callback ) {
if ( ! this.topics[ topic ] )
this.topics[ topic ] = [];
this.topics[ topic ].push( callback );
return callback;
};
this.unsubscribe = function( topic, callback ) {
var i, l,
topics = this.topics[ topic ];
if ( ! topics )
return callback || [];
// Clear matching callbacks
if ( callback ) {
for ( i = 0, l = topics.length; i < l; i++ ) {
if ( callback == topics[i] )
topics.splice( i, 1 );
}
return callback;
// Clear all callbacks
} else {
this.topics[ topic ] = [];
return topics;
}
};
this.publish = function( topic, args ) {
var i, l, broken,
topics = this.topics[ topic ];
if ( ! topics )
return;
args = args || [];
for ( i = 0, l = topics.length; i < l; i++ ) {
broken = ( topics[i].apply( null, args ) === false || broken );
}
return ! broken;
};
};
// Initialize the fullscreen/api object
api = {};
// Create the PubSub (publish/subscribe) interface.
ps = api.pubsub = new PubSub();
s = api.settings = { // Settings
visible: false,
mode: 'tinymce',
id: '',
title_id: '',
timer: 0,
toolbar_shown: false
};
function _hideUI() {
$body.removeClass('wp-dfw-show-ui');
}
/**
* toggleUI
*
* Toggle the CSS class to show/hide the toolbar, borders and statusbar.
*/
toggleUI = api.toggleUI = function( show ) {
clearTimeout( uiTimer );
if ( ! $body.hasClass('wp-dfw-show-ui') || show === 'show' ) {
$body.addClass('wp-dfw-show-ui');
} else if ( show !== 'autohide' ) {
$body.removeClass('wp-dfw-show-ui');
}
if ( show === 'autohide' ) {
uiTimer = setTimeout( _hideUI, 2000 );
}
};
function resetCssPosition( add ) {
s.$dfwWrap.parents().each( function( i, parent ) {
var cssPosition, $parent = $(parent);
if ( add ) {
if ( parent.style.position ) {
$parent.data( 'wp-dfw-css-position', parent.style.position );
}
$parent.css( 'position', 'static' );
} else {
cssPosition = $parent.data( 'wp-dfw-css-position' );
cssPosition = cssPosition || '';
$parent.css( 'position', cssPosition );
}
if ( parent.nodeName === 'BODY' ) {
return false;
}
});
}
/**
* on()
*
* Turns fullscreen on.
*
* @param string mode Optional. Switch to the given mode before opening.
*/
api.on = function() {
var id, $dfwWrap, titleId;
if ( s.visible ) {
return;
}
if ( ! s.$fullscreenFader ) {
api.ui.init();
}
// Settings can be added or changed by defining "wp_fullscreen_settings" JS object.
if ( typeof window.wp_fullscreen_settings === 'object' )
$.extend( s, window.wp_fullscreen_settings );
id = s.id || window.wpActiveEditor;
if ( ! id ) {
if ( s.hasTinymce ) {
id = tinymce.activeEditor.id;
} else {
return;
}
}
s.id = id;
$dfwWrap = s.$dfwWrap = $( '#wp-' + id + '-wrap' );
if ( ! $dfwWrap.length ) {
return;
}
s.$dfwTextarea = $( '#' + id );
s.$editorContainer = $dfwWrap.find( '.wp-editor-container' );
uiScrollTop = $document.scrollTop();
if ( s.hasTinymce ) {
s.editor = tinymce.get( id );
}
if ( s.editor && ! s.editor.isHidden() ) {
s.origHeight = $( '#' + id + '_ifr' ).height();
s.mode = 'tinymce';
} else {
s.origHeight = s.$dfwTextarea.height();
s.mode = 'html';
}
// Try to find title field
if ( typeof window.adminpage !== 'undefined' &&
( window.adminpage === 'post-php' || window.adminpage === 'post-new-php' ) ) {
titleId = 'title';
} else {
titleId = id + '-title';
}
s.$dfwTitle = $( '#' + titleId );
if ( ! s.$dfwTitle.length ) {
s.$dfwTitle = null;
}
api.ui.fade( 'show', 'showing', 'shown' );
};
/**
* off()
*
* Turns fullscreen off.
*/
api.off = function() {
if ( ! s.visible )
return;
api.ui.fade( 'hide', 'hiding', 'hidden' );
};
/**
* switchmode()
*
* @return string - The current mode.
*
* @param string to - The fullscreen mode to switch to.
* @event switchMode
* @eventparam string to - The new mode.
* @eventparam string from - The old mode.
*/
api.switchmode = function( to ) {
var from = s.mode;
if ( ! to || ! s.visible || ! s.hasTinymce || typeof switchEditors === 'undefined' ) {
return from;
}
// Don't switch if the mode is the same.
if ( from == to )
return from;
if ( to === 'tinymce' && ! s.editor ) {
s.editor = tinymce.get( s.id );
if ( ! s.editor && typeof tinyMCEPreInit !== 'undefined' &&
tinyMCEPreInit.mceInit && tinyMCEPreInit.mceInit[ s.id ] ) {
// If the TinyMCE instance hasn't been created, set the "wp_fulscreen" flag on creating it
tinyMCEPreInit.mceInit[ s.id ].wp_fullscreen = true;
}
}
s.mode = to;
switchEditors.go( s.id, to );
api.refreshButtons( true );
if ( to === 'html' ) {
setTimeout( api.resizeTextarea, 200 );
}
return to;
};
/**
* General
*/
api.save = function() {
var $hidden = $('#hiddenaction'),
oldVal = $hidden.val(),
$spinner = $('#wp-fullscreen-save .spinner'),
$saveMessage = $('#wp-fullscreen-save .wp-fullscreen-saved-message'),
$errorMessage = $('#wp-fullscreen-save .wp-fullscreen-error-message');
$spinner.addClass( 'is-active' );
$errorMessage.hide();
$saveMessage.hide();
$hidden.val('wp-fullscreen-save-post');
if ( s.editor && ! s.editor.isHidden() ) {
s.editor.save();
}
$.ajax({
url: window.ajaxurl,
type: 'post',
data: $('form#post').serialize(),
dataType: 'json'
}).done( function( response ) {
$spinner.removeClass( 'is-active' );
if ( response && response.success ) {
$saveMessage.show();
setTimeout( function() {
$saveMessage.fadeOut(300);
}, 3000 );
if ( response.data && response.data.last_edited ) {
$('#wp-fullscreen-save input').attr( 'title', response.data.last_edited );
}
} else {
$errorMessage.show();
}
}).fail( function() {
$spinner.removeClass( 'is-active' );
$errorMessage.show();
});
$hidden.val( oldVal );
};
api.dfwWidth = function( pixels, total ) {
var width;
if ( pixels && pixels.toString().indexOf('%') !== -1 ) {
s.$editorContainer.css( 'width', pixels );
s.$statusbar.css( 'width', pixels );
if ( s.$dfwTitle ) {
s.$dfwTitle.css( 'width', pixels );
}
return;
}
if ( ! pixels ) {
// Reset to theme width
width = $('#wp-fullscreen-body').data('theme-width') || 800;
s.$editorContainer.width( width );
s.$statusbar.width( width );
if ( s.$dfwTitle ) {
s.$dfwTitle.width( width - 16 );
}
deleteUserSetting('dfw_width');
return;
}
if ( total ) {
width = pixels;
} else {
width = s.$editorContainer.width();
width += pixels;
}
if ( width < 200 || width > 1200 ) {
// sanity check
return;
}
s.$editorContainer.width( width );
s.$statusbar.width( width );
if ( s.$dfwTitle ) {
s.$dfwTitle.width( width - 16 );
}
setUserSetting( 'dfw_width', width );
};
// This event occurs before the overlay blocks the UI.
ps.subscribe( 'show', function() {
var title = $('#last-edit').text();
if ( title ) {
$('#wp-fullscreen-save input').attr( 'title', title );
}
});
// This event occurs while the overlay blocks the UI.
ps.subscribe( 'showing', function() {
$body.addClass( 'wp-fullscreen-active' );
s.$dfwWrap.addClass( 'wp-fullscreen-wrap' );
if ( s.$dfwTitle ) {
s.$dfwTitle.after( '<span id="wp-fullscreen-title-placeholder">' );
s.$dfwWrap.prepend( s.$dfwTitle.addClass('wp-fullscreen-title') );
}
api.refreshButtons();
resetCssPosition( true );
$('#wpadminbar').hide();
// Show the UI for 2 sec. when opening
toggleUI('autohide');
api.bind_resize();
if ( s.editor ) {
s.editor.execCommand( 'wpFullScreenOn' );
}
if ( 'ontouchstart' in window ) {
api.dfwWidth( '90%' );
} else {
api.dfwWidth( $( '#wp-fullscreen-body' ).data('dfw-width') || 800, true );
}
// scroll to top so the user is not disoriented
scrollTo(0, 0);
});
// This event occurs after the overlay unblocks the UI
ps.subscribe( 'shown', function() {
s.visible = true;
if ( s.editor && ! s.editor.isHidden() ) {
s.editor.execCommand( 'wpAutoResize' );
} else {
api.resizeTextarea( 'force' );
}
});
ps.subscribe( 'hide', function() { // This event occurs before the overlay blocks DFW.
$document.unbind( '.fullscreen' );
s.$dfwTextarea.unbind('.wp-dfw-resize');
});
ps.subscribe( 'hiding', function() { // This event occurs while the overlay blocks the DFW UI.
$body.removeClass( 'wp-fullscreen-active' );
if ( s.$dfwTitle ) {
$( '#wp-fullscreen-title-placeholder' ).before( s.$dfwTitle.removeClass('wp-fullscreen-title').css( 'width', '' ) ).remove();
}
s.$dfwWrap.removeClass( 'wp-fullscreen-wrap' );
s.$editorContainer.css( 'width', '' );
s.$dfwTextarea.add( '#' + s.id + '_ifr' ).height( s.origHeight );
if ( s.editor ) {
s.editor.execCommand( 'wpFullScreenOff' );
}
resetCssPosition( false );
window.scrollTo( 0, uiScrollTop );
$('#wpadminbar').show();
});
// This event occurs after DFW is removed.
ps.subscribe( 'hidden', function() {
s.visible = false;
});
api.refreshButtons = function( fade ) {
if ( s.mode === 'html' ) {
$('#wp-fullscreen-mode-bar').removeClass('wp-tmce-mode').addClass('wp-html-mode')
.find('a').removeClass( 'active' ).filter('.wp-fullscreen-mode-html').addClass( 'active' );
if ( fade ) {
$('#wp-fullscreen-button-bar').fadeOut( 150, function(){
$(this).addClass('wp-html-mode').fadeIn( 150 );
});
} else {
$('#wp-fullscreen-button-bar').addClass('wp-html-mode');
}
} else if ( s.mode === 'tinymce' ) {
$('#wp-fullscreen-mode-bar').removeClass('wp-html-mode').addClass('wp-tmce-mode')
.find('a').removeClass( 'active' ).filter('.wp-fullscreen-mode-tinymce').addClass( 'active' );
if ( fade ) {
$('#wp-fullscreen-button-bar').fadeOut( 150, function(){
$(this).removeClass('wp-html-mode').fadeIn( 150 );
});
} else {
$('#wp-fullscreen-button-bar').removeClass('wp-html-mode');
}
}
};
/**
* UI Elements
*
* Used for transitioning between states.
*/
api.ui = {
init: function() {
var toolbar;
s.toolbar = toolbar = $('#fullscreen-topbar');
s.$fullscreenFader = $('#fullscreen-fader');
s.$statusbar = $('#wp-fullscreen-status');
s.hasTinymce = typeof tinymce !== 'undefined';
if ( ! s.hasTinymce )
$('#wp-fullscreen-mode-bar').hide();
$document.keyup( function(e) {
var c = e.keyCode || e.charCode, modKey;
if ( ! s.visible ) {
return;
}
if ( navigator.platform && navigator.platform.indexOf('Mac') !== -1 ) {
modKey = e.ctrlKey; // Ctrl key for Mac
} else {
modKey = e.altKey; // Alt key for Win & Linux
}
if ( modKey && ( 61 === c || 107 === c || 187 === c ) ) { // +
api.dfwWidth( 25 );
e.preventDefault();
}
if ( modKey && ( 45 === c || 109 === c || 189 === c ) ) { // -
api.dfwWidth( -25 );
e.preventDefault();
}
if ( modKey && 48 === c ) { // 0
api.dfwWidth( 0 );
e.preventDefault();
}
});
$( window ).on( 'keydown.wp-fullscreen', function( event ) {
// Turn fullscreen off when Esc is pressed.
if ( 27 === event.keyCode && s.visible ) {
api.off();
event.stopImmediatePropagation();
}
});
if ( 'ontouchstart' in window ) {
$body.addClass('wp-dfw-touch');
}
toolbar.on( 'mouseenter', function() {
toggleUI('show');
}).on( 'mouseleave', function() {
toggleUI('autohide');
});
// Bind buttons
$('#wp-fullscreen-buttons').on( 'click.wp-fullscreen', 'button', function( event ) {
var command = event.currentTarget.id ? event.currentTarget.id.substr(6) : null;
if ( s.editor && 'tinymce' === s.mode ) {
switch( command ) {
case 'bold':
s.editor.execCommand('Bold');
break;
case 'italic':
s.editor.execCommand('Italic');
break;
case 'bullist':
s.editor.execCommand('InsertUnorderedList');
break;
case 'numlist':
s.editor.execCommand('InsertOrderedList');
break;
case 'link':
s.editor.execCommand('WP_Link');
break;
case 'unlink':
s.editor.execCommand('unlink');
break;
case 'help':
s.editor.execCommand('WP_Help');
break;
case 'blockquote':
s.editor.execCommand('mceBlockQuote');
break;
}
} else if ( command === 'link' && window.wpLink ) {
window.wpLink.open();
}
if ( command === 'wp-media-library' && typeof wp !== 'undefined' && wp.media && wp.media.editor ) {
wp.media.editor.open( s.id );
}
});
},
fade: function( before, during, after ) {
if ( ! s.$fullscreenFader ) {
api.ui.init();
}
// If any callback bound to before returns false, bail.
if ( before && ! ps.publish( before ) ) {
return;
}
api.fade.In( s.$fullscreenFader, 200, function() {
if ( during ) {
ps.publish( during );
}
api.fade.Out( s.$fullscreenFader, 200, function() {
if ( after ) {
ps.publish( after );
}
});
});
}
};
api.fade = {
// Sensitivity to allow browsers to render the blank element before animating.
sensitivity: 100,
In: function( element, speed, callback, stop ) {
callback = callback || $.noop;
speed = speed || 400;
stop = stop || false;
if ( api.fade.transitions ) {
if ( element.is(':visible') ) {
element.addClass( 'fade-trigger' );
return element;
}
element.show();
element.first().one( transitionend, function() {
callback();
});
setTimeout( function() { element.addClass( 'fade-trigger' ); }, this.sensitivity );
} else {
if ( stop ) {
element.stop();
}
element.css( 'opacity', 1 );
element.first().fadeIn( speed, callback );
if ( element.length > 1 ) {
element.not(':first').fadeIn( speed );
}
}
return element;
},
Out: function( element, speed, callback, stop ) {
callback = callback || $.noop;
speed = speed || 400;
stop = stop || false;
if ( ! element.is(':visible') ) {
return element;
}
if ( api.fade.transitions ) {
element.first().one( transitionend, function() {
if ( element.hasClass('fade-trigger') ) {
return;
}
element.hide();
callback();
});
setTimeout( function() { element.removeClass( 'fade-trigger' ); }, this.sensitivity );
} else {
if ( stop ) {
element.stop();
}
element.first().fadeOut( speed, callback );
if ( element.length > 1 ) {
element.not(':first').fadeOut( speed );
}
}
return element;
},
// Check if the browser supports CSS 3.0 transitions
transitions: ( function() {
var style = document.documentElement.style;
return ( typeof style.WebkitTransition === 'string' ||
typeof style.MozTransition === 'string' ||
typeof style.OTransition === 'string' ||
typeof style.transition === 'string' );
})()
};
/**
* Resize API
*
* Automatically updates textarea height.
*/
api.bind_resize = function() {
s.$dfwTextarea.on( 'keydown.wp-dfw-resize click.wp-dfw-resize paste.wp-dfw-resize', function() {
api.resizeTextarea();
});
};
api.resizeTextarea = function() {
var node = s.$dfwTextarea[0];
if ( node.scrollHeight > node.clientHeight ) {
node.style.height = node.scrollHeight + 50 + 'px';
}
};
// Export
window.wp = window.wp || {};
window.wp.editor = window.wp.editor || {};
window.wp.editor.fullscreen = api;
})( jQuery, window );

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,48 @@
<?php
/**
* Template for displaying 404 pages (Not Found)
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
get_header(); ?>
<div id="primary">
<div id="content" role="main">
<article id="post-0" class="post error404 not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'This is somewhat embarrassing, isn&rsquo;t it?', 'twentyeleven' ); ?></h1>
</header>
<div class="entry-content">
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching, or one of the links below, can help.', 'twentyeleven' ); ?></p>
<?php get_search_form(); ?>
<?php the_widget( 'WP_Widget_Recent_Posts', array( 'number' => 10 ), array( 'widget_id' => '404' ) ); ?>
<div class="widget">
<h2 class="widgettitle"><?php _e( 'Most Used Categories', 'twentyeleven' ); ?></h2>
<ul>
<?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?>
</ul>
</div>
<?php
/* translators: %1$s: smilie */
$archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'twentyeleven' ), convert_smilies( ':)' ) ) . '</p>';
the_widget( 'WP_Widget_Archives', array( 'count' => 0, 'dropdown' => 1 ), array( 'after_title' => '</h2>' . $archive_content ) );
?>
<?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>

View file

@ -0,0 +1,72 @@
<?php
/**
* Template for displaying Archive pages
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
get_header(); ?>
<section id="primary">
<div id="content" role="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title">
<?php if ( is_day() ) : ?>
<?php printf( __( 'Daily Archives: %s', 'twentyeleven' ), '<span>' . get_the_date() . '</span>' ); ?>
<?php elseif ( is_month() ) : ?>
<?php printf( __( 'Monthly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
<?php elseif ( is_year() ) : ?>
<?php printf( __( 'Yearly Archives: %s', 'twentyeleven' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentyeleven' ) ) . '</span>' ); ?>
<?php else : ?>
<?php _e( 'Blog Archives', 'twentyeleven' ); ?>
<?php endif; ?>
</h1>
</header>
<?php twentyeleven_content_nav( 'nav-above' ); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php twentyeleven_content_nav( 'nav-below' ); ?>
<?php else : ?>
<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<?php endif; ?>
</div><!-- #content -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

View file

@ -0,0 +1,101 @@
<?php
/**
* Template for displaying Author Archive pages
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
get_header(); ?>
<section id="primary">
<div id="content" role="main">
<?php if ( have_posts() ) : ?>
<?php
/*
* Queue the first post, that way we know what author
* we're dealing with (if that is the case).
*
* We reset this later so we can run the loop properly
* with a call to rewind_posts().
*/
the_post();
?>
<header class="page-header">
<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
</header>
<?php
/*
* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
rewind_posts();
?>
<?php twentyeleven_content_nav( 'nav-above' ); ?>
<?php
// If a user has filled out their description, show a bio on their entries.
if ( get_the_author_meta( 'description' ) ) : ?>
<div id="author-info">
<div id="author-avatar">
<?php
/**
* Filter the Twenty Eleven author bio avatar size.
*
* @since Twenty Eleven 1.0
*
* @param int The height and width avatar dimension in pixels. Default 60.
*/
echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ) );
?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
</div><!-- #author-description -->
</div><!-- #author-info -->
<?php endif; ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/*
* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php twentyeleven_content_nav( 'nav-below' ); ?>
<?php else : ?>
<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<?php endif; ?>
</div><!-- #content -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

View file

@ -0,0 +1,74 @@
<?php
/**
* Template for displaying Category Archive pages
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
get_header(); ?>
<section id="primary">
<div id="content" role="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php
printf( __( 'Category Archives: %s', 'twentyeleven' ), '<span>' . single_cat_title( '', false ) . '</span>' );
?></h1>
<?php
$category_description = category_description();
if ( ! empty( $category_description ) ) {
/**
* Filter the default Twenty Eleven category description.
*
* @since Twenty Eleven 1.0
*
* @param string The default category description HTML.
*/
echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
}
?>
</header>
<?php twentyeleven_content_nav( 'nav-above' ); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/*
* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php twentyeleven_content_nav( 'nav-below' ); ?>
<?php else : ?>
<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<?php endif; ?>
</div><!-- #content -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

View file

@ -0,0 +1,623 @@
/*
A dark color scheme for Twenty Eleven
*/
/* =Global
----------------------------------------------- */
body {
background: #1d1d1d;
color: #bbb;
}
#page {
background: #0f0f0f;
}
/* Headings */
hr {
background-color: #333;
}
/* Text elements */
blockquote cite {
color: #999;
}
pre {
background: #0b0b0b;
}
code, kbd {
font: 13px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}
abbr, acronym, dfn {
border-bottom: 1px dotted #999;
}
ins {
background: #00063f;
}
input[type=text],
input[type=password],
input[type=email],
input[type=url],
input[type=number],
textarea {
border: 1px solid #222;
}
input#s {
background-color: #ddd;
}
/* Links */
a {
}
/* =Header
----------------------------------------------- */
#branding {
border-top: 2px solid #0a0a0a;
}
#site-title a {
color: #eee;
}
#site-title a:hover,
#site-title a:focus,
#site-title a:active {
}
#site-description {
color: #858585;
}
#branding #s {
background-color: #ddd;
}
/* =Menu
----------------------------------------------- */
#access {
background: #333; /* Show a solid color for older browsers */
background: -moz-linear-gradient(#383838, #272727);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#383838), to(#272727)); /* older webkit syntax */
background: -webkit-linear-gradient(#383838, #272727);
border-bottom: 1px solid #222;
}
/* =Content
----------------------------------------------- */
.page-title {
color: #ccc;
}
.hentry {
border-color: #222;
}
.entry-title {
color: #ddd;
}
.entry-title,
.entry-title a {
color: #ddd;
}
.entry-title a:hover,
.entry-title a:focus,
.entry-title a:active {
}
.entry-meta {
color: #999;
}
.entry-content h1,
.entry-content h2,
.comment-content h1,
.comment-content h2 {
color: #fff;
}
.entry-content table,
.comment-content table {
border-color: #222;
}
.entry-content th,
.comment-content th {
color: #999;
}
.entry-content td,
.comment-content td {
border-color: #222;
}
.page-link {
}
.page-link a {
background: #242424;
color: #bbb;
}
.page-link a:hover {
background: #999;
color: #000;
}
.entry-meta .edit-link a {
background: #242424;
color: #bbb;
}
.entry-meta .edit-link a:hover,
.entry-meta .edit-link a:focus,
.entry-meta .edit-link a:active {
background: #999;
color: #000;
}
/* Images */
.wp-caption {
background: #2c2c2c;
}
.wp-caption .wp-caption-text {
color: #999;
}
.wp-caption .wp-caption-text:before {
color: #999;
}
/* Image borders */
img[class*="wp-image-"],
#content .gallery .gallery-icon img {
border-color: #2c2c2c;
}
.wp-caption img {
border-color: #2c2c2c;
}
a:focus img[class*="wp-image-"],
a:hover img[class*="wp-image-"],
a:active img[class*="wp-image-"] {
background: #2c2c2c;
border-color: #444;
}
.wp-caption a:focus img,
.wp-caption a:active img,
.wp-caption a:hover img {
background: #0f0f0f;
border-color: #2c2c2c;
}
/* Password Protected Posts */
.post-password-required input[type=password] {
background: #ddd;
}
.post-password-required input[type=password]:focus {
background: #fff;
}
/* Author Info */
.singular #author-info {
background: #060606;
border-color: #222;
}
.archive #author-info {
border-color: #222;
}
#author-avatar img {
background: #000;
-webkit-box-shadow: 0 1px 2px #444;
-moz-box-shadow: 0 1px 2px #444;
box-shadow: 0 1px 2px #444;
}
#author-description h2 {
color: #fff;
}
/* Comments link */
.entry-header .comments-link a {
background: #282828 url(../images/comment-bubble-dark.png) no-repeat;
border-color: #222;
color: #888;
}
.rtl .entry-header .comments-link a {
background-image: url(../images/comment-bubble-dark-rtl.png);
}
/* Singular content styles for Posts and Pages */
.singular .entry-title {
color: #fff;
}
/* =Status
----------------------------------------------- */
.format-status img.avatar {
-webkit-box-shadow: 0 1px 2px #333;
-moz-box-shadow: 0 1px 2px #333;
box-shadow: 0 1px 2px #333;
}
/* =Quote
----------------------------------------------- */
.format-quote blockquote {
color: #aaa;
}
/* =Image
----------------------------------------------- */
.indexed.format-image .wp-caption {
background: #242424;
}
.indexed.format-image .entry-meta .edit-link a {
color: #ddd;
}
.indexed.format-image .entry-meta .edit-link a:hover {
color: #fff;
}
/* =error404
----------------------------------------------- */
.error404 #main #searchform {
background: #060606;
border-color: #222;
}
/* =Showcase
----------------------------------------------- */
h1.showcase-heading {
color: #ccc;
}
/* Intro */
article.intro {
background: #060606;
}
article.intro .entry-content {
color: #eee;
}
article.intro .edit-link a {
background: #555;
color: #000;
}
article.intro .edit-link a:hover {
background: #888;
}
/* Featured post */
section.featured-post .hentry {
color: #999;
}
/* Small featured post */
section.featured-post .attachment-small-feature {
border-color: #444;
}
section.featured-post .attachment-small-feature:hover {
border-color: #777;
}
article.feature-image.small .entry-summary {
color: #aaa;
}
article.feature-image.small .entry-summary p a {
background: #ddd;
color: #111;
}
article.feature-image.small .entry-summary p a:hover {
color: #40220c;
}
/* Large featured post */
article.feature-image.large .entry-title a {
background: #ddd;
background: rgba(0,0,0,0.8);
color: #fff;
}
section.feature-image.large:hover .entry-title a,
section.feature-image.large .entry-title:hover a {
background: #111;
background: rgba(255,255,255,0.8);
color: #000;
}
section.feature-image.large img {
border-bottom: 1px solid #222;
}
/* Featured Slider */
.featured-posts {
border-color: #222;
}
.featured-posts section.featured-post {
background: #000;
}
.featured-post .feature-text:after,
.featured-post .feature-image.small:after {
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
background: linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* W3C */
}
.feature-slider a {
background: #c3c3c3;
background: rgba(60,60,60,0.9);
-webkit-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5);
-moz-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5);
box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5);
}
.feature-slider a.active {
background: #000;
background: rgba(255,255,255,0.8);
-webkit-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8);
-moz-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8);
box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8);
}
/* Recent Posts */
section.recent-posts .other-recent-posts {
border-color: #222;
}
section.recent-posts .other-recent-posts .entry-title {
border-color: #222;
}
section.recent-posts .other-recent-posts a[rel="bookmark"] {
color: #ccc;
}
section.recent-posts .other-recent-posts a[rel="bookmark"]:hover {
}
section.recent-posts .other-recent-posts .comments-link a,
section.recent-posts .other-recent-posts .comments-link > span {
border-color: #959595;
color: #bbb;
}
section.recent-posts .other-recent-posts .comments-link > span {
border-color: #444;
color: #777;
}
section.recent-posts .other-recent-posts .comments-link a:hover {
}
/* =Attachments
----------------------------------------------- */
.image-attachment div.attachment {
background: #060606;
border-color: #222;
}
.image-attachment div.attachment a img {
border-color: #060606;
}
.image-attachment div.attachment a:focus img,
.image-attachment div.attachment a:hover img,
.image-attachment div.attachment a:active img {
border-color: #2c2c2c;
background: #0f0f0f;
}
/* =Widgets
----------------------------------------------- */
.widget-title {
color: #ccc;
}
.widget ul li {
color: #888;
}
/* Search Widget */
.widget_search #searchsubmit {
background: #222;
border-color: #333;
-webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
-moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
color: #777;
}
.widget_search #searchsubmit:active {
-webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
-moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
color: #40220c;
}
/* Calendar Widget */
.widget_calendar #wp-calendar {
color: #aaa;
}
.widget_calendar #wp-calendar th {
background: #0b0b0b;
border-color: #333;
}
.widget_calendar #wp-calendar tfoot td {
background: #0b0b0b;
border-color: #333;
}
/* =Comments
----------------------------------------------- */
#comments-title {
color: #bbb;
}
.nocomments {
color: #555;
}
.commentlist > li.comment {
background: #090909;
border-color: #222;
}
.commentlist .children li.comment {
background: #000;
border-color: #222;
}
.rtl .commentlist .children li.comment {
border-color: #222;
}
.comment-meta {
color: #999;
}
.commentlist .avatar {
-webkit-box-shadow: 0 1px 2px #222;
-moz-box-shadow: 0 1px 2px #222;
box-shadow: 0 1px 2px #222;
}
a.comment-reply-link {
background: #242424;
color: #bbb;
}
li.bypostauthor a.comment-reply-link {
background: #111;
}
a.comment-reply-link:hover,
a.comment-reply-link:focus,
a.comment-reply-link:active,
li.bypostauthor a.comment-reply-link:hover,
li.bypostauthor a.comment-reply-link:focus,
li.bypostauthor a.comment-reply-link:active {
background: #999;
color: #000;
}
.commentlist > li:before {
content: url(../images/comment-arrow-dark.png);
}
.rtl .commentlist > li:before {
content: url(../images/comment-arrow-dark-rtl.png);
}
/* Post author highlighting */
.commentlist > li.bypostauthor {
background: #222;
border-color: #2c2c2c;
}
.commentlist > li.bypostauthor:before {
content: url(../images/comment-arrow-bypostauthor-dark.png);
}
.rtl .commentlist > li.bypostauthor:before {
content: url(../images/comment-arrow-bypostauthor-dark-rtl.png);
}
/* Post Author threaded comments */
.commentlist .children > li.bypostauthor {
background: #222;
border-color: #2c2c2c;
}
.commentlist > li.bypostauthor .comment-meta {
color: #a8a8a8;
}
/* Comment Form */
#respond {
background: #222;
border-color: #2c2c2c;
}
#respond input[type="text"],
#respond textarea {
background: #000;
border: 4px solid #111;
-webkit-box-shadow: inset 0 1px 3px rgba(51,51,51,0.95);
-moz-box-shadow: inset 0 1px 3px rgba(51,51,51,0.95);
box-shadow: inset 0 1px 3px rgba(51,51,51,0.95);
color: #bbb;
}
#respond .comment-form-author label,
#respond .comment-form-email label,
#respond .comment-form-url label,
#respond .comment-form-comment label {
background: #111;
-webkit-box-shadow: 1px 2px 2px rgba(51,51,51,0.8);
-moz-box-shadow: 1px 2px 2px rgba(51,51,51,0.8);
box-shadow: 1px 1px 2px rgba(51,51,51,0.8);
color: #aaa;
}
.rtl #respond .comment-form-author label,
.rtl #respond .comment-form-email label,
.rtl #respond .comment-form-url label,
.rtl #respond .comment-form-comment label {
-webkit-box-shadow: -1px 2px 2px rgba(51,51,51,0.8);
-moz-box-shadow: -1px 2px 2px rgba(51,51,51,0.8);
box-shadow: -1px 1px 2px rgba(51,51,51,0.8);
}
#respond .comment-form-author .required,
#respond .comment-form-email .required {
color: #42caff;
}
#respond input#submit {
background: #ddd;
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
color: #111;
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}
#respond input#submit:active {
color: #40220c;
}
#respond #cancel-comment-reply-link {
color: #999;
}
#reply-title {
color: #ccc;
}
#cancel-comment-reply-link {
color: #777;
}
#cancel-comment-reply-link:focus,
#cancel-comment-reply-link:active,
#cancel-comment-reply-link:hover {
color: #00b4cc;
}
/* =Footer
----------------------------------------------- */
#supplementary {
border-color: #222;
}
/* Site Generator Line */
#site-generator {
background: #060606;
border-color: #000;
}
/* =Print
----------------------------------------------- */
@media print {
body {
color: #333;
background: none !important;
}
#page {
background: none !important;
}
/* Comments */
.commentlist > li.comment {
}
/* Post author highlighting */
.commentlist > li.bypostauthor {
color: #333;
}
.commentlist > li.bypostauthor .comment-meta {
color: #959595;
}
.commentlist > li:before {
content: none !important;
}
/* Post Author threaded comments */
.commentlist .children > li.bypostauthor {
background: #fff;
border-color: #ddd;
}
.commentlist .children > li.bypostauthor > article,
.commentlist .children > li.bypostauthor > article .comment-meta {
color: #959595;
}
}

View file

@ -0,0 +1,81 @@
<?php
/**
* Template for displaying Comments
*
* The area of the page that contains both current comments
* and the comment form. The actual display of comments is
* handled by a callback to twentyeleven_comment() which is
* located in the functions.php file.
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<div id="comments">
<?php if ( post_password_required() ) : ?>
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyeleven' ); ?></p>
</div><!-- #comments -->
<?php
/*
* Stop the rest of comments.php from being processed,
* but don't kill the script entirely -- we still have
* to fully load the template.
*/
return;
endif;
?>
<?php // You can start editing here -- including this comment! ?>
<?php if ( have_comments() ) : ?>
<h2 id="comments-title">
<?php
printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyeleven' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
?>
</h2>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-above">
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>
<ol class="commentlist">
<?php
/*
* Loop through and list the comments. Tell wp_list_comments()
* to use twentyeleven_comment() to format the comments.
* If you want to overload this in a child theme then you can
* define twentyeleven_comment() and that will be used instead.
* See twentyeleven_comment() in twentyeleven/functions.php for more.
*/
wp_list_comments( array( 'callback' => 'twentyeleven_comment' ) );
?>
</ol>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-below">
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyeleven' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyeleven' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyeleven' ) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>
<?php
/*
* If there are no comments and comments are closed, let's leave a little note, shall we?
* But we only want the note on posts and pages that had comments in the first place.
*/
if ( ! comments_open() && get_comments_number() ) : ?>
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyeleven' ); ?></p>
<?php endif; ?>
<?php endif; // have_comments() ?>
<?php comment_form(); ?>
</div><!-- #comments -->

View file

@ -0,0 +1,48 @@
<?php
/**
* Template for displaying posts in the Aside Post Format
*
* Used on index and archive pages.
*
* @link https://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Aside', 'twentyeleven' ); ?></h3>
</hgroup>
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>
<?php endif; ?>
</header><!-- .entry-header -->
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-meta">
<?php twentyeleven_posted_on(); ?>
<?php if ( comments_open() ) : ?>
<span class="sep"> | </span>
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -0,0 +1,47 @@
<?php
/**
* Template for displaying content featured in the showcase.php page template
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
global $feature_class;
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( $feature_class ); ?>>
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-summary">
<?php the_excerpt(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
if ( '' != $tag_list ) {
$utility_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
} else {
$utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
}
printf(
$utility_text,
/* translators: used between list items, there is a space after the comma */
get_the_category_list( __( ', ', 'twentyeleven' ) ),
$tag_list,
esc_url( get_permalink() ),
the_title_attribute( 'echo=0' )
);
?>
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -0,0 +1,90 @@
<?php
/**
* Template for displaying posts in the Gallery Post Format
*
* Used on index and archive pages.
*
* @link https://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Gallery', 'twentyeleven' ); ?></h3>
</hgroup>
<div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<?php if ( is_search() ) : // Only display Excerpts for search pages ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php if ( post_password_required() ) : ?>
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php else :
$images = twentyeleven_get_gallery_images();
if ( $images ) :
$total_images = count( $images );
$image = reset( $images );
?>
<figure class="gallery-thumb">
<a href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a>
</figure><!-- .gallery-thumb -->
<p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyeleven' ),
'href="' . esc_url( get_permalink() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"',
number_format_i18n( $total_images )
); ?></em></p>
<?php endif; // end twentyeleven_get_gallery_images() check ?>
<?php the_excerpt(); ?>
<?php endif; ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-meta">
<?php $show_sep = false; ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
if ( $categories_list ):
?>
<span class="cat-links">
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
$show_sep = true; ?>
</span>
<?php endif; // End if categories ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
if ( $tags_list ):
if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
$show_sep = true; ?>
</span>
<?php endif; // End if $tags_list ?>
<?php if ( comments_open() ) : ?>
<?php if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
<?php endif; // End if comments_open() ?>
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -0,0 +1,72 @@
<?php
/**
* Template for displaying posts in the Image Post Format
*
* Used on index and archive pages.
*
* @link https://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'indexed' ); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Image', 'twentyeleven' ); ?></h3>
</hgroup>
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<div class="entry-meta">
<?php
printf( __( '<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span></span>', 'twentyeleven' ),
esc_url( get_permalink() ),
get_the_date( 'c' ),
get_the_date(),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
get_the_author()
);
?>
</div><!-- .entry-meta -->
<div class="entry-meta">
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
if ( $categories_list ):
?>
<span class="cat-links">
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); ?>
</span>
<?php endif; // End if categories ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
if ( $tags_list ): ?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
</span>
<?php endif; // End if $tags_list ?>
<?php if ( comments_open() ) : ?>
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
<?php endif; // End if comments_open() ?>
</div><!-- .entry-meta -->
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -0,0 +1,21 @@
<?php
/**
* Template for displaying page content in the showcase.php page template
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'intro' ); ?>>
<header class="entry-header">
<h2 class="entry-title"><?php the_title(); ?></h2>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -0,0 +1,48 @@
<?php
/**
* Template for displaying posts in the Link Post Format
*
* Used on index and archive pages
*
* @link https://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Link', 'twentyeleven' ); ?></h3>
</hgroup>
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>
<?php endif; ?>
</header><!-- .entry-header -->
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-meta">
<?php twentyeleven_posted_on(); ?>
<?php if ( comments_open() ) : ?>
<span class="sep"> | </span>
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -0,0 +1,23 @@
<?php
/**
* Template used for displaying page content in page.php
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -0,0 +1,74 @@
<?php
/**
* Template for displaying content
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Quote', 'twentyeleven' ); ?></h3>
</hgroup>
<div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!-- .entry-meta -->
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>
<?php endif; ?>
</header><!-- .entry-header -->
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-meta">
<?php $show_sep = false; ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
if ( $categories_list ):
?>
<span class="cat-links">
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
$show_sep = true; ?>
</span>
<?php endif; // End if categories ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
if ( $tags_list ):
if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
$show_sep = true; ?>
</span>
<?php endif; // End if $tags_list ?>
<?php if ( comments_open() ) : ?>
<?php if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
<?php endif; // End if comments_open() ?>
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -0,0 +1,74 @@
<?php
/**
* The template for displaying content in the single.php template
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
if ( '' != $tag_list ) {
$utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
} elseif ( '' != $categories_list ) {
$utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
} else {
$utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyeleven' );
}
printf(
$utility_text,
$categories_list,
$tag_list,
esc_url( get_permalink() ),
the_title_attribute( 'echo=0' ),
get_the_author(),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
);
?>
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
<?php if ( get_the_author_meta( 'description' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
<div id="author-info">
<div id="author-avatar">
<?php
/** This filter is documented in author.php */
echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) );
?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven' ), get_the_author() ); ?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
</div><!-- #author-info -->
<?php endif; ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -0,0 +1,61 @@
<?php
/**
* Template for displaying posts in the Status Post Format
*
* Used on index and archive pages
*
* @link https://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Status', 'twentyeleven' ); ?></h3>
</hgroup>
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>
<?php endif; ?>
</header><!-- .entry-header -->
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<div class="avatar">
<?php
/**
* Filter the Twenty Eleven status avatar size.
*
* @since Twenty Eleven 1.0
*
* @param int The height and width avatar dimensions in pixels. Default 65.
*/
echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentyeleven_status_avatar', 65 ) );
?>
</div>
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-meta">
<?php twentyeleven_posted_on(); ?>
<?php if ( comments_open() ) : ?>
<span class="sep"> | </span>
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -0,0 +1,84 @@
<?php
/**
* Template for displaying content
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( is_sticky() ) : ?>
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( 'Featured', 'twentyeleven' ); ?></h3>
</hgroup>
<?php else : ?>
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php endif; ?>
<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
<?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
</div>
<?php endif; ?>
</header><!-- .entry-header -->
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-meta">
<?php $show_sep = false; ?>
<?php if ( is_object_in_taxonomy( get_post_type(), 'category' ) ) : // Hide category text when not supported ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
if ( $categories_list ):
?>
<span class="cat-links">
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
$show_sep = true; ?>
</span>
<?php endif; // End if categories ?>
<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'category' ) ?>
<?php if ( is_object_in_taxonomy( get_post_type(), 'post_tag' ) ) : // Hide tag text when not supported ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
if ( $tags_list ):
if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
$show_sep = true; ?>
</span>
<?php endif; // End if $tags_list ?>
<?php endif; // End if is_object_in_taxonomy( get_post_type(), 'post_tag' ) ?>
<?php if ( comments_open() ) : ?>
<?php if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
<?php endif; // End if comments_open() ?>
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->

View file

@ -0,0 +1,24 @@
/*
Theme Name: Twenty Eleven
*/
/*
Used to style the TinyMCE editor.
*/
html .mceContentBody {
direction: rtl;
unicode-bidi: embed;
float: right;
width: 584px;
}
* {
font-family: Arial, Tahoma, sans-serif;
}
ul, ol {
margin: 0 2.5em 1.625em 0;
}
blockquote {
font-style: normal;
}
table {
text-align: right;
}

View file

@ -0,0 +1,312 @@
/*
Theme Name: Twenty Eleven
Description: Used to style the TinyMCE editor.
*/
html .mceContentBody {
max-width: 584px;
}
* {
color: inherit;
font: 15px "Helvetica Neue", Helvetica, Arial, sans-serif;
font-style: inherit;
font-weight: inherit;
line-height: 1.625;
}
body {
color: #333;
font: 15px "Helvetica Neue", Helvetica, Arial, "Nimbus Sans L", sans-serif;
font-weight: 300;
line-height: 1.625;
}
/* Headings */
h1,h2,h3,h4,h5,h6 {
clear: both;
}
h1,
h2 {
color: #000;
font-size: 15px;
font-weight: bold;
margin: 0 0 .8125em;
}
h3 {
font-size: 10px;
letter-spacing: 0.1em;
line-height: 2.6em;
text-transform: uppercase;
}
h4, h5, h6 {
font-size: 14px;
margin: 0;
}
hr {
background-color: #ccc;
border: 0;
height: 1px;
margin-bottom: 1.625em;
}
/* Text elements */
p, ul, ol, dl {
font-weight: 300;
}
p {
margin-bottom: 1.625em;
}
ul, ol {
margin: 0 0 1.625em 2.5em;
padding: 0;
}
ul {
list-style: square;
}
ol {
list-style-type: decimal;
}
ol ol {
list-style: upper-alpha;
}
ol ol ol {
list-style: lower-roman;
}
ol ol ol ol {
list-style: lower-alpha;
}
ul ul, ol ol, ul ol, ol ul {
margin-bottom: 0;
}
dl {
margin: 0 1.625em;
}
dt {
font-size: 15px;
font-weight: bold;
}
dd {
margin: 0 0 1.625em;
}
strong {
font-weight: bold;
}
cite, em, i {
font-style: italic;
}
cite {
border: none;
}
big {
font-size: 131.25%;
}
.mceContentBody blockquote,
.mceContentBody blockquote p {
font-family: Georgia, "Bitstream Charter", serif !important;
font-style: italic !important;
font-weight: normal;
margin: 0 3em;
}
.mceContentBody blockquote em,
.mceContentBody blockquote i,
.mceContentBody blockquote cite {
font-style: normal;
}
.mceContentBody blockquote cite {
color: #666;
font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 300;
letter-spacing: 0.05em;
text-transform: uppercase;
}
pre {
background: #f4f4f4;
font: 13px "Courier 10 Pitch", Courier, monospace;
line-height: 1.5;
margin-bottom: 1.625em;
padding: 0.75em 1.625em;
}
code, kbd, samp, var {
font: 13px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}
abbr, acronym, dfn {
border-bottom: 1px dotted #666;
cursor: help;
}
address {
display: block;
margin: 0 0 1.625em;
}
del {
color: #333;
}
ins {
background: #fff9c0;
border: none;
color: #333;
text-decoration: none;
}
sup,
sub {
font-size: 10px;
height: 0;
line-height: 1;
position: relative;
vertical-align: baseline;
}
sup {
bottom: 1ex;
}
sub {
top: .5ex;
}
input[type=text],
textarea {
background: #fafafa;
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
border: 1px solid #ddd;
color: #888;
}
input[type=text]:focus,
textarea:focus {
color: #333;
}
textarea {
padding-left: 3px;
width: 98%;
}
input[type=text] {
padding: 3px;
}
/* Links */
a,
a em,
a strong {
color: #1b8be0;
text-decoration: none;
}
a:focus,
a:active,
a:hover {
text-decoration: underline;
}
/* Alignment */
.alignleft {
display: inline;
float: left;
margin-right: 1.625em;
}
.alignright {
display: inline;
float: right;
margin-left: 1.625em;
}
.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
}
/* Tables */
table {
border: none !important;
border-bottom: 1px solid #ddd !important;
border-collapse: collapse;
border-spacing: 0;
text-align: left;
margin: 0 0 1.625em;
width: 100%;
}
tr th {
border: none !important;
color: #666;
font-size: 10px;
font-weight: 500;
letter-spacing: 0.1em;
line-height: 2.6em;
text-transform: uppercase;
}
td {
border: none !important;
border-top: 1px solid #ddd !important;
padding: 6px 10px 6px 0;
}
/* Images */
img[class*="wp-image-"] {
height: auto;
max-width: 97.5%;
}
img.size-full {
width: auto; /* Prevent stretching of full-size images in IE8 */
}
img.wp-smiley {
border: none;
margin-bottom: 0;
margin-top: 0;
padding: 0;
}
p img,
.wp-caption {
margin-top: 0.4em;
}
img,
.editor-attachment {
border: 1px solid #ddd;
padding: 6px;
}
img.alignleft,
img.alignright,
img.aligncenter {
margin-bottom: 1.625em;
}
.wp-caption {
background: #eee;
border: none;
margin-bottom: 1.625em;
max-width: 96%;
padding: 9px;
}
.wp-caption img {
display: block;
margin: 5px auto 0 !important;
max-width: 98%;
border-color: #eee;
}
.wp-caption .wp-caption-text,
.wp-caption-dd {
color: #666;
font-family: Georgia, serif !important;
font-size: 12px;
margin: 0 0 0.6em 0 !important;
padding: 0 0 5px 40px;
position: relative;
text-align: left;
}
.wp-caption .wp-caption-text:before {
color: #666;
content: '\2014';
font-size: 14px;
font-style: normal;
font-weight: bold;
margin-right: 5px;
position: absolute;
left: 10px;
top: 7px;
}
a:focus img[class*="wp-image-"],
a:hover img[class*="wp-image-"],
a:active img[class*="wp-image-"] {
background: #eee;
border-color: #bbb;
}
.wp-caption a:focus img,
.wp-caption a:active img,
.wp-caption a:hover img {
background: #fff;
border-color: #ddd;
}

View file

@ -0,0 +1,36 @@
<?php
/**
* Template for displaying the footer
*
* Contains the closing of the id=main div and all content after
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
</div><!-- #main -->
<footer id="colophon" role="contentinfo">
<?php
/*
* A sidebar in the footer? Yep. You can can customize
* your footer with three columns of widgets.
*/
if ( ! is_404() )
get_sidebar( 'footer' );
?>
<div id="site-generator">
<?php do_action( 'twentyeleven_credits' ); ?>
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyeleven' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyeleven' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyeleven' ), 'WordPress' ); ?></a>
</div>
</footer><!-- #colophon -->
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>

View file

@ -0,0 +1,742 @@
<?php
/**
* Twenty Eleven functions and definitions
*
* Sets up the theme and provides some helper functions. Some helper functions
* are used in the theme as custom template tags. Others are attached to action and
* filter hooks in WordPress to change core functionality.
*
* The first function, twentyeleven_setup(), sets up the theme by registering support
* for various features in WordPress, such as post thumbnails, navigation menus, and the like.
*
* When using a child theme (see https://codex.wordpress.org/Theme_Development and
* https://codex.wordpress.org/Child_Themes), you can override certain functions
* (those wrapped in a function_exists() call) by defining them first in your child theme's
* functions.php file. The child theme's functions.php file is included before the parent
* theme's file, so the child theme functions would be used.
*
* Functions that are not pluggable (not wrapped in function_exists()) are instead attached
* to a filter or action hook. The hook can be removed by using remove_action() or
* remove_filter() and you can attach your own function to the hook.
*
* We can remove the parent theme's hook only after it is attached, which means we need to
* wait until setting up the child theme:
*
* <code>
* add_action( 'after_setup_theme', 'my_child_theme_setup' );
* function my_child_theme_setup() {
* // We are providing our own filter for excerpt_length (or using the unfiltered value)
* remove_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
* ...
* }
* </code>
*
* For more information on hooks, actions, and filters, see https://codex.wordpress.org/Plugin_API.
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
// Set the content width based on the theme's design and stylesheet.
if ( ! isset( $content_width ) )
$content_width = 584;
/*
* Tell WordPress to run twentyeleven_setup() when the 'after_setup_theme' hook is run.
*/
add_action( 'after_setup_theme', 'twentyeleven_setup' );
if ( ! function_exists( 'twentyeleven_setup' ) ):
/**
* Set up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which runs
* before the init hook. The init hook is too late for some features, such as indicating
* support post thumbnails.
*
* To override twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's
* functions.php file.
*
* @uses load_theme_textdomain() For translation/localization support.
* @uses add_editor_style() To style the visual editor.
* @uses add_theme_support() To add support for post thumbnails, automatic feed links, custom headers
* and backgrounds, and post formats.
* @uses register_nav_menus() To add support for navigation menus.
* @uses register_default_headers() To register the default custom header images provided with the theme.
* @uses set_post_thumbnail_size() To set a custom post thumbnail size.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_setup() {
/*
* Make Twenty Eleven available for translation.
* Translations can be added to the /languages/ directory.
* If you're building a theme based on Twenty Eleven, use
* a find and replace to change 'twentyeleven' to the name
* of your theme in all the template files.
*/
load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' );
// This theme styles the visual editor with editor-style.css to match the theme style.
add_editor_style();
// Load up our theme options page and related code.
require( get_template_directory() . '/inc/theme-options.php' );
// Grab Twenty Eleven's Ephemera widget.
require( get_template_directory() . '/inc/widgets.php' );
// Add default posts and comments RSS feed links to <head>.
add_theme_support( 'automatic-feed-links' );
// This theme uses wp_nav_menu() in one location.
register_nav_menu( 'primary', __( 'Primary Menu', 'twentyeleven' ) );
// Add support for a variety of post formats
add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) );
$theme_options = twentyeleven_get_theme_options();
if ( 'dark' == $theme_options['color_scheme'] )
$default_background_color = '1d1d1d';
else
$default_background_color = 'e2e2e2';
// Add support for custom backgrounds.
add_theme_support( 'custom-background', array(
/*
* Let WordPress know what our default background color is.
* This is dependent on our current color scheme.
*/
'default-color' => $default_background_color,
) );
// This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images
add_theme_support( 'post-thumbnails' );
// Add support for custom headers.
$custom_header_support = array(
// The default header text color.
'default-text-color' => '000',
// The height and width of our custom header.
/**
* Filter the Twenty Eleven default header image width.
*
* @since Twenty Eleven 1.0
*
* @param int The default header image width in pixels. Default 1000.
*/
'width' => apply_filters( 'twentyeleven_header_image_width', 1000 ),
/**
* Filter the Twenty Eleven default header image height.
*
* @since Twenty Eleven 1.0
*
* @param int The default header image height in pixels. Default 288.
*/
'height' => apply_filters( 'twentyeleven_header_image_height', 288 ),
// Support flexible heights.
'flex-height' => true,
// Random image rotation by default.
'random-default' => true,
// Callback for styling the header.
'wp-head-callback' => 'twentyeleven_header_style',
// Callback for styling the header preview in the admin.
'admin-head-callback' => 'twentyeleven_admin_header_style',
// Callback used to display the header preview in the admin.
'admin-preview-callback' => 'twentyeleven_admin_header_image',
);
add_theme_support( 'custom-header', $custom_header_support );
if ( ! function_exists( 'get_custom_header' ) ) {
// This is all for compatibility with versions of WordPress prior to 3.4.
define( 'HEADER_TEXTCOLOR', $custom_header_support['default-text-color'] );
define( 'HEADER_IMAGE', '' );
define( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] );
define( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] );
add_custom_image_header( $custom_header_support['wp-head-callback'], $custom_header_support['admin-head-callback'], $custom_header_support['admin-preview-callback'] );
add_custom_background();
}
/*
* We'll be using post thumbnails for custom header images on posts and pages.
* We want them to be the size of the header image that we just defined.
* Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
*/
set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true );
/*
* Add Twenty Eleven's custom image sizes.
* Used for large feature (header) images.
*/
add_image_size( 'large-feature', $custom_header_support['width'], $custom_header_support['height'], true );
// Used for featured posts if a large-feature doesn't exist.
add_image_size( 'small-feature', 500, 300 );
// Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
register_default_headers( array(
'wheel' => array(
'url' => '%s/images/headers/wheel.jpg',
'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Wheel', 'twentyeleven' )
),
'shore' => array(
'url' => '%s/images/headers/shore.jpg',
'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Shore', 'twentyeleven' )
),
'trolley' => array(
'url' => '%s/images/headers/trolley.jpg',
'thumbnail_url' => '%s/images/headers/trolley-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Trolley', 'twentyeleven' )
),
'pine-cone' => array(
'url' => '%s/images/headers/pine-cone.jpg',
'thumbnail_url' => '%s/images/headers/pine-cone-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Pine Cone', 'twentyeleven' )
),
'chessboard' => array(
'url' => '%s/images/headers/chessboard.jpg',
'thumbnail_url' => '%s/images/headers/chessboard-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Chessboard', 'twentyeleven' )
),
'lanterns' => array(
'url' => '%s/images/headers/lanterns.jpg',
'thumbnail_url' => '%s/images/headers/lanterns-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Lanterns', 'twentyeleven' )
),
'willow' => array(
'url' => '%s/images/headers/willow.jpg',
'thumbnail_url' => '%s/images/headers/willow-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Willow', 'twentyeleven' )
),
'hanoi' => array(
'url' => '%s/images/headers/hanoi.jpg',
'thumbnail_url' => '%s/images/headers/hanoi-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Hanoi Plant', 'twentyeleven' )
)
) );
}
endif; // twentyeleven_setup
if ( ! function_exists( 'twentyeleven_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_header_style() {
$text_color = get_header_textcolor();
// If no custom options for text are set, let's bail.
if ( $text_color == HEADER_TEXTCOLOR )
return;
// If we get this far, we have custom styles. Let's do this.
?>
<style type="text/css" id="twentyeleven-header-css">
<?php
// Has the text been hidden?
if ( 'blank' == $text_color ) :
?>
#site-title,
#site-description {
position: absolute;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
}
<?php
// If the user has set a custom color for the text use that
else :
?>
#site-title a,
#site-description {
color: #<?php echo $text_color; ?>;
}
<?php endif; ?>
</style>
<?php
}
endif; // twentyeleven_header_style
if ( ! function_exists( 'twentyeleven_admin_header_style' ) ) :
/**
* Styles the header image displayed on the Appearance > Header admin panel.
*
* Referenced via add_theme_support('custom-header') in twentyeleven_setup().
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_admin_header_style() {
?>
<style type="text/css" id="twentyeleven-admin-header-css">
.appearance_page_custom-header #headimg {
border: none;
}
#headimg h1,
#desc {
font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
}
#headimg h1 {
margin: 0;
}
#headimg h1 a {
font-size: 32px;
line-height: 36px;
text-decoration: none;
}
#desc {
font-size: 14px;
line-height: 23px;
padding: 0 0 3em;
}
<?php
// If the user has set a custom color for the text use that
if ( get_header_textcolor() != HEADER_TEXTCOLOR ) :
?>
#site-title a,
#site-description {
color: #<?php echo get_header_textcolor(); ?>;
}
<?php endif; ?>
#headimg img {
max-width: 1000px;
height: auto;
width: 100%;
}
</style>
<?php
}
endif; // twentyeleven_admin_header_style
if ( ! function_exists( 'twentyeleven_admin_header_image' ) ) :
/**
* Custom header image markup displayed on the Appearance > Header admin panel.
*
* Referenced via add_theme_support('custom-header') in twentyeleven_setup().
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_admin_header_image() { ?>
<div id="headimg">
<?php
$color = get_header_textcolor();
$image = get_header_image();
$style = 'display: none;';
if ( $color && $color != 'blank' ) {
$style = 'color: #' . $color . ';';
}
?>
<h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>
<div id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></div>
<?php if ( $image ) : ?>
<img src="<?php echo esc_url( $image ); ?>" alt="" />
<?php endif; ?>
</div>
<?php }
endif; // twentyeleven_admin_header_image
/**
* Set the post excerpt length to 40 words.
*
* To override this length in a child theme, remove
* the filter and add your own function tied to
* the excerpt_length filter hook.
*
* @since Twenty Eleven 1.0
*
* @param int $length The number of excerpt characters.
* @return int The filtered number of characters.
*/
function twentyeleven_excerpt_length( $length ) {
return 40;
}
add_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
if ( ! function_exists( 'twentyeleven_continue_reading_link' ) ) :
/**
* Return a "Continue Reading" link for excerpts
*
* @since Twenty Eleven 1.0
*
* @return string The "Continue Reading" HTML link.
*/
function twentyeleven_continue_reading_link() {
return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>';
}
endif; // twentyeleven_continue_reading_link
/**
* Replace "[...]" in the Read More link with an ellipsis.
*
* The "[...]" is appended to automatically generated excerpts.
*
* To override this in a child theme, remove the filter and add your own
* function tied to the excerpt_more filter hook.
*
* @since Twenty Eleven 1.0
*
* @param string $more The Read More text.
* @return The filtered Read More text.
*/
function twentyeleven_auto_excerpt_more( $more ) {
if ( ! is_admin() ) {
return ' &hellip;' . twentyeleven_continue_reading_link();
}
return $more;
}
add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' );
/**
* Add a pretty "Continue Reading" link to custom post excerpts.
*
* To override this link in a child theme, remove the filter and add your own
* function tied to the get_the_excerpt filter hook.
*
* @since Twenty Eleven 1.0
*
* @param string $output The "Continue Reading" link.
* @return string The filtered "Continue Reading" link.
*/
function twentyeleven_custom_excerpt_more( $output ) {
if ( has_excerpt() && ! is_attachment() && ! is_admin() ) {
$output .= twentyeleven_continue_reading_link();
}
return $output;
}
add_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );
/**
* Show a home link for the wp_nav_menu() fallback, wp_page_menu().
*
* @since Twenty Eleven 1.0
*
* @param array $args The page menu arguments. @see wp_page_menu()
* @return array The filtered page menu arguments.
*/
function twentyeleven_page_menu_args( $args ) {
if ( ! isset( $args['show_home'] ) )
$args['show_home'] = true;
return $args;
}
add_filter( 'wp_page_menu_args', 'twentyeleven_page_menu_args' );
/**
* Register sidebars and widgetized areas.
*
* Also register the default Epherma widget.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_widgets_init() {
register_widget( 'Twenty_Eleven_Ephemera_Widget' );
register_sidebar( array(
'name' => __( 'Main Sidebar', 'twentyeleven' ),
'id' => 'sidebar-1',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
'name' => __( 'Showcase Sidebar', 'twentyeleven' ),
'id' => 'sidebar-2',
'description' => __( 'The sidebar for the optional Showcase Template', 'twentyeleven' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
'name' => __( 'Footer Area One', 'twentyeleven' ),
'id' => 'sidebar-3',
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
'name' => __( 'Footer Area Two', 'twentyeleven' ),
'id' => 'sidebar-4',
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
'name' => __( 'Footer Area Three', 'twentyeleven' ),
'id' => 'sidebar-5',
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
}
add_action( 'widgets_init', 'twentyeleven_widgets_init' );
if ( ! function_exists( 'twentyeleven_content_nav' ) ) :
/**
* Display navigation to next/previous pages when applicable.
*
* @since Twenty Eleven 1.0
*
* @param string $html_id The HTML id attribute.
*/
function twentyeleven_content_nav( $html_id ) {
global $wp_query;
if ( $wp_query->max_num_pages > 1 ) : ?>
<nav id="<?php echo esc_attr( $html_id ); ?>">
<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyeleven' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></div>
</nav><!-- #nav-above -->
<?php endif;
}
endif; // twentyeleven_content_nav
/**
* Return the first link from the post content. If none found, the
* post permalink is used as a fallback.
*
* @since Twenty Eleven 1.0
*
* @uses get_url_in_content() to get the first URL from the post content.
*
* @return string The first link.
*/
function twentyeleven_get_first_url() {
$content = get_the_content();
$has_url = function_exists( 'get_url_in_content' ) ? get_url_in_content( $content ) : false;
if ( ! $has_url )
$has_url = twentyeleven_url_grabber();
/** This filter is documented in wp-includes/link-template.php */
return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() );
}
/**
* Return the URL for the first link found in the post content.
*
* @since Twenty Eleven 1.0
*
* @return string|bool URL or false when no link is present.
*/
function twentyeleven_url_grabber() {
if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) )
return false;
return esc_url_raw( $matches[1] );
}
/**
* Count the number of footer sidebars to enable dynamic classes for the footer.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_footer_sidebar_class() {
$count = 0;
if ( is_active_sidebar( 'sidebar-3' ) )
$count++;
if ( is_active_sidebar( 'sidebar-4' ) )
$count++;
if ( is_active_sidebar( 'sidebar-5' ) )
$count++;
$class = '';
switch ( $count ) {
case '1':
$class = 'one';
break;
case '2':
$class = 'two';
break;
case '3':
$class = 'three';
break;
}
if ( $class )
echo 'class="' . esc_attr( $class ) . '"';
}
if ( ! function_exists( 'twentyeleven_comment' ) ) :
/**
* Template for comments and pingbacks.
*
* To override this walker in a child theme without modifying the comments template
* simply create your own twentyeleven_comment(), and that function will be used instead.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @since Twenty Eleven 1.0
*
* @param object $comment The comment object.
* @param array $args An array of comment arguments. @see get_comment_reply_link()
* @param int $depth The depth of the comment.
*/
function twentyeleven_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case 'pingback' :
case 'trackback' :
?>
<li class="post pingback">
<p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?></p>
<?php
break;
default :
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<article id="comment-<?php comment_ID(); ?>" class="comment">
<footer class="comment-meta">
<div class="comment-author vcard">
<?php
$avatar_size = 68;
if ( '0' != $comment->comment_parent )
$avatar_size = 39;
echo get_avatar( $comment, $avatar_size );
/* translators: 1: comment author, 2: date and time */
printf( __( '%1$s on %2$s <span class="says">said:</span>', 'twentyeleven' ),
sprintf( '<span class="fn">%s</span>', get_comment_author_link() ),
sprintf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
esc_url( get_comment_link( $comment->comment_ID ) ),
get_comment_time( 'c' ),
/* translators: 1: date, 2: time */
sprintf( __( '%1$s at %2$s', 'twentyeleven' ), get_comment_date(), get_comment_time() )
)
);
?>
<?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .comment-author .vcard -->
<?php if ( $comment->comment_approved == '0' ) : ?>
<em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>
<br />
<?php endif; ?>
</footer>
<div class="comment-content"><?php comment_text(); ?></div>
<div class="reply">
<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
</div><!-- .reply -->
</article><!-- #comment-## -->
<?php
break;
endswitch;
}
endif; // ends check for twentyeleven_comment()
if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
/**
* Print HTML with meta information for the current post-date/time and author.
*
* Create your own twentyeleven_posted_on to override in a child theme
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_posted_on() {
printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
get_the_author()
);
}
endif;
/**
* Add two classes to the array of body classes.
*
* The first is if the site has only had one author with published posts.
* The second is if a singular post being displayed
*
* @since Twenty Eleven 1.0
*
* @param array $classes Existing body classes.
* @return array The filtered array of body classes.
*/
function twentyeleven_body_classes( $classes ) {
if ( function_exists( 'is_multi_author' ) && ! is_multi_author() )
$classes[] = 'single-author';
if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )
$classes[] = 'singular';
return $classes;
}
add_filter( 'body_class', 'twentyeleven_body_classes' );
/**
* Retrieve the IDs for images in a gallery.
*
* @uses get_post_galleries() First, if available. Falls back to shortcode parsing,
* then as last option uses a get_posts() call.
*
* @since Twenty Eleven 1.6
*
* @return array List of image IDs from the post gallery.
*/
function twentyeleven_get_gallery_images() {
$images = array();
if ( function_exists( 'get_post_galleries' ) ) {
$galleries = get_post_galleries( get_the_ID(), false );
if ( isset( $galleries[0]['ids'] ) )
$images = explode( ',', $galleries[0]['ids'] );
} else {
$pattern = get_shortcode_regex();
preg_match( "/$pattern/s", get_the_content(), $match );
$atts = shortcode_parse_atts( $match[3] );
if ( isset( $atts['ids'] ) )
$images = explode( ',', $atts['ids'] );
}
if ( ! $images ) {
$images = get_posts( array(
'fields' => 'ids',
'numberposts' => 999,
'order' => 'ASC',
'orderby' => 'menu_order',
'post_mime_type' => 'image',
'post_parent' => get_the_ID(),
'post_type' => 'attachment',
) );
}
return $images;
}

View file

@ -0,0 +1,145 @@
<?php
/**
* Header template for the theme
*
* Displays all of the <head> section and everything up till <div id="main">.
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) & !(IE 7) & !(IE 8)]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php
// Print the <title> tag based on what is being viewed.
global $page, $paged;
wp_title( '|', true, 'right' );
// Add the blog name.
bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
// Add a page number if necessary:
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ) );
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php
/*
* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/*
* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
wp_head();
?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed">
<header id="branding" role="banner">
<hgroup>
<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
</hgroup>
<?php
// Check to see if the header image has been removed
$header_image = get_header_image();
if ( $header_image ) :
// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
/*
* We need to figure out what the minimum width should be for our featured image.
* This result would be the suggested width if the theme were to implement flexible widths.
*/
$header_image_width = get_theme_support( 'custom-header', 'width' );
} else {
$header_image_width = HEADER_IMAGE_WIDTH;
}
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<?php
/*
* The header image.
* Check if this is a post or page, if it has a thumbnail, and if it's a big one
*/
if ( is_singular() && has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) &&
$image[1] >= $header_image_width ) :
// Houston, we have a new header image!
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
else :
// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
$header_image_width = get_custom_header()->width;
$header_image_height = get_custom_header()->height;
} else {
$header_image_width = HEADER_IMAGE_WIDTH;
$header_image_height = HEADER_IMAGE_HEIGHT;
}
?>
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
<?php endif; // end check for featured image or standard header ?>
</a>
<?php endif; // end check for removed header image ?>
<?php
// Has the text been hidden?
if ( 'blank' == get_header_textcolor() ) :
?>
<div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>">
<?php get_search_form(); ?>
</div>
<?php
else :
?>
<?php get_search_form(); ?>
<?php endif; ?>
<nav id="access" role="navigation">
<h3 class="assistive-text"><?php _e( 'Main menu', 'twentyeleven' ); ?></h3>
<?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
<div class="skip-link"><a class="assistive-text" href="#content"><?php _e( 'Skip to primary content', 'twentyeleven' ); ?></a></div>
<?php if ( ! is_singular() ) : ?>
<div class="skip-link"><a class="assistive-text" href="#secondary"><?php _e( 'Skip to secondary content', 'twentyeleven' ); ?></a></div>
<?php endif; ?>
<?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assigned to the primary location is the one used. If one isn't assigned, the menu with the lowest ID is used. */ ?>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- #access -->
</header><!-- #branding -->
<div id="main">

View file

@ -0,0 +1,112 @@
<?php
/**
* Template for displaying image attachments
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
get_header(); ?>
<div id="primary" class="image-attachment">
<div id="content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<nav id="nav-single">
<h3 class="assistive-text"><?php _e( 'Image navigation', 'twentyeleven' ); ?></h3>
<span class="nav-previous"><?php previous_image_link( false, __( '&larr; Previous' , 'twentyeleven' ) ); ?></span>
<span class="nav-next"><?php next_image_link( false, __( 'Next &rarr;' , 'twentyeleven' ) ); ?></span>
</nav><!-- #nav-single -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php
$metadata = wp_get_attachment_metadata();
printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>', 'twentyeleven' ),
esc_attr( get_the_time() ),
get_the_date(),
esc_url( wp_get_attachment_url() ),
$metadata['width'],
$metadata['height'],
esc_url( get_permalink( $post->post_parent ) ),
esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ),
get_the_title( $post->post_parent )
);
?>
<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content">
<div class="entry-attachment">
<div class="attachment">
<?php
/*
* Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
* or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
*/
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
foreach ( $attachments as $k => $attachment ) {
if ( $attachment->ID == $post->ID )
break;
}
// If there is more than 1 attachment in a gallery
if ( count( $attachments ) > 1 ) {
$k++;
if ( isset( $attachments[ $k ] ) )
// get the URL of the next image attachment
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else
// or get the URL of the first image attachment
$next_attachment_url = get_attachment_link( $attachments[0]->ID );
} else {
// or, if there's only 1 image, get the URL of the image
$next_attachment_url = wp_get_attachment_url();
}
?>
<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
/**
* Filter the Twenty Eleven default attachment size.
*
* @since Twenty Eleven 1.0
*
* @param int The height and width attachment size dimensions in pixels. Default 848.
*/
$attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 );
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
?></a>
<?php if ( ! empty( $post->post_excerpt ) ) : ?>
<div class="entry-caption">
<?php the_excerpt(); ?>
</div>
<?php endif; ?>
</div><!-- .attachment -->
</div><!-- .entry-attachment -->
<div class="entry-description">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
</div><!-- .entry-description -->
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php comments_template(); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

View file

@ -0,0 +1,30 @@
( function( $ ){
wp.customize( 'blogname', function( value ) {
value.bind( function( to ) {
$( '#site-title a' ).text( to );
} );
} );
wp.customize( 'blogdescription', function( value ) {
value.bind( function( to ) {
$( '#site-description' ).text( to );
} );
} );
// Header text color
wp.customize( 'header_textcolor', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( '#site-title, #site-title a, #site-description' ).css( {
'clip': 'rect(1px, 1px, 1px, 1px)',
'position': 'absolute'
} );
} else {
$( '#site-title, #site-title a, #site-description' ).css( {
'clip': 'auto',
'color': to,
'position': 'relative'
} );
}
} );
} );
} )( jQuery );

View file

@ -0,0 +1,35 @@
#wpcontent select option {
padding-right: 5px;
}
.image-radio-option td {
padding-top: 15px;
}
.image-radio-option label {
display: block;
float: left;
margin: 0 30px 20px 2px;
position: relative;
}
.image-radio-option input {
margin: 0 0 10px;
}
.image-radio-option span {
display: block;
width: 136px;
}
.image-radio-option img {
margin: 0 0 0 -2px;
}
#link-color-example {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
border: 1px solid #dfdfdf;
margin: 0 7px 0 3px;
padding: 4px 14px;
}
body.rtl .image-radio-option label {
float: right;
margin: 0 2px 20px 30px;
}

View file

@ -0,0 +1,52 @@
var farbtastic;
(function($){
var pickColor = function(a) {
farbtastic.setColor(a);
$('#link-color').val(a);
$('#link-color-example').css('background-color', a);
};
$(document).ready( function() {
$('#default-color').wrapInner('<a href="#" />');
farbtastic = $.farbtastic('#colorPickerDiv', pickColor);
pickColor( $('#link-color').val() );
$('.pickcolor').click( function(e) {
$('#colorPickerDiv').show();
e.preventDefault();
});
$('#link-color').keyup( function() {
var a = $('#link-color').val(),
b = a;
a = a.replace(/[^a-fA-F0-9]/, '');
if ( '#' + a !== b )
$('#link-color').val(a);
if ( a.length === 3 || a.length === 6 )
pickColor( '#' + a );
});
$(document).mousedown( function() {
$('#colorPickerDiv').hide();
});
$('#default-color a').click( function(e) {
pickColor( '#' + this.innerHTML.replace(/[^a-fA-F0-9]/, '') );
e.preventDefault();
});
$('.image-radio-option.color-scheme input:radio').change( function() {
var currentDefault = $('#default-color a'),
newDefault = $(this).next().val();
if ( $('#link-color').val() == currentDefault.text() )
pickColor( newDefault );
currentDefault.text( newDefault );
});
});
})(jQuery);

View file

@ -0,0 +1,587 @@
<?php
/**
* Twenty Eleven Theme Options
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
/**
* Properly enqueue styles and scripts for our theme options page.
*
* This function is attached to the admin_enqueue_scripts action hook.
*
* @since Twenty Eleven 1.0
*
* @param string $hook_suffix An admin page's hook suffix.
*/
function twentyeleven_admin_enqueue_scripts( $hook_suffix ) {
wp_enqueue_style( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.css', false, '2011-04-28' );
wp_enqueue_script( 'twentyeleven-theme-options', get_template_directory_uri() . '/inc/theme-options.js', array( 'farbtastic' ), '2011-06-10' );
wp_enqueue_style( 'farbtastic' );
}
add_action( 'admin_print_styles-appearance_page_theme_options', 'twentyeleven_admin_enqueue_scripts' );
/**
* Register the form setting for our twentyeleven_options array.
*
* This function is attached to the admin_init action hook.
*
* This call to register_setting() registers a validation callback, twentyeleven_theme_options_validate(),
* which is used when the option is saved, to ensure that our option values are complete, properly
* formatted, and safe.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_theme_options_init() {
register_setting(
'twentyeleven_options', // Options group, see settings_fields() call in twentyeleven_theme_options_render_page()
'twentyeleven_theme_options', // Database option, see twentyeleven_get_theme_options()
'twentyeleven_theme_options_validate' // The sanitization callback, see twentyeleven_theme_options_validate()
);
// Register our settings field group
add_settings_section(
'general', // Unique identifier for the settings section
'', // Section title (we don't want one)
'__return_false', // Section callback (we don't want anything)
'theme_options' // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page()
);
// Register our individual settings fields
add_settings_field(
'color_scheme', // Unique identifier for the field for this section
__( 'Color Scheme', 'twentyeleven' ), // Setting field label
'twentyeleven_settings_field_color_scheme', // Function that renders the settings field
'theme_options', // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page()
'general' // Settings section. Same as the first argument in the add_settings_section() above
);
add_settings_field( 'link_color', __( 'Link Color', 'twentyeleven' ), 'twentyeleven_settings_field_link_color', 'theme_options', 'general' );
add_settings_field( 'layout', __( 'Default Layout', 'twentyeleven' ), 'twentyeleven_settings_field_layout', 'theme_options', 'general' );
}
add_action( 'admin_init', 'twentyeleven_theme_options_init' );
/**
* Change the capability required to save the 'twentyeleven_options' options group.
*
* @see twentyeleven_theme_options_init() First parameter to register_setting() is the name of the options group.
* @see twentyeleven_theme_options_add_page() The edit_theme_options capability is used for viewing the page.
*
* By default, the options groups for all registered settings require the manage_options capability.
* This filter is required to change our theme options page to edit_theme_options instead.
* By default, only administrators have either of these capabilities, but the desire here is
* to allow for finer-grained control for roles and users.
*
* @param string $capability The capability used for the page, which is manage_options by default.
* @return string The capability to actually use.
*/
function twentyeleven_option_page_capability( $capability ) {
return 'edit_theme_options';
}
add_filter( 'option_page_capability_twentyeleven_options', 'twentyeleven_option_page_capability' );
/**
* Add a theme options page to the admin menu, including some help documentation.
*
* This function is attached to the admin_menu action hook.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_theme_options_add_page() {
$theme_page = add_theme_page(
__( 'Theme Options', 'twentyeleven' ), // Name of page
__( 'Theme Options', 'twentyeleven' ), // Label in menu
'edit_theme_options', // Capability required
'theme_options', // Menu slug, used to uniquely identify the page
'twentyeleven_theme_options_render_page' // Function that renders the options page
);
if ( ! $theme_page )
return;
add_action( "load-$theme_page", 'twentyeleven_theme_options_help' );
}
add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
function twentyeleven_theme_options_help() {
$help = '<p>' . __( 'Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:', 'twentyeleven' ) . '</p>' .
'<ol>' .
'<li>' . __( '<strong>Color Scheme</strong>: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'twentyeleven' ) . '</li>' .
'<li>' . __( '<strong>Link Color</strong>: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'twentyeleven' ) . '</li>' .
'<li>' . __( '<strong>Default Layout</strong>: You can choose if you want your site&#8217;s default layout to have a sidebar on the left, the right, or not at all.', 'twentyeleven' ) . '</li>' .
'</ol>' .
'<p>' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven' ) . '</p>';
$sidebar = '<p><strong>' . __( 'For more information:', 'twentyeleven' ) . '</strong></p>' .
'<p>' . __( '<a href="https://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven' ) . '</p>' .
'<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>', 'twentyeleven' ) . '</p>';
$screen = get_current_screen();
if ( method_exists( $screen, 'add_help_tab' ) ) {
// WordPress 3.3.0
$screen->add_help_tab( array(
'title' => __( 'Overview', 'twentyeleven' ),
'id' => 'theme-options-help',
'content' => $help,
)
);
$screen->set_help_sidebar( $sidebar );
} else {
// WordPress 3.2.0
add_contextual_help( $screen, $help . $sidebar );
}
}
/**
* Return an array of color schemes registered for Twenty Eleven.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_color_schemes() {
$color_scheme_options = array(
'light' => array(
'value' => 'light',
'label' => __( 'Light', 'twentyeleven' ),
'thumbnail' => get_template_directory_uri() . '/inc/images/light.png',
'default_link_color' => '#1b8be0',
),
'dark' => array(
'value' => 'dark',
'label' => __( 'Dark', 'twentyeleven' ),
'thumbnail' => get_template_directory_uri() . '/inc/images/dark.png',
'default_link_color' => '#e4741f',
),
);
/**
* Filter the Twenty Eleven color scheme options.
*
* @since Twenty Eleven 1.0
*
* @param array $color_scheme_options An associative array of color scheme options.
*/
return apply_filters( 'twentyeleven_color_schemes', $color_scheme_options );
}
/**
* Return an array of layout options registered for Twenty Eleven.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_layouts() {
$layout_options = array(
'content-sidebar' => array(
'value' => 'content-sidebar',
'label' => __( 'Content on left', 'twentyeleven' ),
'thumbnail' => get_template_directory_uri() . '/inc/images/content-sidebar.png',
),
'sidebar-content' => array(
'value' => 'sidebar-content',
'label' => __( 'Content on right', 'twentyeleven' ),
'thumbnail' => get_template_directory_uri() . '/inc/images/sidebar-content.png',
),
'content' => array(
'value' => 'content',
'label' => __( 'One-column, no sidebar', 'twentyeleven' ),
'thumbnail' => get_template_directory_uri() . '/inc/images/content.png',
),
);
/**
* Filter the Twenty Eleven layout options.
*
* @since Twenty Eleven 1.0
*
* @param array $layout_options An associative array of layout options.
*/
return apply_filters( 'twentyeleven_layouts', $layout_options );
}
/**
* Return the default options for Twenty Eleven.
*
* @since Twenty Eleven 1.0
*
* @return array An array of default theme options.
*/
function twentyeleven_get_default_theme_options() {
$default_theme_options = array(
'color_scheme' => 'light',
'link_color' => twentyeleven_get_default_link_color( 'light' ),
'theme_layout' => 'content-sidebar',
);
if ( is_rtl() )
$default_theme_options['theme_layout'] = 'sidebar-content';
/**
* Filter the Twenty Eleven default options.
*
* @since Twenty Eleven 1.0
*
* @param array $default_theme_options An array of default theme options.
*/
return apply_filters( 'twentyeleven_default_theme_options', $default_theme_options );
}
/**
* Return the default link color for Twenty Eleven, based on color scheme.
*
* @since Twenty Eleven 1.0
*
* @param string $color_scheme Optional. Color scheme.
* Default null (or the active color scheme).
* @return string The default link color.
*/
function twentyeleven_get_default_link_color( $color_scheme = null ) {
if ( null === $color_scheme ) {
$options = twentyeleven_get_theme_options();
$color_scheme = $options['color_scheme'];
}
$color_schemes = twentyeleven_color_schemes();
if ( ! isset( $color_schemes[ $color_scheme ] ) )
return false;
return $color_schemes[ $color_scheme ]['default_link_color'];
}
/**
* Return the options array for Twenty Eleven.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_get_theme_options() {
return get_option( 'twentyeleven_theme_options', twentyeleven_get_default_theme_options() );
}
/**
* Render the Color Scheme setting field.
*
* @since Twenty Eleven 1.3
*/
function twentyeleven_settings_field_color_scheme() {
$options = twentyeleven_get_theme_options();
foreach ( twentyeleven_color_schemes() as $scheme ) {
?>
<div class="layout image-radio-option color-scheme">
<label class="description">
<input type="radio" name="twentyeleven_theme_options[color_scheme]" value="<?php echo esc_attr( $scheme['value'] ); ?>" <?php checked( $options['color_scheme'], $scheme['value'] ); ?> />
<input type="hidden" id="default-color-<?php echo esc_attr( $scheme['value'] ); ?>" value="<?php echo esc_attr( $scheme['default_link_color'] ); ?>" />
<span>
<img src="<?php echo esc_url( $scheme['thumbnail'] ); ?>" width="136" height="122" alt="" />
<?php echo esc_html( $scheme['label'] ); ?>
</span>
</label>
</div>
<?php
}
}
/**
* Render the Link Color setting field.
*
* @since Twenty Eleven 1.3
*/
function twentyeleven_settings_field_link_color() {
$options = twentyeleven_get_theme_options();
?>
<input type="text" name="twentyeleven_theme_options[link_color]" id="link-color" value="<?php echo esc_attr( $options['link_color'] ); ?>" />
<a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a>
<input type="button" class="pickcolor button hide-if-no-js" value="<?php esc_attr_e( 'Select a Color', 'twentyeleven' ); ?>" />
<div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
<br />
<span><?php printf( __( 'Default color: %s', 'twentyeleven' ), '<span id="default-color">' . twentyeleven_get_default_link_color( $options['color_scheme'] ) . '</span>' ); ?></span>
<?php
}
/**
* Render the Layout setting field.
*
* @since Twenty Eleven 1.3
*/
function twentyeleven_settings_field_layout() {
$options = twentyeleven_get_theme_options();
foreach ( twentyeleven_layouts() as $layout ) {
?>
<div class="layout image-radio-option theme-layout">
<label class="description">
<input type="radio" name="twentyeleven_theme_options[theme_layout]" value="<?php echo esc_attr( $layout['value'] ); ?>" <?php checked( $options['theme_layout'], $layout['value'] ); ?> />
<span>
<img src="<?php echo esc_url( $layout['thumbnail'] ); ?>" width="136" height="122" alt="" />
<?php echo esc_html( $layout['label'] ); ?>
</span>
</label>
</div>
<?php
}
}
/**
* Render the theme options page for Twenty Eleven.
*
* @since Twenty Eleven 1.2
*/
function twentyeleven_theme_options_render_page() {
?>
<div class="wrap">
<?php screen_icon(); ?>
<?php $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme(); ?>
<h2><?php printf( __( '%s Theme Options', 'twentyeleven' ), $theme_name ); ?></h2>
<?php settings_errors(); ?>
<form method="post" action="options.php">
<?php
settings_fields( 'twentyeleven_options' );
do_settings_sections( 'theme_options' );
submit_button();
?>
</form>
</div>
<?php
}
/**
* Sanitize and validate form input.
*
* Accepts an array, return a sanitized array.
*
* @see twentyeleven_theme_options_init()
* @todo set up Reset Options action
*
* @since Twenty Eleven 1.0
*
* @param array $input An array of form input.
*/
function twentyeleven_theme_options_validate( $input ) {
$output = $defaults = twentyeleven_get_default_theme_options();
// Color scheme must be in our array of color scheme options
if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], twentyeleven_color_schemes() ) )
$output['color_scheme'] = $input['color_scheme'];
// Our defaults for the link color may have changed, based on the color scheme.
$output['link_color'] = $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] );
// Link color must be 3 or 6 hexadecimal characters
if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) )
$output['link_color'] = '#' . strtolower( ltrim( $input['link_color'], '#' ) );
// Theme layout must be in our array of theme layout options
if ( isset( $input['theme_layout'] ) && array_key_exists( $input['theme_layout'], twentyeleven_layouts() ) )
$output['theme_layout'] = $input['theme_layout'];
/**
* Filter the Twenty Eleven sanitized form input array.
*
* @since Twenty Eleven 1.0
*
* @param array $output An array of sanitized form output.
* @param array $input An array of un-sanitized form input.
* @param array $defaults An array of default theme options.
*/
return apply_filters( 'twentyeleven_theme_options_validate', $output, $input, $defaults );
}
/**
* Enqueue the styles for the current color scheme.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_enqueue_color_scheme() {
$options = twentyeleven_get_theme_options();
$color_scheme = $options['color_scheme'];
if ( 'dark' == $color_scheme )
wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null );
/**
* Fires after the styles for the Twenty Eleven color scheme are enqueued.
*
* @since Twenty Eleven 1.0
*
* @param string $color_scheme The color scheme.
*/
do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme );
}
add_action( 'wp_enqueue_scripts', 'twentyeleven_enqueue_color_scheme' );
/**
* Add a style block to the theme for the current link color.
*
* This function is attached to the wp_head action hook.
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_print_link_color_style() {
$options = twentyeleven_get_theme_options();
$link_color = $options['link_color'];
$default_options = twentyeleven_get_default_theme_options();
// Don't do anything if the current link color is the default.
if ( $default_options['link_color'] == $link_color )
return;
?>
<style>
/* Link color */
a,
#site-title a:focus,
#site-title a:hover,
#site-title a:active,
.entry-title a:hover,
.entry-title a:focus,
.entry-title a:active,
.widget_twentyeleven_ephemera .comments-link a:hover,
section.recent-posts .other-recent-posts a[rel="bookmark"]:hover,
section.recent-posts .other-recent-posts .comments-link a:hover,
.format-image footer.entry-meta a:hover,
#site-generator a:hover {
color: <?php echo $link_color; ?>;
}
section.recent-posts .other-recent-posts .comments-link a:hover {
border-color: <?php echo $link_color; ?>;
}
article.feature-image.small .entry-summary p a:hover,
.entry-header .comments-link a:hover,
.entry-header .comments-link a:focus,
.entry-header .comments-link a:active,
.feature-slider a.active {
background-color: <?php echo $link_color; ?>;
}
</style>
<?php
}
add_action( 'wp_head', 'twentyeleven_print_link_color_style' );
/**
* Add Twenty Eleven layout classes to the array of body classes.
*
* @since Twenty Eleven 1.0
*
* @param array $existing_classes An array of existing body classes.
*/
function twentyeleven_layout_classes( $existing_classes ) {
$options = twentyeleven_get_theme_options();
$current_layout = $options['theme_layout'];
if ( in_array( $current_layout, array( 'content-sidebar', 'sidebar-content' ) ) )
$classes = array( 'two-column' );
else
$classes = array( 'one-column' );
if ( 'content-sidebar' == $current_layout )
$classes[] = 'right-sidebar';
elseif ( 'sidebar-content' == $current_layout )
$classes[] = 'left-sidebar';
else
$classes[] = $current_layout;
/**
* Filter the Twenty Eleven layout body classes.
*
* @since Twenty Eleven 1.0
*
* @param array $classes An array of body classes.
* @param string $current_layout The current theme layout.
*/
$classes = apply_filters( 'twentyeleven_layout_classes', $classes, $current_layout );
return array_merge( $existing_classes, $classes );
}
add_filter( 'body_class', 'twentyeleven_layout_classes' );
/**
* Implements Twenty Eleven theme options into Customizer
*
* @since Twenty Eleven 1.3
*
* @param object $wp_customize Customizer object.
*/
function twentyeleven_customize_register( $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
$options = twentyeleven_get_theme_options();
$defaults = twentyeleven_get_default_theme_options();
$wp_customize->add_setting( 'twentyeleven_theme_options[color_scheme]', array(
'default' => $defaults['color_scheme'],
'type' => 'option',
'capability' => 'edit_theme_options',
) );
$schemes = twentyeleven_color_schemes();
$choices = array();
foreach ( $schemes as $scheme ) {
$choices[ $scheme['value'] ] = $scheme['label'];
}
$wp_customize->add_control( 'twentyeleven_color_scheme', array(
'label' => __( 'Color Scheme', 'twentyeleven' ),
'section' => 'colors',
'settings' => 'twentyeleven_theme_options[color_scheme]',
'type' => 'radio',
'choices' => $choices,
'priority' => 5,
) );
// Link Color (added to Color Scheme section in Customizer)
$wp_customize->add_setting( 'twentyeleven_theme_options[link_color]', array(
'default' => twentyeleven_get_default_link_color( $options['color_scheme'] ),
'type' => 'option',
'sanitize_callback' => 'sanitize_hex_color',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(
'label' => __( 'Link Color', 'twentyeleven' ),
'section' => 'colors',
'settings' => 'twentyeleven_theme_options[link_color]',
) ) );
// Default Layout
$wp_customize->add_section( 'twentyeleven_layout', array(
'title' => __( 'Layout', 'twentyeleven' ),
'priority' => 50,
) );
$wp_customize->add_setting( 'twentyeleven_theme_options[theme_layout]', array(
'type' => 'option',
'default' => $defaults['theme_layout'],
'sanitize_callback' => 'sanitize_key',
) );
$layouts = twentyeleven_layouts();
$choices = array();
foreach ( $layouts as $layout ) {
$choices[ $layout['value'] ] = $layout['label'];
}
$wp_customize->add_control( 'twentyeleven_theme_options[theme_layout]', array(
'section' => 'twentyeleven_layout',
'type' => 'radio',
'choices' => $choices,
) );
}
add_action( 'customize_register', 'twentyeleven_customize_register' );
/**
* Bind JS handlers to make Customizer preview reload changes asynchronously.
*
* Used with blogname and blogdescription.
*
* @since Twenty Eleven 1.3
*/
function twentyeleven_customize_preview_js() {
wp_enqueue_script( 'twentyeleven-customizer', get_template_directory_uri() . '/inc/theme-customizer.js', array( 'customize-preview' ), '20150401', true );
}
add_action( 'customize_preview_init', 'twentyeleven_customize_preview_js' );

View file

@ -0,0 +1,174 @@
<?php
/**
* Widget For displaying post format posts
*
* Handles displaying Aside, Link, Status, and Quote Posts available with Twenty Eleven.
*
* @link https://codex.wordpress.org/Widgets_API#Developing_Widgets
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
/**
* Constructor
*
* @since Twenty Eleven 1.0
**/
function Twenty_Eleven_Ephemera_Widget() {
$widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ) );
$this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops );
$this->alt_option_name = 'widget_twentyeleven_ephemera';
add_action( 'save_post', array( &$this, 'flush_widget_cache' ) );
add_action( 'deleted_post', array( &$this, 'flush_widget_cache' ) );
add_action( 'switch_theme', array( &$this, 'flush_widget_cache' ) );
}
/**
* Outputs the HTML for this widget.
*
* @since Twenty Eleven 1.0
*
* @param array $args An array of standard parameters for widgets in this theme.
* @param array $instance An array of settings for this widget instance.
**/
function widget( $args, $instance ) {
$cache = wp_cache_get( 'widget_twentyeleven_ephemera', 'widget' );
if ( ! is_array( $cache ) )
$cache = array();
if ( ! isset( $args['widget_id'] ) )
$args['widget_id'] = null;
if ( isset( $cache[ $args['widget_id'] ] ) ) {
echo $cache[ $args['widget_id'] ];
return;
}
ob_start();
extract( $args, EXTR_SKIP );
/** This filter is documented in wp-includes/default-widgets.php */
$args['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base );
if ( ! isset( $instance['number'] ) )
$instance['number'] = '10';
if ( ! $args['number'] = absint( $instance['number'] ) )
$args['number'] = 10;
$ephemera_args = array(
'order' => 'DESC',
'posts_per_page' => $args['number'],
'no_found_rows' => true,
'post_status' => 'publish',
'post__not_in' => get_option( 'sticky_posts' ),
'tax_query' => array(
array(
'taxonomy' => 'post_format',
'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-status', 'post-format-quote' ),
'field' => 'slug',
'operator' => 'IN',
),
),
);
$ephemera = new WP_Query( $ephemera_args );
if ( $ephemera->have_posts() ) :
echo $args['before_widget'];
echo $args['before_title'];
echo $args['title'];
echo $args['after_title'];
?>
<ol>
<?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?>
<?php if ( 'link' != get_post_format() ) : ?>
<li class="widget-entry-title">
<a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark"><?php the_title(); ?></a>
<span class="comments-link">
<?php comments_popup_link( __( '0 <span class="reply">comments &rarr;</span>', 'twentyeleven' ), __( '1 <span class="reply">comment &rarr;</span>', 'twentyeleven' ), __( '% <span class="reply">comments &rarr;</span>', 'twentyeleven' ) ); ?>
</span>
</li>
<?php else : ?>
<li class="widget-entry-title">
<a href="<?php echo esc_url( twentyeleven_get_first_url() ); ?>" rel="bookmark"><?php the_title(); ?>&nbsp;<span>&rarr;</span></a>
<span class="comments-link">
<?php comments_popup_link( __( '0 <span class="reply">comments &rarr;</span>', 'twentyeleven' ), __( '1 <span class="reply">comment &rarr;</span>', 'twentyeleven' ), __( '% <span class="reply">comments &rarr;</span>', 'twentyeleven' ) ); ?>
</span>
</li>
<?php endif; ?>
<?php endwhile; ?>
</ol>
<?php
echo $args['after_widget'];
// Reset the post globals as this query will have stomped on it
wp_reset_postdata();
// end check for ephemeral posts
endif;
$cache[ $args['widget_id'] ] = ob_get_flush();
wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' );
}
/**
* Update widget settings.
*
* Deals with the settings when they are saved by the admin. Here is
* where any validation should be dealt with.
*
* @since Twenty Eleven 1.0
**/
function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = strip_tags( $new_instance['title'] );
$instance['number'] = (int) $new_instance['number'];
$this->flush_widget_cache();
$alloptions = wp_cache_get( 'alloptions', 'options' );
if ( isset( $alloptions['widget_twentyeleven_ephemera'] ) )
delete_option( 'widget_twentyeleven_ephemera' );
return $instance;
}
/**
* Flush widget cache.
*
* @since Twenty Eleven 1.0
*/
function flush_widget_cache() {
wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' );
}
/**
* Set up the widget form.
*
* Displays the form for this widget on the Widgets page of the WP Admin area.
*
* @since Twenty Eleven 1.0
**/
function form( $instance ) {
$title = isset( $instance['title']) ? esc_attr( $instance['title'] ) : '';
$number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 10;
?>
<p><label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'twentyeleven' ); ?></label>
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
<p><label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php _e( 'Number of posts to show:', 'twentyeleven' ); ?></label>
<input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo esc_attr( $number ); ?>" size="3" /></p>
<?php
}
}

View file

@ -0,0 +1,52 @@
<?php
/**
* Main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Eleven
*/
get_header(); ?>
<div id="primary">
<div id="content" role="main">
<?php if ( have_posts() ) : ?>
<?php twentyeleven_content_nav( 'nav-above' ); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
<?php twentyeleven_content_nav( 'nav-below' ); ?>
<?php else : ?>
<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<?php endif; ?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

View file

@ -0,0 +1,8 @@
/*
HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);
if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);

View file

@ -0,0 +1,17 @@
(function($) {
$(document).ready( function() {
$('.feature-slider a').click(function(e) {
$('.featured-posts section.featured-post').css({
opacity: 0,
visibility: 'hidden'
});
$(this.hash).css({
opacity: 1,
visibility: 'visible'
});
$('.feature-slider a').removeClass('active');
$(this).addClass('active');
e.preventDefault();
});
});
})(jQuery);

View file

@ -0,0 +1,655 @@
# Copyright (C) 2015 the WordPress team
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Eleven 2.1\n"
"Report-Msgid-Bugs-To: http://wordpress.org/support/theme/twentyeleven\n"
"POT-Creation-Date: 2015-04-21 12:33:58+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: 404.php:17
msgid "This is somewhat embarrassing, isn&rsquo;t it?"
msgstr ""
#: 404.php:21
msgid ""
"It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps "
"searching, or one of the links below, can help."
msgstr ""
#: 404.php:28
msgid "Most Used Categories"
msgstr ""
#. translators: %1$s: smilie
#: 404.php:36
msgid "Try looking in the monthly archives. %1$s"
msgstr ""
#: archive.php:25
msgid "Daily Archives: %s"
msgstr ""
#: archive.php:27
msgid "Monthly Archives: %s"
msgstr ""
#: archive.php:27
msgctxt "monthly archives date format"
msgid "F Y"
msgstr ""
#: archive.php:29
msgid "Yearly Archives: %s"
msgstr ""
#: archive.php:29
msgctxt "yearly archives date format"
msgid "Y"
msgstr ""
#: archive.php:31
msgid "Blog Archives"
msgstr ""
#: archive.php:57 author.php:86 category.php:59 index.php:37 search.php:44
#: tag.php:60
msgid "Nothing Found"
msgstr ""
#: archive.php:61 author.php:90 category.php:63 index.php:41 tag.php:64
msgid ""
"Apologies, but no results were found for the requested archive. Perhaps "
"searching will help find a related post."
msgstr ""
#: author.php:29
msgid "Author Archives: %s"
msgstr ""
#: author.php:60 content-single.php:63
msgid "About %s"
msgstr ""
#: category.php:19
msgid "Category Archives: %s"
msgstr ""
#: comments.php:17
msgid ""
"This post is password protected. Enter the password to view any comments."
msgstr ""
#: comments.php:34
msgid "One thought on &ldquo;%2$s&rdquo;"
msgid_plural "%1$s thoughts on &ldquo;%2$s&rdquo;"
msgstr[0] ""
msgstr[1] ""
#: comments.php:41 comments.php:62
msgid "Comment navigation"
msgstr ""
#: comments.php:42 comments.php:63
msgid "&larr; Older Comments"
msgstr ""
#: comments.php:43 comments.php:64
msgid "Newer Comments &rarr;"
msgstr ""
#: comments.php:74
msgid "Comments are closed."
msgstr ""
#: content-aside.php:19
msgid "Aside"
msgstr ""
#: content-aside.php:24 content-image.php:23 content-link.php:24
#: content-quote.php:24 content-status.php:24 content.php:30
msgid "Reply"
msgstr ""
#: content-aside.php:24 content-image.php:23 content-link.php:24
#: content-quote.php:24 content-status.php:24 content.php:30
msgctxt "comments number"
msgid "1"
msgstr ""
#: content-aside.php:24 content-image.php:23 content-link.php:24
#: content-quote.php:24 content-status.php:24 content.php:30
msgctxt "comments number"
msgid "%"
msgstr ""
#: content-aside.php:35 content-gallery.php:34 content-image.php:29
#: content-link.php:35 content-quote.php:35 content-status.php:48
#: content.php:41 functions.php:375
msgid "Continue reading <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: content-aside.php:36 content-featured.php:23 content-gallery.php:52
#: content-image.php:30 content-intro.php:18 content-link.php:36
#: content-page.php:18 content-quote.php:36 content-single.php:24
#: content-status.php:49 content.php:42 image.php:98
msgid "Pages:"
msgstr ""
#: content-aside.php:44 content-gallery.php:85 content-image.php:66
#: content-link.php:44 content-quote.php:69 content-status.php:57
#: content.php:79 showcase.php:202
msgid "Leave a reply"
msgstr ""
#: content-aside.php:44 content-gallery.php:85 content-image.php:66
#: content-link.php:44 content-quote.php:69 content-status.php:57
#: content.php:79 showcase.php:202
msgid "<b>1</b> Reply"
msgstr ""
#: content-aside.php:44 content-gallery.php:85 content-image.php:66
#: content-link.php:44 content-quote.php:69 content-status.php:57
#: content.php:79 showcase.php:202
msgid "<b>%</b> Replies"
msgstr ""
#: content-aside.php:46 content-featured.php:45 content-gallery.php:88
#: content-image.php:70 content-intro.php:19 content-link.php:46
#: content-page.php:21 content-quote.php:72 content-single.php:52
#: content-status.php:59 content.php:82 functions.php:609 functions.php:637
#: image.php:41
msgid "Edit"
msgstr ""
#. translators: used between list items, there is a space after the comma
#: content-featured.php:29 content-featured.php:38 content-gallery.php:60
#: content-gallery.php:70 content-image.php:49 content-image.php:58
#: content-quote.php:44 content-quote.php:54 content-single.php:30
#: content-single.php:33 content.php:51 content.php:63
msgid ", "
msgstr ""
#: content-featured.php:31
msgid ""
"This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" "
"title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-featured.php:33
msgid ""
"This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" title="
"\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-gallery.php:19
msgid "Gallery"
msgstr ""
#: content-gallery.php:45
msgid "This gallery contains <a %1$s>%2$s photo</a>."
msgid_plural "This gallery contains <a %1$s>%2$s photos</a>."
msgstr[0] ""
msgstr[1] ""
#: content-gallery.php:46 showcase.php:121
msgid "Permalink to %s"
msgstr ""
#: content-gallery.php:64 content-image.php:53 content-quote.php:48
#: content.php:55
msgid "<span class=\"%1$s\">Posted in</span> %2$s"
msgstr ""
#: content-gallery.php:76 content-image.php:61 content-quote.php:60
#: content.php:69
msgid "<span class=\"%1$s\">Tagged</span> %2$s"
msgstr ""
#: content-image.php:18
msgid "Image"
msgstr ""
#: content-image.php:36
msgid ""
"<a href=\"%1$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%2$s"
"\">%3$s</time></a><span class=\"by-author\"> <span class=\"sep\"> by </span> "
"<span class=\"author vcard\"><a class=\"url fn n\" href=\"%4$s\" title=\"%5$s"
"\" rel=\"author\">%6$s</a></span></span>"
msgstr ""
#: content-image.php:41 functions.php:675
msgid "View all posts by %s"
msgstr ""
#: content-link.php:19
msgid "Link"
msgstr ""
#: content-quote.php:15
msgid "Quote"
msgstr ""
#: content-single.php:35
msgid ""
"This entry was posted in %1$s and tagged %2$s by <a href=\"%6$s\">%5$s</a>. "
"Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark"
"\">permalink</a>."
msgstr ""
#: content-single.php:37
msgid ""
"This entry was posted in %1$s by <a href=\"%6$s\">%5$s</a>. Bookmark the <a "
"href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-single.php:39
msgid ""
"This entry was posted by <a href=\"%6$s\">%5$s</a>. Bookmark the <a href="
"\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-single.php:67
msgid "View all posts by %s <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: content-status.php:19
msgid "Status"
msgstr ""
#: content.php:16
msgid "Featured"
msgstr ""
#: footer.php:28
msgid "http://wordpress.org/"
msgstr ""
#: footer.php:28
msgid "Semantic Personal Publishing Platform"
msgstr ""
#: footer.php:28
msgid "Proudly powered by %s"
msgstr ""
#: functions.php:95
msgid "Primary Menu"
msgstr ""
#. translators: header image description
#: functions.php:184
msgid "Wheel"
msgstr ""
#. translators: header image description
#: functions.php:190
msgid "Shore"
msgstr ""
#. translators: header image description
#: functions.php:196
msgid "Trolley"
msgstr ""
#. translators: header image description
#: functions.php:202
msgid "Pine Cone"
msgstr ""
#. translators: header image description
#: functions.php:208
msgid "Chessboard"
msgstr ""
#. translators: header image description
#: functions.php:214
msgid "Lanterns"
msgstr ""
#. translators: header image description
#: functions.php:220
msgid "Willow"
msgstr ""
#. translators: header image description
#: functions.php:226
msgid "Hanoi Plant"
msgstr ""
#: functions.php:446
msgid "Main Sidebar"
msgstr ""
#: functions.php:455
msgid "Showcase Sidebar"
msgstr ""
#: functions.php:457
msgid "The sidebar for the optional Showcase Template"
msgstr ""
#: functions.php:465
msgid "Footer Area One"
msgstr ""
#: functions.php:467 functions.php:477 functions.php:487
msgid "An optional widget area for your site footer"
msgstr ""
#: functions.php:475
msgid "Footer Area Two"
msgstr ""
#: functions.php:485
msgid "Footer Area Three"
msgstr ""
#: functions.php:509 single.php:18
msgid "Post navigation"
msgstr ""
#: functions.php:510
msgid "<span class=\"meta-nav\">&larr;</span> Older posts"
msgstr ""
#: functions.php:511
msgid "Newer posts <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: functions.php:609
msgid "Pingback:"
msgstr ""
#. translators: 1: comment author, 2: date and time
#: functions.php:626
msgid "%1$s on %2$s <span class=\"says\">said:</span>"
msgstr ""
#. translators: 1: date, 2: time
#: functions.php:632
msgid "%1$s at %2$s"
msgstr ""
#: functions.php:641
msgid "Your comment is awaiting moderation."
msgstr ""
#: functions.php:650
msgid "Reply <span>&darr;</span>"
msgstr ""
#: functions.php:669
msgid ""
"<span class=\"sep\">Posted on </span><a href=\"%1$s\" title=\"%2$s\" rel="
"\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></"
"a><span class=\"by-author\"> <span class=\"sep\"> by </span> <span class="
"\"author vcard\"><a class=\"url fn n\" href=\"%5$s\" title=\"%6$s\" rel="
"\"author\">%7$s</a></span></span>"
msgstr ""
#: header.php:43
msgid "Page %s"
msgstr ""
#: header.php:133
msgid "Main menu"
msgstr ""
#: header.php:135
msgid "Skip to primary content"
msgstr ""
#: header.php:137
msgid "Skip to secondary content"
msgstr ""
#: image.php:18
msgid "Image navigation"
msgstr ""
#: image.php:19
msgid "&larr; Previous"
msgstr ""
#: image.php:20
msgid "Next &rarr;"
msgstr ""
#: image.php:30
msgid ""
"<span class=\"meta-prep meta-prep-entry-date\">Published </span> <span class="
"\"entry-date\"><abbr class=\"published\" title=\"%1$s\">%2$s</abbr></span> "
"at <a href=\"%3$s\" title=\"Link to full-size image\">%4$s &times; %5$s</a> "
"in <a href=\"%6$s\" title=\"Return to %7$s\" rel=\"gallery\">%8$s</a>"
msgstr ""
#: inc/theme-options.php:56 inc/theme-options.php:529
msgid "Color Scheme"
msgstr ""
#: inc/theme-options.php:62 inc/theme-options.php:546
msgid "Link Color"
msgstr ""
#: inc/theme-options.php:63
msgid "Default Layout"
msgstr ""
#: inc/theme-options.php:95 inc/theme-options.php:96
msgid "Theme Options"
msgstr ""
#: inc/theme-options.php:111
msgid ""
"Some themes provide customization options that are grouped together on a "
"Theme Options screen. If you change themes, options may change or disappear, "
"as they are theme-specific. Your current theme, Twenty Eleven, provides the "
"following Theme Options:"
msgstr ""
#: inc/theme-options.php:113
msgid ""
"<strong>Color Scheme</strong>: You can choose a color palette of \"Light"
"\" (light background with dark text) or \"Dark\" (dark background with light "
"text) for your site."
msgstr ""
#: inc/theme-options.php:114
msgid ""
"<strong>Link Color</strong>: You can choose the color used for text links on "
"your site. You can enter the HTML color or hex code, or you can choose "
"visually by clicking the \"Select a Color\" button to pick from a color "
"wheel."
msgstr ""
#: inc/theme-options.php:115
msgid ""
"<strong>Default Layout</strong>: You can choose if you want your site&#8217;"
"s default layout to have a sidebar on the left, the right, or not at all."
msgstr ""
#: inc/theme-options.php:117
msgid ""
"Remember to click \"Save Changes\" to save any changes you have made to the "
"theme options."
msgstr ""
#: inc/theme-options.php:119
msgid "For more information:"
msgstr ""
#: inc/theme-options.php:120
msgid ""
"<a href=\"https://codex.wordpress.org/Appearance_Theme_Options_Screen\" "
"target=\"_blank\">Documentation on Theme Options</a>"
msgstr ""
#: inc/theme-options.php:121
msgid ""
"<a href=\"http://wordpress.org/support/\" target=\"_blank\">Support Forums</"
"a>"
msgstr ""
#: inc/theme-options.php:128
msgid "Overview"
msgstr ""
#: inc/theme-options.php:150
msgid "Light"
msgstr ""
#: inc/theme-options.php:156
msgid "Dark"
msgstr ""
#: inc/theme-options.php:181
msgid "Content on left"
msgstr ""
#: inc/theme-options.php:186
msgid "Content on right"
msgstr ""
#: inc/theme-options.php:191
msgid "One-column, no sidebar"
msgstr ""
#: inc/theme-options.php:298
msgid "Select a Color"
msgstr ""
#: inc/theme-options.php:301
msgid "Default color: %s"
msgstr ""
#: inc/theme-options.php:337
msgid "%s Theme Options"
msgstr ""
#: inc/theme-options.php:553
msgid "Layout"
msgstr ""
#: inc/widgets.php:21
msgid ""
"Use this widget to list your recent Aside, Status, Quote, and Link posts"
msgstr ""
#: inc/widgets.php:22
msgid "Twenty Eleven Ephemera"
msgstr ""
#: inc/widgets.php:56
msgid "Ephemera"
msgstr ""
#: inc/widgets.php:95 inc/widgets.php:104
msgid "0 <span class=\"reply\">comments &rarr;</span>"
msgstr ""
#: inc/widgets.php:95 inc/widgets.php:104
msgid "1 <span class=\"reply\">comment &rarr;</span>"
msgstr ""
#: inc/widgets.php:95 inc/widgets.php:104
msgid "% <span class=\"reply\">comments &rarr;</span>"
msgstr ""
#: inc/widgets.php:167
msgid "Title:"
msgstr ""
#: inc/widgets.php:170
msgid "Number of posts to show:"
msgstr ""
#: search.php:18
msgid "Search Results for: %s"
msgstr ""
#: search.php:48
msgid ""
"Sorry, but nothing matched your search criteria. Please try again with some "
"different keywords."
msgstr ""
#: searchform.php:11 searchform.php:12 searchform.php:13
msgid "Search"
msgstr ""
#: showcase.php:78
msgid "Featured Post"
msgstr ""
#: showcase.php:151
msgid "Featuring: %s"
msgstr ""
#: showcase.php:161
msgid "Recent Posts"
msgstr ""
#: sidebar.php:19
msgid "Archives"
msgstr ""
#: sidebar.php:26
msgid "Meta"
msgstr ""
#: single.php:19
msgid "<span class=\"meta-nav\">&larr;</span> Previous"
msgstr ""
#: single.php:20
msgid "Next <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: tag.php:19
msgid "Tag Archives: %s"
msgstr ""
#. Theme Name of the plugin/theme
msgid "Twenty Eleven"
msgstr ""
#. Theme URI of the plugin/theme
msgid "https://wordpress.org/themes/twentyeleven/"
msgstr ""
#. Description of the plugin/theme
msgid ""
"The 2011 theme for WordPress is sophisticated, lightweight, and adaptable. "
"Make it yours with a custom menu, header image, and background -- then go "
"further with available theme options for light or dark color scheme, custom "
"link colors, and three layout choices. Twenty Eleven comes equipped with a "
"Showcase page template that transforms your front page into a showcase to "
"show off your best content, widget support galore (sidebar, three footer "
"areas, and a Showcase page widget area), and a custom \"Ephemera\" widget to "
"display your Aside, Link, Quote, or Status posts. Included are styles for "
"print and for the admin editor, support for featured images (as custom "
"header images on posts and pages and as large images on featured \"sticky\" "
"posts), and special styles for six different post formats."
msgstr ""
#. Author of the plugin/theme
msgid "the WordPress team"
msgstr ""
#. Author URI of the plugin/theme
msgid "https://wordpress.org/"
msgstr ""
#. Template Name of the plugin/theme
msgid "Showcase Template"
msgstr ""
#. Template Name of the plugin/theme
msgid "Sidebar Template"
msgstr ""

View file

@ -0,0 +1,281 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

View file

@ -0,0 +1,31 @@
<?php
/**
* Template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
get_header(); ?>
<div id="primary">
<div id="content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>

View file

@ -0,0 +1,5 @@
= TWENTY ELEVEN =
* by the WordPress team, http://wordpress.org/
== ABOUT TWENTY ELEVEN ==

View file

@ -0,0 +1,582 @@
/*
Theme Name: Twenty Eleven
Adding support for language written in a Right To Left (RTL) direction is easy -
it's just a matter of overwriting all the horizontal positioning attributes
of your CSS stylesheet in a separate stylesheet file named rtl.css.
http://codex.wordpress.org/Right_to_Left_Language_Support
*/
/* =Reset reset
----------------------------------------------- */
caption, th, td {
text-align: right;
}
/* =Structure
----------------------------------------------- */
body {
direction:rtl;
unicode-bidi:embed;
}
/* Showcase */
.page-template-showcase-php section.recent-posts {
float: left;
margin: 0 31% 0 0;
}
.page-template-showcase-php #main .widget-area {
float: right;
margin: 0 0 0 -22.15%;
}
/* One column */
.one-column article.feature-image.small .entry-summary a {
left: auto;
right: -9%;
}
/* Simplify the pullquotes and pull styles */
.one-column.singular .entry-meta .edit-link a {
right: 0px;
left: auto;
}
/* Make sure we have room for our comment avatars */
.one-column .commentlist > li.comment {
margin-left: 0;
margin-right: 102px;
}
/* Make sure the logo and search form don't collide */
.one-column #branding #searchform {
right: auto;
left: 40px;
}
/* Talking avatars take up too much room at this size */
.one-column .commentlist > li.comment {
margin-right: 0;
}
.one-column .commentlist > li.comment .comment-meta,
.one-column .commentlist > li.comment .comment-content {
margin-right: 0;
margin-left: 85px;
}
.one-column .commentlist .avatar {
right: auto;
left: 1.625em;
}
.one-column .commentlist .children .avatar {
left: auto;
right: 2.2em;
}
/* =Global
----------------------------------------------- */
/* Text elements */
p {
margin-bottom: 1.625em;
}
ul, ol {
margin: 0 2.5em 1.625em 0;
}
.ltr ul, .ltr ol {
margin: 0 0 1.625em 2.5em;
}
blockquote {
font-family: Arial, sans-serif;
}
blockquote em, blockquote i, blockquote cite {
font-style: normal;
}
/* Forms */
textarea {
padding-left: 0;
padding-right: 3px;
}
input#s {
background-position: 97% 6px;
padding: 4px 28px 4px 10px;
}
/* Assistive text */
#access a.assistive-text:focus {
left: auto;
right: 7.6%;
}
/* =Header
----------------------------------------------- */
#site-title {
margin-right: 0;
margin-left: 270px;
}
#site-description {
margin: 0 0 3.65625em 270px;
}
/* =Menu
-------------------------------------------------------------- */
#access {
float: right;
}
#access ul {
margin: 0 -0.8125em 0 0;
padding-right: 0;
}
#access li {
float: right;
}
#access ul ul {
float: right;
left: auto;
right: 0;
}
#access ul ul ul {
left: auto;
right: 100%;
}
/* Search Form */
#branding #searchform {
right: auto;
left: 7.6%;
text-align: left;
}
#branding #s {
float: left;
}
#branding .only-search + #access div {
padding-right: 0;
padding-left: 205px;
}
/* =Content
----------------------------------------------- */
.entry-title,
.entry-header .entry-meta {
padding-right: 0;
padding-left: 76px;
}
.entry-content td,
.comment-content td {
padding: 6px 0 6px 10px;
}
.page-link span {
margin-right: 0;
margin-left: 6px;
}
.entry-meta .edit-link a {
float: left;
}
/* Images */
.wp-caption .wp-caption-text,
.gallery-caption {
font-family: Arial, sans-serif;
}
.wp-caption .wp-caption-text {
padding: 10px 40px 5px 0px;
}
.wp-caption .wp-caption-text:before {
margin-right: 0;
margin-left: 5px;
left: auto;
right: 10px;
}
#content .gallery-columns-4 .gallery-item {
padding-right:0;
padding-left:2%;
}
/* Author Info */
.singular #author-info {
margin: 2.2em -35.4% 0 -35.6%;
}
#author-avatar {
float: right;
margin-right: 0;
margin-left: -78px;
}
#author-description {
float: right;
margin-left: 0;
margin-right: 108px;
}
/* Comments link */
.entry-header .comments-link a {
background-image: url(images/comment-bubble-rtl.png);
right: auto;
left: 0;
}
/*
Post Formats Headings
*/
.singular .entry-title,
.singular .entry-header .entry-meta {
padding-left: 0;
}
.singular .entry-header .entry-meta {
left: auto;
right: 0;
}
.singular .entry-meta .edit-link a {
left: auto;
right: 50px;
}
/* =Gallery
----------------------------------------------- */
.format-gallery .gallery-thumb {
float: right;
margin: .375em 0 0 1.625em;
}
/* =Status
----------------------------------------------- */
.format-status img.avatar {
float: right;
margin: 4px 0 2px 10px;
}
/* =Image
----------------------------------------------- */
.indexed.format-image div.entry-meta {
float: right;
}
/* =error404
----------------------
------------------------- */
.error404 #main .widget {
float: right;
margin-right: auto;
margin-left: 3.7%;
}
.error404 #main .widget_archive {
margin-left: 0;
}
.error404 #main .widget_tag_cloud {
margin-left: 0;
}
/* =Showcase
----------------------------------------------- */
article.intro .edit-link a {
right: auto;
left: 20px;
}
/* Featured post */
section.featured-post {
float: right;
}
/* Small featured post */
section.featured-post .attachment-small-feature {
float: left;
margin: 0 0 1.625em -8.9%;
right: auto;
left: -15px;
}
article.feature-image.small {
float: right;
}
article.feature-image.small .entry-summary p a {
left:auto;
right: -23.8%;
padding: 9px 85px 9px 26px;
}
/* Large featured post */
section.feature-image.large .hentry {
left:auto;
right: 9%;
margin: 1.625em 0 0 9%;
}
/* Featured Slider */
.featured-posts .showcase-heading {
padding-left: 0;
padding-right: 8.9%;
}
.featured-posts section.featured-post {
left: auto;
right: 0;
}
#content .feature-slider {
right: auto;
left: 8.9%;
}
.feature-slider li {
float: right;
}
/* Recent Posts */
section.recent-posts .other-recent-posts a[rel="bookmark"] {
float: right;
}
section.recent-posts .other-recent-posts .comments-link a,
section.recent-posts .other-recent-posts .comments-link > span {
padding: 0.3125em 1em 0.3125em 0;
right: auto;
left: 0;
text-align: left;
}
/* =Attachments
----------------------------------------------- */
/* =Navigation
-------------------------------------------------------------- */
.nav-previous {
float: right;
}
.nav-next {
float: left;
text-align: left;
}
/* Singular navigation */
#nav-single {
float: left;
text-align: left;
}
#nav-single .nav-next {
padding-left: 0;
padding-right: .5em;
}
/* =Widgets
----------------------------------------------- */
.widget ul ul {
margin-left: 0;
margin-right: 1.5em;
}
/* Twitter */
.widget_twitter .timesince {
margin-right: 0;
margin-left: -10px;
text-align: left;
}
/* =Comments
----------------------------------------------- */
.commentlist .children li.comment {
border-left: none;
border-right: 1px solid #ddd;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.commentlist .children li.comment .comment-meta {
margin-left: 0;
margin-right: 50px;
}
.commentlist .avatar {
left: auto;
right: -102px;
}
.commentlist > li:before {
content: url(images/comment-arrow-rtl.png);
left:auto;
right: -21px;
}
.commentlist > li.pingback:before {
content: '';
}
.commentlist .children .avatar {
left: auto;
right: 2.2em;
}
/* Post author highlighting */
.commentlist > li.bypostauthor:before {
content: url(images/comment-arrow-bypostauthor-rtl.png);
}
/* sidebar-page.php comments */
/* Make sure we have room for our comment avatars */
.page-template-sidebar-page-php .commentlist > li.comment,
.page-template-sidebar-page-php.commentlist .pingback {
margin-left: 0;
margin-right: 102px;
}
/* Comment Form */
#respond .comment-form-author label,
#respond .comment-form-email label,
#respond .comment-form-url label,
#respond .comment-form-comment label {
left: auto;
right: 4px;
}
#respond .comment-form-author label,
#respond .comment-form-email label,
#respond .comment-form-url label,
#respond .comment-form-comment label {
-webkit-box-shadow: -1px 2px 2px rgba(204,204,204,0.8);
-moz-box-shadow: -1px 2px 2px rgba(204,204,204,0.8);
box-shadow: -1px 2px 2px rgba(204,204,204,0.8);
}
#respond .comment-form-author .required,
#respond .comment-form-email .required {
left: auto;
right: 75%;
}
#respond .form-submit {
float: left;
}
#respond input#submit {
left: auto;
right: 30px;
padding: 5px 22px 5px 42px;
}
#respond #cancel-comment-reply-link {
margin-left: 0;
margin-right: 10px;
}
#cancel-comment-reply-link {
right: auto;
left: 1.625em;
}
/* =Footer
----------------------------------------------- */
/* Two Footer Widget Areas */
#supplementary.two .widget-area {
float: right;
margin-right: 0;
margin-left: 3.7%;
}
#supplementary.two .widget-area + .widget-area {
margin-left: 0;
}
/* Three Footer Widget Areas */
#supplementary.three .widget-area {
float: right;
margin-right: 0;
margin-left: 3.7%;
}
#supplementary.three .widget-area + .widget-area + .widget-area {
margin-left: 0;
}
/* Site Generator Line */
#site-generator .sep {
background-position: right center;
}
/* =Responsive Structure
----------------------------------------------- */
@media (max-width: 800px) {
/* Simplify the showcase template when small feature */
section.featured-post .attachment-small-feature,
.one-column section.featured-post .attachment-small-feature {
float: right;
}
article.feature-image.small {
float: left;
}
article.feature-image.small .entry-summary p a {
right: 0;
}
.singular .entry-meta .edit-link a {
left: auto;
right: 0px;
}
/* Make sure we have room for our comment avatars */
.commentlist > li.comment,
.commentlist .pingback {
margin-left: 0;
margin-right: 102px;
}
/* No need to float footer widgets at this size */
#colophon #supplementary .widget-area {
margin-left: 0;
}
/* No need to float 404 widgets at this size */
.error404 #main .widget {
margin-left: 0;
}
}
@media (max-width: 650px) {
/* @media (max-width: 650px) Reduce font-sizes for better readability on smaller devices */
#site-title,
#site-description {
margin-left: 0;
}
/* Talking avatars take up too much room at this size */
.commentlist > li.comment,
.commentlist > li.pingback {
margin-right: 0 !important;
}
.commentlist .children .avatar {
left: auto;
right: 2.2em;
}
/* Use the available space in the smaller comment form */
#respond .comment-form-author .required,
#respond .comment-form-email .required {
left: auto;
right: 95%;
}
#content .gallery-columns-3 .gallery-item {
padding-right: 0;
padding-left:2%;
}
}
@media (max-width: 450px) {
#content .gallery-columns-2 .gallery-item {
padding-right:0;
padding-left:4%;
}
}
/* =Print
----------------------------------------------- */
@media print {
#primary {
float: right;
}
/* Comments */
.commentlist .avatar {
left: auto;
right: 2.2em;
}
.commentlist li.comment .comment-meta {
margin-left: 0;
margin-right: 50px;
}
}
/* =IE7
----------------------------------------------- */
#ie7 section.recent-posts {
margin-right: 0;
margin-left: 7.6%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 KiB

View file

@ -0,0 +1,59 @@
<?php
/**
* Template for displaying Search Results pages
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
get_header(); ?>
<section id="primary">
<div id="content" role="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyeleven' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
</header>
<?php twentyeleven_content_nav( 'nav-above' ); ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/*
* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that
* will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php twentyeleven_content_nav( 'nav-below' ); ?>
<?php else : ?>
<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyeleven' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<?php endif; ?>
</div><!-- #content -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Some files were not shown because too many files have changed in this diff Show more