Version Description
- Tweak! Update Freemius SDK
- Tested up to WordPress v4.4.2
Download this release
Release Info
Developer | KingYes |
Plugin | Activity Log |
Version | 2.2.10 |
Comparing to | |
See all releases |
Code changes from version 2.2.9 to 2.2.10
- aryo-activity-log.php +1 -1
- classes/freemius/assets/css/admin/add-ons.css +2 -2
- classes/freemius/assets/scss/admin/add-ons.scss +1 -1
- classes/freemius/includes/class-freemius.php +56 -167
- classes/freemius/includes/class-fs-api.php +4 -1
- classes/freemius/includes/class-fs-plugin-updater.php +3 -3
- classes/freemius/includes/fs-plugin-functions.php +0 -413
- classes/freemius/includes/fs-plugin-info-dialog.php +715 -0
- classes/freemius/start.php +1 -1
- language/aryo-activity-log.pot +51 -51
- readme.txt +23 -15
aryo-activity-log.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wordpress.org/plugins/aryo-activity-log/
|
|
5 |
Description: Get aware of any activities that are taking place on your dashboard! Imagine it like a black-box for your WordPress site. e.g. post was deleted, plugin was activated, user logged in or logged out - it's all these for you to see.
|
6 |
Author: Yakir Sitbon, Maor Chasen, Ariel Klikstein
|
7 |
Author URI: http://pojo.me/
|
8 |
-
Version: 2.2.
|
9 |
Text Domain: aryo-activity-log
|
10 |
Domain Path: /language/
|
11 |
License: GPLv2 or later
|
5 |
Description: Get aware of any activities that are taking place on your dashboard! Imagine it like a black-box for your WordPress site. e.g. post was deleted, plugin was activated, user logged in or logged out - it's all these for you to see.
|
6 |
Author: Yakir Sitbon, Maor Chasen, Ariel Klikstein
|
7 |
Author URI: http://pojo.me/
|
8 |
+
Version: 2.2.10
|
9 |
Text Domain: aryo-activity-log
|
10 |
Domain Path: /language/
|
11 |
License: GPLv2 or later
|
classes/freemius/assets/css/admin/add-ons.css
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x
|
2 |
-
#TB_window,#TB_window iframe{width:772px !important}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin
|
1 |
+
#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
|
2 |
+
#TB_window,#TB_window iframe{width:772px !important}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{background:#FFFEEC;margin:-16px;padding:20px 20px 50px 20px;border-bottom:1px solid #DDD}#plugin-information .plugin-information-pricing h3{margin-top:0}#plugin-information .plugin-information-pricing .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing label{white-space:nowrap}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
|
classes/freemius/assets/scss/admin/add-ons.scss
CHANGED
@@ -172,7 +172,7 @@
|
|
172 |
|
173 |
h3
|
174 |
{
|
175 |
-
margin
|
176 |
}
|
177 |
}
|
178 |
}
|
172 |
|
173 |
h3
|
174 |
{
|
175 |
+
margin: 1em 30px !important;
|
176 |
}
|
177 |
}
|
178 |
}
|
classes/freemius/includes/class-freemius.php
CHANGED
@@ -960,7 +960,10 @@
|
|
960 |
if ( ( $this->_storage->connectivity_test['is_connected'] &&
|
961 |
$this->_storage->connectivity_test['is_active'] ) ||
|
962 |
( ! $flush &&
|
963 |
-
|
|
|
|
|
|
|
964 |
) {
|
965 |
$this->_has_api_connection = $this->_storage->connectivity_test['is_connected'];
|
966 |
$this->_is_on = $this->_storage->connectivity_test['is_active'] || ( WP_FS__DEV_MODE && $this->_has_api_connection );
|
@@ -975,15 +978,23 @@
|
|
975 |
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY ) {
|
976 |
$is_connected = false;
|
977 |
} else {
|
978 |
-
$pong = $this->get_api_plugin_scope()->ping(
|
|
|
|
|
|
|
|
|
979 |
$is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
|
980 |
}
|
981 |
|
982 |
if ( ! $is_connected ) {
|
983 |
// 2nd try of connectivity.
|
984 |
-
$pong = $this->get_api_plugin_scope()->ping(
|
|
|
|
|
|
|
|
|
985 |
|
986 |
-
if ( $this->get_api_plugin_scope()->is_valid_ping( $pong ) ) {
|
987 |
$is_connected = true;
|
988 |
} else {
|
989 |
// Another API failure.
|
@@ -991,9 +1002,13 @@
|
|
991 |
}
|
992 |
}
|
993 |
|
994 |
-
$is_active = (
|
995 |
-
|
996 |
-
(
|
|
|
|
|
|
|
|
|
997 |
|
998 |
$this->_storage->connectivity_test = array(
|
999 |
'is_connected' => $is_connected,
|
@@ -1646,7 +1661,7 @@
|
|
1646 |
if ( ! $this->is_parent_plugin_installed() ) {
|
1647 |
$this->_admin_notices->add(
|
1648 |
( is_string( $parent_name ) ?
|
1649 |
-
sprintf( __fs( 'addon-cannot-run-without-
|
1650 |
sprintf( __fs( 'addon-x-cannot-run-without-parent', $this->_slug ), $this->get_plugin_name() )
|
1651 |
),
|
1652 |
__fs( 'oops', $this->_slug ) . '...',
|
@@ -1673,19 +1688,9 @@
|
|
1673 |
'plugin-information' === fs_request_get( 'tab', false ) &&
|
1674 |
$this->get_id() == fs_request_get( 'parent_plugin_id', false )
|
1675 |
) {
|
1676 |
-
|
1677 |
-
remove_all_actions( 'install_plugins_pre_plugin-information' );
|
1678 |
|
1679 |
-
|
1680 |
-
|
1681 |
-
// Override action with custom plugins function for add-ons.
|
1682 |
-
add_action( 'install_plugins_pre_plugin-information', 'fs_install_plugin_information' );
|
1683 |
-
|
1684 |
-
// Override request for plugin information for Add-ons.
|
1685 |
-
add_filter( 'fs_plugins_api', array(
|
1686 |
-
&$this,
|
1687 |
-
'_get_addon_info_filter'
|
1688 |
-
), WP_FS__DEFAULT_PRIORITY, 3 );
|
1689 |
}
|
1690 |
}
|
1691 |
|
@@ -1791,145 +1796,6 @@
|
|
1791 |
|
1792 |
#region Add-ons -------------------------------------------------------------------------
|
1793 |
|
1794 |
-
/**
|
1795 |
-
* Generate add-on plugin information.
|
1796 |
-
*
|
1797 |
-
* @author Vova Feldman (@svovaf)
|
1798 |
-
* @since 1.0.6
|
1799 |
-
*
|
1800 |
-
* @param array $data
|
1801 |
-
* @param string $action
|
1802 |
-
* @param object|null $args
|
1803 |
-
*
|
1804 |
-
* @return array|null
|
1805 |
-
*/
|
1806 |
-
function _get_addon_info_filter( $data, $action = '', $args = null ) {
|
1807 |
-
$this->_logger->entrance();
|
1808 |
-
|
1809 |
-
$parent_plugin_id = fs_request_get( 'parent_plugin_id', false );
|
1810 |
-
|
1811 |
-
if ( $this->get_id() != $parent_plugin_id ||
|
1812 |
-
( 'plugin_information' !== $action ) ||
|
1813 |
-
! isset( $args->slug )
|
1814 |
-
) {
|
1815 |
-
return $data;
|
1816 |
-
}
|
1817 |
-
|
1818 |
-
// Find add-on by slug.
|
1819 |
-
$addons = $this->get_addons();
|
1820 |
-
$selected_addon = false;
|
1821 |
-
foreach ( $addons as $addon ) {
|
1822 |
-
if ( $addon->slug == $args->slug ) {
|
1823 |
-
$selected_addon = $addon;
|
1824 |
-
break;
|
1825 |
-
}
|
1826 |
-
}
|
1827 |
-
|
1828 |
-
if ( false === $selected_addon ) {
|
1829 |
-
return $data;
|
1830 |
-
}
|
1831 |
-
|
1832 |
-
if ( ! isset( $selected_addon->info ) ) {
|
1833 |
-
// Setup some default info.
|
1834 |
-
$selected_addon->info = new stdClass();
|
1835 |
-
$selected_addon->info->selling_point_0 = 'Selling Point 1';
|
1836 |
-
$selected_addon->info->selling_point_1 = 'Selling Point 2';
|
1837 |
-
$selected_addon->info->selling_point_2 = 'Selling Point 3';
|
1838 |
-
$selected_addon->info->description = '<p>Tell your users all about your add-on</p>';
|
1839 |
-
}
|
1840 |
-
|
1841 |
-
fs_enqueue_local_style( 'fs_addons', '/admin/add-ons.css' );
|
1842 |
-
|
1843 |
-
$data = $args;
|
1844 |
-
|
1845 |
-
// Fetch as much as possible info from local files.
|
1846 |
-
$plugin_local_data = $this->get_plugin_data();
|
1847 |
-
$data->name = $selected_addon->title;
|
1848 |
-
$data->author = $plugin_local_data['Author'];
|
1849 |
-
$view_vars = array( 'plugin' => $selected_addon );
|
1850 |
-
$data->sections = array(
|
1851 |
-
'description' => fs_get_template( '/plugin-info/description.php', $view_vars ),
|
1852 |
-
);
|
1853 |
-
|
1854 |
-
if ( ! empty( $selected_addon->info->banner_url ) ) {
|
1855 |
-
$data->banners = array(
|
1856 |
-
'low' => $selected_addon->info->banner_url,
|
1857 |
-
);
|
1858 |
-
}
|
1859 |
-
|
1860 |
-
if ( ! empty( $selected_addon->info->screenshots ) ) {
|
1861 |
-
$view_vars = array(
|
1862 |
-
'screenshots' => $selected_addon->info->screenshots,
|
1863 |
-
'plugin' => $selected_addon,
|
1864 |
-
);
|
1865 |
-
$data->sections['screenshots'] = fs_get_template( '/plugin-info/screenshots.php', $view_vars );
|
1866 |
-
}
|
1867 |
-
|
1868 |
-
// Load add-on pricing.
|
1869 |
-
$has_pricing = false;
|
1870 |
-
$has_features = false;
|
1871 |
-
$plans = false;
|
1872 |
-
$plans_result = $this->get_api_site_or_plugin_scope()->get( "/addons/{$selected_addon->id}/plans.json" );
|
1873 |
-
if ( ! isset( $plans_result->error ) ) {
|
1874 |
-
$plans = $plans_result->plans;
|
1875 |
-
if ( is_array( $plans ) ) {
|
1876 |
-
foreach ( $plans as &$plan ) {
|
1877 |
-
$pricing_result = $this->get_api_site_or_plugin_scope()->get( "/addons/{$selected_addon->id}/plans/{$plan->id}/pricing.json" );
|
1878 |
-
if ( ! isset( $pricing_result->error ) ) {
|
1879 |
-
// Update plan's pricing.
|
1880 |
-
$plan->pricing = $pricing_result->pricing;
|
1881 |
-
|
1882 |
-
$has_pricing = true;
|
1883 |
-
}
|
1884 |
-
|
1885 |
-
$features_result = $this->get_api_site_or_plugin_scope()->get( "/addons/{$selected_addon->id}/plans/{$plan->id}/features.json" );
|
1886 |
-
if ( ! isset( $features_result->error ) &&
|
1887 |
-
is_array( $features_result->features ) &&
|
1888 |
-
0 < count( $features_result->features )
|
1889 |
-
) {
|
1890 |
-
// Update plan's pricing.
|
1891 |
-
$plan->features = $features_result->features;
|
1892 |
-
|
1893 |
-
$has_features = true;
|
1894 |
-
}
|
1895 |
-
}
|
1896 |
-
}
|
1897 |
-
}
|
1898 |
-
|
1899 |
-
// Get latest add-on version.
|
1900 |
-
$latest = $this->_fetch_latest_version( $selected_addon->id );
|
1901 |
-
|
1902 |
-
if ( is_object( $latest ) ) {
|
1903 |
-
$data->version = $latest->version;
|
1904 |
-
$data->last_updated = ! is_null( $latest->updated ) ? $latest->updated : $latest->created;
|
1905 |
-
$data->requires = $latest->requires_platform_version;
|
1906 |
-
$data->tested = $latest->tested_up_to_version;
|
1907 |
-
} else {
|
1908 |
-
// Add dummy version.
|
1909 |
-
$data->version = '1.0.0';
|
1910 |
-
|
1911 |
-
// Add message to developer to deploy the plugin through Freemius.
|
1912 |
-
}
|
1913 |
-
|
1914 |
-
$data->checkout_link = $this->checkout_url();
|
1915 |
-
$data->download_link = 'https://dummy.com';
|
1916 |
-
|
1917 |
-
if ( $has_pricing ) {
|
1918 |
-
// Add plans to data.
|
1919 |
-
$data->plans = $plans;
|
1920 |
-
|
1921 |
-
if ( $has_features ) {
|
1922 |
-
$view_vars = array(
|
1923 |
-
'plans' => $plans,
|
1924 |
-
'plugin' => $selected_addon,
|
1925 |
-
);
|
1926 |
-
$data->sections['features'] = fs_get_template( '/plugin-info/features.php', $view_vars );
|
1927 |
-
}
|
1928 |
-
}
|
1929 |
-
|
1930 |
-
return $data;
|
1931 |
-
}
|
1932 |
-
|
1933 |
/**
|
1934 |
* Check if add-on installed and activated on site.
|
1935 |
*
|
@@ -2501,7 +2367,7 @@
|
|
2501 |
* the first time that the plugin installed on the site, or the plugin was installed
|
2502 |
* before but didn't have Freemius integrated.
|
2503 |
*
|
2504 |
-
* Since register_activation_hook() do NOT fires since 3.1, and only fires
|
2505 |
* on manual activation via the dashboard, is_plugin_activation() is TRUE
|
2506 |
* only after immediate activation.
|
2507 |
*
|
@@ -6462,7 +6328,9 @@
|
|
6462 |
$this->_get_latest_version_endpoint( $addon_id, 'json' ),
|
6463 |
true
|
6464 |
);
|
|
|
6465 |
$latest_version = ( is_object( $tag ) && isset( $tag->version ) ) ? $tag->version : 'couldn\'t get';
|
|
|
6466 |
$this->_logger->departure( 'Latest version ' . $latest_version );
|
6467 |
|
6468 |
return ( is_object( $tag ) && isset( $tag->version ) ) ? $tag : false;
|
@@ -7543,7 +7411,7 @@
|
|
7543 |
__fs( 'upgrade', $this->_slug ),
|
7544 |
$this->get_upgrade_url(),
|
7545 |
false,
|
7546 |
-
|
7547 |
'upgrade'
|
7548 |
);
|
7549 |
}
|
@@ -7553,7 +7421,7 @@
|
|
7553 |
__fs( 'add-ons', $this->_slug ),
|
7554 |
$this->_get_admin_page_url( 'addons' ),
|
7555 |
false,
|
7556 |
-
|
7557 |
'addons'
|
7558 |
);
|
7559 |
}
|
@@ -7614,27 +7482,48 @@
|
|
7614 |
function _modify_plugin_action_links_hook( $links, $file ) {
|
7615 |
$this->_logger->entrance();
|
7616 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7617 |
ksort( $this->_action_links );
|
7618 |
|
7619 |
foreach ( $this->_action_links as $new_links ) {
|
7620 |
foreach ( $new_links as $link ) {
|
7621 |
-
$
|
7622 |
}
|
7623 |
}
|
7624 |
|
|
|
|
|
7625 |
/*
|
7626 |
* This HTML element is used to identify the correct plugin when attaching an event to its Deactivate link.
|
7627 |
*
|
7628 |
* If user is paying or in trial and have the free version installed,
|
7629 |
* assume that the deactivation is for the upgrade process, so this is not needed.
|
7630 |
*/
|
7631 |
-
|
7632 |
-
if ( isset( $links['deactivate'] ) ) {
|
7633 |
-
$links['deactivate'] .= '<i class="fs-slug" data-slug="' . $this->_slug . '"></i>';
|
7634 |
}
|
|
|
|
|
|
|
7635 |
}
|
7636 |
|
7637 |
-
return $
|
7638 |
}
|
7639 |
|
7640 |
/**
|
960 |
if ( ( $this->_storage->connectivity_test['is_connected'] &&
|
961 |
$this->_storage->connectivity_test['is_active'] ) ||
|
962 |
( ! $flush &&
|
963 |
+
/**
|
964 |
+
* @since 1.1.7 Don't check for connectivity on plugin downgrade.
|
965 |
+
*/
|
966 |
+
version_compare( $version, $this->_storage->connectivity_test['version'], '<=' ) )
|
967 |
) {
|
968 |
$this->_has_api_connection = $this->_storage->connectivity_test['is_connected'];
|
969 |
$this->_is_on = $this->_storage->connectivity_test['is_active'] || ( WP_FS__DEV_MODE && $this->_has_api_connection );
|
978 |
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY ) {
|
979 |
$is_connected = false;
|
980 |
} else {
|
981 |
+
$pong = $this->get_api_plugin_scope()->ping(
|
982 |
+
$this->get_anonymous_id(),
|
983 |
+
$is_update,
|
984 |
+
$version
|
985 |
+
);
|
986 |
$is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
|
987 |
}
|
988 |
|
989 |
if ( ! $is_connected ) {
|
990 |
// 2nd try of connectivity.
|
991 |
+
$pong = $this->get_api_plugin_scope()->ping(
|
992 |
+
$this->get_anonymous_id(),
|
993 |
+
$is_update,
|
994 |
+
$version
|
995 |
+
);
|
996 |
|
997 |
+
if ( ! WP_FS__SIMULATE_NO_API_CONNECTIVITY && $this->get_api_plugin_scope()->is_valid_ping( $pong ) ) {
|
998 |
$is_connected = true;
|
999 |
} else {
|
1000 |
// Another API failure.
|
1002 |
}
|
1003 |
}
|
1004 |
|
1005 |
+
$is_active = $this->apply_filters(
|
1006 |
+
'is_on',
|
1007 |
+
( ! $is_connected ) ? false :
|
1008 |
+
( isset( $pong->is_active ) && true == $pong->is_active ),
|
1009 |
+
$this->is_plugin_update(),
|
1010 |
+
$version
|
1011 |
+
);
|
1012 |
|
1013 |
$this->_storage->connectivity_test = array(
|
1014 |
'is_connected' => $is_connected,
|
1661 |
if ( ! $this->is_parent_plugin_installed() ) {
|
1662 |
$this->_admin_notices->add(
|
1663 |
( is_string( $parent_name ) ?
|
1664 |
+
sprintf( __fs( 'addon-x-cannot-run-without-y', $this->_slug ), $this->get_plugin_name(), $parent_name ) :
|
1665 |
sprintf( __fs( 'addon-x-cannot-run-without-parent', $this->_slug ), $this->get_plugin_name() )
|
1666 |
),
|
1667 |
__fs( 'oops', $this->_slug ) . '...',
|
1688 |
'plugin-information' === fs_request_get( 'tab', false ) &&
|
1689 |
$this->get_id() == fs_request_get( 'parent_plugin_id', false )
|
1690 |
) {
|
1691 |
+
require_once WP_FS__DIR_INCLUDES . '/fs-plugin-info-dialog.php';
|
|
|
1692 |
|
1693 |
+
new FS_Plugin_Info_Dialog( $this );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1694 |
}
|
1695 |
}
|
1696 |
|
1796 |
|
1797 |
#region Add-ons -------------------------------------------------------------------------
|
1798 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1799 |
/**
|
1800 |
* Check if add-on installed and activated on site.
|
1801 |
*
|
2367 |
* the first time that the plugin installed on the site, or the plugin was installed
|
2368 |
* before but didn't have Freemius integrated.
|
2369 |
*
|
2370 |
+
* Since register_activation_hook() do NOT fires on updates since 3.1, and only fires
|
2371 |
* on manual activation via the dashboard, is_plugin_activation() is TRUE
|
2372 |
* only after immediate activation.
|
2373 |
*
|
6328 |
$this->_get_latest_version_endpoint( $addon_id, 'json' ),
|
6329 |
true
|
6330 |
);
|
6331 |
+
|
6332 |
$latest_version = ( is_object( $tag ) && isset( $tag->version ) ) ? $tag->version : 'couldn\'t get';
|
6333 |
+
|
6334 |
$this->_logger->departure( 'Latest version ' . $latest_version );
|
6335 |
|
6336 |
return ( is_object( $tag ) && isset( $tag->version ) ) ? $tag : false;
|
7411 |
__fs( 'upgrade', $this->_slug ),
|
7412 |
$this->get_upgrade_url(),
|
7413 |
false,
|
7414 |
+
7,
|
7415 |
'upgrade'
|
7416 |
);
|
7417 |
}
|
7421 |
__fs( 'add-ons', $this->_slug ),
|
7422 |
$this->_get_admin_page_url( 'addons' ),
|
7423 |
false,
|
7424 |
+
9,
|
7425 |
'addons'
|
7426 |
);
|
7427 |
}
|
7482 |
function _modify_plugin_action_links_hook( $links, $file ) {
|
7483 |
$this->_logger->entrance();
|
7484 |
|
7485 |
+
$passed_deactivate = false;
|
7486 |
+
$deactivate_link = '';
|
7487 |
+
$before_deactivate = array();
|
7488 |
+
$after_deactivate = array();
|
7489 |
+
foreach ( $links as $key => $link ) {
|
7490 |
+
if ( 'deactivate' === $key ) {
|
7491 |
+
$deactivate_link = $link;
|
7492 |
+
$passed_deactivate = true;
|
7493 |
+
continue;
|
7494 |
+
}
|
7495 |
+
|
7496 |
+
if ( ! $passed_deactivate ) {
|
7497 |
+
$before_deactivate[ $key ] = $link;
|
7498 |
+
} else {
|
7499 |
+
$after_deactivate[ $key ] = $link;
|
7500 |
+
}
|
7501 |
+
}
|
7502 |
+
|
7503 |
ksort( $this->_action_links );
|
7504 |
|
7505 |
foreach ( $this->_action_links as $new_links ) {
|
7506 |
foreach ( $new_links as $link ) {
|
7507 |
+
$before_deactivate[ $link['key'] ] = '<a href="' . $link['href'] . '"' . ( $link['external'] ? ' target="_blank"' : '' ) . '>' . $link['label'] . '</a>';
|
7508 |
}
|
7509 |
}
|
7510 |
|
7511 |
+
if ( ! empty( $deactivate_link ) ) {
|
7512 |
+
if ( ! $this->is_paying_or_trial() || $this->is_premium() ) {
|
7513 |
/*
|
7514 |
* This HTML element is used to identify the correct plugin when attaching an event to its Deactivate link.
|
7515 |
*
|
7516 |
* If user is paying or in trial and have the free version installed,
|
7517 |
* assume that the deactivation is for the upgrade process, so this is not needed.
|
7518 |
*/
|
7519 |
+
$deactivate_link .= '<i class="fs-slug" data-slug="' . $this->_slug . '"></i>';
|
|
|
|
|
7520 |
}
|
7521 |
+
|
7522 |
+
// Append deactivation link.
|
7523 |
+
$before_deactivate['deactivate'] = $deactivate_link;
|
7524 |
}
|
7525 |
|
7526 |
+
return array_merge( $before_deactivate, $after_deactivate );
|
7527 |
}
|
7528 |
|
7529 |
/**
|
classes/freemius/includes/class-fs-api.php
CHANGED
@@ -351,10 +351,11 @@
|
|
351 |
*
|
352 |
* @param null|string $unique_anonymous_id
|
353 |
* @param bool $is_update False if new plugin installation.
|
|
|
354 |
*
|
355 |
* @return object
|
356 |
*/
|
357 |
-
function ping( $unique_anonymous_id = null, $is_update = false ) {
|
358 |
$this->_logger->entrance();
|
359 |
|
360 |
if ( self::is_temporary_down() ) {
|
@@ -366,6 +367,7 @@
|
|
366 |
$this->_call( 'ping.json?' . http_build_query( array(
|
367 |
'uid' => $unique_anonymous_id,
|
368 |
'is_update' => $is_update,
|
|
|
369 |
) ) );
|
370 |
|
371 |
if ( $this->is_valid_ping( $pong ) ) {
|
@@ -383,6 +385,7 @@
|
|
383 |
$this->_call( 'ping.json?' . http_build_query( array(
|
384 |
'uid' => $unique_anonymous_id,
|
385 |
'is_update' => $is_update,
|
|
|
386 |
) ) );
|
387 |
|
388 |
if ( ! $this->is_valid_ping( $pong ) ) {
|
351 |
*
|
352 |
* @param null|string $unique_anonymous_id
|
353 |
* @param bool $is_update False if new plugin installation.
|
354 |
+
* @param string $version
|
355 |
*
|
356 |
* @return object
|
357 |
*/
|
358 |
+
function ping( $unique_anonymous_id = null, $is_update = false, $version = '0.0.1' ) {
|
359 |
$this->_logger->entrance();
|
360 |
|
361 |
if ( self::is_temporary_down() ) {
|
367 |
$this->_call( 'ping.json?' . http_build_query( array(
|
368 |
'uid' => $unique_anonymous_id,
|
369 |
'is_update' => $is_update,
|
370 |
+
'version' => $version,
|
371 |
) ) );
|
372 |
|
373 |
if ( $this->is_valid_ping( $pong ) ) {
|
385 |
$this->_call( 'ping.json?' . http_build_query( array(
|
386 |
'uid' => $unique_anonymous_id,
|
387 |
'is_update' => $is_update,
|
388 |
+
'version' => $version,
|
389 |
) ) );
|
390 |
|
391 |
if ( ! $this->is_valid_ping( $pong ) ) {
|
classes/freemius/includes/class-fs-plugin-updater.php
CHANGED
@@ -194,11 +194,11 @@
|
|
194 |
* @since 1.0.5
|
195 |
*
|
196 |
* @param string $action
|
197 |
-
* @param
|
198 |
*
|
199 |
* @return bool|mixed
|
200 |
*/
|
201 |
-
|
202 |
$url = $http_url = 'http://api.wordpress.org/plugins/info/1.0/';
|
203 |
if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
|
204 |
$url = set_url_scheme( $url, 'https' );
|
@@ -266,7 +266,7 @@
|
|
266 |
$plugin_in_repo = false;
|
267 |
if ( ! $is_addon ) {
|
268 |
// Try to fetch info from .org repository.
|
269 |
-
$data =
|
270 |
|
271 |
$plugin_in_repo = ( false !== $data );
|
272 |
}
|
194 |
* @since 1.0.5
|
195 |
*
|
196 |
* @param string $action
|
197 |
+
* @param object $args
|
198 |
*
|
199 |
* @return bool|mixed
|
200 |
*/
|
201 |
+
static function _fetch_plugin_info_from_repository( $action, $args ) {
|
202 |
$url = $http_url = 'http://api.wordpress.org/plugins/info/1.0/';
|
203 |
if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
|
204 |
$url = set_url_scheme( $url, 'https' );
|
266 |
$plugin_in_repo = false;
|
267 |
if ( ! $is_addon ) {
|
268 |
// Try to fetch info from .org repository.
|
269 |
+
$data = self::_fetch_plugin_info_from_repository( $action, $args );
|
270 |
|
271 |
$plugin_in_repo = ( false !== $data );
|
272 |
}
|
classes/freemius/includes/fs-plugin-functions.php
DELETED
@@ -1,413 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
6 |
-
* @since 1.0.6
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Display plugin information in dialog box form.
|
15 |
-
*
|
16 |
-
* @since 2.7.0
|
17 |
-
*/
|
18 |
-
function fs_install_plugin_information() {
|
19 |
-
global $tab;
|
20 |
-
|
21 |
-
if ( empty( $_REQUEST['plugin'] ) ) {
|
22 |
-
return;
|
23 |
-
}
|
24 |
-
|
25 |
-
$args = array(
|
26 |
-
'slug' => wp_unslash( $_REQUEST['plugin'] ),
|
27 |
-
'is_ssl' => is_ssl(),
|
28 |
-
'fields' => array( 'banners' => true, 'reviews' => true )
|
29 |
-
);
|
30 |
-
|
31 |
-
if ( is_array( $args ) ) {
|
32 |
-
$args = (object) $args;
|
33 |
-
}
|
34 |
-
|
35 |
-
if ( ! isset( $args->per_page ) ) {
|
36 |
-
$args->per_page = 24;
|
37 |
-
}
|
38 |
-
|
39 |
-
if ( ! isset( $args->locale ) ) {
|
40 |
-
$args->locale = get_locale();
|
41 |
-
}
|
42 |
-
|
43 |
-
$api = apply_filters( 'fs_plugins_api', false, 'plugin_information', $args );
|
44 |
-
|
45 |
-
if ( is_wp_error( $api ) ) {
|
46 |
-
wp_die( $api );
|
47 |
-
}
|
48 |
-
|
49 |
-
$plugins_allowedtags = array(
|
50 |
-
'a' => array(
|
51 |
-
'href' => array(),
|
52 |
-
'title' => array(),
|
53 |
-
'target' => array(),
|
54 |
-
// Add image style for screenshots.
|
55 |
-
'class' => array()
|
56 |
-
),
|
57 |
-
'style' => array(),
|
58 |
-
'abbr' => array( 'title' => array() ),
|
59 |
-
'acronym' => array( 'title' => array() ),
|
60 |
-
'code' => array(),
|
61 |
-
'pre' => array(),
|
62 |
-
'em' => array(),
|
63 |
-
'strong' => array(),
|
64 |
-
'div' => array( 'class' => array() ),
|
65 |
-
'span' => array( 'class' => array() ),
|
66 |
-
'p' => array(),
|
67 |
-
'ul' => array(),
|
68 |
-
'ol' => array(),
|
69 |
-
'li' => array( 'class' => array() ),
|
70 |
-
'i' => array( 'class' => array() ),
|
71 |
-
'h1' => array(),
|
72 |
-
'h2' => array(),
|
73 |
-
'h3' => array(),
|
74 |
-
'h4' => array(),
|
75 |
-
'h5' => array(),
|
76 |
-
'h6' => array(),
|
77 |
-
'img' => array( 'src' => array(), 'class' => array(), 'alt' => array() ),
|
78 |
-
// 'table' => array(),
|
79 |
-
// 'td' => array(),
|
80 |
-
// 'tr' => array(),
|
81 |
-
// 'th' => array(),
|
82 |
-
// 'thead' => array(),
|
83 |
-
// 'tbody' => array(),
|
84 |
-
);
|
85 |
-
|
86 |
-
$plugins_section_titles = array(
|
87 |
-
'description' => _x( 'Description', 'Plugin installer section title' ),
|
88 |
-
'installation' => _x( 'Installation', 'Plugin installer section title' ),
|
89 |
-
'faq' => _x( 'FAQ', 'Plugin installer section title' ),
|
90 |
-
'screenshots' => _x( 'Screenshots', 'Plugin installer section title' ),
|
91 |
-
'changelog' => _x( 'Changelog', 'Plugin installer section title' ),
|
92 |
-
'reviews' => _x( 'Reviews', 'Plugin installer section title' ),
|
93 |
-
'other_notes' => _x( 'Other Notes', 'Plugin installer section title' ),
|
94 |
-
);
|
95 |
-
|
96 |
-
// Sanitize HTML
|
97 |
-
// foreach ( (array) $api->sections as $section_name => $content ) {
|
98 |
-
// $api->sections[$section_name] = wp_kses( $content, $plugins_allowedtags );
|
99 |
-
// }
|
100 |
-
|
101 |
-
foreach ( array( 'version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug' ) as $key ) {
|
102 |
-
if ( isset( $api->$key ) ) {
|
103 |
-
$api->$key = wp_kses( $api->$key, $plugins_allowedtags );
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
// Add after $api->slug is ready.
|
108 |
-
$plugins_section_titles['features'] = __fs( 'features-and-pricing', $api->slug );
|
109 |
-
|
110 |
-
$_tab = esc_attr( $tab );
|
111 |
-
|
112 |
-
$section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; // Default to the Description tab, Do not translate, API returns English.
|
113 |
-
if ( empty( $section ) || ! isset( $api->sections[ $section ] ) ) {
|
114 |
-
$section_titles = array_keys( (array) $api->sections );
|
115 |
-
$section = array_shift( $section_titles );
|
116 |
-
}
|
117 |
-
|
118 |
-
iframe_header( __( 'Plugin Install' ) );
|
119 |
-
|
120 |
-
$_with_banner = '';
|
121 |
-
|
122 |
-
// var_dump($api->banners);
|
123 |
-
if ( ! empty( $api->banners ) && ( ! empty( $api->banners['low'] ) || ! empty( $api->banners['high'] ) ) ) {
|
124 |
-
$_with_banner = 'with-banner';
|
125 |
-
$low = empty( $api->banners['low'] ) ? $api->banners['high'] : $api->banners['low'];
|
126 |
-
$high = empty( $api->banners['high'] ) ? $api->banners['low'] : $api->banners['high'];
|
127 |
-
?>
|
128 |
-
<style type="text/css">
|
129 |
-
#plugin-information-title.with-banner
|
130 |
-
{
|
131 |
-
background-image: url( <?php echo esc_url( $low ); ?> );
|
132 |
-
}
|
133 |
-
|
134 |
-
@media only screen and ( -webkit-min-device-pixel-ratio: 1.5 )
|
135 |
-
{
|
136 |
-
#plugin-information-title.with-banner
|
137 |
-
{
|
138 |
-
background-image: url( <?php echo esc_url( $high ); ?> );
|
139 |
-
}
|
140 |
-
}
|
141 |
-
</style>
|
142 |
-
<?php
|
143 |
-
}
|
144 |
-
|
145 |
-
echo '<div id="plugin-information-scrollable">';
|
146 |
-
echo "<div id='{$_tab}-title' class='{$_with_banner}'><div class='vignette'></div><h2>{$api->name}</h2></div>";
|
147 |
-
echo "<div id='{$_tab}-tabs' class='{$_with_banner}'>\n";
|
148 |
-
|
149 |
-
foreach ( (array) $api->sections as $section_name => $content ) {
|
150 |
-
if ( 'reviews' === $section_name && ( empty( $api->ratings ) || 0 === array_sum( (array) $api->ratings ) ) ) {
|
151 |
-
continue;
|
152 |
-
}
|
153 |
-
|
154 |
-
if ( isset( $plugins_section_titles[ $section_name ] ) ) {
|
155 |
-
$title = $plugins_section_titles[ $section_name ];
|
156 |
-
} else {
|
157 |
-
$title = ucwords( str_replace( '_', ' ', $section_name ) );
|
158 |
-
}
|
159 |
-
|
160 |
-
$class = ( $section_name === $section ) ? ' class="current"' : '';
|
161 |
-
$href = add_query_arg( array( 'tab' => $tab, 'section' => $section_name ) );
|
162 |
-
$href = esc_url( $href );
|
163 |
-
$san_section = esc_attr( $section_name );
|
164 |
-
echo "\t<a name='$san_section' href='$href' $class>$title</a>\n";
|
165 |
-
}
|
166 |
-
|
167 |
-
echo "</div>\n";
|
168 |
-
|
169 |
-
?>
|
170 |
-
<div id="<?php echo $_tab; ?>-content" class='<?php echo $_with_banner; ?>'>
|
171 |
-
<div class="fyi">
|
172 |
-
<?php if ( isset( $api->plans ) ) : ?>
|
173 |
-
<div class="plugin-information-pricing">
|
174 |
-
<?php foreach ($api->plans as $plan) : ?>
|
175 |
-
<h3 data-plan="<?php echo $plan->id ?>"><?php printf( __fs( 'x-plan', $api->slug ), $plan->title ) ?></h3>
|
176 |
-
<ul>
|
177 |
-
<?php $billing_cycle = 'annual' ?>
|
178 |
-
<?php if ( 1 === count( $plan->pricing ) && 1 == $plan->pricing[0]->licenses ) : ?>
|
179 |
-
<?php $pricing = $plan->pricing[0] ?>
|
180 |
-
<li><label><?php _efs( 'price', $api->slug ) ?>: $<?php
|
181 |
-
if ( isset( $pricing->annual_price ) ) {
|
182 |
-
echo $pricing->annual_price . ( $plan->is_block_features ? ' / year' : '' );
|
183 |
-
$billing_cycle = 'annual';
|
184 |
-
} else if ( isset( $pricing->monthly_price ) ) {
|
185 |
-
echo $pricing->monthly_price . ' / mo';
|
186 |
-
$billing_cycle = 'monthly';
|
187 |
-
} else if ( isset( $pricing->lifetime_price ) ) {
|
188 |
-
echo $pricing->lifetime_price;
|
189 |
-
$billing_cycle = 'lifetime';
|
190 |
-
}
|
191 |
-
?></label></li>
|
192 |
-
<?php else : ?>
|
193 |
-
<?php $first = true;
|
194 |
-
foreach ( $plan->pricing as $pricing ) : ?>
|
195 |
-
<li><label><input name="pricing-<?php echo $plan->id ?>" type="radio"
|
196 |
-
value="<?php echo $pricing->id ?>"<?php checked( $first, true ) ?>><?php
|
197 |
-
switch ( $pricing->licenses ) {
|
198 |
-
case '1':
|
199 |
-
_efs( 'license-single-site', $api->slug );
|
200 |
-
break;
|
201 |
-
case null:
|
202 |
-
_efs( 'license-unlimited', $api->slug );
|
203 |
-
break;
|
204 |
-
default:
|
205 |
-
printf( __fs( 'license-x-sites', $api->slug ), $pricing->licenses );
|
206 |
-
break;
|
207 |
-
}
|
208 |
-
?> - $<?php
|
209 |
-
if ( isset( $pricing->annual_price ) ) {
|
210 |
-
echo $pricing->annual_price . ( $plan->is_block_features ? ' / year' : '' );
|
211 |
-
$billing_cycle = 'annual';
|
212 |
-
} else if ( isset( $pricing->monthly_price ) ) {
|
213 |
-
echo $pricing->monthly_price . ' / mo';
|
214 |
-
$billing_cycle = 'monthly';
|
215 |
-
} else if ( isset( $pricing->lifetime_price ) ) {
|
216 |
-
echo $pricing->lifetime_price;
|
217 |
-
$billing_cycle = 'lifetime';
|
218 |
-
}
|
219 |
-
?></label></li>
|
220 |
-
<?php $first = false; endforeach ?>
|
221 |
-
<?php endif ?>
|
222 |
-
</ul>
|
223 |
-
<?php echo ' <a class="button button-primary right" href="' . esc_url( add_query_arg( array(
|
224 |
-
'plugin_id' => $plan->plugin_id,
|
225 |
-
'plan_id' => $plan->id,
|
226 |
-
'pricing_id' => $plan->pricing[0]->id,
|
227 |
-
'billing_cycle' => $billing_cycle,
|
228 |
-
), $api->checkout_link ) ) . '" target="_parent">' . __fs( 'purchase', $api->slug ) . '</a>' ?>
|
229 |
-
</div>
|
230 |
-
<?php endforeach ?>
|
231 |
-
<?php wp_enqueue_script( 'jquery' ); ?>
|
232 |
-
<script type="text/javascript">
|
233 |
-
(function ($) {
|
234 |
-
$('.plugin-information-pricing input[type=radio]').click(function () {
|
235 |
-
var checkout_url = '<?php echo esc_url_raw(add_query_arg(array(
|
236 |
-
'plugin_id' => $plan->plugin_id,
|
237 |
-
'billing_cycle' => $billing_cycle,
|
238 |
-
), $api->checkout_link)) ?>&plan_id=' +
|
239 |
-
$(this).parents('.plugin-information-pricing').find('h3').attr('data-plan') +
|
240 |
-
'&pricing_id=' + $(this).val();
|
241 |
-
|
242 |
-
$('.plugin-information-pricing .button, #plugin-information-footer .button').attr('href', checkout_url);
|
243 |
-
});
|
244 |
-
})(jQuery);
|
245 |
-
</script>
|
246 |
-
<?php endif ?>
|
247 |
-
<div>
|
248 |
-
<h3><?php _efs( 'details', $api->slug ) ?></h3>
|
249 |
-
<ul>
|
250 |
-
<?php if ( ! empty( $api->version ) ) { ?>
|
251 |
-
<li><strong><?php _e( 'Version:' ); ?></strong> <?php echo $api->version; ?></li>
|
252 |
-
<?php }
|
253 |
-
if ( ! empty( $api->author ) ) { ?>
|
254 |
-
<li>
|
255 |
-
<strong><?php _e( 'Author:' ); ?></strong> <?php echo links_add_target( $api->author, '_blank' ); ?>
|
256 |
-
</li>
|
257 |
-
<?php }
|
258 |
-
if ( ! empty( $api->last_updated ) ) { ?>
|
259 |
-
<li><strong><?php _e( 'Last Updated:' ); ?></strong> <span
|
260 |
-
title="<?php echo $api->last_updated; ?>">
|
261 |
-
<?php printf( __( '%s ago' ), human_time_diff( strtotime( $api->last_updated ) ) ); ?>
|
262 |
-
</span></li>
|
263 |
-
<?php }
|
264 |
-
if ( ! empty( $api->requires ) ) { ?>
|
265 |
-
<li>
|
266 |
-
<strong><?php _e( 'Requires WordPress Version:' ); ?></strong> <?php printf( __( '%s or higher' ), $api->requires ); ?>
|
267 |
-
</li>
|
268 |
-
<?php }
|
269 |
-
if ( ! empty( $api->tested ) ) { ?>
|
270 |
-
<li><strong><?php _e( 'Compatible up to:' ); ?></strong> <?php echo $api->tested; ?></li>
|
271 |
-
<?php }
|
272 |
-
if ( ! empty( $api->downloaded ) ) { ?>
|
273 |
-
<li>
|
274 |
-
<strong><?php _e( 'Downloaded:' ); ?></strong> <?php printf( _n( '%s time', '%s times', $api->downloaded ), number_format_i18n( $api->downloaded ) ); ?>
|
275 |
-
</li>
|
276 |
-
<?php }
|
277 |
-
if ( ! empty( $api->slug ) && empty( $api->external ) ) { ?>
|
278 |
-
<li><a target="_blank"
|
279 |
-
href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/"><?php _e( 'WordPress.org Plugin Page »' ); ?></a>
|
280 |
-
</li>
|
281 |
-
<?php }
|
282 |
-
if ( ! empty( $api->homepage ) ) { ?>
|
283 |
-
<li><a target="_blank"
|
284 |
-
href="<?php echo esc_url( $api->homepage ); ?>"><?php _e( 'Plugin Homepage »' ); ?></a>
|
285 |
-
</li>
|
286 |
-
<?php }
|
287 |
-
if ( ! empty( $api->donate_link ) && empty( $api->contributors ) ) { ?>
|
288 |
-
<li><a target="_blank"
|
289 |
-
href="<?php echo esc_url( $api->donate_link ); ?>"><?php _e( 'Donate to this plugin »' ); ?></a>
|
290 |
-
</li>
|
291 |
-
<?php } ?>
|
292 |
-
</ul>
|
293 |
-
</div>
|
294 |
-
<?php if ( ! empty( $api->rating ) ) { ?>
|
295 |
-
<h3><?php _e( 'Average Rating' ); ?></h3>
|
296 |
-
<?php wp_star_rating( array(
|
297 |
-
'rating' => $api->rating,
|
298 |
-
'type' => 'percent',
|
299 |
-
'number' => $api->num_ratings
|
300 |
-
) ); ?>
|
301 |
-
<small><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></small>
|
302 |
-
<?php
|
303 |
-
}
|
304 |
-
|
305 |
-
if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
|
306 |
-
foreach ( $api->ratings as $key => $ratecount ) {
|
307 |
-
// Avoid div-by-zero.
|
308 |
-
$_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0;
|
309 |
-
?>
|
310 |
-
<div class="counter-container">
|
311 |
-
<span class="counter-label"><a
|
312 |
-
href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
|
313 |
-
target="_blank"
|
314 |
-
title="<?php echo esc_attr( sprintf( _n( 'Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $key ), $key ) ); ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span>
|
315 |
-
<span class="counter-back">
|
316 |
-
<span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span>
|
317 |
-
</span>
|
318 |
-
<span class="counter-count"><?php echo number_format_i18n( $ratecount ); ?></span>
|
319 |
-
</div>
|
320 |
-
<?php
|
321 |
-
}
|
322 |
-
}
|
323 |
-
if ( ! empty( $api->contributors ) ) {
|
324 |
-
?>
|
325 |
-
<h3><?php _e( 'Contributors' ); ?></h3>
|
326 |
-
<ul class="contributors">
|
327 |
-
<?php
|
328 |
-
foreach ( (array) $api->contributors as $contrib_username => $contrib_profile ) {
|
329 |
-
if ( empty( $contrib_username ) && empty( $contrib_profile ) ) {
|
330 |
-
continue;
|
331 |
-
}
|
332 |
-
if ( empty( $contrib_username ) ) {
|
333 |
-
$contrib_username = preg_replace( '/^.+\/(.+)\/?$/', '\1', $contrib_profile );
|
334 |
-
}
|
335 |
-
$contrib_username = sanitize_user( $contrib_username );
|
336 |
-
if ( empty( $contrib_profile ) ) {
|
337 |
-
echo "<li><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' />{$contrib_username}</li>";
|
338 |
-
} else {
|
339 |
-
echo "<li><a href='{$contrib_profile}' target='_blank'><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' />{$contrib_username}</a></li>";
|
340 |
-
}
|
341 |
-
}
|
342 |
-
?>
|
343 |
-
</ul>
|
344 |
-
<?php if ( ! empty( $api->donate_link ) ) { ?>
|
345 |
-
<a target="_blank"
|
346 |
-
href="<?php echo esc_url( $api->donate_link ); ?>"><?php _e( 'Donate to this plugin »' ); ?></a>
|
347 |
-
<?php } ?>
|
348 |
-
<?php } ?>
|
349 |
-
</div>
|
350 |
-
<div id="section-holder" class="wrap">
|
351 |
-
<?php
|
352 |
-
if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
|
353 |
-
echo '<div class="notice notice-warning"><p>' . '<strong>' . __( 'Warning:' ) . '</strong> ' . __( 'This plugin has not been tested with your current version of WordPress.' ) . '</p></div>';
|
354 |
-
} else if ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
|
355 |
-
echo '<div class="notice notice-warning"><p>' . '<strong>' . __( 'Warning:' ) . '</strong> ' . __( 'This plugin has not been marked as compatible with your version of WordPress.' ) . '</p></div>';
|
356 |
-
}
|
357 |
-
|
358 |
-
foreach ( (array) $api->sections as $section_name => $content ) {
|
359 |
-
$content = links_add_base_url( $content, 'https://wordpress.org/plugins/' . $api->slug . '/' );
|
360 |
-
$content = links_add_target( $content, '_blank' );
|
361 |
-
|
362 |
-
$san_section = esc_attr( $section_name );
|
363 |
-
|
364 |
-
$display = ( $section_name === $section ) ? 'block' : 'none';
|
365 |
-
|
366 |
-
echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n";
|
367 |
-
echo $content;
|
368 |
-
echo "\t</div>\n";
|
369 |
-
}
|
370 |
-
echo "</div>\n";
|
371 |
-
echo "</div>\n";
|
372 |
-
echo "</div>\n"; // #plugin-information-scrollable
|
373 |
-
echo "<div id='$tab-footer'>\n";
|
374 |
-
if ( ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) ) {
|
375 |
-
|
376 |
-
if ( ! empty( $api->checkout_link ) && isset( $api->plans ) && 0 < is_array( $api->plans ) ) {
|
377 |
-
echo ' <a class="button button-primary right" href="' . esc_url( add_query_arg( array(
|
378 |
-
'plugin_id' => $plan->plugin_id,
|
379 |
-
'plan_id' => $plan->id,
|
380 |
-
'pricing_id' => $plan->pricing[0]->id,
|
381 |
-
'billing_cycle' => $billing_cycle,
|
382 |
-
), $api->checkout_link ) ) . '" target="_parent">' . __fs( 'purchase', $api->slug ) . '</a>';
|
383 |
-
|
384 |
-
// @todo Add Cart concept.
|
385 |
-
// echo ' <a class="button right" href="' . $status['url'] . '" target="_parent">' . __( 'Add to Cart' ) . '</a>';
|
386 |
-
|
387 |
-
} else if ( ! empty( $api->download_link ) ) {
|
388 |
-
$status = install_plugin_install_status( $api );
|
389 |
-
switch ( $status['status'] ) {
|
390 |
-
case 'install':
|
391 |
-
if ( $status['url'] ) {
|
392 |
-
echo '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __( 'Install Now' ) . '</a>';
|
393 |
-
}
|
394 |
-
break;
|
395 |
-
case 'update_available':
|
396 |
-
if ( $status['url'] ) {
|
397 |
-
echo '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __( 'Install Update Now' ) . '</a>';
|
398 |
-
}
|
399 |
-
break;
|
400 |
-
case 'newer_installed':
|
401 |
-
echo '<a class="button button-primary right disabled">' . sprintf( __( 'Newer Version (%s) Installed' ), $status['version'] ) . '</a>';
|
402 |
-
break;
|
403 |
-
case 'latest_installed':
|
404 |
-
echo '<a class="button button-primary right disabled">' . __( 'Latest Version Installed' ) . '</a>';
|
405 |
-
break;
|
406 |
-
}
|
407 |
-
}
|
408 |
-
}
|
409 |
-
echo "</div>\n";
|
410 |
-
|
411 |
-
iframe_footer();
|
412 |
-
exit;
|
413 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/freemius/includes/fs-plugin-info-dialog.php
ADDED
@@ -0,0 +1,715 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
6 |
+
* @since 1.0.6
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Class FS_Plugin_Info_Dialog
|
15 |
+
*
|
16 |
+
* @author Vova Feldman (@svovaf)
|
17 |
+
* @since 1.1.7
|
18 |
+
*/
|
19 |
+
class FS_Plugin_Info_Dialog {
|
20 |
+
/**
|
21 |
+
* @since 1.1.7
|
22 |
+
*
|
23 |
+
* @var FS_Logger
|
24 |
+
*/
|
25 |
+
private $_logger;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @since 1.1.7
|
29 |
+
*
|
30 |
+
* @var Freemius
|
31 |
+
*/
|
32 |
+
private $_fs;
|
33 |
+
|
34 |
+
function __construct(Freemius $fs) {
|
35 |
+
$this->_fs = $fs;
|
36 |
+
|
37 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $fs->get_slug() . '_info', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
38 |
+
|
39 |
+
// Remove default plugin information action.
|
40 |
+
remove_all_actions( 'install_plugins_pre_plugin-information' );
|
41 |
+
|
42 |
+
// Override action with custom plugins function for add-ons.
|
43 |
+
add_action( 'install_plugins_pre_plugin-information', array( &$this, 'install_plugin_information' ) );
|
44 |
+
|
45 |
+
// Override request for plugin information for Add-ons.
|
46 |
+
add_filter(
|
47 |
+
'fs_plugins_api',
|
48 |
+
array( &$this, '_get_addon_info_filter' ),
|
49 |
+
WP_FS__DEFAULT_PRIORITY, 3 );
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Generate add-on plugin information.
|
54 |
+
*
|
55 |
+
* @author Vova Feldman (@svovaf)
|
56 |
+
* @since 1.0.6
|
57 |
+
*
|
58 |
+
* @param array $data
|
59 |
+
* @param string $action
|
60 |
+
* @param object|null $args
|
61 |
+
*
|
62 |
+
* @return array|null
|
63 |
+
*/
|
64 |
+
function _get_addon_info_filter( $data, $action = '', $args = null ) {
|
65 |
+
$this->_logger->entrance();
|
66 |
+
|
67 |
+
$parent_plugin_id = fs_request_get( 'parent_plugin_id', false );
|
68 |
+
|
69 |
+
if ( $this->_fs->get_id() != $parent_plugin_id ||
|
70 |
+
( 'plugin_information' !== $action ) ||
|
71 |
+
! isset( $args->slug )
|
72 |
+
) {
|
73 |
+
return $data;
|
74 |
+
}
|
75 |
+
|
76 |
+
// Find add-on by slug.
|
77 |
+
$addons = $this->_fs->get_addons();
|
78 |
+
$selected_addon = false;
|
79 |
+
foreach ( $addons as $addon ) {
|
80 |
+
if ( $addon->slug == $args->slug ) {
|
81 |
+
$selected_addon = $addon;
|
82 |
+
break;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( false === $selected_addon ) {
|
87 |
+
return $data;
|
88 |
+
}
|
89 |
+
|
90 |
+
if ( ! isset( $selected_addon->info ) ) {
|
91 |
+
// Setup some default info.
|
92 |
+
$selected_addon->info = new stdClass();
|
93 |
+
$selected_addon->info->selling_point_0 = 'Selling Point 1';
|
94 |
+
$selected_addon->info->selling_point_1 = 'Selling Point 2';
|
95 |
+
$selected_addon->info->selling_point_2 = 'Selling Point 3';
|
96 |
+
$selected_addon->info->description = '<p>Tell your users all about your add-on</p>';
|
97 |
+
}
|
98 |
+
|
99 |
+
fs_enqueue_local_style( 'fs_addons', '/admin/add-ons.css' );
|
100 |
+
|
101 |
+
$data = $args;
|
102 |
+
|
103 |
+
$is_free = true;
|
104 |
+
|
105 |
+
// Load add-on pricing.
|
106 |
+
$has_pricing = false;
|
107 |
+
$has_features = false;
|
108 |
+
$plans = false;
|
109 |
+
$plans_result = $this->_fs->get_api_site_or_plugin_scope()->get( "/addons/{$selected_addon->id}/plans.json" );
|
110 |
+
if ( ! isset( $plans_result->error ) ) {
|
111 |
+
$plans = $plans_result->plans;
|
112 |
+
if ( is_array( $plans ) ) {
|
113 |
+
foreach ( $plans as &$plan ) {
|
114 |
+
$pricing_result = $this->_fs->get_api_site_or_plugin_scope()->get( "/addons/{$selected_addon->id}/plans/{$plan->id}/pricing.json" );
|
115 |
+
if ( ! isset( $pricing_result->error ) ) {
|
116 |
+
// Update plan's pricing.
|
117 |
+
$plan->pricing = $pricing_result->pricing;
|
118 |
+
|
119 |
+
if ( is_array( $plan->pricing ) && ! empty( $plan->pricing ) ) {
|
120 |
+
$is_free = false;
|
121 |
+
}
|
122 |
+
|
123 |
+
$has_pricing = true;
|
124 |
+
}
|
125 |
+
|
126 |
+
$features_result = $this->_fs->get_api_site_or_plugin_scope()->get( "/addons/{$selected_addon->id}/plans/{$plan->id}/features.json" );
|
127 |
+
if ( ! isset( $features_result->error ) &&
|
128 |
+
is_array( $features_result->features ) &&
|
129 |
+
0 < count( $features_result->features )
|
130 |
+
) {
|
131 |
+
// Update plan's pricing.
|
132 |
+
$plan->features = $features_result->features;
|
133 |
+
|
134 |
+
$has_features = true;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
// Fetch latest version from Freemius.
|
141 |
+
$latest = $this->_fs->_fetch_latest_version( $selected_addon->id );
|
142 |
+
|
143 |
+
// If not versions found, then assume it's a .org plugin.
|
144 |
+
$is_wordpress_org = !$is_free || ( false === $latest );
|
145 |
+
|
146 |
+
if ( $is_free ) {
|
147 |
+
if ( $is_wordpress_org ) {
|
148 |
+
|
149 |
+
$data = FS_Plugin_Updater::_fetch_plugin_info_from_repository(
|
150 |
+
'plugin_information', (object) array(
|
151 |
+
'slug' => $selected_addon->slug,
|
152 |
+
'is_ssl' => is_ssl(),
|
153 |
+
'fields' => array(
|
154 |
+
'banners' => true,
|
155 |
+
'reviews' => true,
|
156 |
+
'downloaded' => false,
|
157 |
+
'active_installs' => true
|
158 |
+
)
|
159 |
+
) );
|
160 |
+
} else {
|
161 |
+
$data->download_link = $this->_fs->_get_latest_download_local_url( $selected_addon->id );
|
162 |
+
}
|
163 |
+
} else {
|
164 |
+
$is_wordpress_org = false;
|
165 |
+
$data->checkout_link = $this->_fs->checkout_url();
|
166 |
+
}
|
167 |
+
|
168 |
+
if ( ! $is_wordpress_org ) {
|
169 |
+
// Fetch as much as possible info from local files.
|
170 |
+
$plugin_local_data = $this->_fs->get_plugin_data();
|
171 |
+
$data->name = $selected_addon->title;
|
172 |
+
$data->author = $plugin_local_data['Author'];
|
173 |
+
$view_vars = array( 'plugin' => $selected_addon );
|
174 |
+
$data->sections = array(
|
175 |
+
'description' => fs_get_template( '/plugin-info/description.php', $view_vars ),
|
176 |
+
);
|
177 |
+
|
178 |
+
if ( ! empty( $selected_addon->info->banner_url ) ) {
|
179 |
+
$data->banners = array(
|
180 |
+
'low' => $selected_addon->info->banner_url,
|
181 |
+
);
|
182 |
+
}
|
183 |
+
|
184 |
+
if ( ! empty( $selected_addon->info->screenshots ) ) {
|
185 |
+
$view_vars = array(
|
186 |
+
'screenshots' => $selected_addon->info->screenshots,
|
187 |
+
'plugin' => $selected_addon,
|
188 |
+
);
|
189 |
+
$data->sections['screenshots'] = fs_get_template( '/plugin-info/screenshots.php', $view_vars );
|
190 |
+
}
|
191 |
+
|
192 |
+
if ( is_object( $latest ) ) {
|
193 |
+
$data->version = $latest->version;
|
194 |
+
$data->last_updated = ! is_null( $latest->updated ) ? $latest->updated : $latest->created;
|
195 |
+
$data->requires = $latest->requires_platform_version;
|
196 |
+
$data->tested = $latest->tested_up_to_version;
|
197 |
+
} else {
|
198 |
+
// Add dummy version.
|
199 |
+
$data->version = '1.0.0';
|
200 |
+
|
201 |
+
// Add message to developer to deploy the plugin through Freemius.
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
if ( $has_pricing ) {
|
206 |
+
// Add plans to data.
|
207 |
+
$data->plans = $plans;
|
208 |
+
|
209 |
+
if ( $has_features ) {
|
210 |
+
$view_vars = array(
|
211 |
+
'plans' => $plans,
|
212 |
+
'plugin' => $selected_addon,
|
213 |
+
);
|
214 |
+
$data->sections['features'] = fs_get_template( '/plugin-info/features.php', $view_vars );
|
215 |
+
}
|
216 |
+
}
|
217 |
+
|
218 |
+
$data->is_paid = ! $is_free;
|
219 |
+
$data->external = ! $is_wordpress_org;
|
220 |
+
|
221 |
+
return $data;
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* @author Vova Feldman (@svovaf)
|
226 |
+
* @since 1.1.7
|
227 |
+
*
|
228 |
+
* @param object $plan
|
229 |
+
*
|
230 |
+
* @return string
|
231 |
+
*/
|
232 |
+
private function get_billing_cycle( $plan ) {
|
233 |
+
$billing_cycle = 'annual';
|
234 |
+
|
235 |
+
if ( 1 === count( $plan->pricing ) && 1 == $plan->pricing[0]->licenses ) {
|
236 |
+
$pricing = $plan->pricing[0];
|
237 |
+
if ( isset( $pricing->annual_price ) ) {
|
238 |
+
$billing_cycle = 'annual';
|
239 |
+
} else if ( isset( $pricing->monthly_price ) ) {
|
240 |
+
$billing_cycle = 'monthly';
|
241 |
+
} else if ( isset( $pricing->lifetime_price ) ) {
|
242 |
+
$billing_cycle = 'lifetime';
|
243 |
+
}
|
244 |
+
} else {
|
245 |
+
foreach ( $plan->pricing as $pricing ) {
|
246 |
+
if ( isset( $pricing->annual_price ) ) {
|
247 |
+
$billing_cycle = 'annual';
|
248 |
+
} else if ( isset( $pricing->monthly_price ) ) {
|
249 |
+
$billing_cycle = 'monthly';
|
250 |
+
} else if ( isset( $pricing->lifetime_price ) ) {
|
251 |
+
$billing_cycle = 'lifetime';
|
252 |
+
}
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
return $billing_cycle;
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* @author Vova Feldman (@svovaf)
|
261 |
+
* @since 1.1.7
|
262 |
+
*
|
263 |
+
* @param object $api
|
264 |
+
*
|
265 |
+
* @return string
|
266 |
+
*/
|
267 |
+
private function get_plugin_cta( $api ) {
|
268 |
+
if ( ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) ) {
|
269 |
+
|
270 |
+
if ( ! empty( $api->checkout_link ) && isset( $api->plans ) && 0 < is_array( $api->plans ) ) {
|
271 |
+
$plan = $api->plans[0];
|
272 |
+
|
273 |
+
return ' <a class="button button-primary right" href="' . esc_url( add_query_arg( array(
|
274 |
+
'plugin_id' => $plan->plugin_id,
|
275 |
+
'plan_id' => $plan->id,
|
276 |
+
'pricing_id' => $plan->pricing[0]->id,
|
277 |
+
'billing_cycle' => $this->get_billing_cycle( $plan ),
|
278 |
+
), $api->checkout_link ) ) . '" target="_parent">' . __fs( 'purchase', $api->slug ) . '</a>';
|
279 |
+
|
280 |
+
// @todo Add Cart concept.
|
281 |
+
// echo ' <a class="button right" href="' . $status['url'] . '" target="_parent">' . __( 'Add to Cart' ) . '</a>';
|
282 |
+
|
283 |
+
} else if ( ! empty( $api->download_link ) ) {
|
284 |
+
$status = install_plugin_install_status( $api );
|
285 |
+
|
286 |
+
|
287 |
+
// Hosted on WordPress.org.
|
288 |
+
switch ( $status['status'] ) {
|
289 |
+
case 'install':
|
290 |
+
if ($api->external &&
|
291 |
+
$this->_fs->is_org_repo_compliant() ||
|
292 |
+
!$this->_fs->is_premium())
|
293 |
+
{
|
294 |
+
/**
|
295 |
+
* Add-on hosted on Freemius, not yet installed, and core
|
296 |
+
* plugin is wordpress.org compliant. Therefore, require a download
|
297 |
+
* since installing external plugins is not allowed by the wp.org guidelines.
|
298 |
+
*/
|
299 |
+
return ' <a class="button button-primary right" href="' . esc_url( $api->download_link ) . '" target="_blank">' . __fs( 'download-latest', $api->slug ) . '</a>';
|
300 |
+
}
|
301 |
+
else {
|
302 |
+
if ( $status['url'] ) {
|
303 |
+
return '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __( 'Install Now' ) . '</a>';
|
304 |
+
}
|
305 |
+
}
|
306 |
+
break;
|
307 |
+
case 'update_available':
|
308 |
+
if ( $status['url'] ) {
|
309 |
+
return '<a class="button button-primary right" href="' . $status['url'] . '" target="_parent">' . __( 'Install Update Now' ) . '</a>';
|
310 |
+
}
|
311 |
+
break;
|
312 |
+
case 'newer_installed':
|
313 |
+
return '<a class="button button-primary right disabled">' . sprintf( __( 'Newer Version (%s) Installed' ), $status['version'] ) . '</a>';
|
314 |
+
break;
|
315 |
+
case 'latest_installed':
|
316 |
+
return '<a class="button button-primary right disabled">' . __( 'Latest Version Installed' ) . '</a>';
|
317 |
+
break;
|
318 |
+
}
|
319 |
+
|
320 |
+
}
|
321 |
+
}
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Display plugin information in dialog box form.
|
326 |
+
*
|
327 |
+
* Based on core install_plugin_information() function.
|
328 |
+
*
|
329 |
+
* @author Vova Feldman (@svovaf)
|
330 |
+
* @since 1.0.6
|
331 |
+
*/
|
332 |
+
function install_plugin_information() {
|
333 |
+
global $tab;
|
334 |
+
|
335 |
+
if ( empty( $_REQUEST['plugin'] ) ) {
|
336 |
+
return;
|
337 |
+
}
|
338 |
+
|
339 |
+
$args = array(
|
340 |
+
'slug' => wp_unslash( $_REQUEST['plugin'] ),
|
341 |
+
'is_ssl' => is_ssl(),
|
342 |
+
'fields' => array(
|
343 |
+
'banners' => true,
|
344 |
+
'reviews' => true,
|
345 |
+
'downloaded' => false,
|
346 |
+
'active_installs' => true
|
347 |
+
)
|
348 |
+
);
|
349 |
+
|
350 |
+
if ( is_array( $args ) ) {
|
351 |
+
$args = (object) $args;
|
352 |
+
}
|
353 |
+
|
354 |
+
if ( ! isset( $args->per_page ) ) {
|
355 |
+
$args->per_page = 24;
|
356 |
+
}
|
357 |
+
|
358 |
+
if ( ! isset( $args->locale ) ) {
|
359 |
+
$args->locale = get_locale();
|
360 |
+
}
|
361 |
+
|
362 |
+
$api = apply_filters( 'fs_plugins_api', false, 'plugin_information', $args );
|
363 |
+
|
364 |
+
if ( is_wp_error( $api ) ) {
|
365 |
+
wp_die( $api );
|
366 |
+
}
|
367 |
+
|
368 |
+
$plugins_allowedtags = array(
|
369 |
+
'a' => array(
|
370 |
+
'href' => array(),
|
371 |
+
'title' => array(),
|
372 |
+
'target' => array(),
|
373 |
+
// Add image style for screenshots.
|
374 |
+
'class' => array()
|
375 |
+
),
|
376 |
+
'style' => array(),
|
377 |
+
'abbr' => array( 'title' => array() ),
|
378 |
+
'acronym' => array( 'title' => array() ),
|
379 |
+
'code' => array(),
|
380 |
+
'pre' => array(),
|
381 |
+
'em' => array(),
|
382 |
+
'strong' => array(),
|
383 |
+
'div' => array( 'class' => array() ),
|
384 |
+
'span' => array( 'class' => array() ),
|
385 |
+
'p' => array(),
|
386 |
+
'ul' => array(),
|
387 |
+
'ol' => array(),
|
388 |
+
'li' => array( 'class' => array() ),
|
389 |
+
'i' => array( 'class' => array() ),
|
390 |
+
'h1' => array(),
|
391 |
+
'h2' => array(),
|
392 |
+
'h3' => array(),
|
393 |
+
'h4' => array(),
|
394 |
+
'h5' => array(),
|
395 |
+
'h6' => array(),
|
396 |
+
'img' => array( 'src' => array(), 'class' => array(), 'alt' => array() ),
|
397 |
+
// 'table' => array(),
|
398 |
+
// 'td' => array(),
|
399 |
+
// 'tr' => array(),
|
400 |
+
// 'th' => array(),
|
401 |
+
// 'thead' => array(),
|
402 |
+
// 'tbody' => array(),
|
403 |
+
);
|
404 |
+
|
405 |
+
$plugins_section_titles = array(
|
406 |
+
'description' => _x( 'Description', 'Plugin installer section title' ),
|
407 |
+
'installation' => _x( 'Installation', 'Plugin installer section title' ),
|
408 |
+
'faq' => _x( 'FAQ', 'Plugin installer section title' ),
|
409 |
+
'screenshots' => _x( 'Screenshots', 'Plugin installer section title' ),
|
410 |
+
'changelog' => _x( 'Changelog', 'Plugin installer section title' ),
|
411 |
+
'reviews' => _x( 'Reviews', 'Plugin installer section title' ),
|
412 |
+
'other_notes' => _x( 'Other Notes', 'Plugin installer section title' ),
|
413 |
+
);
|
414 |
+
|
415 |
+
// Sanitize HTML
|
416 |
+
// foreach ( (array) $api->sections as $section_name => $content ) {
|
417 |
+
// $api->sections[$section_name] = wp_kses( $content, $plugins_allowedtags );
|
418 |
+
// }
|
419 |
+
|
420 |
+
foreach ( array( 'version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug' ) as $key ) {
|
421 |
+
if ( isset( $api->$key ) ) {
|
422 |
+
$api->$key = wp_kses( $api->$key, $plugins_allowedtags );
|
423 |
+
}
|
424 |
+
}
|
425 |
+
|
426 |
+
// Add after $api->slug is ready.
|
427 |
+
$plugins_section_titles['features'] = __fs( 'features-and-pricing', $api->slug );
|
428 |
+
|
429 |
+
$_tab = esc_attr( $tab );
|
430 |
+
|
431 |
+
$section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; // Default to the Description tab, Do not translate, API returns English.
|
432 |
+
if ( empty( $section ) || ! isset( $api->sections[ $section ] ) ) {
|
433 |
+
$section_titles = array_keys( (array) $api->sections );
|
434 |
+
$section = array_shift( $section_titles );
|
435 |
+
}
|
436 |
+
|
437 |
+
iframe_header( __( 'Plugin Install' ) );
|
438 |
+
|
439 |
+
$_with_banner = '';
|
440 |
+
|
441 |
+
// var_dump($api->banners);
|
442 |
+
if ( ! empty( $api->banners ) && ( ! empty( $api->banners['low'] ) || ! empty( $api->banners['high'] ) ) ) {
|
443 |
+
$_with_banner = 'with-banner';
|
444 |
+
$low = empty( $api->banners['low'] ) ? $api->banners['high'] : $api->banners['low'];
|
445 |
+
$high = empty( $api->banners['high'] ) ? $api->banners['low'] : $api->banners['high'];
|
446 |
+
?>
|
447 |
+
<style type="text/css">
|
448 |
+
#plugin-information-title.with-banner
|
449 |
+
{
|
450 |
+
background-image: url( <?php echo esc_url( $low ); ?> );
|
451 |
+
}
|
452 |
+
|
453 |
+
@media only screen and ( -webkit-min-device-pixel-ratio: 1.5 )
|
454 |
+
{
|
455 |
+
#plugin-information-title.with-banner
|
456 |
+
{
|
457 |
+
background-image: url( <?php echo esc_url( $high ); ?> );
|
458 |
+
}
|
459 |
+
}
|
460 |
+
</style>
|
461 |
+
<?php
|
462 |
+
}
|
463 |
+
|
464 |
+
echo '<div id="plugin-information-scrollable">';
|
465 |
+
echo "<div id='{$_tab}-title' class='{$_with_banner}'><div class='vignette'></div><h2>{$api->name}</h2></div>";
|
466 |
+
echo "<div id='{$_tab}-tabs' class='{$_with_banner}'>\n";
|
467 |
+
|
468 |
+
foreach ( (array) $api->sections as $section_name => $content ) {
|
469 |
+
if ( 'reviews' === $section_name && ( empty( $api->ratings ) || 0 === array_sum( (array) $api->ratings ) ) ) {
|
470 |
+
continue;
|
471 |
+
}
|
472 |
+
|
473 |
+
if ( isset( $plugins_section_titles[ $section_name ] ) ) {
|
474 |
+
$title = $plugins_section_titles[ $section_name ];
|
475 |
+
} else {
|
476 |
+
$title = ucwords( str_replace( '_', ' ', $section_name ) );
|
477 |
+
}
|
478 |
+
|
479 |
+
$class = ( $section_name === $section ) ? ' class="current"' : '';
|
480 |
+
$href = add_query_arg( array( 'tab' => $tab, 'section' => $section_name ) );
|
481 |
+
$href = esc_url( $href );
|
482 |
+
$san_section = esc_attr( $section_name );
|
483 |
+
echo "\t<a name='$san_section' href='$href' $class>$title</a>\n";
|
484 |
+
}
|
485 |
+
|
486 |
+
echo "</div>\n";
|
487 |
+
|
488 |
+
?>
|
489 |
+
<div id="<?php echo $_tab; ?>-content" class='<?php echo $_with_banner; ?>'>
|
490 |
+
<div class="fyi">
|
491 |
+
<?php if ( isset( $api->plans ) ) : ?>
|
492 |
+
<div class="plugin-information-pricing">
|
493 |
+
<?php foreach ($api->plans as $plan) : ?>
|
494 |
+
<h3 data-plan="<?php echo $plan->id ?>"><?php printf( __fs( 'x-plan', $api->slug ), $plan->title ) ?></h3>
|
495 |
+
<?php if ( $api->is_paid ) : ?>
|
496 |
+
<ul>
|
497 |
+
<?php $billing_cycle = 'annual' ?>
|
498 |
+
<?php if ( 1 === count( $plan->pricing ) && 1 == $plan->pricing[0]->licenses ) : ?>
|
499 |
+
<?php $pricing = $plan->pricing[0] ?>
|
500 |
+
<li><label><?php _efs( 'price', $api->slug ) ?>: $<?php
|
501 |
+
if ( isset( $pricing->annual_price ) ) {
|
502 |
+
echo $pricing->annual_price . ( $plan->is_block_features ? ' / year' : '' );
|
503 |
+
$billing_cycle = 'annual';
|
504 |
+
} else if ( isset( $pricing->monthly_price ) ) {
|
505 |
+
echo $pricing->monthly_price . ' / mo';
|
506 |
+
$billing_cycle = 'monthly';
|
507 |
+
} else if ( isset( $pricing->lifetime_price ) ) {
|
508 |
+
echo $pricing->lifetime_price;
|
509 |
+
$billing_cycle = 'lifetime';
|
510 |
+
}
|
511 |
+
?></label></li>
|
512 |
+
<?php else : ?>
|
513 |
+
<?php $first = true;
|
514 |
+
foreach ( $plan->pricing as $pricing ) : ?>
|
515 |
+
<li><label><input name="pricing-<?php echo $plan->id ?>" type="radio"
|
516 |
+
value="<?php echo $pricing->id ?>"<?php checked( $first, true ) ?>><?php
|
517 |
+
switch ( $pricing->licenses ) {
|
518 |
+
case '1':
|
519 |
+
_efs( 'license-single-site', $api->slug );
|
520 |
+
break;
|
521 |
+
case null:
|
522 |
+
_efs( 'license-unlimited', $api->slug );
|
523 |
+
break;
|
524 |
+
default:
|
525 |
+
printf( __fs( 'license-x-sites', $api->slug ), $pricing->licenses );
|
526 |
+
break;
|
527 |
+
}
|
528 |
+
?> - $<?php
|
529 |
+
if ( isset( $pricing->annual_price ) ) {
|
530 |
+
echo $pricing->annual_price . ( $plan->is_block_features ? ' / year' : '' );
|
531 |
+
$billing_cycle = 'annual';
|
532 |
+
} else if ( isset( $pricing->monthly_price ) ) {
|
533 |
+
echo $pricing->monthly_price . ' / mo';
|
534 |
+
$billing_cycle = 'monthly';
|
535 |
+
} else if ( isset( $pricing->lifetime_price ) ) {
|
536 |
+
echo $pricing->lifetime_price;
|
537 |
+
$billing_cycle = 'lifetime';
|
538 |
+
}
|
539 |
+
?></label></li>
|
540 |
+
<?php $first = false; endforeach ?>
|
541 |
+
<?php endif ?>
|
542 |
+
</ul>
|
543 |
+
<?php endif ?>
|
544 |
+
<?php echo $this->get_plugin_cta($api) ?>
|
545 |
+
</div>
|
546 |
+
<?php endforeach ?>
|
547 |
+
<?php wp_enqueue_script( 'jquery' ); ?>
|
548 |
+
<script type="text/javascript">
|
549 |
+
(function ($) {
|
550 |
+
$('.plugin-information-pricing input[type=radio]').click(function () {
|
551 |
+
var checkout_url = '<?php echo esc_url_raw(add_query_arg(array(
|
552 |
+
'plugin_id' => $plan->plugin_id,
|
553 |
+
'billing_cycle' => $billing_cycle,
|
554 |
+
), $api->checkout_link)) ?>&plan_id=' +
|
555 |
+
$(this).parents('.plugin-information-pricing').find('h3').attr('data-plan') +
|
556 |
+
'&pricing_id=' + $(this).val();
|
557 |
+
|
558 |
+
$('.plugin-information-pricing .button, #plugin-information-footer .button').attr('href', checkout_url);
|
559 |
+
});
|
560 |
+
})(jQuery);
|
561 |
+
</script>
|
562 |
+
<?php endif ?>
|
563 |
+
<div>
|
564 |
+
<h3><?php _efs( 'details', $api->slug ) ?></h3>
|
565 |
+
<ul>
|
566 |
+
<?php if ( ! empty( $api->version ) ) { ?>
|
567 |
+
<li><strong><?php _e( 'Version:' ); ?></strong> <?php echo $api->version; ?></li>
|
568 |
+
<?php
|
569 |
+
}
|
570 |
+
if ( ! empty( $api->author ) ) {
|
571 |
+
?>
|
572 |
+
<li>
|
573 |
+
<strong><?php _e( 'Author:' ); ?></strong> <?php echo links_add_target( $api->author, '_blank' ); ?>
|
574 |
+
</li>
|
575 |
+
<?php
|
576 |
+
}
|
577 |
+
if ( ! empty( $api->last_updated ) ) {
|
578 |
+
?>
|
579 |
+
<li><strong><?php _e( 'Last Updated:' ); ?></strong> <span
|
580 |
+
title="<?php echo $api->last_updated; ?>">
|
581 |
+
<?php printf( __( '%s ago' ), human_time_diff( strtotime( $api->last_updated ) ) ); ?>
|
582 |
+
</span></li>
|
583 |
+
<?php
|
584 |
+
}
|
585 |
+
if ( ! empty( $api->requires ) ) {
|
586 |
+
?>
|
587 |
+
<li>
|
588 |
+
<strong><?php _e( 'Requires WordPress Version:' ); ?></strong> <?php printf( __( '%s or higher' ), $api->requires ); ?>
|
589 |
+
</li>
|
590 |
+
<?php
|
591 |
+
}
|
592 |
+
if ( ! empty( $api->tested ) ) {
|
593 |
+
?>
|
594 |
+
<li><strong><?php _e( 'Compatible up to:' ); ?></strong> <?php echo $api->tested; ?>
|
595 |
+
</li>
|
596 |
+
<?php
|
597 |
+
}
|
598 |
+
if ( ! empty( $api->downloaded ) ) {
|
599 |
+
?>
|
600 |
+
<li>
|
601 |
+
<strong><?php _e( 'Downloaded:' ); ?></strong> <?php printf( _n( '%s time', '%s times', $api->downloaded ), number_format_i18n( $api->downloaded ) ); ?>
|
602 |
+
</li>
|
603 |
+
<?php
|
604 |
+
}
|
605 |
+
if ( ! empty( $api->slug ) && empty( $api->external ) ) {
|
606 |
+
?>
|
607 |
+
<li><a target="_blank"
|
608 |
+
href="https://wordpress.org/plugins/<?php echo $api->slug; ?>/"><?php _e( 'WordPress.org Plugin Page »' ); ?></a>
|
609 |
+
</li>
|
610 |
+
<?php
|
611 |
+
}
|
612 |
+
if ( ! empty( $api->homepage ) ) {
|
613 |
+
?>
|
614 |
+
<li><a target="_blank"
|
615 |
+
href="<?php echo esc_url( $api->homepage ); ?>"><?php _e( 'Plugin Homepage »' ); ?></a>
|
616 |
+
</li>
|
617 |
+
<?php
|
618 |
+
}
|
619 |
+
if ( ! empty( $api->donate_link ) && empty( $api->contributors ) ) {
|
620 |
+
?>
|
621 |
+
<li><a target="_blank"
|
622 |
+
href="<?php echo esc_url( $api->donate_link ); ?>"><?php _e( 'Donate to this plugin »' ); ?></a>
|
623 |
+
</li>
|
624 |
+
<?php } ?>
|
625 |
+
</ul>
|
626 |
+
</div>
|
627 |
+
<?php if ( ! empty( $api->rating ) ) { ?>
|
628 |
+
<h3><?php _e( 'Average Rating' ); ?></h3>
|
629 |
+
<?php wp_star_rating( array(
|
630 |
+
'rating' => $api->rating,
|
631 |
+
'type' => 'percent',
|
632 |
+
'number' => $api->num_ratings
|
633 |
+
) ); ?>
|
634 |
+
<small><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></small>
|
635 |
+
<?php
|
636 |
+
}
|
637 |
+
|
638 |
+
if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) {
|
639 |
+
foreach ( $api->ratings as $key => $ratecount ) {
|
640 |
+
// Avoid div-by-zero.
|
641 |
+
$_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0;
|
642 |
+
?>
|
643 |
+
<div class="counter-container">
|
644 |
+
<span class="counter-label"><a
|
645 |
+
href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>"
|
646 |
+
target="_blank"
|
647 |
+
title="<?php echo esc_attr( sprintf( _n( 'Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $key ), $key ) ); ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span>
|
648 |
+
<span class="counter-back">
|
649 |
+
<span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span>
|
650 |
+
</span>
|
651 |
+
<span class="counter-count"><?php echo number_format_i18n( $ratecount ); ?></span>
|
652 |
+
</div>
|
653 |
+
<?php
|
654 |
+
}
|
655 |
+
}
|
656 |
+
if ( ! empty( $api->contributors ) ) {
|
657 |
+
?>
|
658 |
+
<h3><?php _e( 'Contributors' ); ?></h3>
|
659 |
+
<ul class="contributors">
|
660 |
+
<?php
|
661 |
+
foreach ( (array) $api->contributors as $contrib_username => $contrib_profile ) {
|
662 |
+
if ( empty( $contrib_username ) && empty( $contrib_profile ) ) {
|
663 |
+
continue;
|
664 |
+
}
|
665 |
+
if ( empty( $contrib_username ) ) {
|
666 |
+
$contrib_username = preg_replace( '/^.+\/(.+)\/?$/', '\1', $contrib_profile );
|
667 |
+
}
|
668 |
+
$contrib_username = sanitize_user( $contrib_username );
|
669 |
+
if ( empty( $contrib_profile ) ) {
|
670 |
+
echo "<li><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' />{$contrib_username}</li>";
|
671 |
+
} else {
|
672 |
+
echo "<li><a href='{$contrib_profile}' target='_blank'><img src='https://wordpress.org/grav-redirect.php?user={$contrib_username}&s=36' width='18' height='18' />{$contrib_username}</a></li>";
|
673 |
+
}
|
674 |
+
}
|
675 |
+
?>
|
676 |
+
</ul>
|
677 |
+
<?php if ( ! empty( $api->donate_link ) ) { ?>
|
678 |
+
<a target="_blank"
|
679 |
+
href="<?php echo esc_url( $api->donate_link ); ?>"><?php _e( 'Donate to this plugin »' ); ?></a>
|
680 |
+
<?php } ?>
|
681 |
+
<?php } ?>
|
682 |
+
</div>
|
683 |
+
<div id="section-holder" class="wrap">
|
684 |
+
<?php
|
685 |
+
if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
|
686 |
+
echo '<div class="notice notice-warning"><p>' . '<strong>' . __( 'Warning:' ) . '</strong> ' . __( 'This plugin has not been tested with your current version of WordPress.' ) . '</p></div>';
|
687 |
+
} else if ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
|
688 |
+
echo '<div class="notice notice-warning"><p>' . '<strong>' . __( 'Warning:' ) . '</strong> ' . __( 'This plugin has not been marked as compatible with your version of WordPress.' ) . '</p></div>';
|
689 |
+
}
|
690 |
+
|
691 |
+
foreach ( (array) $api->sections as $section_name => $content ) {
|
692 |
+
$content = links_add_base_url( $content, 'https://wordpress.org/plugins/' . $api->slug . '/' );
|
693 |
+
$content = links_add_target( $content, '_blank' );
|
694 |
+
|
695 |
+
$san_section = esc_attr( $section_name );
|
696 |
+
|
697 |
+
$display = ( $section_name === $section ) ? 'block' : 'none';
|
698 |
+
|
699 |
+
echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n";
|
700 |
+
echo $content;
|
701 |
+
echo "\t</div>\n";
|
702 |
+
}
|
703 |
+
echo "</div>\n";
|
704 |
+
echo "</div>\n";
|
705 |
+
echo "</div>\n"; // #plugin-information-scrollable
|
706 |
+
echo "<div id='$tab-footer'>\n";
|
707 |
+
|
708 |
+
echo $this->get_plugin_cta($api);
|
709 |
+
|
710 |
+
echo "</div>\n";
|
711 |
+
|
712 |
+
iframe_footer();
|
713 |
+
exit;
|
714 |
+
}
|
715 |
+
}
|
classes/freemius/start.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
-
$this_sdk_version = '1.1.7.
|
14 |
|
15 |
#region SDK Selection Logic --------------------------------------------------------------------
|
16 |
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
$this_sdk_version = '1.1.7.2';
|
14 |
|
15 |
#region SDK Selection Logic --------------------------------------------------------------------
|
16 |
|
language/aryo-activity-log.pot
CHANGED
@@ -6,9 +6,9 @@
|
|
6 |
#, fuzzy
|
7 |
msgid ""
|
8 |
msgstr ""
|
9 |
-
"Project-Id-Version: aryo-activity-log 2.2.
|
10 |
"Report-Msgid-Bugs-To: \n"
|
11 |
-
"POT-Creation-Date: 2016-02-
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
@@ -65,7 +65,7 @@ msgid "Description"
|
|
65 |
msgstr ""
|
66 |
|
67 |
#: classes/class-aal-activity-log-list-table.php:142
|
68 |
-
#: classes/freemius/includes/fs-plugin-
|
69 |
#, php-format
|
70 |
msgid "%s ago"
|
71 |
msgstr ""
|
@@ -268,156 +268,156 @@ msgid ""
|
|
268 |
"conditions:"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: classes/freemius/includes/fs-plugin-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
msgctxt "Plugin installer section title"
|
273 |
msgid "Description"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: classes/freemius/includes/fs-plugin-
|
277 |
msgctxt "Plugin installer section title"
|
278 |
msgid "Installation"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: classes/freemius/includes/fs-plugin-
|
282 |
msgctxt "Plugin installer section title"
|
283 |
msgid "FAQ"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: classes/freemius/includes/fs-plugin-
|
287 |
msgctxt "Plugin installer section title"
|
288 |
msgid "Screenshots"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: classes/freemius/includes/fs-plugin-
|
292 |
msgctxt "Plugin installer section title"
|
293 |
msgid "Changelog"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: classes/freemius/includes/fs-plugin-
|
297 |
msgctxt "Plugin installer section title"
|
298 |
msgid "Reviews"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: classes/freemius/includes/fs-plugin-
|
302 |
msgctxt "Plugin installer section title"
|
303 |
msgid "Other Notes"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: classes/freemius/includes/fs-plugin-
|
307 |
msgid "Plugin Install"
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: classes/freemius/includes/fs-plugin-
|
311 |
msgid "Version:"
|
312 |
msgstr ""
|
313 |
|
314 |
-
#: classes/freemius/includes/fs-plugin-
|
315 |
msgid "Author:"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: classes/freemius/includes/fs-plugin-
|
319 |
msgid "Last Updated:"
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: classes/freemius/includes/fs-plugin-
|
323 |
msgid "Requires WordPress Version:"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: classes/freemius/includes/fs-plugin-
|
327 |
#, php-format
|
328 |
msgid "%s or higher"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: classes/freemius/includes/fs-plugin-
|
332 |
msgid "Compatible up to:"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: classes/freemius/includes/fs-plugin-
|
336 |
msgid "Downloaded:"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: classes/freemius/includes/fs-plugin-
|
340 |
#, php-format
|
341 |
msgid "%s time"
|
342 |
msgid_plural "%s times"
|
343 |
msgstr[0] ""
|
344 |
msgstr[1] ""
|
345 |
|
346 |
-
#: classes/freemius/includes/fs-plugin-
|
347 |
msgid "WordPress.org Plugin Page »"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: classes/freemius/includes/fs-plugin-
|
351 |
msgid "Plugin Homepage »"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: classes/freemius/includes/fs-plugin-
|
355 |
-
#: classes/freemius/includes/fs-plugin-
|
356 |
msgid "Donate to this plugin »"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: classes/freemius/includes/fs-plugin-
|
360 |
msgid "Average Rating"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: classes/freemius/includes/fs-plugin-
|
364 |
#, php-format
|
365 |
msgid "(based on %s rating)"
|
366 |
msgid_plural "(based on %s ratings)"
|
367 |
msgstr[0] ""
|
368 |
msgstr[1] ""
|
369 |
|
370 |
-
#: classes/freemius/includes/fs-plugin-
|
371 |
#, php-format
|
372 |
msgid "Click to see reviews that provided a rating of %d star"
|
373 |
msgid_plural "Click to see reviews that provided a rating of %d stars"
|
374 |
msgstr[0] ""
|
375 |
msgstr[1] ""
|
376 |
|
377 |
-
#: classes/freemius/includes/fs-plugin-
|
378 |
#, php-format
|
379 |
msgid "%d star"
|
380 |
msgid_plural "%d stars"
|
381 |
msgstr[0] ""
|
382 |
msgstr[1] ""
|
383 |
|
384 |
-
#: classes/freemius/includes/fs-plugin-
|
385 |
msgid "Contributors"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: classes/freemius/includes/fs-plugin-
|
389 |
-
#: classes/freemius/includes/fs-plugin-
|
390 |
msgid "Warning:"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: classes/freemius/includes/fs-plugin-
|
394 |
msgid "This plugin has not been tested with your current version of WordPress."
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: classes/freemius/includes/fs-plugin-
|
398 |
msgid ""
|
399 |
"This plugin has not been marked as compatible with your version of WordPress."
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: classes/freemius/includes/fs-plugin-functions.php:392
|
403 |
-
#: classes/freemius/includes/i18n.php:111
|
404 |
-
msgid "Install Now"
|
405 |
-
msgstr ""
|
406 |
-
|
407 |
-
#: classes/freemius/includes/fs-plugin-functions.php:397
|
408 |
-
#: classes/freemius/includes/i18n.php:112
|
409 |
-
msgid "Install Update Now"
|
410 |
-
msgstr ""
|
411 |
-
|
412 |
-
#: classes/freemius/includes/fs-plugin-functions.php:401
|
413 |
-
#, php-format
|
414 |
-
msgid "Newer Version (%s) Installed"
|
415 |
-
msgstr ""
|
416 |
-
|
417 |
-
#: classes/freemius/includes/fs-plugin-functions.php:404
|
418 |
-
msgid "Latest Version Installed"
|
419 |
-
msgstr ""
|
420 |
-
|
421 |
#: classes/freemius/includes/i18n.php:35
|
422 |
msgid "Account"
|
423 |
msgstr ""
|
6 |
#, fuzzy
|
7 |
msgid ""
|
8 |
msgstr ""
|
9 |
+
"Project-Id-Version: aryo-activity-log 2.2.10\n"
|
10 |
"Report-Msgid-Bugs-To: \n"
|
11 |
+
"POT-Creation-Date: 2016-02-16 17:00+0200\n"
|
12 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
65 |
msgstr ""
|
66 |
|
67 |
#: classes/class-aal-activity-log-list-table.php:142
|
68 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:581
|
69 |
#, php-format
|
70 |
msgid "%s ago"
|
71 |
msgstr ""
|
268 |
"conditions:"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:303
|
272 |
+
#: classes/freemius/includes/i18n.php:111
|
273 |
+
msgid "Install Now"
|
274 |
+
msgstr ""
|
275 |
+
|
276 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:309
|
277 |
+
#: classes/freemius/includes/i18n.php:112
|
278 |
+
msgid "Install Update Now"
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:313
|
282 |
+
#, php-format
|
283 |
+
msgid "Newer Version (%s) Installed"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:316
|
287 |
+
msgid "Latest Version Installed"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:406
|
291 |
msgctxt "Plugin installer section title"
|
292 |
msgid "Description"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:407
|
296 |
msgctxt "Plugin installer section title"
|
297 |
msgid "Installation"
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:408
|
301 |
msgctxt "Plugin installer section title"
|
302 |
msgid "FAQ"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:409
|
306 |
msgctxt "Plugin installer section title"
|
307 |
msgid "Screenshots"
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:410
|
311 |
msgctxt "Plugin installer section title"
|
312 |
msgid "Changelog"
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:411
|
316 |
msgctxt "Plugin installer section title"
|
317 |
msgid "Reviews"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:412
|
321 |
msgctxt "Plugin installer section title"
|
322 |
msgid "Other Notes"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:437
|
326 |
msgid "Plugin Install"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:567
|
330 |
msgid "Version:"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:573
|
334 |
msgid "Author:"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:579
|
338 |
msgid "Last Updated:"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:588
|
342 |
msgid "Requires WordPress Version:"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:588
|
346 |
#, php-format
|
347 |
msgid "%s or higher"
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:594
|
351 |
msgid "Compatible up to:"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:601
|
355 |
msgid "Downloaded:"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:601
|
359 |
#, php-format
|
360 |
msgid "%s time"
|
361 |
msgid_plural "%s times"
|
362 |
msgstr[0] ""
|
363 |
msgstr[1] ""
|
364 |
|
365 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:608
|
366 |
msgid "WordPress.org Plugin Page »"
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:615
|
370 |
msgid "Plugin Homepage »"
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:622
|
374 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:679
|
375 |
msgid "Donate to this plugin »"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:628
|
379 |
msgid "Average Rating"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:634
|
383 |
#, php-format
|
384 |
msgid "(based on %s rating)"
|
385 |
msgid_plural "(based on %s ratings)"
|
386 |
msgstr[0] ""
|
387 |
msgstr[1] ""
|
388 |
|
389 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:647
|
390 |
#, php-format
|
391 |
msgid "Click to see reviews that provided a rating of %d star"
|
392 |
msgid_plural "Click to see reviews that provided a rating of %d stars"
|
393 |
msgstr[0] ""
|
394 |
msgstr[1] ""
|
395 |
|
396 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:647
|
397 |
#, php-format
|
398 |
msgid "%d star"
|
399 |
msgid_plural "%d stars"
|
400 |
msgstr[0] ""
|
401 |
msgstr[1] ""
|
402 |
|
403 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:658
|
404 |
msgid "Contributors"
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:686
|
408 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:688
|
409 |
msgid "Warning:"
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:686
|
413 |
msgid "This plugin has not been tested with your current version of WordPress."
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: classes/freemius/includes/fs-plugin-info-dialog.php:688
|
417 |
msgid ""
|
418 |
"This plugin has not been marked as compatible with your version of WordPress."
|
419 |
msgstr ""
|
420 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
#: classes/freemius/includes/i18n.php:35
|
422 |
msgid "Account"
|
423 |
msgstr ""
|
readme.txt
CHANGED
@@ -2,21 +2,27 @@
|
|
2 |
Contributors: pojo.me, KingYes, ariel.k, maor, freemius
|
3 |
Tags: actions, activity, Activity Log, activity logs, admin, admin actions, administration, analytics, audit, audit log, audit logs, bbPress, change, changes, dashboard, email notifications, event, event log, log, logger, Logs, monitor, multi-users, multisite, notifications, security, security audit trail, security event log, stats, stream, tracking, troubleshooting, user activity report, user tracking, woocommerce, woocommerce log, woocommerce monitor, woocommerce monitoring, woocommrece security, wordpress activity log, WordPress Admin, wordpress admin monitoring, wordpress audit, wordpress email alerts, wordpress log, wordpress monitor, wordpress monitoring, wordpress multisite, wordpress security, wordpress security alerts, wordpress security audit log, wordpress security monitor, wordpress security plugin, wordpress user tracking
|
4 |
Requires at least: 3.5
|
5 |
-
Tested up to: 4.4
|
6 |
-
Stable tag: 2.2.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
-
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
If you have tens of users or more, you really can’t know who did it. This plugin tries to solve this issue by tracking what users do on the dashboard of your WordPress site.
|
17 |
|
18 |
-
|
|
|
|
|
19 |
|
|
|
|
|
|
|
|
|
|
|
20 |
* <strong>WordPress</strong> - Core Updates
|
21 |
* <strong>Posts</strong> - Created, Updated, Deleted
|
22 |
* <strong>Pages</strong> - Created, Updated, Deleted
|
@@ -36,9 +42,9 @@ If you have tens of users or more, you really can’t know who did it. This plug
|
|
36 |
* <strong>Export</strong> - User download export file from the site
|
37 |
* <strong>WooCommerce</strong> - Monitor all shop options
|
38 |
* <strong>bbPress</strong> - Forums, Topics, Replies, Taxonomies and other actions
|
39 |
-
*
|
40 |
|
41 |
-
<strong>New!</strong> You are now able to get email notifications once an event you have defined (via rules) has
|
42 |
|
43 |
<h4>What people are saying</h4>
|
44 |
* <em>“Best 10 Free WordPress Plugins of the Month – July 2014: Keeping tabs on what your users do with their access to the Dashboard”</em> - [ManageWp.com](https://managewp.com/best-free-wordpress-plugins-july-2014)
|
@@ -62,14 +68,12 @@ If you have tens of users or more, you really can’t know who did it. This plug
|
|
62 |
* Czech (cs_CZ) - Martin Kokeš
|
63 |
* Finnish (fi) - Nazq
|
64 |
|
65 |
-
The plugin does not require any kind of setup. It works out of the box (and that’s
|
66 |
|
67 |
We’re planning to add a lot more features in the upcoming releases. If you think we’re missing something big time, please post your suggestions in the plugin’s forum.
|
68 |
|
69 |
-
<
|
70 |
-
|
71 |
-
Would you like to like to contribute to Activity Log? You are more than welcome to submit your pull requests on the [GitHub repo](https://github.com/KingYes/wordpress-aryo-activity-log). Also, if you have any notes about the code, please open a ticket on ths issue tracker.
|
72 |
-
|
73 |
|
74 |
== Installation ==
|
75 |
|
@@ -96,6 +100,10 @@ Would you like to like to contribute to Activity Log? You are more than welcome
|
|
96 |
|
97 |
== Changelog ==
|
98 |
|
|
|
|
|
|
|
|
|
99 |
= 2.2.9 =
|
100 |
* Tweak! Update Freemius SDK
|
101 |
|
@@ -278,4 +286,4 @@ Would you like to like to contribute to Activity Log? You are more than welcome
|
|
278 |
* Theme Customizer (Thanks to Ohad Raz)
|
279 |
|
280 |
= 1.0 =
|
281 |
-
* Blastoff!
|
2 |
Contributors: pojo.me, KingYes, ariel.k, maor, freemius
|
3 |
Tags: actions, activity, Activity Log, activity logs, admin, admin actions, administration, analytics, audit, audit log, audit logs, bbPress, change, changes, dashboard, email notifications, event, event log, log, logger, Logs, monitor, multi-users, multisite, notifications, security, security audit trail, security event log, stats, stream, tracking, troubleshooting, user activity report, user tracking, woocommerce, woocommerce log, woocommerce monitor, woocommerce monitoring, woocommrece security, wordpress activity log, WordPress Admin, wordpress admin monitoring, wordpress audit, wordpress email alerts, wordpress log, wordpress monitor, wordpress monitoring, wordpress multisite, wordpress security, wordpress security alerts, wordpress security audit log, wordpress security monitor, wordpress security plugin, wordpress user tracking
|
4 |
Requires at least: 3.5
|
5 |
+
Tested up to: 4.4.2
|
6 |
+
Stable tag: 2.2.10
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
+
The #1 Activity Log plugin helps you monitor & log all changes and activities on your site, so you can run a safer, more organized WordPress site.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
A COMPLETE, EASY TO USE, STABLE AND WELL SUPPORTED WORDPRESS ACTIVITY LOG PLUGIN
|
14 |
|
15 |
+
Want to monitor and track your site activity? Find out exactly who does what on your WordPress website. the Activity Log plugin is like an airplane's black box that logs every activity in WordPress, and lets you see exactly what people are doing on your site.
|
|
|
16 |
|
17 |
+
* Like, if someone is trying to hack your site.
|
18 |
+
* Or, when a post was published, and who published it.
|
19 |
+
* Or, if a plugin was activated/deactivated.
|
20 |
|
21 |
+
Useful, right? Trust us, you won't understand how you managed your website without it. The plugin is also lightning fast and works behind the scenes, so it doesn't affect site and admin performance (For optimal performance, we built the plugin so it runs on a separate table in the database).
|
22 |
+
|
23 |
+
If you have tens of users or more, you really can’t know who did what. This plugin tries to solve this issue by tracking what users do, and displaying it in an easy to use and easy to filter view on the dashboard of your WordPress site.
|
24 |
+
|
25 |
+
<h4>With the Activity Log you can log:</h4>
|
26 |
* <strong>WordPress</strong> - Core Updates
|
27 |
* <strong>Posts</strong> - Created, Updated, Deleted
|
28 |
* <strong>Pages</strong> - Created, Updated, Deleted
|
42 |
* <strong>Export</strong> - User download export file from the site
|
43 |
* <strong>WooCommerce</strong> - Monitor all shop options
|
44 |
* <strong>bbPress</strong> - Forums, Topics, Replies, Taxonomies and other actions
|
45 |
+
* There's more, but you get the point...
|
46 |
|
47 |
+
<strong>New!</strong> You are now able to get email notifications once an event you have defined (via rules) has occurred. This is useful in cases you must know right away when someone does something on your site. We use it to thwart hacker attempts, for example.
|
48 |
|
49 |
<h4>What people are saying</h4>
|
50 |
* <em>“Best 10 Free WordPress Plugins of the Month – July 2014: Keeping tabs on what your users do with their access to the Dashboard”</em> - [ManageWp.com](https://managewp.com/best-free-wordpress-plugins-july-2014)
|
68 |
* Czech (cs_CZ) - Martin Kokeš
|
69 |
* Finnish (fi) - Nazq
|
70 |
|
71 |
+
The plugin does not require any kind of setup. It works out of the box (and that’s another reason people love it).
|
72 |
|
73 |
We’re planning to add a lot more features in the upcoming releases. If you think we’re missing something big time, please post your suggestions in the plugin’s forum.
|
74 |
|
75 |
+
<h4>Contributions:</h4>
|
76 |
+
Would you like to like to contribute to Activity Log? You are more than welcome to submit your pull requests on the [GitHub repo](https://github.com/KingYes/wordpress-aryo-activity-log). Also, if you have any notes about the code, please open a ticket on the issue tracker.
|
|
|
|
|
77 |
|
78 |
== Installation ==
|
79 |
|
100 |
|
101 |
== Changelog ==
|
102 |
|
103 |
+
= 2.2.10 =
|
104 |
+
* Tweak! Update Freemius SDK
|
105 |
+
* Tested up to WordPress v4.4.2
|
106 |
+
|
107 |
= 2.2.9 =
|
108 |
* Tweak! Update Freemius SDK
|
109 |
|
286 |
* Theme Customizer (Thanks to Ohad Raz)
|
287 |
|
288 |
= 1.0 =
|
289 |
+
* Blastoff!
|