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
77988842
Commit
77988842
authored
Jul 15, 2022
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started port the gallery to the new structure
parent
a95d4d7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
28 deletions
+33
-28
sexhack_gallery.php
deprecated/sexhack_gallery.php
+0
-28
class-admin.php
includes/class-admin.php
+18
-0
gallery.php
templates/admin/gallery.php
+15
-0
No files found.
deprecated/sexhack_gallery.php
View file @
77988842
...
...
@@ -510,38 +510,10 @@ if(!class_exists('SexHackVideoGallery')) {
}
function
gallery_adminpage
()
{
global
$SEXHACK_GALLERY_DEFAULTSLUG
;
$DEFAULTSLUG
=
$SEXHACK_GALLERY_DEFAULTSLUG
;
?>
<div
class=
"wrap"
>
<?php
do_settings_sections
(
'sexhackme-gallery-settings'
);
?>
<form
method=
"post"
action=
"/wp-admin/options.php"
>
<?php
settings_fields
(
'sexhackme-gallery-settings'
);
?>
<table
class=
"form-table"
>
<tr
align=
"top"
>
<td>
<label>
Slug for gallery
</label>
<input
type=
"text"
name=
"sexhack_gallery_slug"
value=
"
<?php
echo
get_option
(
'sexhack_gallery_slug'
,
"
$DEFAULTSLUG
"
)
?>
"
/>
</td>
</tr>
</table>
<?php
submit_button
();
?>
</form>
</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'
);
...
...
includes/class-admin.php
View file @
77988842
...
...
@@ -60,6 +60,13 @@ if(!class_exists('SH_Admin')) {
register_setting
(
'sexhackme-advert-settings'
,
'sexadv_video_top'
);
register_setting
(
'sexhackme-advert-settings'
,
'sexadv_video_bot'
);
}
// Gallery settings
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/admin/functions-gallery.php'
)
)
{
include_once
SH_PLUGIN_DIR_PATH
.
'includes/admin/functions-gallery.php'
;
register_setting
(
'sexhackme-gallery-settings'
,
'sexhack_gallery_slug'
);
}
}
public
static
function
menu
()
...
...
@@ -96,6 +103,17 @@ if(!class_exists('SH_Admin')) {
}
// Add Gallery settings page
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/admin/functions-gallery.php'
)
)
{
add_submenu_page
(
'sexhackme-settings'
,
// root slug
'Gallery'
,
// title
'Gallery'
,
// title
'manage_options'
,
// capabilities
'gallery'
,
// slug
'wp_SexHackMe\gallery_adminpage'
);
// callback
}
}
...
...
templates/admin/gallery.php
View file @
77988842
...
...
@@ -22,4 +22,19 @@
// Exit if accessed directly
if
(
!
defined
(
'ABSPATH'
)
)
exit
;
?>
<div
class=
"wrap"
>
<?php
do_settings_sections
(
'sexhackme-gallery-settings'
);
?>
<form
method=
"post"
action=
"/wp-admin/options.php"
>
<?php
settings_fields
(
'sexhackme-gallery-settings'
);
?>
<table
class=
"form-table"
>
<tr
align=
"top"
>
<td>
<label>
Slug for gallery
</label>
<input
type=
"text"
name=
"sexhack_gallery_slug"
value=
"
<?php
echo
get_option
(
'sexhack_gallery_slug'
,
"v"
)
?>
"
/>
</td>
</tr>
</table>
<?php
submit_button
();
?>
</form>
</div>
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