Beispiel #1
0
 function output()
 {
     echo '<div class="wrap" id="' . $this->key . '">';
     echo '<h2>' . dfrapi_setting_pages($this->page) . ' &#8212; Datafeedr API</h2>';
     settings_fields($this->page);
     do_settings_sections($this->page);
     echo '</div>';
 }
Beispiel #2
0
 function output()
 {
     echo '<div class="wrap" id="' . $this->key . '">';
     echo '<h2>' . dfrapi_setting_pages($this->page) . ' &#8212; Datafeedr API</h2>';
     echo '<form method="post" action="options.php">';
     wp_nonce_field('update-options');
     settings_fields($this->page);
     do_settings_sections($this->page);
     submit_button(__('Import Data', DFRAPI_DOMAIN));
     echo '</form>';
     echo '</div>';
 }
Beispiel #3
0
        function output()
        {
            echo '<div class="wrap" id="' . $this->key . '">';
            echo '<h2>' . dfrapi_setting_pages($this->page) . ' &#8212; Datafeedr API</h2>';
            ?>
			
			<script>
			jQuery(function($) {
			
				$('#dfrapi_delete_cached_api_data').on('click',function(e) {
					$("#dfrapi_delete_cached_api_data_result").hide();
					$("#dfrapi_delete_cached_api_data").text('<?php 
            _e("Deleting...", DFRAPI_DOMAIN);
            ?>
').addClass('button-disabled');
					$.ajax({
						type: "POST",
						url: "<?php 
            echo admin_url('admin-ajax.php');
            ?>
",
						data: {
							action: "dfrapi_delete_cached_api_data",
							dfrapi_security: "<?php 
            echo wp_create_nonce('dfrapi_ajax_nonce');
            ?>
"
						}
					}).done(function(html) {
						$("#dfrapi_delete_cached_api_data").text('<?php 
            _e("Delete Cached API Data", DFRAPI_DOMAIN);
            ?>
').removeClass('button-disabled');
						$("#dfrapi_delete_cached_api_data_result").show().html(html);
			
					});
					e.preventDefault();
				}); // $('#dfrapi_delete_cached_api_data').on('click',function(e) {	
				
			}); // jQuery(function($) {
			</script>
			
			<?php 
            settings_fields($this->page);
            do_settings_sections($this->page);
            echo '</div>';
        }
 function output()
 {
     echo '<div class="wrap" id="' . $this->key . '">';
     echo '<h2>' . dfrapi_setting_pages($this->page) . ' &#8212; Datafeedr API</h2>';
     if ($errors = $this->api_errors()) {
         echo dfrapi_html_output_api_error($errors);
     } else {
         echo '<form method="post" action="options.php">';
         wp_nonce_field('update-options');
         settings_fields($this->page);
         do_settings_sections($this->page);
         submit_button();
         echo '</form>';
     }
     echo '<div id="dfr_unload_message" style="display:none">' . __('You have unsaved changes', DFRAPI_DOMAIN) . '</div>';
     echo '</div>';
 }