Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
woocommerce_bpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wordpress
woocommerce_bpd
Commits
0531ca55
Commit
0531ca55
authored
Apr 02, 2014
by
Franco nextime Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed woothemes updater
parent
10f4ec1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
82 deletions
+0
-82
woo-functions.php
woo-includes/woo-functions.php
+0
-82
No files found.
woo-includes/woo-functions.php
View file @
0531ca55
...
...
@@ -13,85 +13,3 @@ if ( ! function_exists( 'is_woocommerce_active' ) ) {
return
WC_Dependencies
::
woocommerce_active_check
();
}
}
/**
* Queue updates for the WooUpdater
*/
if
(
!
function_exists
(
'woothemes_queue_update'
)
)
{
function
woothemes_queue_update
(
$file
,
$file_id
,
$product_id
)
{
global
$woothemes_queued_updates
;
if
(
!
isset
(
$woothemes_queued_updates
)
)
$woothemes_queued_updates
=
array
();
$plugin
=
new
stdClass
();
$plugin
->
file
=
$file
;
$plugin
->
file_id
=
$file_id
;
$plugin
->
product_id
=
$product_id
;
$woothemes_queued_updates
[]
=
$plugin
;
}
}
/**
* Load installer for the WooThemes Updater.
* @return $api Object
*/
if
(
!
class_exists
(
'WooThemes_Updater'
)
&&
!
function_exists
(
'woothemes_updater_install'
)
)
{
function
woothemes_updater_install
(
$api
,
$action
,
$args
)
{
$download_url
=
'http://woodojo.s3.amazonaws.com/downloads/woothemes-updater/woothemes-updater.zip'
;
if
(
'plugin_information'
!=
$action
||
false
!==
$api
||
!
isset
(
$args
->
slug
)
||
'woothemes-updater'
!=
$args
->
slug
)
return
$api
;
$api
=
new
stdClass
();
$api
->
name
=
'WooThemes Updater'
;
$api
->
version
=
'1.0.0'
;
$api
->
download_link
=
esc_url
(
$download_url
);
return
$api
;
}
add_filter
(
'plugins_api'
,
'woothemes_updater_install'
,
10
,
3
);
}
/**
* WooUpdater Installation Prompts
*/
if
(
!
class_exists
(
'WooThemes_Updater'
)
&&
!
function_exists
(
'woothemes_updater_notice'
)
)
{
/**
* Display a notice if the "WooThemes Updater" plugin hasn't been installed.
* @return void
*/
function
woothemes_updater_notice
()
{
$active_plugins
=
apply_filters
(
'active_plugins'
,
get_option
(
'active_plugins'
)
);
if
(
in_array
(
'woothemes-updater/woothemes-updater.php'
,
$active_plugins
)
)
return
;
$slug
=
'woothemes-updater'
;
$install_url
=
wp_nonce_url
(
self_admin_url
(
'update.php?action=install-plugin&plugin='
.
$slug
),
'install-plugin_'
.
$slug
);
$activate_url
=
'plugins.php?action=activate&plugin='
.
urlencode
(
'woothemes-updater/woothemes-updater.php'
)
.
'&plugin_status=all&paged=1&s&_wpnonce='
.
urlencode
(
wp_create_nonce
(
'activate-plugin_woothemes-updater/woothemes-updater.php'
)
);
$message
=
'<a href="'
.
esc_url
(
$install_url
)
.
'">Install the WooThemes Updater plugin</a> to get updates for your WooThemes plugins.'
;
$is_downloaded
=
false
;
$plugins
=
array_keys
(
get_plugins
()
);
foreach
(
$plugins
as
$plugin
)
{
if
(
strpos
(
$plugin
,
'woothemes-updater.php'
)
!==
false
)
{
$is_downloaded
=
true
;
$message
=
'<a href="'
.
esc_url
(
admin_url
(
$activate_url
)
)
.
'">Activate the WooThemes Updater plugin</a> to get updates for your WooThemes plugins.'
;
}
}
echo
'<div class="updated fade"><p>'
.
$message
.
'</p></div>'
.
"
\n
"
;
}
add_action
(
'admin_notices'
,
'woothemes_updater_notice'
);
}
/**
* Prevent conflicts with older versions
*/
if
(
!
class_exists
(
'WooThemes_Plugin_Updater'
)
)
{
class
WooThemes_Plugin_Updater
{
function
init
()
{}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment