Plugin Directory

Changeset 1335072


Ignore:
Timestamp:
01/24/2016 06:25:07 PM (10 years ago)
Author:
wassereimer
Message:

new version

Location:
easy-code-placement/trunk
Files:
3 added
2 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • easy-code-placement/trunk/easy-code-placement.php

    r1334958 r1335072  
    11<?php
    22/*
    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 */
    1113
    1214// standards
    1315ob_start();
    1416define('ECP_FILE',__FILE__);
    15 define('ECP_VERSION','3.1');
     17define('ECP_VERSION','3.1.1');
    1618
    1719// load functions, classes
     
    3133
    3234// load languages
    33 load_plugin_textdomain('ecp', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
     35load_plugin_textdomain('easy-code-placement', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
    3436
    3537// include install and uninstall files
  • easy-code-placement/trunk/inc/actions/add.php

    r1256966 r1335072  
    1515    if (strlen($t_ecp_name) > 30) {
    1616        // when name is longer than 30 chars
    17         $ecp_error = __('A maximum of 30 Characters is allowed', 'ecp');
     17        $ecp_error = __('A maximum of 30 Characters is allowed', 'easy-code-placement');
    1818        $ecp_error_page = "&load=add";
    1919        $ecp_error_id = "";
     
    2323    if (preg_match("/[^a-zA-Z0-9\_-]/i", $t_ecp_name)) {
    2424        // when name contains spechial chars
    25         $ecp_error = __('Special Characters are not allowed in the Code Name', 'ecp');
     25        $ecp_error = __('Special Characters are not allowed in the Code Name', 'easy-code-placement');
    2626        $ecp_error_page = "&load=add";
    2727        $ecp_error_id = "";
     
    3131    if ($t_ecp_name =="" || $t_ecp_code =="") {
    3232        // when post emty goto error page
    33     $ecp_error = __('The Code Name and / or the Code must be filled in', 'ecp');
     33    $ecp_error = __('The Code Name and / or the Code must be filled in', 'easy-code-placement');
    3434        $ecp_error_page = "&load=add";
    3535        $ecp_error_id = "";
     
    4040    if ($wpdb->num_rows) {
    4141        // when name in database goto error page
    42     $ecp_error = __('The Code Name already exist - It must be uniqe', 'ecp');
     42    $ecp_error = __('The Code Name already exist - It must be uniqe', 'easy-code-placement');
    4343        $ecp_error_page = "&load=add";
    4444        $ecp_error_id = "";
     
    5757
    5858<div class="wrap">
    59 <h2>Easy Code Placement - <?php _e('New Code','ecp'); ?></h2>
     59<h2>Easy Code Placement - <?php _e('New Code','easy-code-placement'); ?></h2>
    6060<br>
    6161
     
    6363<table width="100%" border="0" cellspacing="0" cellpadding="3">   
    6464    <tr>
    65         <td><?php _e('Name','ecp'); ?>:</td>
     65        <td><?php _e('Name','easy-code-placement'); ?>:</td>
    6666    </tr>
    6767    <tr>
    6868        <td><input type="text" style="width: 250px; height: 50px;" name="name" align="center">
    69         <br>- <?php _e('Only Letters and Numbers are allowed','ecp'); ?>.
    70         <br>- <?php _e('Instead of Whitesspaces use Underlines','ecp'); ?>.
    71         <br>- <?php _e('A maximum of 30 Characters is allowed','ecp'); ?>.</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>
    7272    </tr>
    7373    <tr>
    74         <td><?php _e('Code','ecp'); ?>:</td>
     74        <td><?php _e('Code','easy-code-placement'); ?>:</td>
    7575    </tr>
    7676    <tr>
     
    7878    </tr>
    7979    <tr>
    80         <td><?php _e('Alignment','ecp'); ?>:</td>
     80        <td><?php _e('Alignment','easy-code-placement'); ?>:</td>
    8181    </tr>
    8282    <tr>
    8383        <td>
    84             <input type="radio" name="alignment" value="0" checked><?php _e('None','ecp'); ?>
    85             <input type="radio" name="alignment" value="1"><?php _e('Left','ecp'); ?>
    86             <input type="radio" name="alignment" value="2"><?php _e('Center','ecp'); ?>
    87             <input type="radio" name="alignment" value="3"><?php _e('Right','ecp'); ?>
     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'); ?>
    8888        </td>
    8989    </tr>
    9090    <tr>
    91         <td><?php _e('Status','ecp'); ?>:</td>
     91        <td><?php _e('Status','easy-code-placement'); ?>:</td>
    9292    </tr>
    9393    <tr>
    9494        <td>
    95             <input type="radio" name="status" value="1" checked><?php _e('Online','ecp'); ?>
    96             <input type="radio" name="status" value="2"><?php _e('Offline','ecp'); ?>
     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'); ?>
    9797        </td>
    9898    </tr>
    9999</table>
    100 <br><input type="button" class="button-secondary" value="<?php _e('Back','ecp'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'>&nbsp;&nbsp;<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');?>"'>&nbsp;&nbsp;<input type="submit" name="submit" class="button-primary" value="<?php _e('Add','easy-code-placement'); ?>">
    101101</form>
    102102
  • easy-code-placement/trunk/inc/actions/alignment.php

    r1256966 r1335072  
    1010if ($ecp_id=="" || !is_numeric($ecp_id)) {
    1111    // when get emty or other than numbers goto error page
    12     $ecp_error = __('Modifying of the ID is not allowed', 'ecp');
     12    $ecp_error = __('Modifying of the ID is not allowed', 'easy-code-placement');
    1313    $ecp_error_page = "";
    1414    $ecp_error_id = "";
     
    1616} elseif ($ecp_alignment !=="0" && $ecp_alignment !=="1" && $ecp_alignment !=="2" && $ecp_alignment !=="3") {
    1717    // 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', 'ecp');
     18    $ecp_error = __('Modifying the Alignment to something else than 0, 1, 2 or 3 is not allowed', 'easy-code-placement');
    1919    $ecp_error_page = "";
    2020    $ecp_error_id = "";
  • easy-code-placement/trunk/inc/actions/delete.php

    r1256966 r1335072  
    99if($ecp_id=="" || !is_numeric($ecp_id)) {
    1010    // when get emty or other than numbers goto error page
    11     $ecp_error = __('Modifying of the ID is not allowed', 'ecp');
     11    $ecp_error = __('Modifying of the ID is not allowed', 'easy-code-placement');
    1212    $ecp_error_page = "";
    1313    $ecp_error_id = "";
  • easy-code-placement/trunk/inc/actions/edit.php

    r1256966 r1335072  
    1515    if($t_ecp_id=="" || !is_numeric($t_ecp_id)) {
    1616        // when get emty or other than numbers goto error page
    17         $ecp_error = __('Modifying of the ID is not allowed', 'ecp');
     17        $ecp_error = __('Modifying of the ID is not allowed', 'easy-code-placement');
    1818        $ecp_error_page = "";
    1919        $ecp_error_id = "";
     
    2323    if ($t_ecp_code =="") {
    2424        // when post emty goto error page
    25     $ecp_error = __('The Code must be filled in', 'ecp');
     25    $ecp_error = __('The Code must be filled in', 'easy-code-placement');
    2626        $ecp_error_page = "&load=edit";
    2727        $ecp_error_id = "&ecpid=$ecp_id";
     
    4444    if($ecp_id=="" || !is_numeric($ecp_id)) {
    4545        // when get emty or other than numbers goto error page
    46         $ecp_error = __('Modifying of the ID is not allowed', 'ecp');
     46        $ecp_error = __('Modifying of the ID is not allowed', 'easy-code-placement');
    4747        $ecp_error_page = "";
    4848        $ecp_error_id = "";
     
    5454
    5555<div class="wrap">
    56 <h2>Easy Code Placement - <?php _e('Edit Code','ecp'); ?></h2>
     56<h2>Easy Code Placement - <?php _e('Edit Code','easy-code-placement'); ?></h2>
    5757<br>
    5858
     
    6060<table width="100%" border="0" cellspacing="0" cellpadding="3">   
    6161    <tr>
    62         <td><?php _e('Name','ecp'); ?>:</td>
     62        <td><?php _e('Name','easy-code-placement'); ?>:</td>
    6363    </tr>
    6464    <tr>
    6565        <td><input disabled="disabled" type="text" style="width: 250px; height: 50px;" name="name" align="center" value="<?php echo ($ecp_load->name); ?>">
    6666        <input type="hidden" name="id" align="center" value="<?php echo ($ecp_load->id); ?>">
    67         <br>- <?php _e('Only Letters and Numbers are allowed','ecp'); ?>.
    68         <br>- <?php _e('Instead of Whitesspaces use Underlines','ecp'); ?>.
    69         <br>- <?php _e('A maximum of 30 Characters is allowed','ecp'); ?>.</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>
    7070    </tr>
    7171    <tr>
    72         <td><?php _e('Code','ecp'); ?>:</td>
     72        <td><?php _e('Code','easy-code-placement'); ?>:</td>
    7373    </tr>
    7474    <tr>
     
    7676    </tr>
    7777    <tr>
    78         <td><?php _e('Alignment','ecp'); ?>:</td>
     78        <td><?php _e('Alignment','easy-code-placement'); ?>:</td>
    7979    </tr>
    8080    <tr>
    8181        <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','ecp'); ?>
    83             <input type="radio" name="alignment" value="1" <?php if ($ecp_load->alignment == "1") {echo "checked";} else {echo "";}; ?>><?php _e('Left','ecp'); ?>
    84             <input type="radio" name="alignment" value="2" <?php if ($ecp_load->alignment == "2") {echo "checked";} else {echo "";}; ?>><?php _e('Center','ecp'); ?>
    85             <input type="radio" name="alignment" value="3" <?php if ($ecp_load->alignment == "3") {echo "checked";} else {echo "";}; ?>><?php _e('Right','ecp'); ?>
     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'); ?>
    8686        </td>
    8787    </tr>
    8888    <tr>
    89         <td><?php _e('Status','ecp'); ?>:</td>
     89        <td><?php _e('Status','easy-code-placement'); ?>:</td>
    9090    </tr>
    9191    <tr>
    9292        <td>
    93             <input type="radio" name="status" value="1" <?php if ($ecp_load->status == "1") {echo "checked";} else {echo "";}; ?>><?php _e('Online','ecp'); ?>
    94             <input type="radio" name="status" value="2" <?php if ($ecp_load->status == "2") {echo "checked";} else {echo "";}; ?>><?php _e('Offline','ecp'); ?>
     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'); ?>
    9595        </td>
    9696    </tr>
    9797</table>
    98 <br><input type="button" class="button-secondary" value="<?php _e('Back','ecp'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'>&nbsp;&nbsp;<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');?>"'>&nbsp;&nbsp;<input type="submit" name="submit" class="button-primary" value="<?php _e('Save','easy-code-placement'); ?>">
    9999</form>
    100100
  • easy-code-placement/trunk/inc/actions/status.php

    r1256966 r1335072  
    1010if ($ecp_id=="" || !is_numeric($ecp_id)) {
    1111    // when get emty or other than numbers goto error page
    12     $ecp_error = __('Modifying of the ID is not allowed', 'ecp');
     12    $ecp_error = __('Modifying of the ID is not allowed', 'easy-code-placement');
    1313    $ecp_error_page = "";
    1414    $ecp_error_id = "";
     
    1616} elseif ($ecp_status !=="1" && $ecp_status !=="2") {
    1717    // 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', 'ecp');
     18    $ecp_error = __('Modifying of the Status to something else than 1 or 2 is not allowed', 'easy-code-placement');
    1919    $ecp_error_page = "";
    2020    $ecp_error_id = "";
  • easy-code-placement/trunk/inc/classes/class-ecp-table.php

    r1256966 r1335072  
    1616    function column_action ($item){
    1717        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','ecp'); ?>" alt="<?php echo _e('Online','ecp'); ?>"></a>&nbsp;&nbsp;<?php
     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','easy-code-placement'); ?>" alt="<?php echo _e('Online','easy-code-placement'); ?>"></a>&nbsp;&nbsp;<?php
    1919        } 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','ecp'); ?>" alt="<?php echo _e('Offline','ecp'); ?>"></a>&nbsp;&nbsp;<?php
     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','easy-code-placement'); ?>" alt="<?php echo _e('Offline','easy-code-placement'); ?>"></a>&nbsp;&nbsp;<?php
    2121        }
    2222        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','ecp'); ?>" alt="<?php echo _e('None','ecp'); ?>"></a>&nbsp;<?php
     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','easy-code-placement'); ?>" alt="<?php echo _e('None','easy-code-placement'); ?>"></a>&nbsp;<?php
    2424        } 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','ecp'); ?>" alt="<?php echo _e('Left','ecp'); ?>"></a>&nbsp;<?php
     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','easy-code-placement'); ?>" alt="<?php echo _e('Left','easy-code-placement'); ?>"></a>&nbsp;<?php
    2626        } 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','ecp'); ?>" alt="<?php echo _e('Center','ecp'); ?>"></a>&nbsp;<?php
     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','easy-code-placement'); ?>" alt="<?php echo _e('Center','easy-code-placement'); ?>"></a>&nbsp;<?php
    2828        } 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','ecp'); ?>" alt="<?php echo _e('Right','ecp'); ?>"></a>&nbsp;<?php
     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','easy-code-placement'); ?>" alt="<?php echo _e('Right','easy-code-placement'); ?>"></a>&nbsp;<?php
    3030        }?>
    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','ecp'); ?>" alt="<?php _e('Edit','ecp'); ?>"></a>&nbsp;
    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','ecp'); ?>" 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>&nbsp;
     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>
    3333        <?php
    3434        return;
     
    5454    function get_columns(){
    5555        $columns = array(
    56             'name' => __('Name', 'ecp'),
    57             'shortcode' => __('Shortcode', 'ecp'),
    58             'action' => __('Action', 'ecp')
     56            'name' => __('Name', 'easy-code-placement'),
     57            'shortcode' => __('Shortcode', 'easy-code-placement'),
     58            'action' => __('Action', 'easy-code-placement')
    5959        );
    6060        return $columns;
     
    6868    // if no data - say
    6969    function no_items() {
    70         _e('No Code found - Click "Add New Code" to add one.','ecp');
     70        _e('No Code found - Click "Add New Code" to add one.','easy-code-placement');
    7171    }
    7272
  • easy-code-placement/trunk/inc/classes/class-ecp-tables.php

    r1334967 r1335072  
    520520        extract( $this->_pagination_args, EXTR_SKIP );
    521521
    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>';
    523523
    524524        $current = $this->get_pagenum();
     
    538538        $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
    539539            'first-page' . $disable_first,
    540             esc_attr__( 'Go to the first page' ),
     540            esc_attr__( 'Go to the first page', 'easy-code-placement' ),
    541541            esc_url( remove_query_arg( 'paged', $current_url ) ),
    542542            '&laquo;'
     
    545545        $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
    546546            'prev-page' . $disable_first,
    547             esc_attr__( 'Go to the previous page' ),
     547            esc_attr__( 'Go to the previous page', 'easy-code-placement' ),
    548548            esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
    549549            '&lsaquo;'
     
    554554        else
    555555            $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' ),
    557557                $current,
    558558                strlen( $total_pages )
     
    560560
    561561        $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>';
    563563
    564564        $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
    565565            'next-page' . $disable_last,
    566             esc_attr__( 'Go to the next page' ),
     566            esc_attr__( 'Go to the next page', 'easy-code-placement' ),
    567567            esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
    568568            '&rsaquo;'
     
    571571        $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
    572572            'last-page' . $disable_last,
    573             esc_attr__( 'Go to the last page' ),
     573            esc_attr__( 'Go to the last page', 'easy-code-placement' ),
    574574            esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
    575575            '&raquo;'
     
    935935
    936936        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 ) );
    938938
    939939        if ( isset( $total_pages ) ) {
  • easy-code-placement/trunk/inc/error.php

    r1256966 r1335072  
    11<div class="wrap">
    2 <h2>Easy Code Placement <?php _e('Error','ecp'); ?></h2>
     2<h2>Easy Code Placement <?php _e('Error','easy-code-placement'); ?></h2>
    33<br>
    44
    55<table width="100%" border="0" cellspacing="0" cellpadding="6">   
    66    <tr>
    7         <td><h3><font color="#FF0000"><?php _e('Error','ecp'); ?>!</font></h3></td>
     7        <td><h3><font color="#FF0000"><?php _e('Error','easy-code-placement'); ?>!</font></h3></td>
    88    </tr>
    99    <tr>
     
    1111    </tr>
    1212</table>
    13 <br><input type="button" class="button-secondary" value="<?php _e('Back','ecp'); ?>" 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");?>"'>
    1414
    1515</div>
  • easy-code-placement/trunk/inc/functions.php

    r1334961 r1335072  
    9898}
    9999
    100 // update to 3.1
     100// update to 3.1.1
    101101function ecp_update(){
    102102    // multiside update
     
    108108            switch_to_blog($blogid);
    109109            $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'");
    111111            $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' ));
    113113        }
    114114    switch_to_blog($blog);
     
    117117    global $wpdb;
    118118    $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'");
    120120    $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' ));
    122122    }
    123123}
     
    129129    if (! is_admin()) {
    130130        return;
    131     } elseif ($ecp_options_version === '3.1') {
     131    } elseif ($ecp_options_version === '3.1.1') {
    132132        return;
    133133    } else {
  • easy-code-placement/trunk/inc/page.php

    r1334958 r1335072  
    3030<table width="100%" border="0" cellspacing="0" cellpadding="0">
    3131    <tr>
    32         <td width="70%" align="left"><h2>Easy Code Placement - <?php _e('Codes','ecp'); ?></h2></td>
    33         <td width="30%" align="right"><input type="button" class="button-secondary" value="<?php _e('System Information','ecp'); ?>" 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>
    3434    </tr>
    3535</table>
     
    3737<?php render_ecp_table(); ?>
    3838
    39 <input type="button" class="button-primary" value="<?php _e('Add New Code','ecp'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp&load=add');?>"'>&nbsp;&nbsp;<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');?>"'>&nbsp;&nbsp;<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');?>"'>
    4040
    4141<table width="100%" border="0" cellspacing="0" cellpadding="6">
    4242    <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).','ecp'); ?></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>
    4444        <td><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
    4545            <input type="hidden" name="cmd" value="_s-xclick">
  • easy-code-placement/trunk/inc/settings.php

    r1334958 r1335072  
    1313    if ($t_ecp_perpage == "") {
    1414        // when perpage is empty
    15         $ecp_error = __('The Option "Codes per Page" must be filled in', 'ecp');
     15        $ecp_error = __('The Option "Codes per Page" must be filled in', 'easy-code-placement');
    1616        $ecp_error_page = "&load=settings";
    1717        $ecp_error_id = "";
     
    2121    if (!is_numeric($t_ecp_perpage)) {
    2222        // when perpage not a number
    23         $ecp_error = __('The Value for the Option "Codes per Page" must be numeric', 'ecp');
     23        $ecp_error = __('The Value for the Option "Codes per Page" must be numeric', 'easy-code-placement');
    2424        $ecp_error_page = "&load=settings";
    2525        $ecp_error_id = "";
     
    3939
    4040<div class="wrap">
    41 <h2>Easy Code Placement - <?php _e('Settings','ecp'); ?></h2>
     41<h2>Easy Code Placement - <?php _e('Settings','easy-code-placement'); ?></h2>
    4242<br>
    4343
     
    5151    <thead>
    5252    <tr>
    53             <th><?php _e('Name','ecp'); ?></th>
    54             <th><?php _e('Value','ecp'); ?></th>
     53            <th><?php _e('Name','easy-code-placement'); ?></th>
     54            <th><?php _e('Value','easy-code-placement'); ?></th>
    5555    </tr>
    5656    </thead>
    5757    <tbody>
    5858    <tr>
    59             <td><?php _e('Who can manage this Plugin?','ecp'); ?></td>
     59            <td><?php _e('Who can manage this Plugin?','easy-code-placement'); ?></td>
    6060            <td>
    6161                <?php
     
    6464                ?>
    6565                <select name="role">
    66                     <option <?php if ($ecp_role === 'manage_options') {echo 'selected';}; ?> value="manage_options"><?php _e('Adminstrators and higher','ecp'); ?></option>
    67                     <option <?php if ($ecp_role === 'manage_categories') {echo 'selected';}; ?> value="manage_categories"><?php _e('Editors and higher','ecp'); ?></option>
    68                     <option <?php if ($ecp_role === 'publish_posts') {echo 'selected';}; ?> value="publish_posts"><?php _e('Authors and higher','ecp'); ?></option>
    69                     <option <?php if ($ecp_role === 'edit_posts') {echo 'selected';}; ?> value="edit_posts"><?php _e('Contributors and higher','ecp'); ?></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>
    7070                </select>
    7171            </td>
    7272    </tr>
    7373        <tr>
    74             <td><?php _e('Codes per Page','ecp'); ?></td>
     74            <td><?php _e('Codes per Page','easy-code-placement'); ?></td>
    7575            <td>
    7676                <?php
     
    8484</table>
    8585
    86 <br><input type="button" class="button-secondary" value="<?php _e('Back','ecp'); ?>" onClick='document.location.href="<?php echo admin_url('options-general.php?page=ecp');?>"'>&nbsp;&nbsp;<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');?>"'>&nbsp;&nbsp;<input type="submit" name="submit" class="button-primary" value="<?php _e('Save','easy-code-placement'); ?>">
    8787</form>
    8888
  • easy-code-placement/trunk/inc/system.php

    r1334958 r1335072  
    11<div class="wrap">
    2 <h2>Easy Code Placement - <?php _e('System Information','ecp'); ?></h2>
     2<h2>Easy Code Placement - <?php _e('System Information','easy-code-placement'); ?></h2>
    33<br>
    44
    5 <h3><?php _e('General','ecp'); ?></h3>
     5<h3><?php _e('General','easy-code-placement'); ?></h3>
    66<table class="widefat">
    77    <colgroup>
     
    1111    <thead>
    1212    <tr>
    13             <th><?php _e('Name','ecp'); ?></th>
    14             <th><?php _e('Value','ecp'); ?></th>
     13            <th><?php _e('Name','easy-code-placement'); ?></th>
     14            <th><?php _e('Value','easy-code-placement'); ?></th>
    1515    </tr>
    1616    </thead>
    1717    <tbody>
    1818    <tr>
    19             <td><?php _e('PHP Version','ecp'); ?></td>
     19            <td><?php _e('PHP Version','easy-code-placement'); ?></td>
    2020            <td><?php echo PHP_VERSION; ?></td>
    2121    </tr>
    2222        <tr>
    23             <td><?php _e('MySQL Version','ecp'); ?></td>
     23            <td><?php _e('MySQL Version','easy-code-placement'); ?></td>
    2424            <td><?php
    2525                    if (isset($GLOBALS['wpdb']->dbh->server_info)) {
     
    2828            echo mysql_get_server_info();
    2929                    } else {
    30                         _e('Error','ecp');
     30                        _e('Error','easy-code-placement');
    3131                    }
    3232        ?>
     
    3434        </tr>
    3535    <tr>
    36             <td><?php _e('WordPress Version','ecp'); ?></td>
     36            <td><?php _e('WordPress Version','easy-code-placement'); ?></td>
    3737            <td><?php echo get_bloginfo ('version'); ?></td>
    3838    </tr>
    3939    <tr>
    40             <td><?php _e('WordPress Network Page','ecp'); ?></td>
     40            <td><?php _e('WordPress Network Page','easy-code-placement'); ?></td>
    4141            <td><?php
    4242                    if (is_multisite()) {
    43                         _e('Yes','ecp');
     43                        _e('Yes','easy-code-placement');
    4444                    } else {
    45                         _e('No','ecp');
     45                        _e('No','easy-code-placement');
    4646                    }
    4747                ?>
     
    4949    </tr>
    5050    <tr>
    51             <td><?php _e('Plugin Version (File)','ecp'); ?></td>
     51            <td><?php _e('Plugin Version (File)','easy-code-placement'); ?></td>
    5252            <td><?php echo ECP_VERSION; ?></td>
    5353    </tr>
    5454    <tr>
    55             <td><?php _e('Plugin Version (Database)','ecp'); ?></td>
     55            <td><?php _e('Plugin Version (Database)','easy-code-placement'); ?></td>
    5656            <td><?php
    5757                    global $wpdb;
    5858                    $ecp_options_version = $wpdb->get_var("SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'version'");
    5959                    if ($ecp_options_version === '') {
    60                         _e('Error','ecp');
     60                        _e('Error','easy-code-placement');
    6161                    } else {
    6262                        echo $ecp_options_version;
     
    6666    </tr>
    6767    <tr>
    68             <td><?php _e('Role','ecp'); ?></td>
     68            <td><?php _e('Role','easy-code-placement'); ?></td>
    6969            <td><?php
    7070                    global $wpdb;
    7171                    $ecp_options_role = $wpdb->get_var("SELECT option_value FROM ".$wpdb->prefix."ecp_options WHERE option_name = 'role'");
    7272                    if ($ecp_options_role === '') {
    73                         _e('Error','ecp');
     73                        _e('Error','easy-code-placement');
    7474                    } else {
    7575                        echo $ecp_options_role;
     
    8181</table>
    8282
    83 <h3><?php _e('Configuration','ecp'); ?></h3>
     83<h3><?php _e('Configuration','easy-code-placement'); ?></h3>
    8484<table class="widefat">
    8585    <colgroup>
     
    8989    <thead>
    9090    <tr>
    91             <th><?php _e('Name','ecp'); ?></th>
    92             <th><?php _e('Value','ecp'); ?></th>
     91            <th><?php _e('Name','easy-code-placement'); ?></th>
     92            <th><?php _e('Value','easy-code-placement'); ?></th>
    9393    </tr>
    9494    </thead>
    9595    <tbody>
    9696    <tr>
    97             <td><?php _e('PHP max. execution time','ecp'); ?></td>
     97            <td><?php _e('PHP max. execution time','easy-code-placement'); ?></td>
    9898            <td><?php
    9999                if (function_exists('ini_get')) {
    100100                    echo ini_get('max_execution_time').'s';
    101101                } else {
    102                     _e('Error','ecp');
     102                    _e('Error','easy-code-placement');
    103103                } ?>
    104104            </td>
    105105    </tr>
    106106    <tr>
    107             <td><?php _e('PHP memory limit','ecp'); ?></td>
     107            <td><?php _e('PHP memory limit','easy-code-placement'); ?></td>
    108108            <td><?php
    109109                if (function_exists('ini_get')) {
    110110                    echo ini_get('memory_limit').'B';
    111111                } else {
    112                     _e('Error','ecp');
     112                    _e('Error','easy-code-placement');
    113113                } ?>
    114114            </td>
    115115    </tr>
    116116    <tr>
    117             <td><?php _e('WordPress memory limit','ecp'); ?></td>
     117            <td><?php _e('WordPress memory limit','easy-code-placement'); ?></td>
    118118            <td><?php echo WP_MEMORY_LIMIT; ?>B</td>
    119119    </tr>
     
    121121</table>
    122122
    123 <h3><?php _e('Paths','ecp'); ?></h3>
     123<h3><?php _e('Paths','easy-code-placement'); ?></h3>
    124124<table class="widefat">
    125125    <colgroup>
     
    129129    <thead>
    130130    <tr>
    131             <th><?php _e('Name','ecp'); ?></th>
    132             <th><?php _e('Value','ecp'); ?></th>
     131            <th><?php _e('Name','easy-code-placement'); ?></th>
     132            <th><?php _e('Value','easy-code-placement'); ?></th>
    133133    </tr>
    134134    </thead>
    135135    <tbody>
    136136    <tr>
    137             <td><?php _e('Home URL','ecp'); ?></td>
     137            <td><?php _e('Home URL','easy-code-placement'); ?></td>
    138138            <td class="code"><?php echo home_url(); ?></td>
    139139    </tr>
    140140    <tr>
    141             <td><?php _e('Site URL','ecp'); ?></td>
     141            <td><?php _e('Site URL','easy-code-placement'); ?></td>
    142142            <td class="code"><?php echo site_url(); ?></td>
    143143    </tr>
    144144    <tr>
    145             <td><?php _e('Plugin URL','ecp'); ?></td>
     145            <td><?php _e('Plugin URL','easy-code-placement'); ?></td>
    146146            <td class="code"><?php echo plugins_url(); ?></td>
    147147    </tr>
     
    151151
    152152<form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
    153 <br><input type="button" class="button-secondary" value="<?php _e('Back','ecp'); ?>" 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');?>"'>
    154154</form>
    155155
  • easy-code-placement/trunk/readme.txt

    r1334958 r1335072  
    22Contributors: wassereimer
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2X2EH5MYGPLL4
    4 Tags: ad, addthis, 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, widget
    5 Requires at least: 3.0
     4Tags: 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
     5Requires at least: 3.0.1
    66Tested up to: 4.4.1
    7 Stable tag: 3.1
     7Stable tag: 3.1.1
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1414
    1515Easy 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
     17ATTENTION! CSS, Javascript and Flash Codes does have Problems at the moment. It will be fixed in the future!
    1618
    1719= Which Codes? = 
     
    8183== Changelog ==
    8284
     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
    8394= 3.1 =
    8495* 24.01.2016
Note: See TracChangeset for help on using the changeset viewer.