Changeset 1942608
- Timestamp:
- 09/17/2018 01:10:28 PM (8 years ago)
- Location:
- codec-sponsored-content
- Files:
-
- 16 added
- 4 edited
-
tags/1.0.6 (added)
-
tags/1.0.6/admin-page.php (added)
-
tags/1.0.6/codec-sponsored-content.php (added)
-
tags/1.0.6/css (added)
-
tags/1.0.6/css/codec-admin.css (added)
-
tags/1.0.6/css/codec-message.css (added)
-
tags/1.0.6/images (added)
-
tags/1.0.6/images/codec-logo-small.png (added)
-
tags/1.0.6/images/cropped-Internet-concept-4_clipped_rev_1-1.png (added)
-
tags/1.0.6/images/mon.png (added)
-
tags/1.0.6/js (added)
-
tags/1.0.6/js/codec-message.js (added)
-
tags/1.0.6/js/codec-widget-admin.js (added)
-
tags/1.0.6/js/codec-widgets-page.js (added)
-
tags/1.0.6/readme.txt (added)
-
tags/1.0.6/widget.php (added)
-
trunk/codec-sponsored-content.php (modified) (3 diffs)
-
trunk/js/codec-widget-admin.js (modified) (6 diffs)
-
trunk/js/codec-widgets-page.js (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
codec-sponsored-content/trunk/codec-sponsored-content.php
r1938134 r1942608 3 3 Plugin Name: CODEC Sponsored Content 4 4 description: Premium monetizing system for quality blogs & publications. Generate revenue by displaying a widget with manually approved branded content. 5 Version: 1.0. 55 Version: 1.0.6 6 6 Author: CODEC Prime Inc. 7 7 Author URI: https://codecprime.com … … 11 11 if (!defined('ABSPATH')) exit; // Exit if accessed directly 12 12 13 define('cppp_widget_version', '1.0. 5');13 define('cppp_widget_version', '1.0.6'); 14 14 $plugin = plugin_basename( __FILE__ ); 15 15 … … 75 75 add_action('wp_ajax_cppp_paypal', 'cppp_paypal'); 76 76 add_action('wp_ajax_cppp_empty_widgets', 'cppp_empty_widgets'); 77 add_action('wp_ajax_cppp_site_url', 'cppp_site_url'); 77 78 78 79 //Ajax functions 80 function cppp_site_url() { 81 $get_url = get_site_url(); 82 $get_url = str_replace('https://','',$get_url); 83 $get_url = str_replace('http://','',$get_url); 84 echo $get_url; 85 wp_die(); 86 } 79 87 function cppp_empty_widgets() { 80 88 update_option('widget_cppp_widget', ''); -
codec-sponsored-content/trunk/js/codec-widget-admin.js
r1919553 r1942608 43 43 data = {'action': 'cppp_paypal', val: val}; 44 44 $.post(ajaxurl, data, function(response) { 45 $.post('https://codecprime.com/partner/api/user/publisher/action', {token: token, method: 'save_pal',i: val}).done(function() { 45 $.post('https://codecprime.com/partner/api/user/publisher/method', {token: token, method: 'save_pal',i: val}).done(function(result) { 46 result = JSON.parse(result); 46 47 setTimeout(function(){ 47 48 val = $('#paypal_input').val(); … … 93 94 94 95 function check_connection() { 95 $.post('https://codecprime.com/partner/api/widget/get-code/check.php', {method: 'get_code'}).done(function(data) { 96 myArray = JSON.parse(data); 97 error = myArray['error']; 98 token = myArray['token']; 99 connect = myArray['connect']; 100 pub = myArray['pub']; 101 if(error) { 102 codec_disconnected(); 103 } 104 else { 105 codec_connected(); 106 cppp_page_status('', pub); 107 } 96 data = {'action': 'cppp_site_url'}; 97 $.post(ajaxurl, data, function(response) { 98 console.log(response); 99 $.post('https://codecprime.com/partner/api/widget/get-code/check', {method: 'get_code', u: response}).done(function(data) { 100 myArray = JSON.parse(data); 101 error = myArray['error']; 102 token = myArray['token']; 103 connect = myArray['connect']; 104 pub = myArray['pub']; 105 if(error) { 106 codec_disconnected(); 107 } 108 else { 109 codec_connected(); 110 cppp_page_status('', pub); 111 } 112 }); 108 113 }); 109 114 } … … 114 119 th = $(this); 115 120 th.after (" " + cppp_fa_spinner); 116 $.post('https://codecprime.com/partner/api/user/publisher/action', {token: token, method: 'disconnect'}).done(function() { 117 link = 'https://codecprime.com/partner/api/user/response/'+token+'.json'; 118 $.getJSON(link, function(result){ 119 if(result['result'] == 'disconnected') { 120 codec_disconnected(); 121 cppp_loader_remove(); 122 } 123 }); 124 }); 121 $.post('https://codecprime.com/partner/api/user/publisher/method', {token: token, method: 'disconnect'}).done(function(result) { 122 result = JSON.parse(result); 123 cppp_loader_remove(); 124 if(result['result'] == 'disconnected') { 125 codec_disconnected(); 126 127 } 128 }). fail(function(request,status,errorThrown) { 129 //console.log(request.responseText); 130 } 131 132 ); 125 133 }); 126 134 … … 144 152 cppp_hide_errors(); 145 153 m = $('#codec_email').val(); 154 spin = th.find('.fa-spin').length; 146 155 n = $('#codec_name').val(); 147 156 p = $('#codec_phone').val(); … … 152 161 good = ''; 153 162 } 163 if(spin) good = ''; 154 164 valid = cppp_check_mail(m); 155 165 if(!valid) cppp_error_before(th, "Email not valid"); 156 166 if(valid && good) { 157 167 th.append(" " + cppp_fa_spinner); 158 $.post('https://codecprime.com/partner/api/user/publisher/action', {token: token, method: 'new',i: cod_info}).done(function() { 159 link = 'https://codecprime.com/partner/api/user/response/'+token+'.json'; 160 $.getJSON(link, function(result){ 168 169 170 data = {'action': 'cppp_site_url'}; 171 $.post(ajaxurl, data, function(response) { 172 cod_info['u'] = response; 173 $.post('https://codecprime.com/partner/api/user/publisher/method', {token: token, method: 'new', i: cod_info}).done(function(result) { 174 result = JSON.parse(result); 161 175 cppp_loader_remove(); 162 176 res = result['result']; 163 177 error = result['error']; 164 178 pub = result['pub']; 179 165 180 if(!error) 166 181 if(res == 'connected' || res == 'created') { … … 175 190 }); 176 191 }); 192 193 177 194 } 178 195 }); -
codec-sponsored-content/trunk/js/codec-widgets-page.js
r1917493 r1942608 7 7 if(codec) { 8 8 i = {'id': widget_id, 'type': 'vertical', 'posts': 3}; 9 $.post('https://codecprime.com/partner/api/widget/get-code/check.php', {method: 'get_code'}).done(function(data) { 9 data = {'action': 'cppp_site_url'}; 10 $.post(ajaxurl, data, function(response) { 11 $.post('https://codecprime.com/partner/api/widget/get-code/check', {method: 'get_code', u: response}).done(function(data) { 10 12 myArray = JSON.parse(data); 11 13 error = myArray['error']; 12 14 token = myArray['token']; 13 15 if(token) { 14 $.post('https://codecprime.com/partner/api/user/publisher/action', {token: token, method: 'update_widget', i: i}).done(function(){}); 16 i['u'] = response; 17 $.post('https://codecprime.com/partner/api/user/publisher/method', {token: token, method: 'update_widget', i: i}).done(function(){}); 15 18 } 19 }); 16 20 }); 17 21 } … … 40 44 if(typeof posts == 'undefined') posts = 3; 41 45 if(posts == 'Select') posts = 3; 46 data = {'action': 'cppp_site_url'}; 47 $.post(ajaxurl, data, function(response) { 42 48 i = {'id': th_id, 'type': widg, 'posts': posts}; 43 $.post('https://codecprime.com/partner/api/widget/get-code/check .php', {method: 'get_code'}).done(function(data) {49 $.post('https://codecprime.com/partner/api/widget/get-code/check', {method: 'get_code', u: response}).done(function(data) { 44 50 myArray = JSON.parse(data); 45 51 error = myArray['error']; 46 52 token = myArray['token']; 47 53 if(token) { 48 $.post('https://codecprime.com/partner/api/user/publisher/action', {token: token, method: 'update_widget', i: i}).done(function() {}); 54 i['u'] = response; 55 $.post('https://codecprime.com/partner/api/user/publisher/method', {token: token, method: 'update_widget', i: i}).done(function(data) { 56 }); 49 57 } 58 }); 50 59 }); 51 60 } -
codec-sponsored-content/trunk/readme.txt
r1938134 r1942608 6 6 Tested up to: 4.9.8 7 7 Requires PHP: 5.2.4 8 Stable tag: 1.0. 58 Stable tag: 1.0.6 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 64 64 == Changelog == 65 65 66 = 1.0.1-1.0. 5=66 = 1.0.1-1.0.6 = 67 67 * Minor bug fixes 68 68
Note: See TracChangeset
for help on using the changeset viewer.