230500
7358
backup/wp/wp-content/plugins/popularfx-templates/freemium.php
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 827 B |
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="32px" height="32px" viewBox="0 0 128 128" xml:space="preserve"><g><linearGradient id="linear-gradient"><stop offset="0%" stop-color="#ffffff" fill-opacity="0"/><stop offset="100%" stop-color="#00557d" fill-opacity="1"/></linearGradient><path d="M63.85 0A63.85 63.85 0 1 1 0 63.85 63.85 63.85 0 0 1 63.85 0zm.65 19.5a44 44 0 1 1-44 44 44 44 0 0 1 44-44z" fill="url(#linear-gradient)" fill-rule="evenodd"/><animateTransform attributeName="transform" type="rotate" from="0 64 64" to="360 64 64" dur="1320ms" repeatCount="indefinite"></animateTransform></g></svg>
|
||||
|
After Width: | Height: | Size: 756 B |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
@@ -0,0 +1 @@
|
||||
<?php //prevent directory listing
|
||||
377
backup/wp/wp-content/plugins/popularfx-templates/license.php
Normal file
@@ -0,0 +1,377 @@
|
||||
<?php
|
||||
|
||||
if(!function_exists('popularfx_license')){
|
||||
|
||||
global $popularfx;
|
||||
$popularfx['t'] = wp_get_theme();
|
||||
|
||||
// Setup import
|
||||
function pfx_redownload_template_fix(){
|
||||
|
||||
global $popularfx, $pl_error;
|
||||
|
||||
$slug = get_theme_mod('popularfx_template');
|
||||
|
||||
// We dont have to setup anything
|
||||
if(empty($slug)){
|
||||
return;
|
||||
}
|
||||
|
||||
$dest = pfx_templates_dir().'/'.$slug;
|
||||
|
||||
// Download
|
||||
include_once(dirname(__FILE__).'/templates.php');
|
||||
popularfx_download_template($slug);
|
||||
|
||||
if(file_exists($dest.'/style.css')){
|
||||
pfx_fix_image_urls_108();
|
||||
}else{
|
||||
$pl_error['redownload_error'] = __('There was an error downloading the theme', 'popularfx');
|
||||
return false;
|
||||
}
|
||||
|
||||
$GLOBALS['pl_redownload'] = true;
|
||||
|
||||
}
|
||||
|
||||
// The PopularFX Settings Header
|
||||
function popularfx_page_header($title = 'PopularFX License'){
|
||||
|
||||
$promos = apply_filters('popularfx_review_link', false);
|
||||
|
||||
echo '<div style="margin: 0px;">
|
||||
<div class="metabox-holder">
|
||||
<div class="postbox-container">
|
||||
<div class="wrap" style="margin-top:0px;">
|
||||
<h1 style="padding:0px"><!--This is to fix promo--></h1>
|
||||
<table cellpadding="2" cellspacing="1" width="100%" class="fixed" border="0">
|
||||
<tr>
|
||||
<td valign="top"><h1>'.$title.'</h1></td>
|
||||
'.($promos ? '<td align="right"><a target="_blank" class="button button-primary" href="https://wordpress.org/support/view/plugin-reviews/pagelayer">Review Pagelayer</a></td>' : '').'
|
||||
<td align="right" width="40"><a target="_blank" href="https://twitter.com/PopularFXthemes"><img src="'.PFX_URL.'/images/twitter.png" /></a></td>
|
||||
<td align="right" width="40"><a target="_blank" href="https://facebook.com/PopularFX"><img src="'.PFX_URL.'/images/facebook.png" /></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr />
|
||||
|
||||
<!--Main Table-->
|
||||
<table cellpadding="8" cellspacing="1" width="100%" class="fixed">
|
||||
<tr>
|
||||
<td valign="top">';
|
||||
|
||||
}
|
||||
|
||||
// The Pagelayer Settings footer
|
||||
function popularfx_page_footer(){
|
||||
|
||||
global $popularfx;
|
||||
|
||||
echo '
|
||||
</td>';
|
||||
|
||||
$promos = apply_filters('pagelayer_right_bar_promos', true);
|
||||
|
||||
if($promos){
|
||||
|
||||
echo '
|
||||
<td width="200" valign="top" id="pagelayer-right-bar">';
|
||||
|
||||
echo '
|
||||
<div class="postbox" style="min-width:0px !important;">
|
||||
<h2 class="hndle ui-sortable-handle">
|
||||
<span><a target="_blank" href="'.PAGELAYER_PRO_URL.'"><img src="'.PFX_URL.'/images/pagelayer_product.png" width="100%" /></a></span>
|
||||
</h2>
|
||||
<div class="inside">
|
||||
<i>The best WordPress page builder </i>:<br>
|
||||
<ul class="pagelayer-right-ul">
|
||||
<li>30+ Free Widgets</li>
|
||||
<li>60+ Premium Widgets</li>
|
||||
<li>400+ Premium Sections</li>
|
||||
<li>Theme Builder</li>
|
||||
<li>WooCommerce Builder</li>
|
||||
<li>Theme Creator and Exporter</li>
|
||||
<li>Form Builder</li>
|
||||
<li>Popup Builder</li>
|
||||
<li>And many more ...</li>
|
||||
</ul>
|
||||
<center><a class="button button-primary" target="_blank" href="'.PAGELAYER_PRO_URL.'">Upgrade</a></center>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo '
|
||||
<div class="postbox" style="min-width:0px !important;">
|
||||
<h2 class="hndle ui-sortable-handle">
|
||||
<span><a target="_blank" href="https://loginizer.com/?from=pfx-theme"><img src="'.PFX_URL.'/images/loginizer-product.png" width="100%" /></a></span>
|
||||
</h2>
|
||||
<div class="inside">
|
||||
<i>Secure your website with the following features </i>:<br>
|
||||
<ul class="lz-right-ul">
|
||||
<li>PasswordLess Login</li>
|
||||
<li>Two Factor Auth - Email</li>
|
||||
<li>Two Factor Auth - App</li>
|
||||
<li>Login Challenge Question</li>
|
||||
<li>reCAPTCHA</li>
|
||||
<li>Rename Login Page</li>
|
||||
<li>Disable XML-RPC</li>
|
||||
<li>And many more ...</li>
|
||||
</ul>
|
||||
<center><a class="button button-primary" href="https://loginizer.com/pricing">Upgrade</a></center>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo '
|
||||
<div class="postbox" style="min-width:0px !important;">
|
||||
<h2 class="hndle ui-sortable-handle">
|
||||
<span><a target="_blank" href="https://wpcentral.co/?from=pfx-theme"><img src="'.PFX_URL.'/images/wpcentral_product.png" width="100%" /></a></span>
|
||||
</h2>
|
||||
<div class="inside">
|
||||
<i>Manage all your WordPress sites from <b>1 dashboard</b> </i>:<br>
|
||||
<ul class="pagelayer-right-ul">
|
||||
<li>1-click Admin Access</li>
|
||||
<li>Update WordPress</li>
|
||||
<li>Update Themes</li>
|
||||
<li>Update Plugins</li>
|
||||
<li>Backup your WordPress Site</li>
|
||||
<li>Plugins & Theme Management</li>
|
||||
<li>Post Management</li>
|
||||
<li>And many more ...</li>
|
||||
</ul>
|
||||
<center><a class="button button-primary" target="_blank" href="https://wpcentral.co/?from=pfx-template">Visit wpCentral</a></center>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</tr>
|
||||
</table>
|
||||
<br />';
|
||||
|
||||
if(empty($GLOBALS['sitepad'])){
|
||||
|
||||
echo '<div style="width:45%;background:#FFF;padding:15px; margin:auto">
|
||||
<b>Let your followers know that you use PopularFX to build your website :</b>
|
||||
<form method="get" action="https://twitter.com/intent/tweet" id="tweet" onsubmit="return dotweet(this);">
|
||||
<textarea name="text" cols="45" row="3" style="resize:none;">I easily built my #WordPress #site using @PopularFXthemes</textarea>
|
||||
<input type="submit" value="Tweet!" class="button button-primary" onsubmit="return false;" id="twitter-btn" style="margin-top:20px;"/>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<script>
|
||||
function dotweet(ele){
|
||||
window.open(jQuery("#"+ele.id).attr("action")+"?"+jQuery("#"+ele.id).serialize(), "_blank", "scrollbars=no, menubar=no, height=400, width=500, resizable=yes, toolbar=no, status=no");
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<hr />
|
||||
<a href="'.$popularfx['www_url'].'" target="_blank">'.$popularfx['t']->get('Name').'</a> v'.$popularfx['t']->get('Version').' You can report any bugs <a href="'.$popularfx['support_url'].'" target="_blank">here</a>.';
|
||||
|
||||
}
|
||||
|
||||
echo '
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
}
|
||||
|
||||
// The License Page
|
||||
function popularfx_license(){
|
||||
|
||||
global $popularfx, $pl_error;
|
||||
|
||||
// 108 fixer option
|
||||
if(isset($_REQUEST['redownload'])){
|
||||
pfx_redownload_template_fix();
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['save_pfx_license'])){
|
||||
check_admin_referer('popularfx-options');
|
||||
}
|
||||
|
||||
// Is there a license key ?
|
||||
if(isset($_POST['save_pfx_license'])){
|
||||
|
||||
$license = pfx_optpost('popularfx_license');
|
||||
|
||||
// Check if its a valid license
|
||||
if(empty($license)){
|
||||
$pl_error['lic_invalid'] = __('The license key was not submitted', 'popularfx');
|
||||
return popularfx_license_T();
|
||||
}
|
||||
|
||||
$resp = wp_remote_get(pfx_api_url().'license.php?license='.$license, array('timeout' => 30));
|
||||
|
||||
if(is_array($resp)){
|
||||
$json = json_decode($resp['body'], true);
|
||||
//print_r($json);
|
||||
}else{
|
||||
|
||||
$pl_error['resp_invalid'] = __('The response was malformed<br>', 'popularfx').var_export($resp, true);
|
||||
return popularfx_license_T();
|
||||
|
||||
}
|
||||
|
||||
// Save the License
|
||||
if(empty($json['license'])){
|
||||
|
||||
$pl_error['lic_invalid'] = __('The license key is invalid', 'popularfx');
|
||||
return popularfx_license_T();
|
||||
|
||||
}else{
|
||||
|
||||
$json['last_update'] = time();
|
||||
update_option('popularfx_license', $json);
|
||||
|
||||
// Load license
|
||||
pfx_load_license();
|
||||
|
||||
// Mark as saved
|
||||
$GLOBALS['pl_saved'] = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
popularfx_license_T();
|
||||
|
||||
}
|
||||
|
||||
// The License Page - THEME
|
||||
function popularfx_license_T(){
|
||||
|
||||
global $popularfx, $pagelayer, $pl_error;
|
||||
|
||||
popularfx_page_header('PopularFX License');
|
||||
|
||||
// Saved ?
|
||||
if(!empty($GLOBALS['pl_saved'])){
|
||||
echo '<div class="notice notice-success"><p>'. __('The settings were saved successfully', 'popularfx'). '</p></div><br />';
|
||||
}
|
||||
|
||||
// Saved ?
|
||||
if(!empty($GLOBALS['pl_redownload'])){
|
||||
echo '<div class="notice notice-success"><p>'. __('The template was redownloaded successfully', 'popularfx'). '</p></div><br />';
|
||||
}
|
||||
|
||||
// If the license is active and you are the free version, then suggest to install the pro
|
||||
if(!empty($popularfx['license']['status']) && !defined('PAGELAYER_PREMIUM') && empty($_REQUEST['install_pro'])){
|
||||
echo '<div class="updated"><p>'. __('You have activated the license, but are using the Free version ! <a href="'.admin_url('admin.php?page=pagelayer_license&install_pro=1').'" class="button button-primary">Install Pagelayer Pro Now</a>', 'pagelayer'). '</p></div><br />';
|
||||
}
|
||||
|
||||
// Any errors ?
|
||||
if(!empty($pl_error)){
|
||||
pagelayer_report_error($pl_error);echo '<br />';
|
||||
}
|
||||
|
||||
$slug = get_theme_mod('popularfx_template');
|
||||
|
||||
?>
|
||||
|
||||
<div class="postbox">
|
||||
<h2 class="hndle ui-sortable-handle">
|
||||
<span><?php echo __('System Information', 'popularfx'); ?></span>
|
||||
</h2>
|
||||
|
||||
<div class="inside">
|
||||
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
<?php wp_nonce_field('popularfx-options'); ?>
|
||||
<table class="wp-list-table fixed striped users" cellspacing="1" border="0" width="95%" cellpadding="10" align="center">
|
||||
<?php
|
||||
echo '
|
||||
<tr>
|
||||
<th align="left" width="25%">'.__('Theme Name', 'popularfx').'</th>
|
||||
<td>'.$popularfx['t']->get('Name').'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="left" width="25%">'.__('Theme Version', 'popularfx').'</th>
|
||||
<td>'.$popularfx['t']->get('Version').'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="left" width="25%">'.__('PopularFX Plugin Version', 'popularfx').'</th>
|
||||
<td>'.PFX_VERSION.'</td>
|
||||
</tr>';
|
||||
|
||||
if(is_super_admin()){
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<th align="left" valign="top">'.__('PopularFX License', 'popularfx').'</th>
|
||||
<td align="left">
|
||||
'.(empty($popularfx['license']) ? '<span style="color:red">Free Version</span> ' : '').'
|
||||
<input type="text" name="popularfx_license" value="'.(empty($popularfx['license']) ? '' : $popularfx['license']['license']).'" size="30" placeholder="e.g. PFX-11111-22222-33333-44444" style="width:300px;" />
|
||||
<input name="save_pfx_license" class="button button-primary" value="Update License" type="submit" />';
|
||||
|
||||
if(!empty($popularfx['license'])){
|
||||
|
||||
$expires = $popularfx['license']['expires'];
|
||||
$expires = substr($expires, 0, 4).'/'.substr($expires, 4, 2).'/'.substr($expires, 6);
|
||||
|
||||
echo '<div style="margin-top:10px;">License Status : '.(empty($popularfx['license']['status_txt']) ? 'N.A.' : $popularfx['license']['status_txt']).'
|
||||
License Expires : '.($popularfx['license']['expires'] <= date('Ymd') ? '<span style="color:red">'.$expires.'</span>' : $expires).'
|
||||
</div>';
|
||||
}else{
|
||||
echo '<div style="margin-top:10px;">You are currently using the free version. If you have a Pro License, please enter it here to unlock the Pro features. You can buy a Pro license from our <a href="'.PFX_PRO_URL.'">website</a>.</div>';
|
||||
}
|
||||
|
||||
echo
|
||||
'</td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
|
||||
echo '<tr>
|
||||
<th align="left" width="25%">'.__('Pagelayer Version', 'popularfx').'</th>
|
||||
<td>'.PAGELAYER_VERSION.(defined('PAGELAYER_PREMIUM') ? ' (PRO Version)' : '').'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th align="left" width="25%">'.__('Current Template', 'popularfx').'</th>
|
||||
<td>'.(empty($slug) ? 'N.A.' : ucfirst($slug).' <a class="button primary-button" href="'.admin_url('admin.php?page=popularfx&redownload=1').'">Re-Download Template</a>').'</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th align="left">'.__('URL', 'popularfx').'</th>
|
||||
<td>'.home_url().'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="left">'.__('Path', 'popularfx').'</th>
|
||||
<td>'.ABSPATH.'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="left">'.__('Server\'s IP Address', 'popularfx').'</th>
|
||||
<td>'.$_SERVER['SERVER_ADDR'].'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="left">'.__('wp-config.php is writable', 'popularfx').'</th>
|
||||
<td>'.(is_writable(ABSPATH.'/wp-config.php') ? '<span style="color:red">Yes</span>' : '<span style="color:green">No</span>').'</td>
|
||||
</tr>';
|
||||
|
||||
if(file_exists(ABSPATH.'/.htaccess')){
|
||||
echo '
|
||||
<tr>
|
||||
<th align="left">'.__('.htaccess is writable', 'popularfx').'</th>
|
||||
<td>'.(is_writable(ABSPATH.'/.htaccess') ? '<span style="color:red">Yes</span>' : '<span style="color:green">No</span>').'</td>
|
||||
</tr>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
popularfx_page_footer();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
502
backup/wp/wp-content/plugins/popularfx-templates/license.txt
Normal file
@@ -0,0 +1,502 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
@@ -0,0 +1,745 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: PopularFX Website Templates
|
||||
Plugin URI: https://popularfx.com/
|
||||
Description: PopularFX is a lightweight theme with 500+ templates to make beautiful websites with Pagelayer. PopularFX can be used for a blogging site, WooCommerce Store, Business website, personal portfolio, etc.
|
||||
Version: 1.2.4
|
||||
Author: Pagelayer Team
|
||||
Author URI: https://pagelayer.com/
|
||||
Text Domain: popularfx
|
||||
*/
|
||||
|
||||
// We need the ABSPATH
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
if(!function_exists('add_action')){
|
||||
echo 'You are not allowed to access this page directly.';
|
||||
exit;
|
||||
}
|
||||
|
||||
define('PFX_FILE', __FILE__);
|
||||
define('PFX_BASE', plugin_basename(PFX_FILE));
|
||||
define('PFX_PRO_BASE', 'popularfx-templates/popularfx-templates.php');
|
||||
define('PFX_VERSION', '1.2.4');
|
||||
define('PFX_DIR', dirname(PFX_FILE));
|
||||
define('PFX_SLUG', 'popularfx-templates');
|
||||
define('PFX_URL', plugins_url('', PFX_FILE));
|
||||
define('PFX_CSS', PFX_URL.'/css');
|
||||
define('PFX_JS', PFX_URL.'/js');
|
||||
define('PFX_PRO_URL', 'https://popularfx.com/pricing?from=pfx-plugin');
|
||||
define('PFX_WWW_URL', 'https://popularfx.com/');
|
||||
define('PFX_DOCS', 'https://popularfx.com/docs/');
|
||||
define('PFX_API', 'https://a.softaculous.com/popularfx/');
|
||||
define('PFX_PAGELAYER_API', 'https://api.pagelayer.com/');
|
||||
|
||||
// Ok so we are now ready to go
|
||||
register_activation_hook(PFX_FILE, 'pfx_activation');
|
||||
|
||||
// Is called when the ADMIN enables the plugin
|
||||
function pfx_activation(){
|
||||
|
||||
global $wpdb;
|
||||
|
||||
$sql = array();
|
||||
|
||||
add_option('popularfx_version', PFX_VERSION);
|
||||
|
||||
}
|
||||
|
||||
// Checks if we are to update ?
|
||||
function pfx_update_check(){
|
||||
|
||||
global $wpdb;
|
||||
|
||||
$sql = array();
|
||||
$current_version = get_option('popularfx_version');
|
||||
$version = (int) str_replace('.', '', $current_version);
|
||||
|
||||
// No update required
|
||||
if($current_version == PFX_VERSION){
|
||||
return true;
|
||||
}
|
||||
|
||||
// Is it first run ?
|
||||
if(empty($current_version)){
|
||||
|
||||
// Reinstall
|
||||
pfx_activation();
|
||||
|
||||
// Trick the following if conditions to not run
|
||||
$version = (int) str_replace('.', '', PFX_VERSION);
|
||||
|
||||
}
|
||||
|
||||
// Save the new Version
|
||||
update_option('popularfx_version', PFX_VERSION);
|
||||
|
||||
// Bug fix prior to 108 - We can only attempt this once
|
||||
if($version <= 108 && get_option('template') == 'popularfx'){
|
||||
|
||||
$template = get_theme_mod('popularfx_template');
|
||||
$template_dir = get_template_directory().'/templates/'.$template;
|
||||
$style = $template_dir.'/style.css';
|
||||
$dest = pfx_templates_dir().'/'.$template;
|
||||
|
||||
if(!empty($template) && file_exists($style)){
|
||||
|
||||
if(!function_exists( 'download_url' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/file.php';
|
||||
}
|
||||
|
||||
define('FS_METHOD', 'direct');
|
||||
WP_Filesystem();
|
||||
|
||||
// Create the dir if missing
|
||||
wp_mkdir_p($dest);
|
||||
|
||||
// Just copy the dir
|
||||
copy_dir($template_dir, $dest);
|
||||
|
||||
if(file_exists($dest.'/style.css')){
|
||||
pfx_fix_image_urls_108();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Add the action to load the plugin
|
||||
add_action('plugins_loaded', 'pfx_load_plugin');
|
||||
|
||||
// The function that will be called when the plugin is loaded
|
||||
function pfx_load_plugin(){
|
||||
|
||||
global $pagelayer, $popularfx;
|
||||
|
||||
// Check if the installed version is outdated
|
||||
pfx_update_check();
|
||||
|
||||
// Load license
|
||||
pfx_load_license();
|
||||
|
||||
// Load the language
|
||||
load_plugin_textdomain('popularfx', false, PFX_SLUG.'/languages/');
|
||||
|
||||
// Check for updates
|
||||
include_once(PFX_DIR.'/plugin-update-checker.php');
|
||||
$popularfx_updater = PopularFX_PucFactory::buildUpdateChecker(PFX_API.'update2.php?version='.PFX_VERSION, PFX_FILE);
|
||||
|
||||
// Add the license key to query arguments
|
||||
$popularfx_updater->addQueryArgFilter('pfx_updater_filter_args');
|
||||
|
||||
// Show the text to install the license key
|
||||
add_filter('puc_manual_final_check_link-pagelayer-pro', 'pfx_updater_check_link', 10, 1);
|
||||
|
||||
// Template Installation related ajax calls
|
||||
add_action('wp_ajax_popularfx_template_info', 'pfx_templates_ajax');
|
||||
add_action('wp_ajax_popularfx_start_install_template', 'pfx_templates_ajax');
|
||||
add_action('wp_ajax_popularfx_download_template', 'pfx_templates_ajax');
|
||||
add_action('wp_ajax_popularfx_import_template', 'pfx_templates_ajax');
|
||||
|
||||
// Load the freemium widgets
|
||||
if(!defined('PAGELAYER_PREMIUM')){
|
||||
add_action('pagelayer_load_custom_widgets', 'pfx_freemium_shortcodes');
|
||||
}
|
||||
|
||||
// Are we to setup a template ?
|
||||
$slug = get_option('popularfx_setup_template');
|
||||
if(!empty($slug)){
|
||||
add_action('after_setup_theme', 'pfx_setup_template_import');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Setup import
|
||||
function pfx_setup_template_import(){
|
||||
|
||||
$slug = get_option('popularfx_setup_template');
|
||||
|
||||
// We dont have to setup anything
|
||||
if(empty($slug)){
|
||||
return;
|
||||
}
|
||||
|
||||
// Setup the theme credit
|
||||
update_option('pagelayer-copyright', pagelayer_get_option('pagelayer-copyright').' | '.popularfx_copyright());
|
||||
|
||||
// Set that we have setup
|
||||
delete_option('popularfx_setup_template');
|
||||
|
||||
include_once(dirname(__FILE__).'/templates.php');
|
||||
|
||||
$_POST['delete_old_import'] = 1;
|
||||
$_POST['set_home_page'] = 1;
|
||||
$data = popularfx_import_template($slug);
|
||||
if(!empty($_GET['install-pfx-template'])){
|
||||
popularfx_ajax_output($data);
|
||||
}else{
|
||||
wp_redirect(home_url());
|
||||
}
|
||||
exit();
|
||||
}
|
||||
|
||||
// Load the freemium widgets
|
||||
function pfx_freemium_shortcodes(){
|
||||
|
||||
if(defined('PAGELAYER_PREMIUM')){
|
||||
return;
|
||||
}
|
||||
|
||||
include_once(dirname(__FILE__).'/freemium_functions.php');
|
||||
include_once(dirname(__FILE__).'/freemium.php');
|
||||
}
|
||||
|
||||
// Add our license key if ANY
|
||||
function pfx_updater_filter_args($queryArgs) {
|
||||
|
||||
global $popularfx;
|
||||
|
||||
if ( !empty($popularfx['license']['license']) ) {
|
||||
$queryArgs['license'] = $popularfx['license']['license'];
|
||||
}
|
||||
|
||||
return $queryArgs;
|
||||
}
|
||||
|
||||
// Handle the Check for update link and ask to install license key
|
||||
function pfx_updater_check_link($final_link){
|
||||
|
||||
global $popularfx;
|
||||
|
||||
if(empty($popularfx['license']['license'])){
|
||||
return '<a href="'.admin_url('admin.php?page=popularfx').'">Install PopularFX Pro License Key</a>';
|
||||
}
|
||||
|
||||
return $final_link;
|
||||
}
|
||||
|
||||
// This adds the left menu in WordPress Admin page
|
||||
add_action('admin_menu', 'pfx_admin_menu', 5);
|
||||
function pfx_admin_menu() {
|
||||
|
||||
$capability = 'edit_theme_options';// TODO : Capability for accessing this page
|
||||
|
||||
// Add the menu page
|
||||
add_menu_page(__('PopularFX'), __('PopularFX'), $capability, 'popularfx', 'pfx_page_handler', PFX_URL.'/images/popularfx-logo-menu.png');
|
||||
|
||||
// Options Page
|
||||
add_submenu_page('popularfx', __('PopularFX'), __('Options'), $capability, 'popularfx', 'pfx_page_handler');
|
||||
|
||||
// PopularFX Templates
|
||||
add_submenu_page('popularfx', __('Website Templates'), __('Website Templates'), $capability, 'popularfx_templates', 'pfx_page_templates');
|
||||
|
||||
// Manually Import Template
|
||||
//add_submenu_page('popularfx', __('Manual Import'), __('Manual Import'), $capability, 'popularfx_manual_import', 'pfx_manual_import');
|
||||
|
||||
if(!function_exists('pagelayer_theme_import_notices')){
|
||||
add_submenu_page('popularfx', 'Install Pagelayer', 'Install Pagelayer', 'install_plugins', 'popularfx_install_pagelayer', 'pfx_install_pagelayer');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function pfx_install_pagelayer(){
|
||||
|
||||
global $pagelayer;
|
||||
|
||||
if(!empty($_GET['license'])){
|
||||
return pfx_install_pagelayer_pro();
|
||||
}
|
||||
|
||||
// Include the necessary stuff
|
||||
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
|
||||
|
||||
// Includes necessary for Plugin_Upgrader and Plugin_Installer_Skin
|
||||
include_once( ABSPATH . 'wp-admin/includes/file.php' );
|
||||
include_once( ABSPATH . 'wp-admin/includes/misc.php' );
|
||||
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
||||
|
||||
// Filter to prevent the activate text
|
||||
add_filter('install_plugin_complete_actions', 'pfx_install_pagelayer_complete_actions', 10, 3);
|
||||
|
||||
echo '<h2>Install Pagelayer Free Version</h2>';
|
||||
|
||||
$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( ) );
|
||||
$installed = $upgrader->install('https://downloads.wordpress.org/plugin/pagelayer.zip');
|
||||
|
||||
if(is_wp_error( $installed ) || empty($installed)){
|
||||
return $installed;
|
||||
}
|
||||
|
||||
if ( !is_wp_error( $installed ) && $installed ) {
|
||||
echo 'Activating Pagelayer Plugin !';
|
||||
$installed = activate_plugin('pagelayer/pagelayer.php');
|
||||
|
||||
if ( is_null($installed)) {
|
||||
$installed = true;
|
||||
echo '<div id="message" class="updated"><p>'. sprintf(__('Done! Pagelayer is now installed and activated. Please click <a href="%s">here</a> to import your themes content', 'popularfx'), admin_url('admin.php?page=pagelayer_import')). '</p></div><br />';
|
||||
echo '<br><br><b>Done! Pagelayer is now installed and activated.</b>';
|
||||
}
|
||||
}
|
||||
|
||||
return $installed;
|
||||
|
||||
}
|
||||
|
||||
// Install Pagelayer Pro
|
||||
function pfx_install_pagelayer_pro($license = ''){
|
||||
|
||||
global $pagelayer;
|
||||
|
||||
$license = empty($license) ? $_GET['license'] : $license;
|
||||
|
||||
// Include the necessary stuff
|
||||
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
|
||||
|
||||
// Includes necessary for Plugin_Upgrader and Plugin_Installer_Skin
|
||||
include_once( ABSPATH . 'wp-admin/includes/file.php' );
|
||||
include_once( ABSPATH . 'wp-admin/includes/misc.php' );
|
||||
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
||||
|
||||
// Filter to prevent the activate text
|
||||
add_filter('install_plugin_complete_actions', 'pfx_install_pagelayer_complete_actions', 10, 3);
|
||||
|
||||
echo '<h2>Install Pagelayer Pro</h2>';
|
||||
|
||||
$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( ) );
|
||||
$installed = $upgrader->install(PFX_PAGELAYER_API.'download.php?version=latest&license='.$license);
|
||||
|
||||
if(is_wp_error( $installed ) || empty($installed)){
|
||||
return $installed;
|
||||
}
|
||||
|
||||
if ( !is_wp_error( $installed ) && $installed ) {
|
||||
echo 'Activating Pagelayer Pro !';
|
||||
$installed = activate_plugin('pagelayer-pro/pagelayer-pro.php');
|
||||
|
||||
if ( is_null($installed)) {
|
||||
$installed = true;
|
||||
echo '<div id="message" class="updated"><p>'. sprintf(__('Done! Pagelayer Pro is now installed and activated. Please click <a href="%s">here</a> to import your themes content', 'popularfx'), admin_url('admin.php?page=pagelayer_import')). '</p></div><br />';
|
||||
echo '<br><br><b>Done! Pagelayer Pro is now installed and activated.</b>';
|
||||
}
|
||||
}
|
||||
|
||||
return $installed;
|
||||
|
||||
}
|
||||
|
||||
// Prevent pro activate text for installer
|
||||
function pfx_install_pagelayer_complete_actions($install_actions, $api, $plugin_file){
|
||||
|
||||
if($plugin_file == 'pagelayer-pro/pagelayer-pro.php'){
|
||||
return array();
|
||||
}
|
||||
|
||||
if($plugin_file == 'pagelayer/pagelayer.php'){
|
||||
return array();
|
||||
}
|
||||
|
||||
return $install_actions;
|
||||
}
|
||||
|
||||
// Show the message to install pagelayer Pro
|
||||
function pfx_pagelayer_required(){
|
||||
|
||||
if($_REQUEST['page'] == 'popularfx_install_pagelayer'){
|
||||
return;
|
||||
}
|
||||
|
||||
echo '
|
||||
<div class="notice notice-warning">
|
||||
<p style="font-size:13px">You need the <a href="'.PFX_WWW_URL.'" target="_blank"><b>Pagelayer Editor</b></a> to run this theme and also import its content ! Please enter your PopularFX / Pagelayer Pro License key and click on <b>Install</b></p>
|
||||
<p style="font-size:13px">
|
||||
<input type="text" id="pfx_license_key" placeholder="PFX-XXXXX-XXXXX-XXXXX-XXXXX" size="40" /> <button class="button button-primary" onclick="popularfx_install_pagelayer()">Install</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function pfx_install_pagelayer(){
|
||||
var url = "'.admin_url('admin.php?page=popularfx_install_pagelayer&license=').'"+jQuery("#pfx_license_key").val();
|
||||
window.location = url;
|
||||
}
|
||||
</script>';
|
||||
|
||||
}
|
||||
|
||||
function pfx_page_templates() {
|
||||
|
||||
include_once(dirname(__FILE__).'/templates.php');
|
||||
|
||||
popularfx_templates();
|
||||
|
||||
}
|
||||
|
||||
function pfx_templates_ajax() {
|
||||
|
||||
include_once(dirname(__FILE__).'/templates.php');
|
||||
|
||||
if($_GET['action'] == 'popularfx_template_info'){
|
||||
popularfx_ajax_template_info();
|
||||
}
|
||||
|
||||
if($_GET['action'] == 'popularfx_start_install_template'){
|
||||
popularfx_ajax_start_install_template();
|
||||
}
|
||||
|
||||
if($_GET['action'] == 'popularfx_download_template'){
|
||||
popularfx_ajax_download_template();
|
||||
}
|
||||
|
||||
if($_GET['action'] == 'popularfx_import_template'){
|
||||
popularfx_ajax_import_template();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function pfx_page_handler() {
|
||||
|
||||
include_once(dirname(__FILE__).'/license.php');
|
||||
|
||||
popularfx_license();
|
||||
|
||||
}
|
||||
|
||||
// Default Templates for Blog
|
||||
function pfx_create_blog_template($template_name){
|
||||
|
||||
global $pagelayer;
|
||||
|
||||
$file = pfx_cleanpath(get_theme_root());
|
||||
|
||||
// Do we have the blog template ?
|
||||
if(file_exists($file.'/blog-template.pgl')){
|
||||
return;
|
||||
}
|
||||
|
||||
$data['blog-template'] = '[pl_row pagelayer-id="ffbgB5e4xPIruUJC" stretch="auto" col_gap="10" width_content="auto" row_height="default" overlay_hover_delay="400" row_shape_top_color="#227bc3" row_shape_top_width="100" row_shape_top_height="100" row_shape_bottom_color="#e44993" row_shape_bottom_width="100" row_shape_bottom_height="100"]
|
||||
[pl_col pagelayer-id="aF6cze85x0CVnb4I" overlay_hover_delay="400"]
|
||||
[pl_archive_title pagelayer-id="a6sL2H8c5FJDwHmL" align="left" typo=",,,,,,Solid,,,," ele_margin="0px,0px,18px,0px" font_size="28"]
|
||||
[/pl_archive_title]
|
||||
[pl_archive_posts pagelayer-id="CrFuxlpqwrKx1cok" type="default" columns="3" columns_mobile="1" col_gap="20" row_gap="40" data_padding="5,5,5,5" bg_color="#ffffff" show_thumb="true" show_title="true" meta="author,date,comments" meta_sep="|" show_content="excerpt" content_color="#121212" content_align="left" pagination="number_prev_next" thumb_size="medium_large" ratio="0.7" title_color="#0986c0" title_typo=",18,,,,,solid,,,," exc_length="10" pagi_prev_text="Previous" pagi_next_text="Next" pagi_end_size="1" pagi_mid_size="2" pagi_align="center"]
|
||||
[/pl_archive_posts]
|
||||
[/pl_col]
|
||||
[/pl_row]';
|
||||
|
||||
$data['single-template'] = '[pl_row pagelayer-id="TeNMIn3gRsvsyDZj" stretch="auto" col_gap="10" width_content="auto" row_height="default" overlay_hover_delay="400" row_shape_top_color="#227bc3" row_shape_top_width="100" row_shape_top_height="100" row_shape_bottom_color="#e44993" row_shape_bottom_width="100" row_shape_bottom_height="100"]
|
||||
[pl_col pagelayer-id="qyP2XV3ClSd9cEWM" overlay_hover_delay="400"]
|
||||
[pl_post_title pagelayer-id="nNt87422AXwZoBQg" title_color="" typo=",35,,700,,,solid,,,," align="center"]
|
||||
[/pl_post_title]
|
||||
[/pl_col]
|
||||
[/pl_row]
|
||||
[pl_row pagelayer-id="6UuOjtSrBDhWOnWG" stretch="auto" col_gap="10" width_content="fixed" row_height="default" overlay_hover_delay="400" row_shape_top_color="#227bc3" row_shape_top_width="100" row_shape_top_height="100" row_shape_bottom_color="#e44993" row_shape_bottom_width="100" row_shape_bottom_height="100" row_width="70%" fixed_width="70%" fixed_width_tablet="85%" fixed_width_mobile="100%"]
|
||||
[pl_col pagelayer-id="gzGSF2JVwcPcNUk6" overlay_hover_delay="400" col_width="80" col="12"]
|
||||
[pl_post_info pagelayer-id="gBDuE9nYBu0bIHyv" layout="vertical" space_between="15" align="center" icon_colors="normal" text_colors="normal"]
|
||||
[pl_post_info_list pagelayer-id="ZMZjpaTiEc9Ien3t" type="author" info_link="true" info_icon_on="true" info_icon="fas fa-user-circle"]
|
||||
[/pl_post_info_list]
|
||||
[pl_post_info_list pagelayer-id="xI8gpn9VRfPDkZ0Q" type="date" info_link="true" info_icon_on="true" info_icon="fas fa-calendar-alt" date_format="default"]
|
||||
[/pl_post_info_list]
|
||||
[pl_post_info_list pagelayer-id="LaEZYd9SjEnQHsg3" type="time" info_link="true" info_icon_on="true" info_icon="fas fa-clock" time_format="default"]
|
||||
[/pl_post_info_list]
|
||||
[pl_post_info_list pagelayer-id="9lTHiEQJQqESt6YG" type="comments" info_link="true" info_icon_on="true" info_icon="fas fa-comment"]
|
||||
[/pl_post_info_list]
|
||||
[/pl_post_info]
|
||||
[pl_post_excerpt pagelayer-id="NklzzZGW3ve1X8BS" ele_margin="15px,0px,15px,0px" align="left"]
|
||||
[/pl_post_excerpt]
|
||||
[pl_featured_img pagelayer-id="sZLiICVhGCbBTx1a" size="full" img_filter="0,100,100,0,0,100,100" caption_color="#0986c0" img_hover_delay="400" custom_size="70%,0%" align="center"]
|
||||
[/pl_featured_img]
|
||||
[pl_post_content pagelayer-id="7JbkxQEvq0skyUUl" ele_margin="35px,0px,35px,0px" font_size="NaN"]
|
||||
[/pl_post_content]
|
||||
[pl_post_info pagelayer-id="tvno5FCIKdwGa8IE" layout="horizontal" space_between="5" align="left" icon_colors="normal" text_colors="normal" input_typo=",,,,,,Solid,,,,"]
|
||||
[pl_post_info_list pagelayer-id="SwoZ4cxl3XFMLE3l" type="terms" info_link="true" info_icon_on="" info_icon="fas fa-user-circle" taxonomy="category" info_before="Category :"]
|
||||
[/pl_post_info_list]
|
||||
[pl_post_info_list pagelayer-id="sgTqNx5LkBHODkrG" type="terms" info_link="true" info_icon_on="" info_icon="fas fa-user-circle" taxonomy="post_tag" info_before="Tags :"]
|
||||
[/pl_post_info_list]
|
||||
[/pl_post_info]
|
||||
[/pl_col]
|
||||
[/pl_row]
|
||||
[pl_row pagelayer-id="heO1UxRj8lIQZ52M" stretch="auto" col_gap="10" width_content="auto" row_height="default" overlay_hover_delay="400" row_shape_top_color="#227bc3" row_shape_top_width="100" row_shape_top_height="100" row_shape_bottom_color="#e44993" row_shape_bottom_width="100" row_shape_bottom_height="100"]
|
||||
[pl_col pagelayer-id="s3sgObVllcHz0CB7" overlay_hover_delay="400"]
|
||||
[pl_post_nav pagelayer-id="RrRky7duRa9KGmsA" lables="true" post_title="true" arrows="true" sep_color="#bdbdbd" sep_rotate="20" sep_width="5" prev_label="Previous" next_label="Next" label_colors="normal" title_colors="normal" arrows_list="angle" icon_colors="normal"]
|
||||
[/pl_post_nav]
|
||||
[/pl_col]
|
||||
[/pl_row]
|
||||
[pl_row pagelayer-id="duGtpLrwHkOWbE0m" stretch="auto" col_gap="10" width_content="auto" row_height="default" overlay_hover_delay="400" row_shape_top_color="#227bc3" row_shape_top_width="100" row_shape_top_height="100" row_shape_bottom_color="#e44993" row_shape_bottom_width="100" row_shape_bottom_height="100"]
|
||||
[pl_col pagelayer-id="ad58IjV6dHjcRBmV" overlay_hover_delay="400"]
|
||||
[pl_post_comment pagelayer-id="bwueyBxPgdNLC1Ec" comment_skin="theme_comment" post_type="current"]
|
||||
[/pl_post_comment]
|
||||
[/pl_col]
|
||||
[/pl_row]';
|
||||
|
||||
$conf = '{
|
||||
"single-template": {
|
||||
"type": "single",
|
||||
"title": "Single Template",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "include",
|
||||
"template": "singular",
|
||||
"sub_template": "post",
|
||||
"id": ""
|
||||
},
|
||||
{
|
||||
"type": "include",
|
||||
"template": "singular",
|
||||
"sub_template": "attachment",
|
||||
"id": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"blog-template": {
|
||||
"type": "archive",
|
||||
"title": "Blog Template",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "include",
|
||||
"template": "archives",
|
||||
"sub_template": "",
|
||||
"id": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}';
|
||||
|
||||
$pgl = json_decode($conf, true);
|
||||
|
||||
// Loop the default template
|
||||
foreach($pgl as $k => $v){
|
||||
|
||||
$new_post = array();
|
||||
|
||||
// Is the page there ?
|
||||
$template = get_page_by_path($k, OBJECT, $pagelayer->builder['name']);
|
||||
|
||||
// It does exist so save the revision IF its the header and footer
|
||||
if(!empty($template)){
|
||||
|
||||
$rev = wp_save_post_revision($template->ID);
|
||||
|
||||
// Did we save the rev ?
|
||||
//if(empty($rev)){
|
||||
// TODO : Throw error
|
||||
//}
|
||||
|
||||
$new_post['ID'] = $template->ID;
|
||||
|
||||
}
|
||||
|
||||
// Make an array
|
||||
$new_post['post_content'] = $data[$k];
|
||||
$new_post['post_title'] = $v['title'];
|
||||
$new_post['post_name'] = $k;
|
||||
$new_post['post_type'] = $pagelayer->builder['name'];
|
||||
$new_post['post_status'] = 'publish';
|
||||
$new_post['comment_status'] = 'closed';
|
||||
$new_post['ping_status'] = 'closed';
|
||||
//pagelayer_print($new_post);die();
|
||||
|
||||
// Now insert / update the post
|
||||
$ret = pagelayer_insert_content($new_post, $err);
|
||||
$post_id = $ret;
|
||||
|
||||
// Did we save the rev ?
|
||||
if(empty($ret)){
|
||||
die('Could not update the Pagelayer Template '.$k);
|
||||
}
|
||||
|
||||
// Save our template type
|
||||
update_post_meta($post_id, 'pagelayer_template_type', $v['type']);
|
||||
update_post_meta($post_id, 'pagelayer_template_conditions', $v['conditions']);
|
||||
|
||||
update_post_meta($post_id, 'pagelayer_imported_content', $template_name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Load license data
|
||||
function pfx_load_license(){
|
||||
|
||||
global $popularfx, $pagelayer;
|
||||
|
||||
// Load license
|
||||
$popularfx['license'] = get_option('popularfx_license');
|
||||
|
||||
if(empty($popularfx['license'])){
|
||||
return;
|
||||
}
|
||||
|
||||
// Update license details as well
|
||||
if(empty($popularfx['license']['last_update']) ||
|
||||
(!empty($popularfx['license']['last_update']) && (time() - $popularfx['license']['last_update']) >= 86400)
|
||||
){
|
||||
|
||||
$resp = wp_remote_get(pfx_api_url().'license.php?license='.$popularfx['license']['license']);
|
||||
|
||||
// Did we get a response ?
|
||||
if(is_array($resp)){
|
||||
|
||||
$tosave = json_decode($resp['body'], true);
|
||||
|
||||
// Is it the license ?
|
||||
if(!empty($tosave['license'])){
|
||||
$tosave['last_update'] = time();
|
||||
update_option('popularfx_license', $tosave);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Add the same license to Pagelayer if we have Pagelayer Pro with an unlicensed value
|
||||
if(function_exists('pagelayer_theme_import_notices') && empty($pagelayer->license['status']) && !empty($popularfx['license']['status'])){
|
||||
$pagelayer->license = $popularfx['license'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function pfx_sp_api_url(){
|
||||
|
||||
global $popularfx;
|
||||
|
||||
return str_replace('/popularfx', '/sitepad', pfx_api_url());
|
||||
|
||||
}
|
||||
|
||||
function pfx_api_url(){
|
||||
|
||||
global $popularfx;
|
||||
|
||||
$r = array(
|
||||
'https://s1.softaculous.com/a/popularfx/',
|
||||
'https://s2.softaculous.com/a/popularfx/',
|
||||
'https://s3.softaculous.com/a/popularfx/',
|
||||
'https://s4.softaculous.com/a/popularfx/',
|
||||
'https://s5.softaculous.com/a/popularfx/'
|
||||
);
|
||||
|
||||
$mirror = $r[array_rand($r)];
|
||||
|
||||
// If the license is newly issued, we need to fetch from API only
|
||||
if(empty($popularfx['license']['last_edit']) ||
|
||||
(!empty($popularfx['license']['last_edit']) && (time() - 1800) < $popularfx['license']['last_edit'])
|
||||
){
|
||||
$mirror = 'https://a.softaculous.com/popularfx/';
|
||||
}
|
||||
|
||||
return $mirror;
|
||||
|
||||
}
|
||||
|
||||
// Add settings link on plugin page
|
||||
add_filter('plugin_action_links_popularfx-templates/popularfx-templates.php', 'pfx_plugin_action_links');
|
||||
function pfx_plugin_action_links($links){
|
||||
|
||||
global $popularfx;
|
||||
|
||||
if(empty($popularfx['license']['status'])){
|
||||
$links[] = '<a href="'.PFX_PRO_URL.'" style="color:#3db634;" target="_blank">'._x('Go Pro', 'Upgrade to PopularFX Pro for many more features', 'popularfx').'</a>';
|
||||
}
|
||||
|
||||
$settings_link = '<a href="admin.php?page=popularfx">Settings</a>';
|
||||
array_unshift($links, $settings_link);
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
// Check if a field is posted via POST else return default value
|
||||
function pfx_optpost($name, $default = ''){
|
||||
|
||||
if(!empty($_POST[$name])){
|
||||
return pfx_inputsec(pfx_htmlizer(trim($_POST[$name])));
|
||||
}
|
||||
|
||||
return $default;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function pfx_inputsec($string){
|
||||
|
||||
$string = addslashes($string);
|
||||
|
||||
// This is to replace ` which can cause the command to be executed in exec()
|
||||
$string = str_replace('`', '\`', $string);
|
||||
|
||||
return $string;
|
||||
|
||||
}
|
||||
|
||||
function pfx_htmlizer($string){
|
||||
|
||||
$string = htmlentities($string, ENT_QUOTES, 'UTF-8');
|
||||
|
||||
preg_match_all('/(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)/', $string, $matches);//r_print($matches);
|
||||
|
||||
foreach($matches[1] as $mk => $mv){
|
||||
$tmp_m = pfx_entity_check($matches[2][$mk]);
|
||||
$string = str_replace($matches[1][$mk], $tmp_m, $string);
|
||||
}
|
||||
|
||||
return $string;
|
||||
|
||||
}
|
||||
|
||||
function pfx_entity_check($string){
|
||||
|
||||
//Convert Hexadecimal to Decimal
|
||||
$num = ((substr($string, 0, 1) === 'x') ? hexdec(substr($string, 1)) : (int) $string);
|
||||
|
||||
//Squares and Spaces - return nothing
|
||||
$string = (($num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) || $num < 0x20) ? '' : '&#'.$num.';');
|
||||
|
||||
return $string;
|
||||
|
||||
}
|
||||
|
||||
function pfx_cleanpath($path){
|
||||
$path = str_replace('\\', '/', $path);
|
||||
$path = str_replace('//', '/', $path);
|
||||
return rtrim($path, '/');
|
||||
}
|
||||
|
||||
function pfx_templates_dir(){
|
||||
$dir = wp_upload_dir(NULL, false);
|
||||
return $dir['basedir'].'/popularfx-templates';
|
||||
}
|
||||
|
||||
function pfx_templates_dir_url(){
|
||||
$dir = wp_upload_dir(NULL, false);
|
||||
return $dir['baseurl'].'/popularfx-templates';
|
||||
}
|
||||
|
||||
// Fix the image URLs for versions prior to 108
|
||||
function pfx_fix_image_urls_108(){
|
||||
|
||||
$template = get_theme_mod('popularfx_template');
|
||||
|
||||
// Get list of pages and pagelayer templates to edit
|
||||
$args = array(
|
||||
'post_type' => ['page', 'pagelayer-template'],
|
||||
);
|
||||
|
||||
$query = new WP_Query($args);
|
||||
|
||||
foreach($query->posts as $k => $v){
|
||||
$v->post_content = str_replace(get_stylesheet_directory_uri().'/templates/'.$template.'/images/', pfx_templates_dir_url().'/'.$template.'/images/', $v->post_content);
|
||||
|
||||
// For fixing wwww.abc.com which may be abc.com only
|
||||
if(preg_match('/'.preg_quote('/wp-content/themes/popularfx/templates/'.$template.'/images/', '/').'/is', $v->post_content)){
|
||||
|
||||
$v->post_content = str_replace('/wp-content/themes/popularfx/templates/'.$template.'/images/', '/wp-content/uploads/popularfx-templates/'.$template.'/images/', $v->post_content);
|
||||
|
||||
}
|
||||
|
||||
wp_update_post($v);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
add_action('wp_loaded', 'pfx_woo_fix');
|
||||
function pfx_woo_fix(){
|
||||
if(class_exists( 'woocommerce' ) && function_exists('pagelayer_template_product_fix')){
|
||||
pagelayer_template_product_fix();
|
||||
}
|
||||
}
|
||||
195
backup/wp/wp-content/plugins/popularfx-templates/readme.txt
Normal file
@@ -0,0 +1,195 @@
|
||||
=== PopularFX Website Templates ===
|
||||
Contributors: pagelayer, softaculous
|
||||
Tags: pagelayer, wysiwyg, design, maintenance mode, coming soon, under construction, website builder, landing page builder, front-end builder, site-builder
|
||||
Requires at least: 4.7
|
||||
Tested up to: 6.1
|
||||
Requires PHP: 5.5
|
||||
Stable tag: 1.2.4
|
||||
License: LGPL v2.1
|
||||
License URI: http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
|
||||
The most advanced frontend drag & drop page builder. PageLayer is a light weight but extremely powerful Website Builder. With PageLayer you can create great looking websites much faster. Works with any theme and any page.
|
||||
|
||||
== Description ==
|
||||
|
||||
Pagelayer is a WordPress page builder plugin. Its very easy to use and very light on the browser. Pagelayer works with any WordPress theme. Pagelayer is a real time editor and you can create beautiful web pages and web sites in a few minutes ! You dont need any programming knowledge when using Pagelayer. Pagelayer comes with top-notch features with a great UX and simple UI.
|
||||
|
||||
[Home Page](https://pagelayer.com "PageLayer Homepage") | [Support](https://pagelayer.deskuss.com "PageLayer Support") | [Documents](http://pagelayer.com/docs "Documents")
|
||||
|
||||
|
||||
== Widgets ==
|
||||
|
||||
We have large number of widgets so you can design your page by selecting the widget from widget area.
|
||||
|
||||
== Drag & Drop Editor ==
|
||||
|
||||
Design your page by dragging widgets from given choices of widget. You will be able to create amazing sections of your website much easily. And you can move them by simply dragging them.
|
||||
|
||||
== Real Time Design ==
|
||||
|
||||
Whenever you make changes on your page it gets updated instantly on your page. It helps you design your page quickly by saving your time.
|
||||
|
||||
== In-line Editing ==
|
||||
|
||||
Simply click on any text and by typing you can add your new text. A variety of header and text options enhance your experience as well.
|
||||
|
||||
== Typography ==
|
||||
|
||||
With this feature you can beautify your page content by changing font-size, weight, transform, decoration. You can also add google fonts to beautify content of page.
|
||||
|
||||
== Duplicate ==
|
||||
|
||||
Simply click on this option and it will create exact copy of existing element by saving your time.
|
||||
|
||||
== Animation ==
|
||||
|
||||
Create your page more attractive with animation effects that trigger when the element is in display area.
|
||||
|
||||
== Styling Options ==
|
||||
|
||||
With large number of styling options you can design your page the way you want such as: background overlay, background image, box shadow etc.
|
||||
|
||||
== Easily Customizable ==
|
||||
|
||||
Each widget has multiple options to fully customize the widget such as change font colors, sizing and spacing.
|
||||
|
||||
== Widgets in the Free Version ==
|
||||
|
||||
* Row
|
||||
* Columns
|
||||
* Title
|
||||
* Rich Text
|
||||
* Quote
|
||||
* List
|
||||
* Icon
|
||||
* Badge
|
||||
* Tooltip
|
||||
* Image
|
||||
* Image Slider
|
||||
* Video
|
||||
* Grid Gallery
|
||||
* Button
|
||||
* Tabs
|
||||
* Accordion
|
||||
* Collapse
|
||||
* Image Box
|
||||
* Icon Box
|
||||
* Space
|
||||
* Embed
|
||||
* Shortcodes
|
||||
* Counter
|
||||
* Google Maps
|
||||
* Testimonial
|
||||
* Progress Bars
|
||||
* Color Block
|
||||
* Alert
|
||||
* Divider
|
||||
* Social Profile
|
||||
* Star Rating
|
||||
* Anchor
|
||||
|
||||
And more are in the making !
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
Do you have questions related to PageLayer ? Use the following links :
|
||||
|
||||
1. [Docs](http://pagelayer.com/docs)
|
||||
3. [Help Desk](https://pagelayer.deskuss.com)
|
||||
2. [Support Forum](http://wordpress.org/support/plugin/pagelayer)
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. **Widgets** You can drag and drop any widgets from the left menu.
|
||||
2. **Quote Widget** Full width rows with a quote on the left and an image widget
|
||||
3. **Image Slider** You can create beautiful sliders with Pagelayer. Its just a matter of choosing images. We also have multiple slider options.
|
||||
4. **Image and Icon Box** Image and icon boxes can be created with overlays, etc.
|
||||
5. **Image Widget** You can create image overlays with captions and also lightboxes with Pagelayer
|
||||
6. **Sections** Pagelayer has a nice grid systems with rows and columns. You can create sections so much easily with Pagelayer
|
||||
|
||||
== Changelog
|
||||
|
||||
= 1.2.4 (Jan 23, 2024) =
|
||||
* [Task] Updated to the latest version of Pagelayer widgets.
|
||||
|
||||
= 1.2.3 (Dec 07, 2022) =
|
||||
* [Task] Updated to the latest version of Pagelayer widgets.
|
||||
* [Task] Added the "HTML Tag" option in post title widget. Now you can select the tags to wrap the post title.
|
||||
* [Bug-Fix] In some cases, there was a PHP error when accessing the PopularFX license page. This has been fixed.
|
||||
|
||||
= 1.2.2 (Feb 04, 2022) =
|
||||
* [Task] Updated to the latest version of Pagelayer widgets
|
||||
* [Task] Added pagelayer required notification on template page
|
||||
|
||||
= 1.2.1 (Dec 15, 2021) =
|
||||
* [Task] Updated to the latest version of Pagelayer widgets
|
||||
|
||||
= 1.2.0 (Sept 25, 2021) =
|
||||
* [Task] Updated to the latest version of Pagelayer widgets
|
||||
|
||||
= 1.1.9 (July 6, 2021) =
|
||||
* [Feature] Added sort by option in the Templates List
|
||||
* [Bug-Fix] License key will be shown only to the Super Admin
|
||||
|
||||
= 1.1.8 (May 11, 2021) =
|
||||
* [Bug-Fix] Fixed the install Pagelayer Pro function name
|
||||
|
||||
= 1.1.7 (Mar 23, 2021) =
|
||||
* [Task] Minor UX changes
|
||||
|
||||
= 1.1.6 (Jan 22, 2021) =
|
||||
* [Bug-Fix] pagelayer_get_the_excerpt function shifted to freemium_functions.php
|
||||
|
||||
= 1.1.5 (Jan 22, 2021) =
|
||||
* [Task] Updated to latest Pagelayer version compatibility.
|
||||
* [Bug-Fix] WooCommerce compatibility issues fixed.
|
||||
|
||||
= 1.1.4 (Dec 5, 2020) =
|
||||
* [Task] Updated to latest Pagelayer version compatibility.
|
||||
|
||||
= 1.1.3 (Nov 5, 2020) =
|
||||
* [Added] Added option for the top / bottom position for the contact form success / failed message.
|
||||
* [Added] Added "Open link in new window (tab)" option to the social widget.
|
||||
* [Bug-Fix] After submitting the contact form the default success/failed message was not shown if the message was not set from the setting. This is fixed.
|
||||
* [Bug-Fix] The post content widget was not working properly for the password protected posts. This is fixed.
|
||||
|
||||
= 1.1.2 (Oct 28, 2020) =
|
||||
* Added single page import option
|
||||
* If there is an AJAX failure during import, detailed AJAX error report will be shown.
|
||||
* Version checks for templates added !
|
||||
|
||||
= 1.1.1 (Oct 14, 2020) =
|
||||
* Added fix for http://www.domain.com URLs which maybe like http://domain.com
|
||||
|
||||
= 1.1.0 (Oct 14, 2020) =
|
||||
* Added option to re-download template
|
||||
|
||||
= 1.0.9 (Oct 14, 2020) =
|
||||
* Major bug fix for templates folder getting deleted when PopularFX theme was updated !
|
||||
|
||||
= 1.0.8 (Oct 13, 2020) =
|
||||
* When adding the license for the first time within 30 minutes of issuing the license, an Invalid License error was coming. This is fixed.
|
||||
|
||||
= 1.0.7 (Oct 12, 2020) =
|
||||
* Mobile View of Blog Template Fixed
|
||||
|
||||
= 1.0.6 (Oct 7, 2020) =
|
||||
* Fixed license loading issue
|
||||
|
||||
= 1.0.5 (September 29, 2020) =
|
||||
* Improved the Freeium Widgets for more options to edit.
|
||||
|
||||
= 1.0.4 (September 26, 2020) =
|
||||
* If the PopularFX theme is not installed, the template import used to fail. This is fixed now.
|
||||
|
||||
= 1.0.3 (September 21, 2020) =
|
||||
* Undefined notice error fixed for $pagelayer
|
||||
|
||||
= 1.0.2 (September 15, 2020) =
|
||||
* Made some premium options editable in the free version
|
||||
|
||||
= 1.0.1 (August 25, 2020) =
|
||||
* Improved UX after installing the license
|
||||
|
||||
= 1.0.0 (August 25, 2020) =
|
||||
* Released Plugin
|
||||
1
backup/wp/wp-content/plugins/popularfx-templates/rev
Normal file
@@ -0,0 +1 @@
|
||||
2054
|
||||