-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Wow-Company
committed
Oct 5, 2017
1 parent
4d0d294
commit 6073243
Showing
84 changed files
with
11,189 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,41 @@ | ||
# edd-recent-purchases | ||
# Easy Digital Downloads - Recent Purchases | ||
|
||
Wordpress plugin for display the last purchases that were made via of Easy Digital Downloads Plugin | ||
|
||
## Description | ||
Plugin Easy Digital Downloads Recent Purchases is designed to show the last purchases that were made with the help of [Easy Digital Downloads](https://wordpress.org/plugins/easy-digital-downloads/) Plugin. | ||
This Plugin outputs the list of the last purchases with the predefined users' settings. | ||
|
||
**Demo** | ||
You can see Recent Purchases on sidebar on [this page](https://wow-estore.com/item/float-menu-pro/) | ||
|
||
*** | ||
|
||
** In the notification about the purchase you can specify: ** | ||
|
||
* customer surname; | ||
* customer name; | ||
* product name that was purchased; | ||
* purchase price | ||
* purchase time | ||
|
||
** Main features ** | ||
|
||
* lists through shortcode; | ||
* lists through widget; | ||
* custom settings of notification; | ||
* outputs the preview with a link to the product; | ||
* outputs the customer avatar. | ||
|
||
*** | ||
|
||
This Plugin is able to show the real purchase activity on the site, thereby creating the effect of demand for products. Together with [Herd Effect](https://wordpress.org/plugins/mwp-herd-effect/) this effect increases in several times. | ||
|
||
** Other plugins that can be helpful in sales promotion: ** | ||
* [Modal Window – create a simple popup & insert any content](https://wordpress.org/plugins/modal-window/) | ||
* [Countdowns – create any counter, timer and coundown](https://wordpress.org/plugins/mwp-countdown/) | ||
* [Forms – create any form with custom style](https://wordpress.org/plugins/mwp-forms/) | ||
* [Float menu – awesome floating side menu](https://wordpress.org/plugins/float-menu/) | ||
* [Bubble Menu – awesome custom circle menu](https://wordpress.org/plugins/bubble-menu/) | ||
|
||
*** Wish you good sales! *** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
=== Easy Digital Downloads - Recent Purchases === | ||
Contributors: lobov, Wpcalc | ||
Donate link: https://wow-estore.com/ | ||
Tags: recent purchases, purchases, last purchases, easydigitaldownloads, easy digital downloads, easy digital downloads recent purchases, easydigitaldownloads recent purchases, edd recent purchases, easydigitaldownloads, edd | ||
Requires at least: 4.3 | ||
Tested up to: 4.8 | ||
Stable tag: trunk | ||
License: GPLv2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
Display last purchases that were made via of Easy Digital Downloads Plugin | ||
|
||
== Description == | ||
Plugin Easy Digital Downloads Recent Purchases is designed to show the last purchases that were made with the help of [Easy Digital Downloads](https://wordpress.org/plugins/easy-digital-downloads/) Plugin. | ||
This Plugin outputs the list of the last purchases with the predefined users' settings. | ||
|
||
= Demo = | ||
You can see Recent Purchases on sidebar on [this page](https://wow-estore.com/item/float-menu-pro/) | ||
|
||
= In the notification about the purchase you can specify: = | ||
* customer surname; | ||
* customer name; | ||
* product name that was purchased; | ||
* purchase price | ||
* purchase time | ||
|
||
|
||
= Main features = | ||
* lists through shortcode; | ||
* lists through widget; | ||
* custom settings of notification; | ||
* outputs the preview with a link to the product; | ||
* outputs the customer avatar. | ||
|
||
This Plugin is able to show the real purchase activity on the site, thereby creating the effect of demand for products. Together with [Herd Effect](https://wordpress.org/plugins/mwp-herd-effect/) this effect increases in several times. | ||
|
||
= Other plugins that can be helpful in sales promotion: = | ||
* [Modal Window – create a simple popup & insert any content](https://wordpress.org/plugins/modal-window/) | ||
* [Countdowns – create any counter, timer and coundown](https://wordpress.org/plugins/mwp-countdown/) | ||
* [Forms – create any form with custom style](https://wordpress.org/plugins/mwp-forms/) | ||
* [Float menu – awesome floating side menu](https://wordpress.org/plugins/float-menu/) | ||
* [Bubble Menu – awesome custom circle menu](https://wordpress.org/plugins/bubble-menu/) | ||
|
||
= Wish you good sales! = | ||
|
||
== Screenshots == | ||
1. List of Downloads with image | ||
2. List of Downloads with avatar | ||
3. Admin | ||
4. Admin | ||
|
||
|
||
|
||
== Changelog == | ||
|
||
= 1.0 = | ||
* Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<?php if ( ! defined( 'ABSPATH' ) ) exit; | ||
/** | ||
* Admin Page Class | ||
* | ||
* @package WOW_EDD_RECENT_PURCHASES_ADMIN | ||
* @subpackage | ||
* @copyright Copyright (c) 2017, Dmytro Lobov | ||
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | ||
* @since 1.0 | ||
*/ | ||
|
||
class WOW_EDD_RECENT_PURCHASES_ADMIN { | ||
|
||
private $arg; | ||
|
||
public function __construct( $arg ) { | ||
$this->plugin_name = $arg['plugin_name']; | ||
$this->plugin_menu = $arg['plugin_menu']; | ||
$this->version = $arg['version']; | ||
$this->pref = $arg['pref']; | ||
$this->slug = $arg['slug']; | ||
$this->plugin_dir = $arg['plugin_dir']; | ||
$this->plugin_url = $arg['plugin_url']; | ||
$this->plugin_home_url = $arg['plugin_home_url']; | ||
$this->shortcode = $arg['shortcode']; | ||
|
||
|
||
// admin pages | ||
add_action( 'admin_menu', array($this, 'add_menu_page') ); | ||
add_action( 'admin_init', array($this, 'update_option') ); | ||
|
||
} | ||
function add_menu_page() { | ||
add_submenu_page('wow-company', $this->plugin_name, $this->plugin_menu, 'manage_options', $this->slug, array( $this, 'plugin_admin' )); | ||
} | ||
|
||
function plugin_admin() { | ||
global $wow_company_plugin; | ||
$wow_company_plugin = true; | ||
include_once( $this->plugin_dir.'admin/partials/index.php' ); | ||
self:: plugin_admin_style_script(); | ||
} | ||
function plugin_admin_style_script() { | ||
// plugin sctyle & script | ||
wp_enqueue_style( $this->slug.'-style', $this->plugin_url . 'admin/css/style.css',false, $this->version); | ||
wp_enqueue_style( $this->slug.'-icon', $this->plugin_url . 'asset/font-awesome/css/font-awesome.min.css', array(), '4.7.0' ); | ||
} | ||
|
||
// Update an option | ||
public function update_option(){ | ||
if ( !empty($_POST['wow_'.$this->pref.'_nonce_field']) && wp_verify_nonce($_POST['wow_'.$this->pref.'_nonce_field'],'wow_'.$this->pref.'_update') ){ | ||
$new_option = wp_unslash($_POST[''.$this->pref.'']); | ||
$options = get_option( $this->pref ); | ||
if (empty($options)){ | ||
$result = $new_option; | ||
} | ||
else { | ||
$result = array_merge($options, $new_option); | ||
} | ||
update_option( $this->pref, $result ); | ||
$reffer = $_POST['_wp_http_referer']; | ||
$url = add_query_arg( array('ua-message' => 'update'), $reffer ); | ||
wp_redirect($url); | ||
exit; | ||
} | ||
} | ||
|
||
function create_option ($arg){ | ||
$id = isset($arg['id']) ? $arg['id'] : null; | ||
$name = isset($arg['name']) ? $arg['name'] : ''; | ||
$type = isset($arg['type']) ? $arg['type'] : ''; | ||
$func = !empty($arg['func']) ? ' onchange="'.$arg['func'].'();"' : ''; | ||
$options = isset($arg['option']) ? $arg['option'] : ''; | ||
$val = $arg['val']; | ||
$separator = isset($arg['sep']) ? $arg['sep'] : ''; | ||
// create radio fields | ||
if ($type == 'radio'){ | ||
$option = ''; | ||
foreach ($options as $key => $value){ | ||
$select = ($key == $val) ? 'checked="checked"' : ''; | ||
$option .= '<input name="'.$this->pref.'['.$name.']" type="radio" value="'.$key.'" id="wow_'.$id.'_'.$key.'" '.$select.'><label for="wow_'.$id.'_'.$key.'"> '.$value.'</label>'.$separator; | ||
} | ||
$field = $option; | ||
} | ||
|
||
// create checkbox field | ||
if ($type == 'checkbox'){ | ||
$select = !empty($val) ? 'checked="checked"' : ''; | ||
$field = '<input name="'.$this->pref.'['.$name.']" type="checkbox" value="1" '.$select.$func.' id="wow_'.$id.'">'.$separator; | ||
} | ||
|
||
// create text field | ||
if ($type == 'text'){ | ||
$field = '<input name="'.$this->pref.'['.$name.']" type="text" value="'.$val.'" id="wow_'.$id.'"'.$func.'>'.$separator; | ||
} | ||
|
||
// create number field | ||
if ($type == 'number'){ | ||
$field = '<input name="'.$this->pref.'['.$name.']" type="number" value="'.$val.'" id="wow_'.$id.'"'.$func.'>'.$separator; | ||
} | ||
|
||
// create color field | ||
if ($type == 'color'){ | ||
$field = '<input name="'.$this->pref.'['.$name.']" type="text" value="'.$val.'" class="wp-color-picker-field" data-alpha="true">'.$separator; | ||
} | ||
|
||
// create select field | ||
if ($type == 'select'){ | ||
$option = ''; | ||
foreach ($options as $key => $value){ | ||
$select = ($key == $val) ? 'selected="selected"' : ''; | ||
$option .= '<option value="'.$key.'" '.$select.'>'.$value.'</option>'; | ||
} | ||
$field = '<select name="'.$this->pref.'['.$name.']"'.$func.' id="wow_'.$id.'">'; | ||
$field .= $option; | ||
$field .= '</select>'; | ||
} | ||
|
||
// create editor field | ||
if ($type == 'editor'){ | ||
$settings = array( | ||
'textarea_name' => ''.$this->pref.'['.$name.']', | ||
); | ||
$field = wp_editor( $val, $id, $settings ); | ||
|
||
} | ||
|
||
// create textarea field | ||
if ($type == 'textarea'){ | ||
$field = '<textarea name="'.$this->pref.'['.$name.']" id="wow_'.$id.'">'.$val.'</textarea>'.$separator; | ||
} | ||
return $field; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php // Silence is golden |
Oops, something went wrong.