Skip to content

Commit

Permalink
add timeout for ajax functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Houke de Kwant committed Nov 23, 2016
1 parent 49d9063 commit 35e3d28
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions assets/js/bulk-generate-palette.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jQuery(document).on('ready', function() {
url: ajaxurl,
type: 'post',
dataType: 'JSON',
timeout: 30000,
data: {
action: 'cpg_bulk_add_palette',
dominant: colorThiefOutput.dominant,
Expand Down
2 changes: 2 additions & 0 deletions assets/js/generate-palette.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jQuery(document).on('ready', function() {
url: ajaxurl,
type: 'post',
dataType: 'JSON',
timeout: 30000,
data: {
action: 'cpg_add_palette',
dominant: colorThiefOutput.dominant,
Expand All @@ -76,6 +77,7 @@ jQuery(document).on('ready', function() {
url: ajaxurl,
type: 'post',
dataType: 'JSON',
timeout: 30000,
data: {
action: params.action,
id: params.post_id,
Expand Down
2 changes: 1 addition & 1 deletion color-palette-generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Color Palette Generator
Plugin URI: https://github.com/houke/color-palette-generator
Description: Generates color palettes for your media uploads (jpg, png, gif), shows them on your website and allows you to show images per color
Version: 0.1
Version: 1.0
Author: Houke de Kwant
Author URI: http://nl.linkedin.com/in/houkedekwant
Text Domain: cpg
Expand Down
2 changes: 1 addition & 1 deletion inc/cpg-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ function cpg_settings_page(){
function cpg_register_taxonomies(){

$args = array(
'public' => true,
'public' => false,
'update_count_callback' => '_update_generic_term_count',
'query_var' => false,
'hierarchical' => true
Expand Down

0 comments on commit 35e3d28

Please sign in to comment.