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
96e18356
Commit
96e18356
authored
Jul 04, 2022
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add admin subpage for modules
parent
754eb3dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
1 deletion
+54
-1
sexhack_gallery.php
classes/sexhack_gallery.php
+13
-1
sexhackme.php
sexhackme.php
+21
-0
video.php
template/video.php
+20
-0
No files found.
classes/sexhack_gallery.php
View file @
96e18356
...
...
@@ -375,12 +375,24 @@ if(!class_exists('SexHackVideoGallery')) {
}
function
gallery_adminpage
()
{
?>
<div
class=
"wrap"
>
<h2>
SexHackMe Gallery Settings
</h2>
</div>
<?php
}
$SEXHACK_SECTION
=
array
(
'class'
=>
'SexHackVideoGallery'
,
'description'
=>
'Create Video galleries for Sexhack Video products'
,
//'require-page' => true,
'adminmenu'
=>
array
(
array
(
'title'
=>
'Gallery'
,
'slug'
=>
'gallery'
,
'callback'
=>
'wp_SexHackMe\gallery_adminpage'
)
),
'name'
=>
'sexhackme_videogallery'
);
...
...
sexhackme.php
View file @
96e18356
...
...
@@ -173,6 +173,27 @@ if(!class_exists('SexHackMe')) {
{
add_menu_page
(
'SexHackMe Settings'
,
'SexHackMe'
,
'manage_options'
,
'sexhackme-settings'
,
array
(
$this
,
'admin_page'
),
plugin_dir_url
(
__FILE__
)
.
'/img/admin_icon.png'
,
150
);
add_submenu_page
(
'sexhackme-settings'
,
'SexHackMe Settings'
,
'Modules'
,
'manage_options'
,
'sexhackme-settings'
);
foreach
(
$this
->
SECTIONS
as
$section
)
{
if
(
get_option
(
$section
[
'name'
])
==
"1"
)
{
if
(
array_key_exists
(
'adminmenu'
,
$section
)
&&
is_array
(
$section
[
'adminmenu'
]))
{
foreach
(
$section
[
'adminmenu'
]
as
$admsub
)
{
sexhack_log
(
$admsub
);
if
(
is_array
(
$admsub
)
&&
array_key_exists
(
'title'
,
$admsub
)
&&
array_key_exists
(
'callback'
,
$admsub
)
&&
array_key_exists
(
'slug'
,
$admsub
))
{
add_submenu_page
(
'sexhackme-settings'
,
$admsub
[
'title'
],
$admsub
[
'title'
],
'manage_options'
,
$admsub
[
'slug'
],
$admsub
[
'callback'
]);
}
}
}
}
}
}
public
function
admin_page
()
...
...
template/video.php
View file @
96e18356
...
...
@@ -30,6 +30,18 @@ get_header(); ?>
echo
do_shortcode
(
"[sexadv adv="
.
get_option
(
'sexadv_video_top'
)
.
"]"
);
$htmltags
=
'<span><b>TAGS: </b></span>'
;
$tags
=
get_the_terms
(
get_the_ID
(),
'product_tag'
);
if
(
!
empty
(
$tags
)
&&
!
is_wp_error
(
$tags
)
)
{
foreach
(
$tags
as
$tag
)
{
$htmltags
.=
"<span>#"
.
$tag
->
name
.
'</span> '
;
}
}
$prod
=
wc_get_product
(
get_the_ID
());
$hls
=
$prod
->
get_attribute
(
"hls_public"
);
$hls_member
=
$prod
->
get_attribute
(
"hls_members"
);
...
...
@@ -76,6 +88,8 @@ get_header(); ?>
else
if
(
$gif_preview
)
echo
'<img src="'
.
$gif_preview
.
'" loading="lazy"></img>'
;
else
echo
'<img src="'
.
$thumb
.
'" loading="lazy"></img>'
;
echo
$htmltags
;
}
elseif
(
$sexhack_pms
->
is_member
())
// free membership
{
...
...
@@ -88,6 +102,8 @@ get_header(); ?>
else
if
(
$gif_preview
)
echo
'<img src="'
.
$gif_preview
.
'" loading="lazy"></img>'
;
else
echo
'<img src="'
.
$thumb
.
'" loading="lazy"></img>'
;
echo
$htmltags
;
if
(
$hls_premium
)
$endhtml
.=
"<h3><a href='/product-category/subscriptions/'>Premium full lenght version available here</a></h3>"
;
if
(
$vr_premium
)
$endhtml
.=
"<h3><a href='/product-category/subscriptions/'>VR 3D Premium full lenght version available here</a></h3>"
;
}
...
...
@@ -100,6 +116,8 @@ get_header(); ?>
else
if
(
$gif_preview
)
echo
'<img src="'
.
$gif_preview
.
'" loading="lazy"></img>'
;
else
echo
'<img src="'
.
$thumb
.
'" loading="lazy"></img>'
;
echo
$htmltags
;
if
(
$hls_premium
)
$endhtml
.=
"<h3><a href='/product-category/subscriptions/'>Premium full lenght version available here</a></h3>"
;
if
(
$hls_member
)
$endhtml
.=
"<h3><a href='/login'>Free members only version available! Sign up or Login to watch</a></h3>"
;
if
(
$vr_premium
)
$endhtml
.=
"<h3><a href='/product-category/subscriptions/'>VR 3D Premium full lenght version available here</a></h3>"
;
...
...
@@ -114,8 +132,10 @@ get_header(); ?>
// get_template_part( 'content', get_post_format() ); // get_post_format() return empty for us
//endif;
echo
$endhtml
;
?>
<h3><a
href=
"
<?php
echo
get_the_permalink
();
?>
"
>
Download the full lenght hi-res version of this video
</a><h3>
<br><hr>
<?php
echo
do_shortcode
(
"[sexadv adv="
.
get_option
(
'sexadv_video_bot'
)
.
"]"
);
...
...
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