• Hi there,

    My name is Elias and I’m getting a syntaxis error at /wp-content/plugins/wp-affiliate-links/views/admin/edit/index.php in line 53

    This is the line 53 : <?php $types = [
    ant this is the part of code with the problem:

    ———————————————————————————————

    <select name=”redirect_type”>
    <?php $types = [
    ‘META_REFRESH’ => ‘Meta Refresh Redirect’,
    ‘FRAME’ => ‘Frame Redirect’,
    ‘JAVASCRIPT’ => ‘Javascript Redirect’,
    ‘REFERER_MASK’ => ‘Referer Masking’,
    ‘301’ => ‘301 Permanent Redirect’,
    ‘302’ => ‘302 Redirect Temporary’,
    ‘307’ => ‘307 Redirect Temporary’
    ];

    foreach ($types as $type => $label) {
    $selected = ”;
    if($post[‘redirect_type’] == $type){
    $selected = ‘selected=”selected”‘;
    }
    ?>
    <option value=”<?php echo $type ?>” <?php echo $selected?><?php echo $label ?></option>
    <?php
    } ?>
    </select>

    ———————————————————————————————

    So I tried to fix it, changed it to:

    ———————————————————————————————

    <select name=”redirect_type”>
    <?php $types = array(
    ‘META_REFRESH’ => ‘Meta Refresh Redirect’,
    ‘FRAME’ => ‘Frame Redirect’,
    ‘JAVASCRIPT’ => ‘Javascript Redirect’,
    ‘REFERER_MASK’ => ‘Referer Masking’,
    ‘301’ => ‘301 Permanent Redirect’,
    ‘302’ => ‘302 Redirect Temporary’,
    ‘307’ => ‘307 Redirect Temporary’
    );

    foreach ($types as $type => $label) {
    $selected = ”;
    if($post[‘redirect_type’] == $type){
    $selected = ‘selected=”selected”‘;
    }
    ?>
    <option value=”<?php echo $type ?>” <?php echo $selected?><?php echo $label ?></option>
    <?php
    } ?>
    </select>

    ———————————————————————————————

    but it didn’t work, now the select “Cloaking Method” option at the template appears empty

    How could I fix this problem?

    Thanks for your time

    regards Elias

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Error adding new links’ is closed to new replies.