Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WordPress_SexHackMe_Plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
WordPress_SexHackMe_Plugin
Commits
d70220ff
Commit
d70220ff
authored
Jul 14, 2022
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Storefront support rewritten
parent
98d086fb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
1 deletion
+63
-1
class-storefront.php
includes/class-storefront.php
+52
-0
functions-utils.php
includes/functions-utils.php
+4
-1
sexhackme.php
sexhackme.php
+7
-0
No files found.
deprecated/storefront_headercart_credi
t.php
→
includes/class-storefron
t.php
View file @
d70220ff
...
@@ -21,46 +21,32 @@
...
@@ -21,46 +21,32 @@
namespace
wp_SexHackMe
;
namespace
wp_SexHackMe
;
if
(
!
class_exists
(
'StorefrontMoveHeaderCart'
))
{
// Exit if accessed directly
class
StorefrontMoveHeaderCart
if
(
!
defined
(
'ABSPATH'
)
)
exit
;
{
public
function
__construct
()
{
sexhack_log
(
'StorefrontMoveHeaderCart() Instanced'
);
add_action
(
'init'
,
array
(
$this
,
'remove_header_cart'
));
add_filter
(
'storefront_credit_link'
,
false
);
//add_action('storefront_footer', array($this, 'disclaimer')); // XXX I don't like positioning this way. Fix in CSS or sobstitute footer theme file?
add_action
(
'storefront_header'
,
array
(
$this
,
'add_header_cart'
),
40
);
}
public
function
disclaimer
()
{
?>
<div
class=
"site-info"
>
All pictures and videos are property of the respective models. Please copy them for personal use but do not republish any without permission.
</div>
<?php
}
public
function
remove_header_cart
()
if
(
!
class_exists
(
'SH_StoreFront'
))
{
class
SH_StoreFront
{
public
static
function
init
()
{
{
// Remove the cart and the product search
remove_action
(
'storefront_header'
,
'storefront_header_cart'
,
60
);
remove_action
(
'storefront_header'
,
'storefront_header_cart'
,
60
);
remove_action
(
'storefront_header'
,
'storefront_product_search'
,
40
);
remove_action
(
'storefront_header'
,
'storefront_product_search'
,
40
);
}
public
function
add_header_cart
()
// Remove StoreFront credits
{
add_filter
(
'storefront_credit_link'
,
false
);
storefront_header_cart
();
}
}
}
// add footer disclaimer
//add_action('storefront_footer', 'wp_SexHackMe\sh_get_disclaimer')); // XXX I don't like positioning this way. Fix in CSS or sobstitute footer theme file?
// Re add the cart in the right position
add_action
(
'storefront_header'
,
'storefront_header_cart'
,
40
);
}
}
}
$SEXHACK_SECTION
=
array
(
'class'
=>
'StorefrontMoveHeaderCart'
,
'description'
=>
'Move storefront header cart and remove find products and credits'
,
'name'
=>
'sexhackme_sf_headercart'
);
?>
?>
includes/functions-utils.php
View file @
d70220ff
...
@@ -48,7 +48,10 @@ function sh_get_template($tmpl, $args=array())
...
@@ -48,7 +48,10 @@ function sh_get_template($tmpl, $args=array())
}
}
function
sh_disclaimer
()
{
echo
sh_get_template
(
"blocks/disclaimer.php"
);
}
function
sh_hls_player
(
$video_url
,
$posters
=
''
)
function
sh_hls_player
(
$video_url
,
$posters
=
''
)
{
{
...
...
sexhackme.php
View file @
d70220ff
...
@@ -229,6 +229,10 @@ if(!class_exists('SexHackMe_Plugin')) {
...
@@ -229,6 +229,10 @@ if(!class_exists('SexHackMe_Plugin')) {
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-livecam-site-support.php'
)
)
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-livecam-site-support.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-livecam-site-support.php'
;
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-livecam-site-support.php'
;
/* Storefront customization support */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-storefront.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-storefront.php'
;
/* Shortcodes */
/* Shortcodes */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-shortcodes.php'
)
)
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-shortcodes.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-shortcodes.php'
;
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-shortcodes.php'
;
...
@@ -298,6 +302,9 @@ if(!class_exists('SexHackMe_Plugin')) {
...
@@ -298,6 +302,9 @@ if(!class_exists('SexHackMe_Plugin')) {
add_action
(
'init'
,
array
(
'wp_SexHackMe\SH_Shortcodes'
,
'init'
)
);
add_action
(
'init'
,
array
(
'wp_SexHackMe\SH_Shortcodes'
,
'init'
)
);
//add_action( 'init', array( $this, 'init_dependencies' ), 1 );
//add_action( 'init', array( $this, 'init_dependencies' ), 1 );
// Initialize storefront fixes/personalizations
add_action
(
'init'
,
array
(
'wp_SexHackMe\SH_StoreFront'
,
'init'
)
);
//Show row meta on the plugin screen (used to add links like Documentation, Support etc.).
//Show row meta on the plugin screen (used to add links like Documentation, Support etc.).
add_filter
(
'plugin_row_meta'
,
array
(
$this
,
'plugin_row_meta'
),
10
,
2
);
add_filter
(
'plugin_row_meta'
,
array
(
$this
,
'plugin_row_meta'
),
10
,
2
);
...
...
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