Created
July 1, 2014 07:17
-
-
Save peebeebee/ec857c4debcf7ad63154 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: content/plugins/wp-tell-a-friend-popup-form/wp-tell-a-friend-popup-form.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- content/plugins/wp-tell-a-friend-popup-form/wp-tell-a-friend-popup-form.php (date 1403968273000) | |
+++ content/plugins/wp-tell-a-friend-popup-form/wp-tell-a-friend-popup-form.php (revision ) | |
@@ -49,36 +49,36 @@ | |
<?php | |
} | |
function TellAFriend_install() | |
{ | |
global $wpdb, $wp_version; | |
$admin_email = get_option('admin_email'); | |
if($admin_email == "") | |
{ | |
$admin_email = "admin@tellafriend.com"; | |
} | |
$url = home_url(); | |
add_option('TellAFriend_Title', "Tell A Friend"); | |
add_option('TellAFriend_Fromemail', $admin_email); | |
add_option('TellAFriend_On_MyEmail', ""); | |
add_option('TellAFriend_On_Subject', "Link recommended by ##USERNAME##"); | |
- add_option('TellAFriend_Caption', "<img src='".get_option('siteurl')."/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend.jpg' />"); | |
+ add_option('TellAFriend_Caption', "<img src='".plugin_dir_url(__FILE__)."/tell-a-friend.jpg' />"); | |
add_option('TellAFriend_Adminmail_Content', "Hi Admin, Someone (##USERNAME##) used our form to send link (##LINK##) to friend ##FRIENDEMAIL## with the message \r\n\r\n ##MESSAGE## "); | |
add_option('TellAFriend_Usermail_Content', "Hi, Your friend ##USERNAME## has sent you a link to web site. \r\n\r\n ##LINK## \r\n\r\n ##MESSAGE##"); | |
add_option('TellAFriend_homeurl', $url); | |
} | |
function TellAFriend_widget($args) | |
{ | |
extract($args); | |
echo $before_widget; | |
TellAFriend(); | |
echo $after_widget; | |
} | |
function TellAFriend_control() | |
{ | |
echo '<p>'; | |
_e('Check official website for more information', 'tell-a-friend'); | |
@@ -206,44 +206,43 @@ | |
} | |
function TellAFriend_add_to_menu() | |
{ | |
add_options_page(__('Tell A friend', 'tell-a-friend'), __('Tell A friend', 'tell-a-friend'), 'manage_options', __FILE__, 'TellAFriend_admin' ); | |
} | |
if (is_admin()) | |
{ | |
add_action('admin_menu', 'TellAFriend_add_to_menu'); | |
} | |
function TellAFriend_add_javascript_files() | |
{ | |
if (!is_admin()) | |
{ | |
- wp_enqueue_style( 'tell-a-friend', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend.css'); | |
- wp_enqueue_script( 'tell-a-friend-form', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend-form.js'); | |
- wp_enqueue_script( 'tell-a-friend-popup', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend-popup.js'); | |
- } | |
+ wp_enqueue_style( 'tell-a-friend', plugin_dir_url(__FILE__).'/tell-a-friend.css'); | |
+ wp_enqueue_script( 'tell-a-friend-form', plugin_dir_url(__FILE__).'/tell-a-friend-form.js'); | |
+ wp_enqueue_script( 'tell-a-friend-popup', plugin_dir_url(__FILE__).'/tell-a-friend-popup.js'); } | |
+} | |
//[tell-a-friend id="1" title="Tell a friend"] | |
function TellAFriend_shortcode( $atts ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment