Changeset 1335072
- Timestamp:
- 01/24/2016 06:25:07 PM (10 years ago)
- Location:
- easy-code-placement/trunk
- Files:
-
- 3 added
- 2 deleted
- 14 edited
-
easy-code-placement.php (modified) (2 diffs)
-
inc/actions/add.php (modified) (7 diffs)
-
inc/actions/alignment.php (modified) (2 diffs)
-
inc/actions/delete.php (modified) (1 diff)
-
inc/actions/edit.php (modified) (6 diffs)
-
inc/actions/status.php (modified) (2 diffs)
-
inc/classes/class-ecp-table.php (modified) (3 diffs)
-
inc/classes/class-ecp-tables.php (modified) (7 diffs)
-
inc/error.php (modified) (2 diffs)
-
inc/functions.php (modified) (4 diffs)
-
inc/page.php (modified) (2 diffs)
-
inc/settings.php (modified) (6 diffs)
-
inc/system.php (modified) (11 diffs)
-
lang/easy-code-placement-de_DE.mo (added)
-
lang/easy-code-placement-de_DE.po (added)
-
lang/easy-code-placement.pot (added)
-
lang/ecp-de_DE.mo (deleted)
-
lang/ecp-de_DE.po (deleted)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-code-placement/trunk/easy-code-placement.php
r1334958 r1335072 1 1 <?php 2 2 /* 3 Plugin Name: Easy Code Placement 4 Version: 3.1 5 Plugin URI: http://www.randnotizen.org/easy-code-placement/ 6 Author: Jens Herdy 7 Author URI: http://www.randnotizen.org/ 8 Description: A great Wordpress Plugin to place ANY Code ANYWHERE you want. 9 License: GPLv3 10 */ 3 * Plugin Name: Easy Code Placement 4 * Text Domain: easy-code-placement 5 * Domain Path: /lang 6 * Version: 3.1.1 7 * Plugin URI: http://www.randnotizen.org/easy-code-placement/ 8 * Author: Jens Herdy 9 * Author URI: http://www.randnotizen.org/ 10 * Description: A great Wordpress Plugin to place ANY Code ANYWHERE you want. 11 * License: GPLv3 12 */ 11 13 12 14 // standards 13 15 ob_start(); 14 16 define('ECP_FILE',__FILE__); 15 define('ECP_VERSION','3.1 ');17 define('ECP_VERSION','3.1.1'); 16 18 17 19 // load functions, classes … … 31 33 32 34 // load languages 33 load_plugin_textdomain('e cp', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );35 load_plugin_textdomain('easy-code-placement', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' ); 34 36 35 37 // include install and uninstall files -
easy-code-placement/trunk/inc/actions/add.php
r1256966 r1335072 15 15 if (strlen($t_ecp_name) > 30) { 16 16 // when name is longer than 30 chars 17 $ecp_error = __('A maximum of 30 Characters is allowed', 'e cp');17 $ecp_error = __('A maximum of 30 Characters is allowed', 'easy-code-placement'); 18 18 $ecp_error_page = "&load=add"; 19 19 $ecp_error_id = ""; … … 23 23 if (preg_match("/[^a-zA-Z0-9\_-]/i", $t_ecp_name)) { 24 24 // when name contains spechial chars 25 $ecp_error = __('Special Characters are not allowed in the Code Name', 'e cp');25 $ecp_error = __('Special Characters are not allowed in the Code Name', 'easy-code-placement'); 26 26 $ecp_error_page = "&load=add"; 27 27 $ecp_error_id = ""; … … 31 31 if ($t_ecp_name =="" || $t_ecp_code =="") { 32 32 // when post emty goto error page 33 $ecp_error = __('The Code Name and / or the Code must be filled in', 'e cp');33 $ecp_error = __('The Code Name and / or the Code must be filled in', 'easy-code-placement'); 34 34 $ecp_error_page = "&load=add"; 35 35 $ecp_error_id = ""; … … 40 40 if ($wpdb->num_rows) { 41 41 // when name in database goto error page 42 $ecp_error = __('The Code Name already exist - It must be uniqe', 'e cp');42 $ecp_error = __('The Code Name already exist - It must be uniqe', 'easy-code-placement'); 43 43 $ecp_error_page = "&load=add"; 44 44 $ecp_error_id = ""; … … 57 57 58 58 <div class="wrap"> 59 <h2>Easy Code Placement - <?php _e('New Code','e cp'); ?></h2>59 <h2>Easy Code Placement - <?php _e('New Code','easy-code-placement'); ?></h2> 60 60 <br> 61 61 … … 63 63 <table width="100%" border="0" cellspacing="0" cellpadding="3"> 64 64 <tr> 65 <td><?php _e('Name','e cp'); ?>:</td>65 <td><?php _e('Name','easy-code-placement'); ?>:</td> 66 66 </tr> 67 67 <tr> 68 68 <td><input type="text" style="width: 250px; height: 50px;" name="name" align="center"> 69 <br>- <?php _e('Only Letters and Numbers are allowed','e cp'); ?>.70 <br>- <?php _e('Instead of Whitesspaces use Underlines','e cp'); ?>.71 <br>- <?php _e('A maximum of 30 Characters is allowed','e cp'); ?>.</td>69 <br>- <?php _e('Only Letters and Numbers are allowed','easy-code-placement'); ?>. 70 <br>- <?php _e('Instead of Whitesspaces use Underlines','easy-code-placement'); ?>. 71 <br>- <?php _e('A maximum of 30 Characters is allowed','easy-code-placement'); ?>.</td> 72 72 </tr> 73 73 <tr> 74 <td><?php _e('Code','e cp'); ?>:</td>74 <td><?php _e('Code','easy-code-placement'); ?>:</td> 75 75 </tr> 76 76 <tr> … … 78 78 </tr> 79 79 <tr> 80 <td><?php _e('Alignment','e cp'); ?>:</td>80 <td><?php _e('Alignment','easy-code-placement'); ?>:</td> 81 81 </tr> 82 82 <tr> 83 83 <td> 84 <input type="radio" name="alignment" value="0" checked><?php _e('None','e cp'); ?>85 <input type="radio" name="alignment" value="1"><?php _e('Left','e cp'); ?>86 <input type="radio" name="alignment" value="2"><?php _e('Center','e cp'); ?>87 <input type="radio" name="alignment" value="3"><?php _e('Right','e cp'); ?>84 <input type="radio" name="alignment" value="0" checked><?php _e('None','easy-code-placement'); ?> 85 <input type="radio" name="alignment" value="1"><?php _e('Left','easy-code-placement'); ?> 86 <input type="radio" name="alignment" value="2"><?php _e('Center','easy-code-placement'); ?> 87 <input type="radio" name="alignment" value="3"><?php _e('Right','easy-code-placement'); ?> 88 88 </td> 89 89 </tr> 90 90 <tr> 91 <td><?php _e('Status','e cp'); ?>:</td>91 <td><?php _e('Status','easy-code-placement'); ?>:</td> 92 92 </tr> 93 93 <tr> 94 94 <td> 95 <input type="radio" name="status" value="1" checked><?php _e('Online','e cp'); ?>96 <input type="radio" name="status" value="2"><?php _e('Offline','e cp'); ?>95 <input type="radio" name="status" value="1" checked><?php _e('Online','easy-code-placement'); ?> 96 <input type="radio" name="status" value="2"><?php _e('Offline','easy-code-placement'); ?> 97 97 </td> 98 98 </tr> 99 99 </table> 100 <br><input type="button" class="button-secondary" value="<?php _e('Back','e cp'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'> <input type="submit" name="submit" class="button-primary" value="<?php _e('Add','ecp'); ?>">100 <br><input type="button" class="button-secondary" value="<?php _e('Back','easy-code-placement'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'> <input type="submit" name="submit" class="button-primary" value="<?php _e('Add','easy-code-placement'); ?>"> 101 101 </form> 102 102 -
easy-code-placement/trunk/inc/actions/alignment.php
r1256966 r1335072 10 10 if ($ecp_id=="" || !is_numeric($ecp_id)) { 11 11 // when get emty or other than numbers goto error page 12 $ecp_error = __('Modifying of the ID is not allowed', 'e cp');12 $ecp_error = __('Modifying of the ID is not allowed', 'easy-code-placement'); 13 13 $ecp_error_page = ""; 14 14 $ecp_error_id = ""; … … 16 16 } elseif ($ecp_alignment !=="0" && $ecp_alignment !=="1" && $ecp_alignment !=="2" && $ecp_alignment !=="3") { 17 17 // when get emty or other than numbers goto error page 18 $ecp_error = __('Modifying the Alignment to something else than 0, 1, 2 or 3 is not allowed', 'e cp');18 $ecp_error = __('Modifying the Alignment to something else than 0, 1, 2 or 3 is not allowed', 'easy-code-placement'); 19 19 $ecp_error_page = ""; 20 20 $ecp_error_id = ""; -
easy-code-placement/trunk/inc/actions/delete.php
r1256966 r1335072 9 9 if($ecp_id=="" || !is_numeric($ecp_id)) { 10 10 // when get emty or other than numbers goto error page 11 $ecp_error = __('Modifying of the ID is not allowed', 'e cp');11 $ecp_error = __('Modifying of the ID is not allowed', 'easy-code-placement'); 12 12 $ecp_error_page = ""; 13 13 $ecp_error_id = ""; -
easy-code-placement/trunk/inc/actions/edit.php
r1256966 r1335072 15 15 if($t_ecp_id=="" || !is_numeric($t_ecp_id)) { 16 16 // when get emty or other than numbers goto error page 17 $ecp_error = __('Modifying of the ID is not allowed', 'e cp');17 $ecp_error = __('Modifying of the ID is not allowed', 'easy-code-placement'); 18 18 $ecp_error_page = ""; 19 19 $ecp_error_id = ""; … … 23 23 if ($t_ecp_code =="") { 24 24 // when post emty goto error page 25 $ecp_error = __('The Code must be filled in', 'e cp');25 $ecp_error = __('The Code must be filled in', 'easy-code-placement'); 26 26 $ecp_error_page = "&load=edit"; 27 27 $ecp_error_id = "&ecpid=$ecp_id"; … … 44 44 if($ecp_id=="" || !is_numeric($ecp_id)) { 45 45 // when get emty or other than numbers goto error page 46 $ecp_error = __('Modifying of the ID is not allowed', 'e cp');46 $ecp_error = __('Modifying of the ID is not allowed', 'easy-code-placement'); 47 47 $ecp_error_page = ""; 48 48 $ecp_error_id = ""; … … 54 54 55 55 <div class="wrap"> 56 <h2>Easy Code Placement - <?php _e('Edit Code','e cp'); ?></h2>56 <h2>Easy Code Placement - <?php _e('Edit Code','easy-code-placement'); ?></h2> 57 57 <br> 58 58 … … 60 60 <table width="100%" border="0" cellspacing="0" cellpadding="3"> 61 61 <tr> 62 <td><?php _e('Name','e cp'); ?>:</td>62 <td><?php _e('Name','easy-code-placement'); ?>:</td> 63 63 </tr> 64 64 <tr> 65 65 <td><input disabled="disabled" type="text" style="width: 250px; height: 50px;" name="name" align="center" value="<?php echo ($ecp_load->name); ?>"> 66 66 <input type="hidden" name="id" align="center" value="<?php echo ($ecp_load->id); ?>"> 67 <br>- <?php _e('Only Letters and Numbers are allowed','e cp'); ?>.68 <br>- <?php _e('Instead of Whitesspaces use Underlines','e cp'); ?>.69 <br>- <?php _e('A maximum of 30 Characters is allowed','e cp'); ?>.</td>67 <br>- <?php _e('Only Letters and Numbers are allowed','easy-code-placement'); ?>. 68 <br>- <?php _e('Instead of Whitesspaces use Underlines','easy-code-placement'); ?>. 69 <br>- <?php _e('A maximum of 30 Characters is allowed','easy-code-placement'); ?>.</td> 70 70 </tr> 71 71 <tr> 72 <td><?php _e('Code','e cp'); ?>:</td>72 <td><?php _e('Code','easy-code-placement'); ?>:</td> 73 73 </tr> 74 74 <tr> … … 76 76 </tr> 77 77 <tr> 78 <td><?php _e('Alignment','e cp'); ?>:</td>78 <td><?php _e('Alignment','easy-code-placement'); ?>:</td> 79 79 </tr> 80 80 <tr> 81 81 <td> 82 <input type="radio" name="alignment" value="0" <?php if ($ecp_load->alignment == "0" OR $ecp_load->alignment == "") {echo "checked";} else {echo "";}; ?>><?php _e('None','e cp'); ?>83 <input type="radio" name="alignment" value="1" <?php if ($ecp_load->alignment == "1") {echo "checked";} else {echo "";}; ?>><?php _e('Left','e cp'); ?>84 <input type="radio" name="alignment" value="2" <?php if ($ecp_load->alignment == "2") {echo "checked";} else {echo "";}; ?>><?php _e('Center','e cp'); ?>85 <input type="radio" name="alignment" value="3" <?php if ($ecp_load->alignment == "3") {echo "checked";} else {echo "";}; ?>><?php _e('Right','e cp'); ?>82 <input type="radio" name="alignment" value="0" <?php if ($ecp_load->alignment == "0" OR $ecp_load->alignment == "") {echo "checked";} else {echo "";}; ?>><?php _e('None','easy-code-placement'); ?> 83 <input type="radio" name="alignment" value="1" <?php if ($ecp_load->alignment == "1") {echo "checked";} else {echo "";}; ?>><?php _e('Left','easy-code-placement'); ?> 84 <input type="radio" name="alignment" value="2" <?php if ($ecp_load->alignment == "2") {echo "checked";} else {echo "";}; ?>><?php _e('Center','easy-code-placement'); ?> 85 <input type="radio" name="alignment" value="3" <?php if ($ecp_load->alignment == "3") {echo "checked";} else {echo "";}; ?>><?php _e('Right','easy-code-placement'); ?> 86 86 </td> 87 87 </tr> 88 88 <tr> 89 <td><?php _e('Status','e cp'); ?>:</td>89 <td><?php _e('Status','easy-code-placement'); ?>:</td> 90 90 </tr> 91 91 <tr> 92 92 <td> 93 <input type="radio" name="status" value="1" <?php if ($ecp_load->status == "1") {echo "checked";} else {echo "";}; ?>><?php _e('Online','e cp'); ?>94 <input type="radio" name="status" value="2" <?php if ($ecp_load->status == "2") {echo "checked";} else {echo "";}; ?>><?php _e('Offline','e cp'); ?>93 <input type="radio" name="status" value="1" <?php if ($ecp_load->status == "1") {echo "checked";} else {echo "";}; ?>><?php _e('Online','easy-code-placement'); ?> 94 <input type="radio" name="status" value="2" <?php if ($ecp_load->status == "2") {echo "checked";} else {echo "";}; ?>><?php _e('Offline','easy-code-placement'); ?> 95 95 </td> 96 96 </tr> 97 97 </table> 98 <br><input type="button" class="button-secondary" value="<?php _e('Back','e cp'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'> <input type="submit" name="submit" class="button-primary" value="<?php _e('Save','ecp'); ?>">98 <br><input type="button" class="button-secondary" value="<?php _e('Back','easy-code-placement'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'> <input type="submit" name="submit" class="button-primary" value="<?php _e('Save','easy-code-placement'); ?>"> 99 99 </form> 100 100 -
easy-code-placement/trunk/inc/actions/status.php
r1256966 r1335072 10 10 if ($ecp_id=="" || !is_numeric($ecp_id)) { 11 11 // when get emty or other than numbers goto error page 12 $ecp_error = __('Modifying of the ID is not allowed', 'e cp');12 $ecp_error = __('Modifying of the ID is not allowed', 'easy-code-placement'); 13 13 $ecp_error_page = ""; 14 14 $ecp_error_id = ""; … … 16 16 } elseif ($ecp_status !=="1" && $ecp_status !=="2") { 17 17 // when get emty or other than numbers goto error page 18 $ecp_error = __('Modifying of the Status to something else than 1 or 2 is not allowed', 'e cp');18 $ecp_error = __('Modifying of the Status to something else than 1 or 2 is not allowed', 'easy-code-placement'); 19 19 $ecp_error_page = ""; 20 20 $ecp_error_id = ""; -
easy-code-placement/trunk/inc/classes/class-ecp-table.php
r1256966 r1335072 16 16 function column_action ($item){ 17 17 if ($item['status'] === '1') { 18 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=status&ecpid='.$item['id'].'&status=2'); ?>'><img src="<?php echo plugins_url('../../img/green.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Status is Online - Click to change','e cp'); ?>" alt="<?php echo _e('Online','ecp'); ?>"></a> <?php18 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=status&ecpid='.$item['id'].'&status=2'); ?>'><img src="<?php echo plugins_url('../../img/green.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Status is Online - Click to change','easy-code-placement'); ?>" alt="<?php echo _e('Online','easy-code-placement'); ?>"></a> <?php 19 19 } elseif ($item['status'] === '2') { 20 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=status&ecpid='.$item['id'].'&status=1'); ?>'><img src="<?php echo plugins_url('../../img/red.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Status is Offline - Click to change','e cp'); ?>" alt="<?php echo _e('Offline','ecp'); ?>"></a> <?php20 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=status&ecpid='.$item['id'].'&status=1'); ?>'><img src="<?php echo plugins_url('../../img/red.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Status is Offline - Click to change','easy-code-placement'); ?>" alt="<?php echo _e('Offline','easy-code-placement'); ?>"></a> <?php 21 21 } 22 22 if ($item['alignment'] === '0') { 23 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$item['id'].'&alignment=1'); ?>'><img src="<?php echo plugins_url('../../img/none.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('No Alignment - Click to change','e cp'); ?>" alt="<?php echo _e('None','ecp'); ?>"></a> <?php23 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$item['id'].'&alignment=1'); ?>'><img src="<?php echo plugins_url('../../img/none.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('No Alignment - Click to change','easy-code-placement'); ?>" alt="<?php echo _e('None','easy-code-placement'); ?>"></a> <?php 24 24 } elseif ($item['alignment'] === '1') { 25 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$item['id'].'&alignment=2'); ?>'><img src="<?php echo plugins_url('../../img/left.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Left Alignment - Click to change','e cp'); ?>" alt="<?php echo _e('Left','ecp'); ?>"></a> <?php25 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$item['id'].'&alignment=2'); ?>'><img src="<?php echo plugins_url('../../img/left.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Left Alignment - Click to change','easy-code-placement'); ?>" alt="<?php echo _e('Left','easy-code-placement'); ?>"></a> <?php 26 26 } elseif ($item['alignment'] === '2') { 27 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$item['id'].'&alignment=3'); ?>'><img src="<?php echo plugins_url('../../img/center.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Center Alignment - Click to change','e cp'); ?>" alt="<?php echo _e('Center','ecp'); ?>"></a> <?php27 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$item['id'].'&alignment=3'); ?>'><img src="<?php echo plugins_url('../../img/center.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Center Alignment - Click to change','easy-code-placement'); ?>" alt="<?php echo _e('Center','easy-code-placement'); ?>"></a> <?php 28 28 } elseif ($item['alignment'] === '3') { 29 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$item['id'].'&alignment=0'); ?>'><img src="<?php echo plugins_url('../../img/right.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Right Alignment - Click to change','e cp'); ?>" alt="<?php echo _e('Right','ecp'); ?>"></a> <?php29 ?><a href='<?php echo admin_url('options-general.php?page=ecp&load=alignment&ecpid='.$item['id'].'&alignment=0'); ?>'><img src="<?php echo plugins_url('../../img/right.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Right Alignment - Click to change','easy-code-placement'); ?>" alt="<?php echo _e('Right','easy-code-placement'); ?>"></a> <?php 30 30 }?> 31 <a href='<?php echo admin_url('options-general.php?page=ecp&load=edit&ecpid='.$item['id']); ?>'><img src="<?php echo plugins_url('../../img/edit.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Edit','e cp'); ?>" alt="<?php _e('Edit','ecp'); ?>"></a> 32 <a href='<?php echo admin_url('options-general.php?page=ecp&load=delete&ecpid='.$item['id']); ?>'><img src="<?php echo plugins_url('../../img/delete.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Delete','e cp'); ?>" alt="<?php _e('Delete','ecp'); ?>"></a>31 <a href='<?php echo admin_url('options-general.php?page=ecp&load=edit&ecpid='.$item['id']); ?>'><img src="<?php echo plugins_url('../../img/edit.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Edit','easy-code-placement'); ?>" alt="<?php _e('Edit','easy-code-placement'); ?>"></a> 32 <a href='<?php echo admin_url('options-general.php?page=ecp&load=delete&ecpid='.$item['id']); ?>'><img src="<?php echo plugins_url('../../img/delete.png' , __FILE__); ?>" style="vertical-align:middle;" width="32" height="32" title="<?php echo _e('Delete','easy-code-placement'); ?>" alt="<?php _e('Delete','easy-code-placement'); ?>"></a> 33 33 <?php 34 34 return; … … 54 54 function get_columns(){ 55 55 $columns = array( 56 'name' => __('Name', 'e cp'),57 'shortcode' => __('Shortcode', 'e cp'),58 'action' => __('Action', 'e cp')56 'name' => __('Name', 'easy-code-placement'), 57 'shortcode' => __('Shortcode', 'easy-code-placement'), 58 'action' => __('Action', 'easy-code-placement') 59 59 ); 60 60 return $columns; … … 68 68 // if no data - say 69 69 function no_items() { 70 _e('No Code found - Click "Add New Code" to add one.','e cp');70 _e('No Code found - Click "Add New Code" to add one.','easy-code-placement'); 71 71 } 72 72 -
easy-code-placement/trunk/inc/classes/class-ecp-tables.php
r1334967 r1335072 520 520 extract( $this->_pagination_args, EXTR_SKIP ); 521 521 522 $output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items), number_format_i18n( $total_items ) ) . '</span>';522 $output = '<span class="displaying-num">' . sprintf( _n( '1 Code', '%s Codes', $total_items, 'easy-code-placement' ), number_format_i18n( $total_items ) ) . '</span>'; 523 523 524 524 $current = $this->get_pagenum(); … … 538 538 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", 539 539 'first-page' . $disable_first, 540 esc_attr__( 'Go to the first page' ),540 esc_attr__( 'Go to the first page', 'easy-code-placement' ), 541 541 esc_url( remove_query_arg( 'paged', $current_url ) ), 542 542 '«' … … 545 545 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", 546 546 'prev-page' . $disable_first, 547 esc_attr__( 'Go to the previous page' ),547 esc_attr__( 'Go to the previous page', 'easy-code-placement' ), 548 548 esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ), 549 549 '‹' … … 554 554 else 555 555 $html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='paged' value='%s' size='%d' />", 556 esc_attr__( 'Current page' ),556 esc_attr__( 'Current page', 'easy-code-placement' ), 557 557 $current, 558 558 strlen( $total_pages ) … … 560 560 561 561 $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) ); 562 $page_links[] = '<span class="paging-input">' . sprintf( _ x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . '</span>';562 $page_links[] = '<span class="paging-input">' . sprintf( __( '%1$s of %2$s', 'easy-code-placement' ), $html_current_page, $html_total_pages ) . '</span>'; 563 563 564 564 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", 565 565 'next-page' . $disable_last, 566 esc_attr__( 'Go to the next page' ),566 esc_attr__( 'Go to the next page', 'easy-code-placement' ), 567 567 esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ), 568 568 '›' … … 571 571 $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", 572 572 'last-page' . $disable_last, 573 esc_attr__( 'Go to the last page' ),573 esc_attr__( 'Go to the last page', 'easy-code-placement' ), 574 574 esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ), 575 575 '»' … … 935 935 936 936 if ( isset( $total_items ) ) 937 $response['total_items_i18n'] = sprintf( _n( '1 item', '%s items', $total_items), number_format_i18n( $total_items ) );937 $response['total_items_i18n'] = sprintf( _n( '1 Code', '%s Codes', $total_items, 'easy-code-placement' ), number_format_i18n( $total_items ) ); 938 938 939 939 if ( isset( $total_pages ) ) { -
easy-code-placement/trunk/inc/error.php
r1256966 r1335072 1 1 <div class="wrap"> 2 <h2>Easy Code Placement <?php _e('Error','e cp'); ?></h2>2 <h2>Easy Code Placement <?php _e('Error','easy-code-placement'); ?></h2> 3 3 <br> 4 4 5 5 <table width="100%" border="0" cellspacing="0" cellpadding="6"> 6 6 <tr> 7 <td><h3><font color="#FF0000"><?php _e('Error','e cp'); ?>!</font></h3></td>7 <td><h3><font color="#FF0000"><?php _e('Error','easy-code-placement'); ?>!</font></h3></td> 8 8 </tr> 9 9 <tr> … … 11 11 </tr> 12 12 </table> 13 <br><input type="button" class="button-secondary" value="<?php _e('Back','e cp'); ?>" onClick='document.location.href="<?php echo admin_url("options-general.php?page=ecp$ecp_error_page$ecp_error_id");?>"'>13 <br><input type="button" class="button-secondary" value="<?php _e('Back','easy-code-placement'); ?>" onClick='document.location.href="<?php echo admin_url("options-general.php?page=ecp$ecp_error_page$ecp_error_id");?>"'> 14 14 15 15 </div> -
easy-code-placement/trunk/inc/functions.php
r1334961 r1335072 98 98 } 99 99 100 // update to 3.1 100 // update to 3.1.1 101 101 function ecp_update(){ 102 102 // multiside update … … 108 108 switch_to_blog($blogid); 109 109 $wpdb->query("ALTER TABLE ".$wpdb->prefix."ecp_options MODIFY COLUMN option_value varchar(20)"); 110 $wpdb->query("UPDATE ".$wpdb->prefix."ecp_data SET version='3.1 '");110 $wpdb->query("UPDATE ".$wpdb->prefix."ecp_data SET version='3.1.1'"); 111 111 $wpdb->insert($wpdb->prefix.'ecp_options', array( 'option_name' => 'role','option_value' => 'manage_options')); 112 $wpdb->update($wpdb->prefix.'ecp_options', array( 'option_value' => '3.1 ' ), array( 'option_name' => 'version' ));112 $wpdb->update($wpdb->prefix.'ecp_options', array( 'option_value' => '3.1.1' ), array( 'option_name' => 'version' )); 113 113 } 114 114 switch_to_blog($blog); … … 117 117 global $wpdb; 118 118 $wpdb->query("ALTER TABLE ".$wpdb->prefix."ecp_options MODIFY COLUMN option_value varchar(20)"); 119 $wpdb->query("UPDATE ".$wpdb->prefix."ecp_data SET version='3.1 '");119 $wpdb->query("UPDATE ".$wpdb->prefix."ecp_data SET version='3.1.1'"); 120 120 $wpdb->insert($wpdb->prefix.'ecp_options', array( 'option_name' => 'role','option_value' => 'manage_options')); 121 $wpdb->update($wpdb->prefix.'ecp_options', array( 'option_value' => '3.1 ' ), array( 'option_name' => 'version' ));121 $wpdb->update($wpdb->prefix.'ecp_options', array( 'option_value' => '3.1.1' ), array( 'option_name' => 'version' )); 122 122 } 123 123 } … … 129 129 if (! is_admin()) { 130 130 return; 131 } elseif ($ecp_options_version === '3.1 ') {131 } elseif ($ecp_options_version === '3.1.1') { 132 132 return; 133 133 } else { -
easy-code-placement/trunk/inc/page.php
r1334958 r1335072 30 30 <table width="100%" border="0" cellspacing="0" cellpadding="0"> 31 31 <tr> 32 <td width="70%" align="left"><h2>Easy Code Placement - <?php _e('Codes','e cp'); ?></h2></td>33 <td width="30%" align="right"><input type="button" class="button-secondary" value="<?php _e('System Information','e cp'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp&load=system');?>"'></td>32 <td width="70%" align="left"><h2>Easy Code Placement - <?php _e('Codes','easy-code-placement'); ?></h2></td> 33 <td width="30%" align="right"><input type="button" class="button-secondary" value="<?php _e('System Information','easy-code-placement'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp&load=system');?>"'></td> 34 34 </tr> 35 35 </table> … … 37 37 <?php render_ecp_table(); ?> 38 38 39 <input type="button" class="button-primary" value="<?php _e('Add New Code','e cp'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp&load=add');?>"'> <input type="button" class="button-primary" value="<?php _e('Settings','ecp'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp&load=settings');?>"'>39 <input type="button" class="button-primary" value="<?php _e('Add New Code','easy-code-placement'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp&load=add');?>"'> <input type="button" class="button-primary" value="<?php _e('Settings','easy-code-placement'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp&load=settings');?>"'> 40 40 41 41 <table width="100%" border="0" cellspacing="0" cellpadding="6"> 42 42 <tr> 43 <td width="600px" align="left"><?php _e('If you want to thank the developer for this free Plugin, you are welcome to make a donation via PayPal (you don\'t need a PayPal account to make the donation).','e cp'); ?></td>43 <td width="600px" align="left"><?php _e('If you want to thank the developer for this free Plugin, you are welcome to make a donation via PayPal (you don\'t need a PayPal account to make the donation).','easy-code-placement'); ?></td> 44 44 <td><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank"> 45 45 <input type="hidden" name="cmd" value="_s-xclick"> -
easy-code-placement/trunk/inc/settings.php
r1334958 r1335072 13 13 if ($t_ecp_perpage == "") { 14 14 // when perpage is empty 15 $ecp_error = __('The Option "Codes per Page" must be filled in', 'e cp');15 $ecp_error = __('The Option "Codes per Page" must be filled in', 'easy-code-placement'); 16 16 $ecp_error_page = "&load=settings"; 17 17 $ecp_error_id = ""; … … 21 21 if (!is_numeric($t_ecp_perpage)) { 22 22 // when perpage not a number 23 $ecp_error = __('The Value for the Option "Codes per Page" must be numeric', 'e cp');23 $ecp_error = __('The Value for the Option "Codes per Page" must be numeric', 'easy-code-placement'); 24 24 $ecp_error_page = "&load=settings"; 25 25 $ecp_error_id = ""; … … 39 39 40 40 <div class="wrap"> 41 <h2>Easy Code Placement - <?php _e('Settings','e cp'); ?></h2>41 <h2>Easy Code Placement - <?php _e('Settings','easy-code-placement'); ?></h2> 42 42 <br> 43 43 … … 51 51 <thead> 52 52 <tr> 53 <th><?php _e('Name','e cp'); ?></th>54 <th><?php _e('Value','e cp'); ?></th>53 <th><?php _e('Name','easy-code-placement'); ?></th> 54 <th><?php _e('Value','easy-code-placement'); ?></th> 55 55 </tr> 56 56 </thead> 57 57 <tbody> 58 58 <tr> 59 <td><?php _e('Who can manage this Plugin?','e cp'); ?></td>59 <td><?php _e('Who can manage this Plugin?','easy-code-placement'); ?></td> 60 60 <td> 61 61 <?php … … 64 64 ?> 65 65 <select name="role"> 66 <option <?php if ($ecp_role === 'manage_options') {echo 'selected';}; ?> value="manage_options"><?php _e('Adminstrators and higher','e cp'); ?></option>67 <option <?php if ($ecp_role === 'manage_categories') {echo 'selected';}; ?> value="manage_categories"><?php _e('Editors and higher','e cp'); ?></option>68 <option <?php if ($ecp_role === 'publish_posts') {echo 'selected';}; ?> value="publish_posts"><?php _e('Authors and higher','e cp'); ?></option>69 <option <?php if ($ecp_role === 'edit_posts') {echo 'selected';}; ?> value="edit_posts"><?php _e('Contributors and higher','e cp'); ?></option>66 <option <?php if ($ecp_role === 'manage_options') {echo 'selected';}; ?> value="manage_options"><?php _e('Adminstrators and higher','easy-code-placement'); ?></option> 67 <option <?php if ($ecp_role === 'manage_categories') {echo 'selected';}; ?> value="manage_categories"><?php _e('Editors and higher','easy-code-placement'); ?></option> 68 <option <?php if ($ecp_role === 'publish_posts') {echo 'selected';}; ?> value="publish_posts"><?php _e('Authors and higher','easy-code-placement'); ?></option> 69 <option <?php if ($ecp_role === 'edit_posts') {echo 'selected';}; ?> value="edit_posts"><?php _e('Contributors and higher','easy-code-placement'); ?></option> 70 70 </select> 71 71 </td> 72 72 </tr> 73 73 <tr> 74 <td><?php _e('Codes per Page','e cp'); ?></td>74 <td><?php _e('Codes per Page','easy-code-placement'); ?></td> 75 75 <td> 76 76 <?php … … 84 84 </table> 85 85 86 <br><input type="button" class="button-secondary" value="<?php _e('Back','e cp'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'> <input type="submit" name="submit" class="button-primary" value="<?php _e('Save','ecp'); ?>">86 <br><input type="button" class="button-secondary" value="<?php _e('Back','easy-code-placement'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'> <input type="submit" name="submit" class="button-primary" value="<?php _e('Save','easy-code-placement'); ?>"> 87 87 </form> 88 88 -
easy-code-placement/trunk/inc/system.php
r1334958 r1335072 1 1 <div class="wrap"> 2 <h2>Easy Code Placement - <?php _e('System Information','e cp'); ?></h2>2 <h2>Easy Code Placement - <?php _e('System Information','easy-code-placement'); ?></h2> 3 3 <br> 4 4 5 <h3><?php _e('General','e cp'); ?></h3>5 <h3><?php _e('General','easy-code-placement'); ?></h3> 6 6 <table class="widefat"> 7 7 <colgroup> … … 11 11 <thead> 12 12 <tr> 13 <th><?php _e('Name','e cp'); ?></th>14 <th><?php _e('Value','e cp'); ?></th>13 <th><?php _e('Name','easy-code-placement'); ?></th> 14 <th><?php _e('Value','easy-code-placement'); ?></th> 15 15 </tr> 16 16 </thead> 17 17 <tbody> 18 18 <tr> 19 <td><?php _e('PHP Version','e cp'); ?></td>19 <td><?php _e('PHP Version','easy-code-placement'); ?></td> 20 20 <td><?php echo PHP_VERSION; ?></td> 21 21 </tr> 22 22 <tr> 23 <td><?php _e('MySQL Version','e cp'); ?></td>23 <td><?php _e('MySQL Version','easy-code-placement'); ?></td> 24 24 <td><?php 25 25 if (isset($GLOBALS['wpdb']->dbh->server_info)) { … … 28 28 echo mysql_get_server_info(); 29 29 } else { 30 _e('Error','e cp');30 _e('Error','easy-code-placement'); 31 31 } 32 32 ?> … … 34 34 </tr> 35 35 <tr> 36 <td><?php _e('WordPress Version','e cp'); ?></td>36 <td><?php _e('WordPress Version','easy-code-placement'); ?></td> 37 37 <td><?php echo get_bloginfo ('version'); ?></td> 38 38 </tr> 39 39 <tr> 40 <td><?php _e('WordPress Network Page','e cp'); ?></td>40 <td><?php _e('WordPress Network Page','easy-code-placement'); ?></td> 41 41 <td><?php 42 42 if (is_multisite()) { 43 _e('Yes','e cp');43 _e('Yes','easy-code-placement'); 44 44 } else { 45 _e('No','e cp');45 _e('No','easy-code-placement'); 46 46 } 47 47 ?> … … 49 49 </tr> 50 50 <tr> 51 <td><?php _e('Plugin Version (File)','e cp'); ?></td>51 <td><?php _e('Plugin Version (File)','easy-code-placement'); ?></td> 52 52 <td><?php echo ECP_VERSION; ?></td> 53 53 </tr> 54 54 <tr> 55 <td><?php _e('Plugin Version (Database)','e cp'); ?></td>55 <td><?php _e('Plugin Version (Database)','easy-code-placement'); ?></td> 56 56 <td><?php 57 57 global $wpdb; 58 58 $ecp_options_version = $wpdb->get_var("SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'version'"); 59 59 if ($ecp_options_version === '') { 60 _e('Error','e cp');60 _e('Error','easy-code-placement'); 61 61 } else { 62 62 echo $ecp_options_version; … … 66 66 </tr> 67 67 <tr> 68 <td><?php _e('Role','e cp'); ?></td>68 <td><?php _e('Role','easy-code-placement'); ?></td> 69 69 <td><?php 70 70 global $wpdb; 71 71 $ecp_options_role = $wpdb->get_var("SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'role'"); 72 72 if ($ecp_options_role === '') { 73 _e('Error','e cp');73 _e('Error','easy-code-placement'); 74 74 } else { 75 75 echo $ecp_options_role; … … 81 81 </table> 82 82 83 <h3><?php _e('Configuration','e cp'); ?></h3>83 <h3><?php _e('Configuration','easy-code-placement'); ?></h3> 84 84 <table class="widefat"> 85 85 <colgroup> … … 89 89 <thead> 90 90 <tr> 91 <th><?php _e('Name','e cp'); ?></th>92 <th><?php _e('Value','e cp'); ?></th>91 <th><?php _e('Name','easy-code-placement'); ?></th> 92 <th><?php _e('Value','easy-code-placement'); ?></th> 93 93 </tr> 94 94 </thead> 95 95 <tbody> 96 96 <tr> 97 <td><?php _e('PHP max. execution time','e cp'); ?></td>97 <td><?php _e('PHP max. execution time','easy-code-placement'); ?></td> 98 98 <td><?php 99 99 if (function_exists('ini_get')) { 100 100 echo ini_get('max_execution_time').'s'; 101 101 } else { 102 _e('Error','e cp');102 _e('Error','easy-code-placement'); 103 103 } ?> 104 104 </td> 105 105 </tr> 106 106 <tr> 107 <td><?php _e('PHP memory limit','e cp'); ?></td>107 <td><?php _e('PHP memory limit','easy-code-placement'); ?></td> 108 108 <td><?php 109 109 if (function_exists('ini_get')) { 110 110 echo ini_get('memory_limit').'B'; 111 111 } else { 112 _e('Error','e cp');112 _e('Error','easy-code-placement'); 113 113 } ?> 114 114 </td> 115 115 </tr> 116 116 <tr> 117 <td><?php _e('WordPress memory limit','e cp'); ?></td>117 <td><?php _e('WordPress memory limit','easy-code-placement'); ?></td> 118 118 <td><?php echo WP_MEMORY_LIMIT; ?>B</td> 119 119 </tr> … … 121 121 </table> 122 122 123 <h3><?php _e('Paths','e cp'); ?></h3>123 <h3><?php _e('Paths','easy-code-placement'); ?></h3> 124 124 <table class="widefat"> 125 125 <colgroup> … … 129 129 <thead> 130 130 <tr> 131 <th><?php _e('Name','e cp'); ?></th>132 <th><?php _e('Value','e cp'); ?></th>131 <th><?php _e('Name','easy-code-placement'); ?></th> 132 <th><?php _e('Value','easy-code-placement'); ?></th> 133 133 </tr> 134 134 </thead> 135 135 <tbody> 136 136 <tr> 137 <td><?php _e('Home URL','e cp'); ?></td>137 <td><?php _e('Home URL','easy-code-placement'); ?></td> 138 138 <td class="code"><?php echo home_url(); ?></td> 139 139 </tr> 140 140 <tr> 141 <td><?php _e('Site URL','e cp'); ?></td>141 <td><?php _e('Site URL','easy-code-placement'); ?></td> 142 142 <td class="code"><?php echo site_url(); ?></td> 143 143 </tr> 144 144 <tr> 145 <td><?php _e('Plugin URL','e cp'); ?></td>145 <td><?php _e('Plugin URL','easy-code-placement'); ?></td> 146 146 <td class="code"><?php echo plugins_url(); ?></td> 147 147 </tr> … … 151 151 152 152 <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>"> 153 <br><input type="button" class="button-secondary" value="<?php _e('Back','e cp'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'>153 <br><input type="button" class="button-secondary" value="<?php _e('Back','easy-code-placement'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'> 154 154 </form> 155 155 -
easy-code-placement/trunk/readme.txt
r1334958 r1335072 2 2 Contributors: wassereimer 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2X2EH5MYGPLL4 4 Tags: ad, add this, ads, adsense, adsense plugin, advertising, affilimatch, affilinet, align, alignment, amazon associates, audio, clicksor, code, codes, css, flash, google, google adsense, html, infolinks, insert, java, javascript, multisite, network, offline, online, page, pages, php, place, plugin, post, posts, shortcode, shortcodes, snippet, snippets, text, video, widget5 Requires at least: 3.0 4 Tags: ad, add, addthis, ads, adsense, adsense plugin, advertising, affilimatch, affilinet, align, alignment, amazon associates, any, audio, clicksor, code, codes, css, easy, flash, google, google adsense, html, infolinks, insert, java, javascript, multisite, network, offline, online, page, pages, php, place, placement, plugin, post, posts, shortcode, shortcodes, snippet, snippets, text, video, widget 5 Requires at least: 3.0.1 6 6 Tested up to: 4.4.1 7 Stable tag: 3.1 7 Stable tag: 3.1.1 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 14 14 15 15 Easy Code Placement provides a very easy way to place any Code where you want to have it. - You can use the WordPress Text Widget with an Shortcode in it or just place a Shortcode anywhere in Posts/Pages to display your code where you want to have it. 16 17 ATTENTION! CSS, Javascript and Flash Codes does have Problems at the moment. It will be fixed in the future! 16 18 17 19 = Which Codes? = … … 81 83 == Changelog == 82 84 85 = 3.1.1 = 86 * 24.01.2016 87 * Fixed the false configured text-domain 88 * Fixed hardcoded text to be translatable 89 * Added missing Strings to the German Translation 90 * Added a .pot File for translations 91 * Added a few tags 92 * Added a warning that CSS, Javascript and Flash Codes does have Problems at the moment 93 83 94 = 3.1 = 84 95 * 24.01.2016
Note: See TracChangeset
for help on using the changeset viewer.