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
34c08fbe
Commit
34c08fbe
authored
Jul 07, 2022
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix advert, remove useless add_settings_field() calls
parent
dd58c420
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
advert.php
classes/advert.php
+1
-1
sexhack_gallery.php
classes/sexhack_gallery.php
+5
-3
sexhackme.php
sexhackme.php
+6
-4
No files found.
classes/advert.php
View file @
34c08fbe
...
@@ -25,7 +25,7 @@ if(!class_exists('SexhackAdvert')) {
...
@@ -25,7 +25,7 @@ if(!class_exists('SexhackAdvert')) {
echo
$args
[
'before_widget'
];
echo
$args
[
'before_widget'
];
$id
=
$instance
[
'advid'
];
$id
=
$instance
[
'advid'
];
if
(
!
empty
(
$id
))
if
(
!
empty
(
$id
))
echo
$args
[
'before_advid'
]
.
do_shortcode
(
'[sexadv adv='
.
$id
.
']'
)
.
$args
[
'after_advid'
];
echo
/*$args['before_advid'] . */
do_shortcode
(
'[sexadv adv='
.
$id
.
']'
);
//
. $args['after_advid'];
echo
$args
[
'after_widget'
];
echo
$args
[
'after_widget'
];
}
}
...
...
classes/sexhack_gallery.php
View file @
34c08fbe
...
@@ -124,8 +124,8 @@ if(!class_exists('SexHackVideoGallery')) {
...
@@ -124,8 +124,8 @@ if(!class_exists('SexHackVideoGallery')) {
{
{
add_settings_section
(
'sexhackme-gallery-settings'
,
' '
,
array
(
$this
,
'settings_section'
),
'sexhackme-gallery-settings'
);
add_settings_section
(
'sexhackme-gallery-settings'
,
' '
,
array
(
$this
,
'settings_section'
),
'sexhackme-gallery-settings'
);
register_setting
(
'sexhackme-gallery-settings'
,
'sexhack_gallery_slug'
);
register_setting
(
'sexhackme-gallery-settings'
,
'sexhack_gallery_slug'
);
add_settings_field
(
'sexhack_gallery_slug'
,
'sexhack_gallery_slug'
,
'sexhack_gallery_slug'
,
//
add_settings_field('sexhack_gallery_slug', 'sexhack_gallery_slug', 'sexhack_gallery_slug',
array
(
$this
,
'settings_field'
),
'sexhackme-gallery-settings'
,
'sexhackme-gallery-settings'
,
'sexhack_gallery_slug'
);
// array($this, 'settings_field'), 'sexhackme-gallery-settings', 'sexhackme-gallery-settings'
);
}
}
...
@@ -134,10 +134,12 @@ if(!class_exists('SexHackVideoGallery')) {
...
@@ -134,10 +134,12 @@ if(!class_exists('SexHackVideoGallery')) {
echo
"<h2>SexHackMe Gallery Settings</h2>"
;
echo
"<h2>SexHackMe Gallery Settings</h2>"
;
}
}
/*
public function settings_field($name)
public function settings_field($name)
{
{
echo $name;
echo $name;
}
}
*/
public
function
check_rewrite
(
$rules
)
public
function
check_rewrite
(
$rules
)
{
{
...
...
sexhackme.php
View file @
34c08fbe
...
@@ -50,7 +50,7 @@ if(count($slug) > 1) {
...
@@ -50,7 +50,7 @@ if(count($slug) > 1) {
require_once
dirname
(
__FILE__
)
.
'/inc/class-tgm-plugin-activation.php'
;
require_once
dirname
(
__FILE__
)
.
'/inc/class-tgm-plugin-activation.php'
;
add_action
(
'tgmpa_register'
,
'sexhackme_register_required_plugins'
);
add_action
(
'tgmpa_register'
,
'
wp_SexHackMe\
sexhackme_register_required_plugins'
);
function
sexhackme_register_required_plugins
()
{
function
sexhackme_register_required_plugins
()
{
...
@@ -146,11 +146,13 @@ if(!class_exists('SexHackMe')) {
...
@@ -146,11 +146,13 @@ if(!class_exists('SexHackMe')) {
public
function
settings_section
()
{
public
function
settings_section
()
{
echo
"<h3>Enable following functionalities:</h3>"
;
echo
"<h3>Enable following functionalities:</h3>"
;
}
}
/*
public function settings_field($name)
public function settings_field($name)
{
{
echo $name;
echo $name;
}
}
*/
public
function
checkbox
(
$res
)
public
function
checkbox
(
$res
)
{
{
...
@@ -177,8 +179,8 @@ if(!class_exists('SexHackMe')) {
...
@@ -177,8 +179,8 @@ if(!class_exists('SexHackMe')) {
add_settings_section
(
'sexhackme-settings'
,
' '
,
array
(
$this
,
'settings_section'
),
'sexhackme-settings'
);
add_settings_section
(
'sexhackme-settings'
,
' '
,
array
(
$this
,
'settings_section'
),
'sexhackme-settings'
);
//register_setting('sexhackme-settings', 'need_rewrite_flush');
//register_setting('sexhackme-settings', 'need_rewrite_flush');
foreach
(
$this
->
SECTIONS
as
$section
)
{
foreach
(
$this
->
SECTIONS
as
$section
)
{
add_settings_field
(
$section
[
'name'
],
$section
[
'name'
],
$section
[
'name'
],
//
add_settings_field($section['name'], $section['name'], $section['name'],
array
(
$this
,
'settings_field'
),
'sexhackme-settings'
,
'sexhackme-settings'
,
$section
[
'name'
]
);
//
array($this, 'settings_field'), 'sexhackme-settings', 'sexhackme-settings', $section['name'] );
register_setting
(
'sexhackme-settings'
,
$section
[
'name'
]);
register_setting
(
'sexhackme-settings'
,
$section
[
'name'
]);
if
(
array_key_exists
(
'require-page'
,
$section
)
&&
(
$section
[
'require-page'
]))
if
(
array_key_exists
(
'require-page'
,
$section
)
&&
(
$section
[
'require-page'
]))
{
{
...
...
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