Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
[fix] for ajax requests, now works for users and visitors
Browse files Browse the repository at this point in the history
  • Loading branch information
alekart committed Oct 13, 2015
1 parent a33b285 commit 6142436
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
2 changes: 1 addition & 1 deletion arcw-popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ArcwPopover.prototype.popover = function(elem) {
ArcwPopover.prototype._getPosts = function (link) {
var self = this,
data = {
'action': 'getArcw',
'action': 'get_archives_list',
'link': link
};

Expand Down
2 changes: 1 addition & 1 deletion arcw-popover.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions arcw-popover.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ function arcwp_init() {
wp_localize_script( 'arcwp-script', 'ajaxurl', admin_url( 'admin-ajax.php' ) );
}

add_action( 'wp_ajax_getArcw', 'arcwp_getArc' );
add_action( 'wp_ajax_get_archives_list', 'arcwp_get_archives_list' );
add_action( 'wp_ajax_nopriv_get_archives_list', 'arcwp_get_archives_list' );

function arcwp_getArc() {
function arcwp_get_archives_list() {
global $wpdb;

$wpurl = get_bloginfo( 'url' );
Expand Down Expand Up @@ -110,6 +111,6 @@ function arcwp_getArc() {
}
echo "</ul>";

wp_die();
die();
}

11 changes: 5 additions & 6 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: alekart
Tags: archives, calendar, widget, sidebar, view, plugin, addon, extension
Requires at least: 3.6
Tested up to: 4.3
Stable tag: 0.1.0
Tested up to: 4.3.1
Stable tag: 0.1.1
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand All @@ -18,17 +18,16 @@ Get it here : [Archives Calendar Widget](https://wordpress.org/plugins/archives-

There is no any settings, just install and activate.

*This is the first release.*
It was coded in one day. *Not* bugs free but didn't see any till now (they're hiding).


= Notes =
Please use the Support section to report issues.

== Screenshots ==

== Changelog ==

= 0.1.1 =
* [fix] for ajax requests, now works for users and visitors

= 0.1.0 =
* First, initial release

Expand Down

0 comments on commit 6142436

Please sign in to comment.