| @@ -38,10 +38,8 @@ | ||
| 38 | 38 | 'on' => '', |
| 39 | 39 | 'button_text' => '', |
| 40 | 40 | 'hide_button' => '', |
| 41 | 41 | 'button_spinner' => '', |
| 42 | - 'button_id' => '', | |
| 43 | - 'ajax_output' => '.wpgetapi_ajax_output', | |
| 44 | 42 | 'chain' => '', |
| 45 | 43 | 'chain_delay' => '0', |
| 46 | 44 | ), $atts ); |
| 47 | 45 | |
| @@ -85,10 +83,8 @@ | ||
| 85 | 83 | $a['args']['on'] = $a['on']; |
| 86 | 84 | $a['args']['button_text'] = $a['button_text']; |
| 87 | 85 | $a['args']['hide_button'] = $a['hide_button']; |
| 88 | 86 | $a['args']['button_spinner'] = $a['button_spinner']; |
| 89 | - $a['args']['button_id'] = $a['button_id']; | |
| 90 | - $a['args']['ajax_output'] = $a['ajax_output']; | |
| 91 | 87 | $a['args']['chain'] = $a['chain']; |
| 92 | 88 | $a['args']['chain_delay'] = $a['chain_delay']; |
| 93 | 89 | |
| 94 | 90 | |
| @@ -105,9 +101,8 @@ | ||
| 105 | 101 | |
| 106 | 102 | <div class="wpgetapi_ajax_wrap" data-id="<?php esc_html_e( $a['api_id'] ); ?>-<?php esc_html_e( $a['endpoint_id'] ); ?>"> |
| 107 | 103 | <button |
| 108 | 104 | class="button btn btn-primary wpgetapi_ajax_request" |
| 109 | - id="<?php esc_html_e( $a['button_id'] ); ?>" | |
| 110 | 105 | data-api="<?php esc_html_e( $a['api_id'] ); ?>" |
| 111 | 106 | data-endpoint="<?php esc_html_e( $a['endpoint_id'] ); ?>" |
| 112 | 107 | data-args="<?php esc_html_e( json_encode( $a['args'] ) ); ?>" |
| 113 | 108 | data-keys="<?php esc_html_e( json_encode( $a['keys'] ) ); ?>" |
| @@ -113,11 +108,9 @@ | ||
| 113 | 108 | data-keys="<?php esc_html_e( json_encode( $a['keys'] ) ); ?>" |
| 114 | 109 | data-post_id="<?php esc_html_e( get_the_ID() ); ?>"> |
| 115 | 110 | <span class="button_text"><?php esc_html_e( $button_text ); ?></span> |
| 116 | 111 | </button> |
| 117 | - | |
| 118 | 112 | <div class="wpgetapi_ajax_output"></div> |
| 119 | - | |
| 120 | 113 | </div> |
| 121 | 114 | |
| 122 | 115 | <?php |
| 123 | 116 | $result = ob_get_contents(); |