Changeset 1978868
- Timestamp:
- 11/22/2018 02:51:13 PM (7 years ago)
- Location:
- siteattention
- Files:
-
- 6 edited
- 1 copied
-
tags/2.0.1 (copied) (copied from siteattention/trunk)
-
tags/2.0.1/README.txt (modified) (2 diffs)
-
tags/2.0.1/includes/class-siteattention.php (modified) (2 diffs)
-
tags/2.0.1/siteattention.php (modified) (25 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/includes/class-siteattention.php (modified) (2 diffs)
-
trunk/siteattention.php (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
-
siteattention/tags/2.0.1/README.txt
r1868112 r1978868 6 6 Requires at least: 4.5 7 7 Tested up to: 4.9 8 Stable tag: 2.0. 08 Stable tag: 2.0.1 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 41 41 3. SiteAttention SEO Plugin Settings 42 42 4. SiteAttention SEO Plugin Tab (left side menu) 43 5. SiteAttention Dashboard Google Rank44 6. SiteAttention Dashboard - TRending and Falling Ranks45 7. SiteAttention Dashboard Single Page Statistics46 43 47 44 == Changelog == -
siteattention/tags/2.0.1/includes/class-siteattention.php
r1864021 r1978868 96 96 97 97 public static function callApi($route,$body){ 98 $options = get_option(self::NAME); 99 $response = wp_remote_post( self::URL . $route, [ 100 'headers' => [ 101 'Content-Type' => 'application/json', 102 'X-SiteAttention' => $options['key'], 103 'Referer' => get_site_url() . '/siteattention-wordpress', 104 ], 98 99 //URL = https://test.siteattention.com/ $route = customer/instance/page/publish 100 $response = wp_remote_post(self::URL.$route, array( 105 101 'method' => 'POST', 106 102 'body' => json_encode($body), 107 103 'timeout' => 15, 104 'headers' => array( 105 'Content-Type' => 'application/json', 106 'X-SiteAttention' => siteattention_get_option('license_key', siteattention_get_option('key', '')), 107 'Referer' => get_site_url() . '/siteattention-wordpress' 108 ) 109 108 110 // 'blocking' => false, 109 111 // 'sslverify' => false, 110 112 // 'redirection' => 0, 111 113 // 'httpversion' => '1.1', 112 ]);114 )); 113 115 114 116 if (is_wp_error($response)) … … 122 124 } 123 125 } 126 124 127 125 128 public static function write_log( $log ){ -
siteattention/tags/2.0.1/siteattention.php
r1864129 r1978868 16 16 * Plugin Name: SiteAttention 17 17 * Description: Simple and intuitive SEO tool to help improve seach ranking. 18 * Version: 2.0. 018 * Version: 2.0.1 19 19 * Author: siteattention 20 20 * Author URI: https://siteattention.com … … 33 33 // register a new setting for "siteattention" page 34 34 register_setting( 'siteattention', 'siteattention_options', 'siteattention_validate_inputs'); 35 35 36 36 // register a new field in the "siteattention_section_license" section, inside the "siteattention" page 37 37 add_settings_field( … … 47 47 ] 48 48 ); 49 49 50 50 // Provide e-mail field for resending lost license key to customer. 51 51 /* add_settings_field( … … 61 61 ] 62 62 ); 63 */ 63 */ 64 64 add_settings_field( 65 65 'iid', // as of WP 4.6 this value is used only internally … … 74 74 ] 75 75 ); 76 76 77 77 add_settings_field( 78 78 'iname', // as of WP 4.6 this value is used only internally … … 88 88 ); 89 89 // ------ New Form Section here ------ // 90 90 91 91 // register a new field in the "siteattention_section_register" section, inside the "siteattention" page 92 92 add_settings_field( … … 102 102 ] 103 103 ); 104 104 105 105 // register a new field in the "siteattention_section_register" section, inside the "siteattention" page 106 106 add_settings_field( … … 116 116 ] 117 117 ); 118 118 119 119 // if(!siteattention_registered()) { 120 120 // register a new section for the customer registration in the "siteattention" page … … 147 147 // Create our array for storing the validated options 148 148 $output = array(); 149 149 150 150 // Loop through each of the incoming options 151 151 foreach( $input as $key => $value ) { 152 152 // Check to see if the current option has a value. If so, process it. 153 153 if( isset( $input[$key] ) ) { 154 154 155 155 // Strip all HTML and PHP tags and properly handle quoted strings 156 156 $output[$key] = strip_tags( stripslashes( $input[ $key ] ) ); 157 157 158 158 } // end if 159 159 160 160 } // end foreach 161 161 162 162 // Return the array processing any additional functions filtered by this action 163 163 return apply_filters( 'siteattention_validate_inputs', $output, $input ); 164 165 } 166 167 168 164 165 } 166 167 168 169 169 /** 170 170 * register our siteattention_settings_init to the admin_init action hook 171 171 */ 172 172 add_action( 'admin_init', 'siteattention_settings_init' ); 173 173 174 174 /** 175 175 * custom option and settings: 176 176 * callback functions 177 177 */ 178 178 179 179 // developers section cb 180 180 181 181 // section callbacks can accept an $args parameter, which is an array. 182 182 // $args have the following keys defined: title, id, callback. … … 202 202 <?php 203 203 } 204 204 205 205 function siteattention_get_option($option_key, $default_value = '') { 206 206 $all_option_values = get_option( 'siteattention_options' ); … … 219 219 $rs_list = array('TcJGali4iC'); 220 220 } 221 221 222 222 return $rs_list; 223 223 } 224 224 225 225 // pill field cb 226 226 227 227 // field callbacks can accept an $args parameter, which is an array. 228 228 // $args is defined at the add_settings_field() function. … … 234 234 // get the value of the setting we've registered with register_setting() 235 235 $license_key_value = siteattention_get_option( 'license_key' ); 236 236 237 237 // output the field 238 238 ?> … … 309 309 <?php 310 310 } 311 311 312 312 /** 313 313 * top level menu … … 324 324 ); 325 325 } 326 326 327 327 /** 328 328 * register our siteattention_options_page to the admin_menu action hook 329 329 */ 330 330 add_action( 'admin_menu', 'siteattention_options_page' ); 331 331 332 332 $siteattention_info_assoc = null; 333 333 function siteattention_get_acccount_info() { … … 362 362 $siteattention_info_assoc = $resp_body; 363 363 } 364 364 365 365 return $siteattention_info_assoc; 366 366 } … … 376 376 else { 377 377 return false; 378 } 378 } 379 379 } 380 380 … … 388 388 return; 389 389 } 390 390 391 391 // add the filter 392 392 add_filter( 'siteattention_form_submit_button', 'filter_siteattention_form_submit_button', 10, 2 ); 393 393 394 394 // add error/update messages 395 395 396 396 // check if the user have submitted the settings 397 397 // wordpress will add the "settings-updated" $_GET parameter to the url … … 402 402 } 403 403 404 404 405 405 // show error/update messages 406 406 settings_errors( 'siteattention_messages' ); … … 411 411 <?php if(siteattention_registered()) { ?> 412 412 <div class="info-wrap" style="display:block;width:45%;margin-left:5%;margin-bottom:5%;float:right;"> 413 <h2 style="font-size:1.8em">Your Account information </h2>413 <h2 style="font-size:1.8em">Your Account informations</h2> 414 414 <?php 415 415 $sa_all_info = siteattention_get_acccount_info(); … … 448 448 <?php if ( $section['callback'] ) 449 449 call_user_func( $section['callback'], $section ); 450 450 451 451 if ( ! isset( $wp_settings_fields ) || !isset( $wp_settings_fields[$page] ) || !isset( $wp_settings_fields[$page][$section['id']] ) ) 452 452 continue; … … 466 466 </div> 467 467 <?php } ?> 468 468 469 469 <?php 470 470 $site_url_noschema = get_site_url(); … … 481 481 jQuery('form#siteattention_settings').submit(); 482 482 }); 483 483 484 484 jQuery('#siteattention_btn_register').on('click', function(e) { 485 485 jQuery('#siteattention_settings').find("input[type=text]").attr("disabled", false); … … 496 496 else { 497 497 var register_msg_class = "error"; 498 if(typeof data['error']['email'] != 'undefined') { 498 if(typeof data['error']['email'] != 'undefined') { 499 499 data['error'] = data['error']['email']; 500 500 } … … 508 508 } 509 509 }) 510 return false; 510 return false; 511 511 }); 512 512 513 513 jQuery('#siteattention_license_key_get_info').on('click', function(e) { 514 514 jQuery('form#siteattention_settings').submit(); … … 532 532 <p><?php echo $msg; ?></p> 533 533 </div> 534 534 535 535 <?php } 536 536 // Only show the message on post/page edit views. -
siteattention/trunk/README.txt
r1868112 r1978868 5 5 Tags: SEO, Content analysis, Readability 6 6 Requires at least: 4.5 7 Tested up to: 4.9 8 Stable tag: 2.0. 07 Tested up to: 4.9.2 8 Stable tag: 2.0.1 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 41 41 3. SiteAttention SEO Plugin Settings 42 42 4. SiteAttention SEO Plugin Tab (left side menu) 43 5. SiteAttention Dashboard Google Rank44 6. SiteAttention Dashboard - TRending and Falling Ranks45 7. SiteAttention Dashboard Single Page Statistics46 43 47 44 == Changelog == -
siteattention/trunk/includes/class-siteattention.php
r1864021 r1978868 96 96 97 97 public static function callApi($route,$body){ 98 $options = get_option(self::NAME); 99 $response = wp_remote_post( self::URL . $route, [ 100 'headers' => [ 101 'Content-Type' => 'application/json', 102 'X-SiteAttention' => $options['key'], 103 'Referer' => get_site_url() . '/siteattention-wordpress', 104 ], 98 99 //URL = https://test.siteattention.com/ $route = customer/instance/page/publish 100 $response = wp_remote_post(self::URL.$route, array( 105 101 'method' => 'POST', 106 102 'body' => json_encode($body), 107 103 'timeout' => 15, 104 'headers' => array( 105 'Content-Type' => 'application/json', 106 'X-SiteAttention' => siteattention_get_option('license_key', siteattention_get_option('key', '')), 107 'Referer' => get_site_url() . '/siteattention-wordpress' 108 ) 109 108 110 // 'blocking' => false, 109 111 // 'sslverify' => false, 110 112 // 'redirection' => 0, 111 113 // 'httpversion' => '1.1', 112 ]);114 )); 113 115 114 116 if (is_wp_error($response)) … … 122 124 } 123 125 } 126 124 127 125 128 public static function write_log( $log ){ -
siteattention/trunk/siteattention.php
r1864129 r1978868 16 16 * Plugin Name: SiteAttention 17 17 * Description: Simple and intuitive SEO tool to help improve seach ranking. 18 * Version: 2.0. 018 * Version: 2.0.1 19 19 * Author: siteattention 20 20 * Author URI: https://siteattention.com … … 33 33 // register a new setting for "siteattention" page 34 34 register_setting( 'siteattention', 'siteattention_options', 'siteattention_validate_inputs'); 35 35 36 36 // register a new field in the "siteattention_section_license" section, inside the "siteattention" page 37 37 add_settings_field( … … 47 47 ] 48 48 ); 49 49 50 50 // Provide e-mail field for resending lost license key to customer. 51 51 /* add_settings_field( … … 61 61 ] 62 62 ); 63 */ 63 */ 64 64 add_settings_field( 65 65 'iid', // as of WP 4.6 this value is used only internally … … 74 74 ] 75 75 ); 76 76 77 77 add_settings_field( 78 78 'iname', // as of WP 4.6 this value is used only internally … … 88 88 ); 89 89 // ------ New Form Section here ------ // 90 90 91 91 // register a new field in the "siteattention_section_register" section, inside the "siteattention" page 92 92 add_settings_field( … … 102 102 ] 103 103 ); 104 104 105 105 // register a new field in the "siteattention_section_register" section, inside the "siteattention" page 106 106 add_settings_field( … … 116 116 ] 117 117 ); 118 118 119 119 // if(!siteattention_registered()) { 120 120 // register a new section for the customer registration in the "siteattention" page … … 147 147 // Create our array for storing the validated options 148 148 $output = array(); 149 149 150 150 // Loop through each of the incoming options 151 151 foreach( $input as $key => $value ) { 152 152 // Check to see if the current option has a value. If so, process it. 153 153 if( isset( $input[$key] ) ) { 154 154 155 155 // Strip all HTML and PHP tags and properly handle quoted strings 156 156 $output[$key] = strip_tags( stripslashes( $input[ $key ] ) ); 157 157 158 158 } // end if 159 159 160 160 } // end foreach 161 161 162 162 // Return the array processing any additional functions filtered by this action 163 163 return apply_filters( 'siteattention_validate_inputs', $output, $input ); 164 165 } 166 167 168 164 165 } 166 167 168 169 169 /** 170 170 * register our siteattention_settings_init to the admin_init action hook 171 171 */ 172 172 add_action( 'admin_init', 'siteattention_settings_init' ); 173 173 174 174 /** 175 175 * custom option and settings: 176 176 * callback functions 177 177 */ 178 178 179 179 // developers section cb 180 180 181 181 // section callbacks can accept an $args parameter, which is an array. 182 182 // $args have the following keys defined: title, id, callback. … … 202 202 <?php 203 203 } 204 204 205 205 function siteattention_get_option($option_key, $default_value = '') { 206 206 $all_option_values = get_option( 'siteattention_options' ); … … 219 219 $rs_list = array('TcJGali4iC'); 220 220 } 221 221 222 222 return $rs_list; 223 223 } 224 224 225 225 // pill field cb 226 226 227 227 // field callbacks can accept an $args parameter, which is an array. 228 228 // $args is defined at the add_settings_field() function. … … 234 234 // get the value of the setting we've registered with register_setting() 235 235 $license_key_value = siteattention_get_option( 'license_key' ); 236 236 237 237 // output the field 238 238 ?> … … 309 309 <?php 310 310 } 311 311 312 312 /** 313 313 * top level menu … … 324 324 ); 325 325 } 326 326 327 327 /** 328 328 * register our siteattention_options_page to the admin_menu action hook 329 329 */ 330 330 add_action( 'admin_menu', 'siteattention_options_page' ); 331 331 332 332 $siteattention_info_assoc = null; 333 333 function siteattention_get_acccount_info() { … … 362 362 $siteattention_info_assoc = $resp_body; 363 363 } 364 364 365 365 return $siteattention_info_assoc; 366 366 } … … 376 376 else { 377 377 return false; 378 } 378 } 379 379 } 380 380 … … 388 388 return; 389 389 } 390 390 391 391 // add the filter 392 392 add_filter( 'siteattention_form_submit_button', 'filter_siteattention_form_submit_button', 10, 2 ); 393 393 394 394 // add error/update messages 395 395 396 396 // check if the user have submitted the settings 397 397 // wordpress will add the "settings-updated" $_GET parameter to the url … … 402 402 } 403 403 404 404 405 405 // show error/update messages 406 406 settings_errors( 'siteattention_messages' ); … … 411 411 <?php if(siteattention_registered()) { ?> 412 412 <div class="info-wrap" style="display:block;width:45%;margin-left:5%;margin-bottom:5%;float:right;"> 413 <h2 style="font-size:1.8em">Your Account information </h2>413 <h2 style="font-size:1.8em">Your Account informations</h2> 414 414 <?php 415 415 $sa_all_info = siteattention_get_acccount_info(); … … 448 448 <?php if ( $section['callback'] ) 449 449 call_user_func( $section['callback'], $section ); 450 450 451 451 if ( ! isset( $wp_settings_fields ) || !isset( $wp_settings_fields[$page] ) || !isset( $wp_settings_fields[$page][$section['id']] ) ) 452 452 continue; … … 466 466 </div> 467 467 <?php } ?> 468 468 469 469 <?php 470 470 $site_url_noschema = get_site_url(); … … 481 481 jQuery('form#siteattention_settings').submit(); 482 482 }); 483 483 484 484 jQuery('#siteattention_btn_register').on('click', function(e) { 485 485 jQuery('#siteattention_settings').find("input[type=text]").attr("disabled", false); … … 496 496 else { 497 497 var register_msg_class = "error"; 498 if(typeof data['error']['email'] != 'undefined') { 498 if(typeof data['error']['email'] != 'undefined') { 499 499 data['error'] = data['error']['email']; 500 500 } … … 508 508 } 509 509 }) 510 return false; 510 return false; 511 511 }); 512 512 513 513 jQuery('#siteattention_license_key_get_info').on('click', function(e) { 514 514 jQuery('form#siteattention_settings').submit(); … … 532 532 <p><?php echo $msg; ?></p> 533 533 </div> 534 534 535 535 <?php } 536 536 // Only show the message on post/page edit views.
Note: See TracChangeset
for help on using the changeset viewer.