Version Description
- Now supports l18n!
- Includes dutch translation.
Download this release
Release Info
Developer | Erikvona |
Plugin | Per page add to head |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.1
- languages/per-page-ath-nl_NL.mo +0 -0
- languages/per-page-ath-nl_NL.po +66 -0
- languages/per-page-ath.pot +59 -0
- perpagehead.php +9 -5
- readme.txt +10 -7
- settings.php +6 -6
languages/per-page-ath-nl_NL.mo
ADDED
Binary file
|
languages/per-page-ath-nl_NL.po
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2014
|
2 |
+
# This file is distributed under the same license as the package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: \n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/per-page-add-to\n"
|
7 |
+
"POT-Creation-Date: 2014-01-16 19:16:56+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2014-01-16 21:02+0100\n"
|
12 |
+
"Last-Translator: \n"
|
13 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
"X-Generator: Poedit 1.6.3\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"Language: nl\n"
|
17 |
+
|
18 |
+
#: perpagehead.php:16
|
19 |
+
msgid "Add to head"
|
20 |
+
msgstr "Voeg toe aan head tag"
|
21 |
+
|
22 |
+
#: perpagehead.php:38
|
23 |
+
msgid "Put your head html here"
|
24 |
+
msgstr "Plaats je HTML voor de head tag hier"
|
25 |
+
|
26 |
+
#: perpagehead.php:105
|
27 |
+
msgid "Error reading config file %s! Is this file readable by the webserver?"
|
28 |
+
msgstr ""
|
29 |
+
"Fout bij het lezen van configuratiebestand %s! Is het bestand leesbaar door "
|
30 |
+
"de webserver?"
|
31 |
+
|
32 |
+
#: perpagehead.php:114
|
33 |
+
msgid "Add <head> to every page"
|
34 |
+
msgstr "Voeg <head> toe aan elke pagina"
|
35 |
+
|
36 |
+
#: perpagehead.php:120
|
37 |
+
msgid "You do not have sufficient permissions to access this page."
|
38 |
+
msgstr "Je hebt niet genoeg rechten om bij deze pagina te kunnen"
|
39 |
+
|
40 |
+
#: settings.php:14
|
41 |
+
msgid "Insert HTML on every page"
|
42 |
+
msgstr "Voeg HTML in op elke pagina"
|
43 |
+
|
44 |
+
#: settings.php:15
|
45 |
+
msgid ""
|
46 |
+
"Everything you put in here will be inserted into the <head> tag on "
|
47 |
+
"every page. Ideal for favicons!"
|
48 |
+
msgstr ""
|
49 |
+
"Alles wat je hier toevoegd, zal in de <head> tag op elke pagina worden "
|
50 |
+
"toegevoegd"
|
51 |
+
|
52 |
+
#: settings.php:22
|
53 |
+
msgid "Error creating %s! Is the underlying folder writable?"
|
54 |
+
msgstr "Fout bij het maken van %s! Is de onderliggende map schrijfbaar?"
|
55 |
+
|
56 |
+
#: settings.php:29
|
57 |
+
msgid "Succesfully edited %s!"
|
58 |
+
msgstr "%s succesvol bewerkt!"
|
59 |
+
|
60 |
+
#: settings.php:30
|
61 |
+
msgid "Error writing HTML to %s. Is this file writable?"
|
62 |
+
msgstr "Fout bij het schrijven van HTML naar %s. Is dit bestand schrijfbaar?"
|
63 |
+
|
64 |
+
#: settings.php:44
|
65 |
+
msgid "Error reading HTML from file %s. Is this file readable?"
|
66 |
+
msgstr "Fout bij het lezen van de HTML van %s. Is dit bestand leesbaar?"
|
languages/per-page-ath.pot
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2014
|
2 |
+
# This file is distributed under the same license as the package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: \n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/per-page-add-to\n"
|
7 |
+
"POT-Creation-Date: 2014-01-16 19:16:56+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
|
12 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
|
15 |
+
#: perpagehead.php:16
|
16 |
+
msgid "Add to head"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#: perpagehead.php:38
|
20 |
+
msgid "Put your head html here"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: perpagehead.php:105
|
24 |
+
msgid "Error reading config file %s! Is this file readable by the webserver?"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: perpagehead.php:114
|
28 |
+
msgid "Add <head> to every page"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: perpagehead.php:120
|
32 |
+
msgid "You do not have sufficient permissions to access this page."
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: settings.php:14
|
36 |
+
msgid "Insert HTML on every page"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: settings.php:15
|
40 |
+
msgid ""
|
41 |
+
"Everything you put in here will be inserted into the <head> tag on "
|
42 |
+
"every page. Ideal for favicons!"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: settings.php:22
|
46 |
+
msgid "Error creating %s! Is the underlying folder writable?"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: settings.php:29
|
50 |
+
msgid "Succesfully edited %s!"
|
51 |
+
msgstr ""
|
52 |
+
|
53 |
+
#: settings.php:30
|
54 |
+
msgid "Error writing HTML to %s. Is this file writable?"
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
+
#: settings.php:44
|
58 |
+
msgid "Error reading HTML from file %s. Is this file readable?"
|
59 |
+
msgstr ""
|
perpagehead.php
CHANGED
@@ -4,17 +4,20 @@
|
|
4 |
Plugin Name: Per page head
|
5 |
Plugin URI: http://www.evona.nl/plugins/per-page-head
|
6 |
Description: Allows you to add content into the <head> section for a specific page, like custom JS or custom HTML, using post meta. Also allows you to add content for every page, under Settings -> add <head> to every page
|
7 |
-
Version: 1.
|
8 |
Author: Erik von Asmuth
|
9 |
-
Author URI: http://evona.nl/
|
10 |
License: GPLv2
|
|
|
11 |
*/
|
|
|
12 |
|
13 |
//Add the meta box
|
14 |
function perpageathaddbox() {
|
|
|
15 |
$screens = array( 'post', 'page' );
|
16 |
foreach ( $screens as $screen ) {
|
17 |
-
add_meta_box( 'per-page-ath',
|
18 |
'default', null );
|
19 |
}
|
20 |
}
|
@@ -100,7 +103,7 @@ function perpageath_display(){
|
|
100 |
fclose($htmlhandle);
|
101 |
echo $html;
|
102 |
}else{
|
103 |
-
echo "<!-- Error reading
|
104 |
}
|
105 |
}
|
106 |
}
|
@@ -109,7 +112,8 @@ add_action('wp_head', 'perpageath_display');
|
|
109 |
//Create a menu
|
110 |
//Load in the option page
|
111 |
function EvonaCreateATHMenu() {
|
112 |
-
|
|
|
113 |
}
|
114 |
|
115 |
function PerPageATHSettings(){
|
4 |
Plugin Name: Per page head
|
5 |
Plugin URI: http://www.evona.nl/plugins/per-page-head
|
6 |
Description: Allows you to add content into the <head> section for a specific page, like custom JS or custom HTML, using post meta. Also allows you to add content for every page, under Settings -> add <head> to every page
|
7 |
+
Version: 1.1
|
8 |
Author: Erik von Asmuth
|
9 |
+
Author URI: http://evona.nl/about-me/
|
10 |
License: GPLv2
|
11 |
+
Text Domain: per-page-ath
|
12 |
*/
|
13 |
+
load_plugin_textdomain('per-page-ath', false, basename( dirname( __FILE__ ) ) . '/languages' );
|
14 |
|
15 |
//Add the meta box
|
16 |
function perpageathaddbox() {
|
17 |
+
$addtohead = __('Add to head', 'per-page-ath');
|
18 |
$screens = array( 'post', 'page' );
|
19 |
foreach ( $screens as $screen ) {
|
20 |
+
add_meta_box( 'per-page-ath', $addtohead, 'athcallback', $screen, 'normal',
|
21 |
'default', null );
|
22 |
}
|
23 |
}
|
103 |
fclose($htmlhandle);
|
104 |
echo $html;
|
105 |
}else{
|
106 |
+
echo "<!-- ".printf( __( 'Error reading config file %s! Is this file readable by the webserver?', 'per-page-ath' ), $htmlfile )." -->";
|
107 |
}
|
108 |
}
|
109 |
}
|
112 |
//Create a menu
|
113 |
//Load in the option page
|
114 |
function EvonaCreateATHMenu() {
|
115 |
+
$menuname = __('Add <head> to every page', 'per-page-ath');
|
116 |
+
add_options_page( $menuname, $menuname, 'manage_options', 'perpageath-every-page', 'PerPageATHSettings' );
|
117 |
}
|
118 |
|
119 |
function PerPageATHSettings(){
|
readme.txt
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
|
2 |
Contributors: Erikvona
|
3 |
Plugin Name: Per page add to head
|
4 |
Tags: head, css, favicon
|
5 |
-
Author URI: http://evona.
|
6 |
Author: Erik von Asmuth (Erikvona)
|
7 |
Requires at least: 3.5
|
8 |
-
Tested up to: 3.
|
9 |
-
Stable tag: 1.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -15,15 +15,15 @@ This plugin adds content between the head tags for specific WordPress posts, or
|
|
15 |
|
16 |
== Description ==
|
17 |
|
18 |
-
Ever got really annoyed how much effort it took to add
|
19 |
|
20 |
Offcourse, you can also use it to add your own stylesheets and JavaScript files. Anything that normally goes in the head section is fine.
|
21 |
|
22 |
-
Add to head also features an option under settings to add some text inside
|
23 |
|
24 |
Just install the plugin, activate it, make sure it is showing in your post editor by clicking screen options and checking add to head while editing a page, and add stuff!
|
25 |
|
26 |
-
**Warning:** Don't put stuff in the head tags that shouldn't be there! This plugin does not validate anything, and it is really easy to invalidate your HTML by making mistakes in your head tag. Don't forget to add
|
27 |
|
28 |
== Installation ==
|
29 |
|
@@ -35,6 +35,9 @@ Installation is plain and simple
|
|
35 |
1. You can also add head to all posts! Just use settings -> add head to every page
|
36 |
|
37 |
== Changelog ==
|
|
|
|
|
|
|
38 |
|
39 |
= 1.0 =
|
40 |
- Now uses $_SERVER superglobal to locate current page url
|
1 |
+
=== Per page add to head ===
|
2 |
Contributors: Erikvona
|
3 |
Plugin Name: Per page add to head
|
4 |
Tags: head, css, favicon
|
5 |
+
Author URI: http://evona.nl/over-mij
|
6 |
Author: Erik von Asmuth (Erikvona)
|
7 |
Requires at least: 3.5
|
8 |
+
Tested up to: 3.9
|
9 |
+
Stable tag: 1.1
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
15 |
|
16 |
== Description ==
|
17 |
|
18 |
+
Ever got really annoyed how much effort it took to add style tags for just one page into the head section of a page, using WordPress? Well, I did. So I made this plugin for exactly that purpose. It just adds whatever you give it to the head tag. With a size of 8KB, and no use of any client side code, efficiency is taken care of. You can also use it to add meta tags, for SEO, auto-refresh, Google Analytics, or anything else you want to put in there.
|
19 |
|
20 |
Offcourse, you can also use it to add your own stylesheets and JavaScript files. Anything that normally goes in the head section is fine.
|
21 |
|
22 |
+
Add to head also features an option under settings to add some text inside head on every page. Ideal for favicons, Modern UI start screen icons, or style sheets if you�re too lazy to make a child theme.
|
23 |
|
24 |
Just install the plugin, activate it, make sure it is showing in your post editor by clicking screen options and checking add to head while editing a page, and add stuff!
|
25 |
|
26 |
+
**Warning:** Don't put stuff in the head tags that shouldn't be there! This plugin does not validate anything, and it is really easy to invalidate your HTML by making mistakes in your head tag. Don't forget to add style or script tags
|
27 |
|
28 |
== Installation ==
|
29 |
|
35 |
1. You can also add head to all posts! Just use settings -> add head to every page
|
36 |
|
37 |
== Changelog ==
|
38 |
+
= 1.1 =
|
39 |
+
- Now supports l18n!
|
40 |
+
- Includes dutch translation.
|
41 |
|
42 |
= 1.0 =
|
43 |
- Now uses $_SERVER superglobal to locate current page url
|
settings.php
CHANGED
@@ -11,23 +11,23 @@ function perpageath_config(){
|
|
11 |
$htmlfile = dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'evonapluginconfig'.DIRECTORY_SEPARATOR.'everyheadpage.html';
|
12 |
?>
|
13 |
<div class="wrap">
|
14 |
-
<h2
|
15 |
-
<h3
|
16 |
<?php
|
17 |
if(!file_exists($htmlfile)){
|
18 |
if($htmlcreatehandle = fopen($htmlfile, 'x')){
|
19 |
fwrite($htmlcreatehandle, "");
|
20 |
fclose($htmlcreatehandle);
|
21 |
}else{
|
22 |
-
|
23 |
}
|
24 |
}
|
25 |
if(isset($_POST['html'])){
|
26 |
if($htmlwritehandle = fopen($htmlfile, 'w')){
|
27 |
fwrite($htmlwritehandle, stripslashes_deep($_POST['html']));
|
28 |
fclose($htmlwritehandle);
|
29 |
-
|
30 |
-
}else{
|
31 |
}
|
32 |
if($htmlhandle = fopen($htmlfile, 'r')){
|
33 |
if(filesize($htmlfile) > 0){
|
@@ -41,7 +41,7 @@ function perpageath_config(){
|
|
41 |
<textarea style="white-space:pre; width:80%; min-width:600px; height:300px;" name="html"><?php echo $html; ?></textarea>
|
42 |
<?php
|
43 |
submit_button();
|
44 |
-
}else{
|
45 |
echo "</form></div>";
|
46 |
}
|
47 |
?>
|
11 |
$htmlfile = dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'evonapluginconfig'.DIRECTORY_SEPARATOR.'everyheadpage.html';
|
12 |
?>
|
13 |
<div class="wrap">
|
14 |
+
<h2><?php _e('Insert HTML on every page', 'per-page-ath'); ?></h2>
|
15 |
+
<h3><?php _e('Everything you put in here will be inserted into the <head> tag on every page. Ideal for favicons!', 'per-page-ath'); ?></h3>
|
16 |
<?php
|
17 |
if(!file_exists($htmlfile)){
|
18 |
if($htmlcreatehandle = fopen($htmlfile, 'x')){
|
19 |
fwrite($htmlcreatehandle, "");
|
20 |
fclose($htmlcreatehandle);
|
21 |
}else{
|
22 |
+
printf(__("Error creating %s! Is the underlying folder writable?", 'per-page-ath'), $htmlfile);
|
23 |
}
|
24 |
}
|
25 |
if(isset($_POST['html'])){
|
26 |
if($htmlwritehandle = fopen($htmlfile, 'w')){
|
27 |
fwrite($htmlwritehandle, stripslashes_deep($_POST['html']));
|
28 |
fclose($htmlwritehandle);
|
29 |
+
printf(__("Succesfully edited %s!", 'per-page-ath'), $htmlfile);
|
30 |
+
}else{printf(__("Error writing HTML to %s. Is this file writable?", 'per-page-ath'), $htmlfile);}
|
31 |
}
|
32 |
if($htmlhandle = fopen($htmlfile, 'r')){
|
33 |
if(filesize($htmlfile) > 0){
|
41 |
<textarea style="white-space:pre; width:80%; min-width:600px; height:300px;" name="html"><?php echo $html; ?></textarea>
|
42 |
<?php
|
43 |
submit_button();
|
44 |
+
}else{printf(__("Error reading HTML from file %s. Is this file readable?", 'per-page-ath'), $htmlfile);}
|
45 |
echo "</form></div>";
|
46 |
}
|
47 |
?>
|