404page – your smart custom 404 error page - Version 1.1

Version Description

(2014-06-03) = * Multilingual support added * German translation

Download this release

Release Info

Developer smartware.cc
Plugin Icon 128x128 404page – your smart custom 404 error page
Version 1.1
Comparing to
See all releases

Code changes from version 1.0 to 1.1

404page.php CHANGED
@@ -3,13 +3,13 @@
3
  Plugin Name: 404page
4
  Plugin URI: http://smartware.cc/wp-404page
5
  Description: Define any of your pages as 404 page
6
- Version: 1.0
7
  Author: smartware.cc
8
  Author URI: http://smartware.cc
9
  License: GPL2
10
  */
11
 
12
- /* Copyright 2013 smartware.cc (email : sw@smartware.cc)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License, version 2, as
@@ -49,16 +49,18 @@ function swcc_404page_admin() {
49
  ?>
50
  <div class="wrap">
51
  <div id="icon-tools" class="icon32"></div>
52
- <h2>404page</h2>
53
  <div class="metabox-holder has-right-sidebar">
54
  <div class="inner-sidebar">
55
  <div class="postbox">
56
- <h3><span>the 404page plugin</span></h3>
57
  <div class="inside">
58
  <ul>
59
- <li><a href="http://wordpress.org/extend/plugins/404page/">Please rate the plugin</a></li>
60
- <li><a href="http://smartware.cc/wp-404page/">Plugin homepage</a></li>
61
- <li><a href="http://smartware.cc/">Author homepage</a></li>
 
 
62
  </ul>
63
  </div>
64
  </div>
@@ -72,21 +74,21 @@ function swcc_404page_admin() {
72
  $pageid = swcc_404page_get_page_id();
73
  if ( $_POST['404pageid'] != $pageid ) {
74
  if ( update_option( '404page_page_id', $_POST['404pageid'] ) ) {
75
- add_settings_error( 'swcc_404page_err', esc_attr( 'settings_updated' ), __('Settings saved.'), 'updated' );
76
  } else {
77
- add_settings_error( 'swcc_404page_err', esc_attr( 'settings_updated' ), 'An unexpected error occured while saving the settings!', 'error' );
78
  }
79
  }
80
  }
81
  $pageid = swcc_404page_get_page_id();
82
  if ( $pageid < 0 ) {
83
- add_settings_error( 'swcc_404page_err', esc_attr( 'settings_updated' ), 'The page you have selected as 404 page does not exist anymore. Please choose another page.', 'error' );
84
  }
85
  settings_errors( 'swcc_404page_err' );
86
  ?>
87
- <label for="404pageid">Page to be displayed as 404 page: </label>
88
  <?php
89
- wp_dropdown_pages( array( 'name' => '404pageid', 'echo' => 1, 'show_option_none' => '&mdash; NONE (WP Default) &mdash;', 'option_none_value' => '0', 'selected' => $pageid ) );
90
  ?>
91
  </p>
92
  <p class="submit">
@@ -102,7 +104,7 @@ function swcc_404page_admin() {
102
 
103
  // init backend
104
  function swcc_404page_adminmenu() {
105
- add_submenu_page( 'options-general.php', '404page', '404page', 'manage_options', '404page', 'swcc_404page_admin' );
106
  }
107
 
108
  // returns the id of the 404 page if one is defined, returns 0 if none is defined, returns -1 if the defined page id does not exist
@@ -116,7 +118,12 @@ function swcc_404page_get_page_id() {
116
  }
117
  return $pageid;
118
  }
 
 
 
 
119
 
 
120
  add_filter( '404_template', 'swcc_404page' );
121
  add_action( 'admin_menu', 'swcc_404page_adminmenu' );
122
  ?>
3
  Plugin Name: 404page
4
  Plugin URI: http://smartware.cc/wp-404page
5
  Description: Define any of your pages as 404 page
6
+ Version: 1.1
7
  Author: smartware.cc
8
  Author URI: http://smartware.cc
9
  License: GPL2
10
  */
11
 
12
+ /* Copyright 2013-2014 smartware.cc (email : sw@smartware.cc)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License, version 2, as
49
  ?>
50
  <div class="wrap">
51
  <div id="icon-tools" class="icon32"></div>
52
+ <h2><?php _e('404 Error Page', '404page'); ?></h2>
53
  <div class="metabox-holder has-right-sidebar">
54
  <div class="inner-sidebar">
55
  <div class="postbox">
56
+ <h3><span><?php _e( 'Like this Plugin?', '404page' ); ?></span></h3>
57
  <div class="inside">
58
  <ul>
59
+ <li><a href="http://wordpress.org/extend/plugins/404page/"><?php _e( 'Please rate the plugin', '404page' ); ?></a></li>
60
+ <li><a href="http://smartware.cc/wp-404page/"><?php _e( 'Plugin homepage', '404page'); ?></a></li>
61
+ <li><a href="http://smartware.cc/"><?php _e( 'Author homepage', '404page' );?></a></li>
62
+ <li><a href="https://plus.google.com/+SmartwareCc"><?php _e(' Authors Google+ Page', '404page' ); ?></a></li>
63
+ <li><a href="https://www.facebook.com/smartware.cc"><?php _e(' Athors facebook Page', '404page' ); ?></a></li>
64
  </ul>
65
  </div>
66
  </div>
74
  $pageid = swcc_404page_get_page_id();
75
  if ( $_POST['404pageid'] != $pageid ) {
76
  if ( update_option( '404page_page_id', $_POST['404pageid'] ) ) {
77
+ add_settings_error( 'swcc_404page_err', esc_attr( 'settings_updated' ), __( 'Settings saved.' ), 'updated' );
78
  } else {
79
+ add_settings_error( 'swcc_404page_err', esc_attr( 'settings_updated' ), __( 'An unexpected error occured while saving the settings!', '404page' ), 'error' );
80
  }
81
  }
82
  }
83
  $pageid = swcc_404page_get_page_id();
84
  if ( $pageid < 0 ) {
85
+ add_settings_error( 'swcc_404page_err', esc_attr( 'settings_updated' ), __( 'The page you have selected as 404 page does not exist anymore. Please choose another page.', '404page' ), 'error' );
86
  }
87
  settings_errors( 'swcc_404page_err' );
88
  ?>
89
+ <label for="404pageid"><?php _e('Page to be displayed as 404 page', '404page' )?>:</label>
90
  <?php
91
+ wp_dropdown_pages( array( 'name' => '404pageid', 'echo' => 1, 'show_option_none' => __( '&mdash; NONE (WP default 404 page) &mdash;', '404page'), 'option_none_value' => '0', 'selected' => $pageid ) );
92
  ?>
93
  </p>
94
  <p class="submit">
104
 
105
  // init backend
106
  function swcc_404page_adminmenu() {
107
+ add_submenu_page( 'options-general.php', __('404 Error Page', '404page' ), __('404 Error Page', '404page' ), 'manage_options', '404page', 'swcc_404page_admin' );
108
  }
109
 
110
  // returns the id of the 404 page if one is defined, returns 0 if none is defined, returns -1 if the defined page id does not exist
118
  }
119
  return $pageid;
120
  }
121
+ // addd text domain
122
+ function swcc_404page_add_text_domain() {
123
+ load_plugin_textdomain( '404page', false, basename( dirname( __FILE__ ) ) . '/languages' );
124
+ }
125
 
126
+ add_action( 'init', 'swcc_404page_add_text_domain' );
127
  add_filter( '404_template', 'swcc_404page' );
128
  add_action( 'admin_menu', 'swcc_404page_adminmenu' );
129
  ?>
languages/404page-de_DE.mo ADDED
Binary file
languages/404page-de_DE.po ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: 404page\n"
4
+ "POT-Creation-Date: 2014-05-02 14:12+0100\n"
5
+ "PO-Revision-Date: 2014-05-02 14:31+0100\n"
6
+ "Last-Translator: smartware.cc <sw@smartware.cc>\n"
7
+ "Language-Team: smartware.cc <sw@smartware.cc>\n"
8
+ "Language: de_DE\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.5\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-KeywordsList: __;_e\n"
17
+ "X-Poedit-SearchPath-0: C:\\Users\\rado\\Google Drive\\web\\websites"
18
+ "\\df_webserver\\webseiten\\dev.smartware.cc\\wp-content\\plugins\\404page\n"
19
+
20
+ msgid "404 Error Page"
21
+ msgstr "404 Fehler Seite"
22
+
23
+ msgid "Page to be displayed as 404 page"
24
+ msgstr "Seite, die als 404 Seite angezeigt werden soll"
25
+
26
+ msgid "&mdash; NONE (WP default 404 page) &mdash;"
27
+ msgstr "&mdash; KEINE (WP Standard 404 Seite) &mdash;"
28
+
29
+ msgid "An unexpected error occured while saving the settings!"
30
+ msgstr "Beim Speichern der Einstellungen ist ein Fehler aufgetreten!"
31
+
32
+ msgid ""
33
+ "The page you have selected as 404 page does not exist anymore. Please choose "
34
+ "another page."
35
+ msgstr ""
36
+ "Die Seite, die als 404 Seite ausgew&auml;hlt wurde, exisitiert nicht mehr. "
37
+ "Bitte w&auml;hle eine andere Seite."
38
+
39
+ msgid "Like this Plugin?"
40
+ msgstr "Du magst dieses Plugin?"
41
+
42
+ msgid "Please rate the plugin"
43
+ msgstr "Bitte bewerte das Plugin"
44
+
45
+ msgid "Plugin homepage"
46
+ msgstr "Plugin Homepage"
47
+
48
+ msgid "Author homepage"
49
+ msgstr "Homepage des Autors"
50
+
51
+ msgid " Authors Google+ Page"
52
+ msgstr "Google+ Seite des Autors"
53
+
54
+ msgid " Athors facebook Page"
55
+ msgstr "Facebook Seite des Autors"
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: smartware.cc
3
  Tags: page, 404, error, error page, 404 page, page not found, page not found error, 404 error page
4
  Requires at least: 3.0
5
- Tested up to: 3.6.1
6
- Stable tag: 1.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -13,9 +13,16 @@ Define any of your WordPress pages as 404 error page
13
 
14
  Create your 404 Page as a normal WordPress Page using the full power of WordPress. You can use a Custom Page Template or Custom Fields, you can set a Featured Image - everything like on every other Page.
15
 
16
- The go to Settings -> 404page from your WordPress Dashbord and select the created Page as 404 error page.
17
 
18
- [Plugin Homepage](http://smartware.cc/wp-404page)
 
 
 
 
 
 
 
19
 
20
  == Installation ==
21
 
@@ -30,5 +37,9 @@ The go to Settings -> 404page from your WordPress Dashbord and select the create
30
 
31
  == Changelog ==
32
 
 
 
 
 
33
  = 1.0 (2013-09-30) =
34
  * Initial Release
2
  Contributors: smartware.cc
3
  Tags: page, 404, error, error page, 404 page, page not found, page not found error, 404 error page
4
  Requires at least: 3.0
5
+ Tested up to: 3.9.1
6
+ Stable tag: 1.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
13
 
14
  Create your 404 Page as a normal WordPress Page using the full power of WordPress. You can use a Custom Page Template or Custom Fields, you can set a Featured Image - everything like on every other Page.
15
 
16
+ The go to 'Settings' -> '404 Error Page' from your WordPress Dashbord and select the created Page as your 404 error page.
17
 
18
+ = Languages =
19
+
20
+ * English
21
+ * German
22
+
23
+ = More Information =
24
+
25
+ Visit the [Plugin Homepage](http://smartware.cc/wp-404page)
26
 
27
  == Installation ==
28
 
37
 
38
  == Changelog ==
39
 
40
+ = 1.1 (2014-06-03) =
41
+ * Multilingual support added
42
+ * German translation
43
+
44
  = 1.0 (2013-09-30) =
45
  * Initial Release