auto-patch 656-dev-dev01-2024-05-20T15_40_39
This commit is contained in:
@@ -11,19 +11,6 @@ namespace ShareThisShareButtons;
|
||||
* Main plugin bootstrap file.
|
||||
*/
|
||||
class Plugin extends Plugin_Base {
|
||||
/**
|
||||
* Plugin assets prefix.
|
||||
*
|
||||
* @var string Lowercased dashed prefix.
|
||||
*/
|
||||
public $assets_prefix;
|
||||
|
||||
/**
|
||||
* Plugin meta prefix.
|
||||
*
|
||||
* @var string Lowercased underscored prefix.
|
||||
*/
|
||||
public $meta_prefix;
|
||||
|
||||
/**
|
||||
* Plugin constructor.
|
||||
@@ -45,10 +32,6 @@ class Plugin extends Plugin_Base {
|
||||
foreach ( $classes as $instance ) {
|
||||
$this->add_doc_hooks( $instance );
|
||||
}
|
||||
|
||||
// Define some prefixes to use througout the plugin.
|
||||
$this->assets_prefix = strtolower( preg_replace( '/\B([A-Z])/', '-$1', __NAMESPACE__ ) );
|
||||
$this->meta_prefix = strtolower( preg_replace( '/\B([A-Z])/', '_$1', __NAMESPACE__ ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -64,7 +47,7 @@ class Plugin extends Plugin_Base {
|
||||
|
||||
if ( is_array( $propertyid ) && array() !== $propertyid ) {
|
||||
wp_register_script(
|
||||
"{$this->assets_prefix}-mu",
|
||||
ASSET_PREFIX . '-mu',
|
||||
"//platform-api.sharethis.com/js/sharethis.js#property={$propertyid[0]}&product={$first_prod}-buttons&source=sharethis-share-buttons-wordpress",
|
||||
array(),
|
||||
SHARETHIS_SHARE_BUTTONS_VERSION,
|
||||
@@ -74,10 +57,10 @@ class Plugin extends Plugin_Base {
|
||||
|
||||
// Register style sheet for sticky hiding.
|
||||
wp_register_style(
|
||||
"{$this->assets_prefix}-sticky",
|
||||
"{$this->dir_url}css/mu-style.css",
|
||||
ASSET_PREFIX . '-sticky',
|
||||
DIR_URL . 'css/mu-style.css',
|
||||
array(),
|
||||
filemtime( "{$this->dir_path}css/mu-style.css" )
|
||||
filemtime( DIR_PATH . 'css/mu-style.css' )
|
||||
);
|
||||
}
|
||||
|
||||
@@ -88,37 +71,37 @@ class Plugin extends Plugin_Base {
|
||||
*/
|
||||
public function register_admin_assets() {
|
||||
wp_register_script(
|
||||
"{$this->assets_prefix}-mua",
|
||||
ASSET_PREFIX . '-mua',
|
||||
'//platform-api.sharethis.com/js/sharethis.js?product=inline-share-buttons',
|
||||
array(),
|
||||
SHARETHIS_SHARE_BUTTONS_VERSION,
|
||||
false
|
||||
);
|
||||
wp_register_script(
|
||||
"{$this->assets_prefix}-admin",
|
||||
"{$this->dir_url}js/admin.js",
|
||||
ASSET_PREFIX . '-admin',
|
||||
DIR_URL . 'js/admin.js',
|
||||
array( 'jquery', 'jquery-ui-sortable', 'wp-util', 'wp-color-picker' ),
|
||||
filemtime( "{$this->dir_path}js/admin.js" ),
|
||||
filemtime( DIR_PATH . 'js/admin.js' ),
|
||||
false
|
||||
);
|
||||
wp_register_script(
|
||||
"{$this->assets_prefix}-meta-box",
|
||||
"{$this->dir_url}js/meta-box.js",
|
||||
ASSET_PREFIX . '-meta-box',
|
||||
DIR_URL . 'js/meta-box.js',
|
||||
array( 'jquery', 'wp-util' ),
|
||||
filemtime( "{$this->dir_path}js/meta-box.js" ),
|
||||
filemtime( DIR_PATH . 'js/meta-box.js' ),
|
||||
false
|
||||
);
|
||||
wp_register_style(
|
||||
"{$this->assets_prefix}-admin",
|
||||
"{$this->dir_url}css/admin.css",
|
||||
ASSET_PREFIX . '-admin',
|
||||
DIR_URL . 'css/admin.css',
|
||||
array( 'wp-color-picker' ),
|
||||
filemtime( "{$this->dir_path}css/admin.css" )
|
||||
filemtime( DIR_PATH . 'css/admin.css' )
|
||||
);
|
||||
wp_register_style(
|
||||
"{$this->assets_prefix}-meta-box",
|
||||
"{$this->dir_url}css/meta-box.css",
|
||||
ASSET_PREFIX . '-meta-box',
|
||||
DIR_URL . 'css/meta-box.css',
|
||||
array(),
|
||||
filemtime( "{$this->dir_path}css/meta-box.css" )
|
||||
filemtime( DIR_PATH . 'css/meta-box.css' )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user