Changeset 2811099
- Timestamp:
- 11/03/2022 01:31:59 PM (3 years ago)
- Location:
- custom-api-for-wp/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (2 diffs)
-
custom-api-for-wordpress.php (modified) (14 diffs)
-
custom-api-handler.php (modified) (1 diff)
-
custom-api-license-purchase.php (modified) (1 diff)
-
custom-api-wp-ui.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-api-for-wp/trunk/README.txt
r2783425 r2811099 4 4 Requires at least: 3.0.1 5 5 Requires PHP: 5.4 6 Tested up to: 6. 07 Stable tag: 2.5. 06 Tested up to: 6.1 7 Stable tag: 2.5.1 8 8 License: MIT/Expat 9 9 License URI: https://docs.miniorange.com/mit-license … … 288 288 * Bug Fixes 289 289 290 = 2.5.1 = 291 * Compatibility with WordPress 6.1 292 290 293 == Upgrade Notice == 291 294 -
custom-api-for-wp/trunk/custom-api-for-wordpress.php
r2783461 r2811099 16 16 * Plugin URI: custom-api-for-wp 17 17 * Description: This plugin helps in creating custom api end points for extracting customized data from database. The plugin can also be extended to integrate external APIs in WordPress. 18 * Version: 2.5. 018 * Version: 2.5.1 19 19 * Author: miniOrange 20 20 * Author URI: https://www.miniorange.com … … 38 38 * Rename this for your plugin and update it as you release new versions. 39 39 */ 40 define('CUSTOM_API_FOR_WORDPRESS_VERSION', '2. 5.0');40 define('CUSTOM_API_FOR_WORDPRESS_VERSION', '2.3.0'); 41 41 42 42 update_option('mo_custom_api_wp_version', CUSTOM_API_FOR_WORDPRESS_VERSION); … … 239 239 $mo_regex = substr($mo_regex, 0, -2); 240 240 241 if(isset($_GET[$mo_regex]) && sanitize_text_field($_GET[$mo_regex])!== NULL){242 $sql_query = str_replace($reg_array[0][$i], sanitize_text_field($_GET[$mo_regex]), $sql_query);241 if(isset($_GET[$mo_regex]) && $_GET[$mo_regex] !== NULL){ 242 $sql_query = str_replace($reg_array[0][$i], $_GET[$mo_regex], $sql_query); 243 243 } 244 244 else{ … … 282 282 if( $matches !== 0 && (sizeof($_POST) == sizeof($reg_array[0])) ){ 283 283 $i=0; 284 for ($i=0;$i<s anitize_text_field($_POST);$i++) {284 for ($i=0;$i<sizeof($_POST);$i++) { 285 285 $mo_regex = substr($reg_array[0][$i], 2); 286 286 $mo_regex = substr($mo_regex, 0, -2); 287 if(isset($_POST[$mo_regex]) && sanitize_text_field($_POST[$mo_regex])!== NULL){288 $sql_query = str_replace($reg_array[0][$i], sanitize_text_field($_POST[$mo_regex]), $sql_query);287 if(isset($_POST[$mo_regex]) && $_POST[$mo_regex] !== NULL){ 288 $sql_query = str_replace($reg_array[0][$i], $_POST[$mo_regex], $sql_query); 289 289 } 290 290 else{ … … 547 547 if (current_user_can('administrator')) { 548 548 if (isset($_POST["SubmitForm1"])) { 549 if (isset($_POST['SubmitUser1']) && wp_verify_nonce( sanitize_text_field($_POST['SubmitUser1']), 'CheckNonce1')) {549 if (isset($_POST['SubmitUser1']) && wp_verify_nonce($_POST['SubmitUser1'], 'CheckNonce1')) { 550 550 $data1 = array( 551 551 "ApiName" => custom_api_wp_sanitise($_POST['api_name_initial']), … … 560 560 if (current_user_can('administrator')) { 561 561 if (isset($_POST["SubmitForm2"])) { 562 if (isset($_POST['SubmitUser2']) && wp_verify_nonce( sanitize_text_field($_POST['SubmitUser2']), 'CheckNonce2')) {562 if (isset($_POST['SubmitUser2']) && wp_verify_nonce($_POST['SubmitUser2'], 'CheckNonce2')) { 563 563 $data2 = array( 564 564 "ApiName" => custom_api_wp_sanitise($_POST['api_name_initial2']), … … 573 573 if (current_user_can('administrator')) { 574 574 if (isset($_POST["SendResult"])) { 575 if (isset($_POST['SubmitUser']) && wp_verify_nonce( sanitize_text_field($_POST['SubmitUser']), 'CheckNonce')) {575 if (isset($_POST['SubmitUser']) && wp_verify_nonce($_POST['SubmitUser'], 'CheckNonce')) { 576 576 577 577 $data = array( … … 655 655 'firstName' => isset($current_user->user_firstname) ? $current_user->user_firstname : '', 656 656 'lastName' => isset($current_user->user_lastname) ? $current_user->user_lastname : '', 657 'company' => sanitize_text_field($_SERVER['SERVER_NAME']),657 'company' => $_SERVER['SERVER_NAME'], 658 658 'email' => $email, 659 659 'ccEmail' => '[email protected]', … … 689 689 if (current_user_can('administrator')) { 690 690 if (isset($_POST["ExternalApiConnection"])) { 691 if (isset($_POST['SubmitUser']) && wp_verify_nonce( sanitize_text_field($_POST['SubmitUser']), 'CheckNonce')) {691 if (isset($_POST['SubmitUser']) && wp_verify_nonce($_POST['SubmitUser'], 'CheckNonce')) { 692 692 693 693 $ExternalApiName = isset($_POST['ExternalApiName']) ? custom_api_wp_sanitise($_POST['ExternalApiName']) : ''; … … 755 755 if (isset($_POST["ExternalApiConnectionSave"])) { 756 756 757 if (isset($_POST['SubmitUser']) && wp_verify_nonce( sanitize_text_field($_POST['SubmitUser']), 'CheckNonce')) {757 if (isset($_POST['SubmitUser']) && wp_verify_nonce($_POST['SubmitUser'], 'CheckNonce')) { 758 758 759 759 $list = false!==get_option('custom_api_save_ExternalApiConfiguration')?get_option('custom_api_save_ExternalApiConfiguration'):[]; … … 1003 1003 if (isset($_POST['option'])) { 1004 1004 if (custom_api_wp_sanitise($_POST['option']) == "custom_api_authentication_register_customer") { 1005 if (wp_verify_nonce( sanitize_text_field($_POST['mo_custom_api_register_customer_field']), 'mo_custom_api_register_customer')) {1005 if (wp_verify_nonce($_POST['mo_custom_api_register_customer_field'], 'mo_custom_api_register_customer')) { 1006 1006 $email = ''; 1007 1007 $phone = ''; … … 1064 1064 if (isset($_POST['option2'])) { 1065 1065 if (sanitize_text_field($_POST['option2']) == "custom_api_authentication_goto_login1") { 1066 if (wp_verify_nonce( sanitize_text_field($_POST['mo_custom_api_goto_login_form1_field']), 'mo_custom_api_goto_login_form1')) {1066 if (wp_verify_nonce($_POST['mo_custom_api_goto_login_form1_field'], 'mo_custom_api_goto_login_form1')) { 1067 1067 update_option('custom_api_authentication_verify_customer', 'yes'); 1068 1068 delete_option('custom_api_authentication_new_customer'); … … 1073 1073 if (isset($_POST['option2'])) { 1074 1074 if (sanitize_text_field($_POST['option2']) == "custom_api_authentication_goto_register"){ 1075 if (wp_verify_nonce( sanitize_text_field($_POST['mo_custom_api_goto_register_form_field']), 'mo_custom_api_goto_register_form')) {1075 if (wp_verify_nonce($_POST['mo_custom_api_goto_register_form_field'], 'mo_custom_api_goto_register_form')) { 1076 1076 update_option('custom_api_authentication_new_customer', 'yes'); 1077 1077 delete_option('custom_api_authentication_verify_customer'); … … 1082 1082 if (isset($_POST['option'])){ 1083 1083 if (sanitize_text_field($_POST['option']) == "change_miniorange") { 1084 if (wp_verify_nonce( sanitize_text_field($_POST['mo_custom_api_goto_login_form_field']), 'mo_custom_api_goto_login_form')) {1084 if (wp_verify_nonce($_POST['mo_custom_api_goto_login_form_field'], 'mo_custom_api_goto_login_form')) { 1085 1085 update_option('custom_api_authentication_verify_customer', 'yes'); 1086 1086 } -
custom-api-for-wp/trunk/custom-api-handler.php
r2783425 r2811099 95 95 if($message=="Feedback skipped") 96 96 { 97 $content = '<div >Hello, <br><br>First Name :' . $user->user_firstname . '<br><br>Last Name :' . $user->user_lastname . ' <br><br>Company :<a href="' . sanitize_text_field($_SERVER['SERVER_NAME']) . '" target="_blank" >' . sanitize_text_field($_SERVER['SERVER_NAME']). '</a><br><br>Phone Number :' . $phone . '<br><br>Email :<a href="mailto:' . $fromEmail . '" target="_blank">' . $fromEmail . '</a><br><br><p style="color:#FF0000">'.$query.'</p></div>';97 $content = '<div >Hello, <br><br>First Name :' . $user->user_firstname . '<br><br>Last Name :' . $user->user_lastname . ' <br><br>Company :<a href="' . $_SERVER['SERVER_NAME'] . '" target="_blank" >' . $_SERVER['SERVER_NAME'] . '</a><br><br>Phone Number :' . $phone . '<br><br>Email :<a href="mailto:' . $fromEmail . '" target="_blank">' . $fromEmail . '</a><br><br><p style="color:#FF0000">'.$query.'</p></div>'; 98 98 } 99 99 else 100 $content = '<div >Hello, <br><br>First Name :' . $user->user_firstname . '<br><br>Last Name :' . $user->user_lastname . ' <br><br>Company :<a href="' . sanitize_text_field($_SERVER['SERVER_NAME']) . '" target="_blank" >' . sanitize_text_field($_SERVER['SERVER_NAME']). '</a><br><br>Phone Number :' . $phone . '<br><br>Email :<a href="mailto:' . $fromEmail . '" target="_blank">' . $fromEmail . '</a><br><br>Rating: '.$rating.'<br><br>Query :' . $query . '</div>';100 $content = '<div >Hello, <br><br>First Name :' . $user->user_firstname . '<br><br>Last Name :' . $user->user_lastname . ' <br><br>Company :<a href="' . $_SERVER['SERVER_NAME'] . '" target="_blank" >' . $_SERVER['SERVER_NAME'] . '</a><br><br>Phone Number :' . $phone . '<br><br>Email :<a href="mailto:' . $fromEmail . '" target="_blank">' . $fromEmail . '</a><br><br>Rating: '.$rating.'<br><br>Query :' . $query . '</div>'; 101 101 102 102 $fields = array( -
custom-api-for-wp/trunk/custom-api-license-purchase.php
r2783425 r2811099 128 128 <li>✅ <span class="text-muted">Support for Unlimited External APIs Connection </li> 129 129 <li>✅ <span class="text-muted"> External API integration to fetch data in the WordPress, update data on External API provider side.</span></li> 130 <li>✅ <span class="text-muted">Support for OAuth 2.0, Basic authentication, API Key authentication and Bearer token authentication </span> </li>130 <li>✅ <span class="text-muted">Support for Dynamic header in API Request </span> </ l i> 131 131 <li>✅ <span class="text-muted">Support for GET, POST, PUT & DELETE methods</span></li> 132 <li>✅ <span class="text-muted">Display the data fetched from external API using shortcode.</span></li>133 132 <li>✅ <span class="text-muted">Dynamic WordPress hooks for each External API Connection to perform operations on external data</span></li> 134 133 <li>✅ <span class="text-muted">Integration on any WordPress event or any third-party plugin event/action.</span></li> -
custom-api-for-wp/trunk/custom-api-wp-ui.php
r2783425 r2811099 2009 2009 <div class="row mo_custom_api_page_layout_row"> 2010 2010 <div class="col-md-8 mo_custom_api_page_layout" style="padding:30px;padding-top: 15px;background-color: #f5f5f5;"> 2011 <p class="mo_custom_api_heading">Check out all our paidintegration and use cases-</p>2011 <p class="mo_custom_api_heading">Check out all our integration and use cases-</p> 2012 2012 <hr style="height: 5px;background: #1f3668;margin-top: 9px;border-radius: 30px;"> 2013 2013 2014 2014 <div class="mo_custom_api_intg_cards"> 2015 <h4 class="mo_custom_api_intg_head">Woocommerce Sync products from External API. (Import Woocommerce Product using API)</h4>2015 <h4 class="mo_custom_api_intg_head">Woocommerce Sync products from External API.</h4> 2016 2016 <p class="mo_custom_api_intg_para">If you have a Woocommerce store having a lot of products and want to sync/import products from external inventory, supplier via APIs. Then this can be acheived using this plugin along with Woocommerce sync add-on.</p> 2017 2017 <img src="<?php echo esc_url(plugin_dir_url(__FILE__) . "/images/woo-3.png"); ?>" class="mo_cusotm_api_intg_logo" alt=" Image"> … … 2038 2038 <a class="mo_custom_api_intg_readmore" href="https://plugins.miniorange.com/integrate-external-third-party-rest-api-endpoints-into-wordpress#step_3" target="_blank">Learn More</a> 2039 2039 </div> 2040 <div class="mo_custom_api_intg_cards"> 2041 <h4 class="mo_custom_api_intg_head">Display data fetched from API using shortcode</h4> 2042 <p class="mo_custom_api_intg_para">If you are looking to fetch the data from an external API and want to display that data on your WordPress site, then this can be achieved using the shortcode with a custom design. You can embed your HTML, CSS and JS and add the dynamic data fetched from the API and display that on the front-end. This feature is available with the plugin's Enterprise Plan.</p> 2043 <img src="<?php echo esc_url(plugin_dir_url(__FILE__) . "/images/ex3.png"); ?>" class="mo_cusotm_api_intg_logo" alt=" Image"> 2044 <span class="mo_custom_api_intg_rect"></span> 2045 <span class="mo_custom_api_intg_tri"></span> 2046 <!-- <a class="mo_custom_api_intg_readmore" href="https://plugins.miniorange.com/woocommerce-api-product-sync-with-woocommerce-rest-apis" target="_blank">Learn More</a> --> 2047 </div> 2040 2048 2041 <div class="mo_custom_api_intg_cards"> 2049 2042 <h4 class="mo_custom_api_intg_head">Zoho Webhooks and API integration in WordPress.</h4> … … 2054 2047 <!-- <a class="mo_custom_api_intg_readmore" href="https://plugins.miniorange.com/wordpress-user-provisioning" target="_blank">Learn More</a> --> 2055 2048 </div> 2049 2050 <div class="mo_custom_api_intg_cards"> 2051 <h4 class="mo_custom_api_intg_head">AliDropship Sync products from External API.</h4> 2052 <p class="mo_custom_api_intg_para"> If you have Alidropship products store having a lot of products and want to sync/import products from external inventory, supplier via APIs. Then this can be acheived using this plugin along with Alidropship sync add-on.</p> 2053 <img src="<?php echo esc_url(plugin_dir_url(__FILE__) . "/images/alidropship.png"); ?>" class="mo_cusotm_api_intg_logo" alt=" Image"> 2054 <span class="mo_custom_api_intg_rect"></span> 2055 <span class="mo_custom_api_intg_tri"></span> 2056 <!-- <a class="mo_custom_api_intg_readmore" href="https://plugins.miniorange.com/wordpress-user-provisioning" target="_blank">Learn More</a> --> 2057 </div> 2058 2056 2059 <div class="mo_custom_api_intg_cards"> 2057 2060 <h4 class="mo_custom_api_intg_head">Connect External API on Woocommerce events.</h4> … … 2061 2064 <span class="mo_custom_api_intg_tri"></span> 2062 2065 <a class="mo_custom_api_intg_readmore" href="https://plugins.miniorange.com/woocommerce-events-integration-on-webhooks" target="_blank">Learn More</a> 2063 </div>2064 <div class="mo_custom_api_intg_cards">2065 <h4 class="mo_custom_api_intg_head">AliDropship Sync products from External API.</h4>2066 <p class="mo_custom_api_intg_para"> If you have Alidropship products store having a lot of products and want to sync/import products from external inventory, supplier via APIs. Then this can be acheived using this plugin along with Alidropship sync add-on.</p>2067 <img src="<?php echo esc_url(plugin_dir_url(__FILE__) . "/images/alidropship.png"); ?>" class="mo_cusotm_api_intg_logo" alt=" Image">2068 <span class="mo_custom_api_intg_rect"></span>2069 <span class="mo_custom_api_intg_tri"></span>2070 <!-- <a class="mo_custom_api_intg_readmore" href="https://plugins.miniorange.com/wordpress-user-provisioning" target="_blank">Learn More</a> -->2071 2066 </div> 2072 2067 <div class="mo_custom_api_intg_cards">
Note: See TracChangeset
for help on using the changeset viewer.