Plugin Directory

Changeset 2231647


Ignore:
Timestamp:
01/22/2020 02:59:01 PM (6 years ago)
Author:
cuelinks1
Message:

updated

Location:
cuelinks
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cuelinks/tags/1.0.1/index.php

    r2230937 r2231647  
    1717 *
    1818 * @author Cuelinks
    19  * @package cueblinks
     19 * @package cuelinks
    2020 * @since cueblinks 1.0.1
    2121 *
     
    4949        <div class="wrap">
    5050            <?php
    51             if (isset($_POST['cuelink_script_val'])) {
    52                 if (count(explode(' ', $_POST['cuelink_script_val'])) > 1) {
     51            if (isset($_POST['cuelink_script_val']) &&
     52        wp_verify_nonce($_POST['nonce'], 'wporg_options')) {
     53
     54 
     55                if (count(explode(' ', sanitize_text_field($_POST['cuelink_script_val']))) > 1) {
    5356                    echo '<div id="message" class="error notice notice-error is-dismissible"><p><strong>Please do not add any space in option value.</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>';
    5457                } else {
    55                     update_option('cuelink_script_val', $_POST['cuelink_script_val']);
     58                    update_option('cuelink_script_val', sanitize_text_field($_POST['cuelink_script_val']));
    5659                    echo '<div id="message" class="updated notice notice-success is-dismissible"><p><strong>Publisher Id saved Successfully.</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>';
    5760                }
     
    6164            <div class="scriptingbox">
    6265                <div class="head">
    63                     <div class="leftside">         
    64                         <img src ="<?php echo plugins_url() . '/cuelinks/images/cuelinks-logo.png'; ?>"/>
    65                         <span>/ Settings</span>
     66                    <div class="leftside">
     67                    <?php echo '<img src="' . esc_url( plugins_url( 'images/cuelinks-logo.png', __FILE__ ) ) . '" > '; ?>
     68
     69                        <span><?php  echo esc_html( __( '/ Settings', 'cuelinks' ) );?></span>
    6670                    </div>
    6771                    <div class="rightside">
    68                         <a href="https://www.cuelinks.com/" target="_blank">Help</a>
     72                        <a href="<?php echo (filter_var('https://www.cuelinks.com', FILTER_VALIDATE_URL)? 'https://www.cuelinks.com' : '');?>" target="_blank"><?php  echo esc_html( __( 'Help', 'cuelinks' ) );?></a>
    6973                    </div>
    7074                </div>
    71                 <p>Copy your Channel ID from Cuelinks.com and paste it below, you can check your Channel id <a href="https://www.cuelinks.com/my-channels" target="_blank"> here </a></p>
     75                <p><?php  echo esc_html( __( 'Copy your Channel ID from Cuelinks.com and paste it below, you can check your Channel id', 'cuelinks' ) );?> <a href="<?php echo (filter_var('https://www.cuelinks.com/my-channels', FILTER_VALIDATE_URL)? 'https://www.cuelinks.com/my-channels' : '');?>" target="_blank"> <?php  echo esc_html( __( 'here ', 'cuelinks' ) );?></a></p>
    7276                <form method="post">
    7377                    <table class="form-table">
    74                         <tr valign="top"><th scope="row">Cuelinks Status:</th>
     78                        <tr valign="top"><th scope="row"><?php  echo esc_html( __( 'Cuelinks Status:', 'cuelinks' ) );?></th>
    7579                            <td>
    7680                                <?php
     
    8690                            </td>
    8791                        </tr>
    88                         <tr valign="top"><th scope="row">Cuelinks cId:</th>
    89                             <td><input required placeholder="Please Insert Value" type="text" name="cuelink_script_val" value="<?php echo $cidvalue; ?>" /><label>Required</label></td>
     92                        <tr valign="top"><th scope="row"><?php  echo esc_html( __( 'Cuelinks cId:', 'cuelinks' ) );?></th>
     93                            <td><input required placeholder="Please Insert Value" type="text" name="cuelink_script_val" value="<?php echo $cidvalue; ?>" /><label><?php  echo esc_html( __('Required')); ?></label></td>
     94                            <input type="hidden" name="nonce" value="<?php echo wp_create_nonce('wporg_options'); ?>" />
    9095                        </tr>                                 
    9196                    </table>
    9297                    <p class="submit">
    93                         <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
     98                        <input type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
    9499                    </p>
    95100                </form>
    96                 <p>If you have any questions or suggestions about this plugin, reach out to us at <a href="mailto:[email protected]">[email protected]</a></p>
     101                <p><?php _e('If you have any questions or suggestions about this plugin, reach out to us at '); ?><a href="mailto:[email protected]"><?php echo _e('[email protected]'); ?></a></p>
    97102                <style type="text/css">
    98103                    div.scriptingbox div.head { clear: both; overflow: hidden; position: relative;}
     
    200205    <?php
    201206}
     207
  • cuelinks/trunk/index.php

    r2230937 r2231647  
    1212 * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1313 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  * GNU General Public License for more details.
     14 * GNU General Public License for more details. 
    1515 *
    1616 * This header and all notices must be kept intact.
    1717 *
    1818 * @author Cuelinks
    19  * @package cueblinks
    20  * @since cueblinks 1.0.1
     19 * @package cuelinks
     20 * @since cuelinks 1.0.0
    2121 *
    2222 * Plugin Name: Cuelinks - Affiliate Marketing Tool for Publishers
    2323 * Plugin URI: https://www.cuelinks.com/affiliate-wordpress-plugin
    24  * Version: 1.0.1
     24 * Version: 1.0.0
    2525 * Description: Cuelinks is a 2-minute Content Monetization tool for bloggers, deal site owners, coupon sites, forum owners or any publishers. We help publishers monetize their content in an effective manner by converting product links in your post into their equivalent affiliate links on-the-fly without affecting your users' experience.
    2626 * Author: Ambient Infotech
     
    4949        <div class="wrap">
    5050            <?php
    51             if (isset($_POST['cuelink_script_val'])) {
    52                 if (count(explode(' ', $_POST['cuelink_script_val'])) > 1) {
     51            if (isset($_POST['cuelink_script_val']) &&
     52        wp_verify_nonce($_POST['nonce'], 'wporg_options')) {
     53
     54 
     55                if (count(explode(' ', sanitize_text_field($_POST['cuelink_script_val']))) > 1) {
    5356                    echo '<div id="message" class="error notice notice-error is-dismissible"><p><strong>Please do not add any space in option value.</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>';
    5457                } else {
    55                     update_option('cuelink_script_val', $_POST['cuelink_script_val']);
     58                    update_option('cuelink_script_val', sanitize_text_field($_POST['cuelink_script_val']));
    5659                    echo '<div id="message" class="updated notice notice-success is-dismissible"><p><strong>Publisher Id saved Successfully.</strong></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>';
    5760                }
     
    6164            <div class="scriptingbox">
    6265                <div class="head">
    63                     <div class="leftside">         
    64                         <img src ="<?php echo plugins_url() . '/cuelinks/images/cuelinks-logo.png'; ?>"/>
    65                         <span>/ Settings</span>
     66                    <div class="leftside">
     67                    <?php echo '<img src="' . esc_url( plugins_url( 'images/cuelinks-logo.png', __FILE__ ) ) . '" > '; ?>
     68
     69                        <span><?php  echo esc_html( __( '/ Settings', 'cuelinks' ) );?></span>
    6670                    </div>
    6771                    <div class="rightside">
    68                         <a href="https://www.cuelinks.com/" target="_blank">Help</a>
     72                        <a href="<?php echo (filter_var('https://www.cuelinks.com', FILTER_VALIDATE_URL)? 'https://www.cuelinks.com' : '');?>" target="_blank"><?php  echo esc_html( __( 'Help', 'cuelinks' ) );?></a>
    6973                    </div>
    7074                </div>
    71                 <p>Copy your Channel ID from Cuelinks.com and paste it below, you can check your Channel id <a href="https://www.cuelinks.com/my-channels" target="_blank"> here </a></p>
     75                <p><?php  echo esc_html( __( 'Copy your Channel ID from Cuelinks.com and paste it below, you can check your Channel id', 'cuelinks' ) );?> <a href="<?php echo (filter_var('https://www.cuelinks.com/my-channels', FILTER_VALIDATE_URL)? 'https://www.cuelinks.com/my-channels' : '');?>" target="_blank"> <?php  echo esc_html( __( 'here ', 'cuelinks' ) );?></a></p>
    7276                <form method="post">
    7377                    <table class="form-table">
    74                         <tr valign="top"><th scope="row">Cuelinks Status:</th>
     78                        <tr valign="top"><th scope="row"><?php  echo esc_html( __( 'Cuelinks Status:', 'cuelinks' ) );?></th>
    7579                            <td>
    7680                                <?php
     
    8690                            </td>
    8791                        </tr>
    88                         <tr valign="top"><th scope="row">Cuelinks cId:</th>
    89                             <td><input required placeholder="Please Insert Value" type="text" name="cuelink_script_val" value="<?php echo $cidvalue; ?>" /><label>Required</label></td>
     92                        <tr valign="top"><th scope="row"><?php  echo esc_html( __( 'Cuelinks cId:', 'cuelinks' ) );?></th>
     93                            <td><input required placeholder="Please Insert Value" type="text" name="cuelink_script_val" value="<?php echo $cidvalue; ?>" /><label><?php  echo esc_html( __('Required')); ?></label></td>
     94                            <input type="hidden" name="nonce" value="<?php echo wp_create_nonce('wporg_options'); ?>" />
    9095                        </tr>                                 
    9196                    </table>
    9297                    <p class="submit">
    93                         <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
     98                        <input type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
    9499                    </p>
    95100                </form>
    96                 <p>If you have any questions or suggestions about this plugin, reach out to us at <a href="mailto:[email protected]">[email protected]</a></p>
     101                <p><?php _e('If you have any questions or suggestions about this plugin, reach out to us at '); ?><a href="mailto:[email protected]"><?php echo _e('[email protected]'); ?></a></p>
    97102                <style type="text/css">
    98103                    div.scriptingbox div.head { clear: both; overflow: hidden; position: relative;}
     
    200205    <?php
    201206}
     207
Note: See TracChangeset for help on using the changeset viewer.