Plugin Directory

Changeset 1342044


Ignore:
Timestamp:
02/03/2016 09:30:17 AM (10 years ago)
Author:
call_from_web
Message:

Adjust plugin to new v3 button.

Location:
call-from-web/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • call-from-web/trunk/call-from-web.php

    r918645 r1342044  
    22/*
    33 * Plugin Name: Call From Web
    4  * Plugin URI: http://www.call-from-web.com/plugins/wordpress
     4 * Plugin URI: https://www.call-from-web.com/plugins/wordpress
    55 * Description: Let your visitors call you by phone for free.
    6  * Version: 2.3
     6 * Version: 3.0
    77 * Author: Call From Web
    8  * Author URI: http://www.call-from-web.com
     8 * Author URI: https://www.call-from-web.com
    99 * License: GPL2
    1010 * */
    1111?>
    1212<?php
     13
     14define('CFW_BASE_URL', 'https://www.call-from-web.com');
    1315
    1416add_action('admin_menu', 'cfw_add_page_fn');
     
    2325    <div class="icon32" id="icon-options-general"><br></div>
    2426    <h2>Call From Web</h2>
    25     Set up your domain widget ID here to be able to view your comments. <h3>Need a valid widget ID? <a href="http://www.call-from-web.com/users/sign_up?utm_source=wordpress&utm_medium=plugin&utm_campaign=settings">Sign up</a>.</h3>
     27    Set up your domain widget ID here to be able to view your comments. <h3>Need a valid widget ID? <a href="<?= CFW_BASE_URL ?>/users/sign_up?utm_source=wordpress&utm_medium=plugin&utm_campaign=settings">Sign up</a>.</h3>
    2628    <form action="options.php" method="post">
    2729    <?php settings_fields('cfw_plugin_options'); ?>
     
    3032      <input name="Submit" type="submit" class="button-primary" value="<?php esc_attr_e('Save Changes'); ?>" />
    3133    </p>
    32     <h3><a href="http://www.call-from-web.com/contact_attempts?utm_source=wordpress&utm_medium=plugin&utm_campaign=settings">Log in</a> to check for incoming calls.</h3>
     34    <h3><a href="<?= CFW_BASE_URL ?>/contact_attempts?utm_source=wordpress&utm_medium=plugin&utm_campaign=settings">Log in</a> to check for incoming calls.</h3>
    3335    </form>
    3436  </div>
     
    7577function cfw_addButton(){
    7678  $o = get_option('cfw_plugin_options');
    77   $profile = empty($o['cfw_profile']) ? "" : "/{$o['cfw_profile']}";
     79  $profile = empty($o['cfw_profile']) ? "no_profile" : $o['cfw_profile'];
    7880  $button_title = empty($o['cfw_button_title']) ? 'Contact Us' : $o['cfw_button_title'];
    79   echo "<a href=\"http://www.call-from-web.com/request{$profile}\" class=\"call-from-web\">{$button_title}</a>";
    80   echo '<script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://cdn.call-from-web.com/assets/form/v1.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","call-from-web-js");</script>';
     81  echo "<a href=\"" . CFW_BASE_URL . "/request/{$profile}\" class=\"call-from-web\">{$button_title}</a>";
     82  echo "<script type=\"text/javascript\">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=\"". CFW_BASE_URL . "/button/v2/{$profile}.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,'script','call-from-web-v2-js');</script>";
    8183}
    8284
     
    8486    $no_api_key_provided =<<<EOS
    8587<p>You have not entered your Widget ID for <b>Call From Web</b> plugin. <a href="options-general.php?page=call-from-web/call-from-web.php">Please enter your Widget ID here</a>.</p>
    86 <p><a href="http://www.call-from-web.com/users/sign_up?utm_source=wordpress&utm_medium=plugin&utm_campaign=notice">Get your Widget ID if you don't have one here.</a></p>
     88<p><a href="https://www.call-from-web.com/users/sign_up?utm_source=wordpress&utm_medium=plugin&utm_campaign=notice">Get your Widget ID if you don't have one here.</a></p>
    8789EOS;
    8890    ?>
     
    9597$o = get_option('cfw_plugin_options');
    9698if (empty($o['cfw_profile'])) { add_action( 'admin_notices', 'cfw_no_api_key_provided_admin_notice'); }
    97 
  • call-from-web/trunk/readme.txt

    r1313555 r1342044  
    33Tags: call, phone, button, click2call, support, feedback, form, button, contact form, request, comment, bug report, request features
    44Requires at least: 3.3
    5 Version: 1.0
     5Version: 3.0
    66Tested up to: 4.4
    77Stable tag: trunk
Note: See TracChangeset for help on using the changeset viewer.