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
e110388b
Commit
e110388b
authored
Jan 16, 2024
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rewrite support + add missing image
parent
61d32555
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
class-post_types.php
includes/class-post_types.php
+6
-2
sexhackme.php
sexhackme.php
+4
-1
No files found.
includes/class-post_types.php
View file @
e110388b
...
@@ -119,7 +119,11 @@ if(!class_exists('SH_PostTypes')) {
...
@@ -119,7 +119,11 @@ if(!class_exists('SH_PostTypes')) {
if
(
!
array_key_exists
(
$DEFAULTSLUG
.
'/([^/]+)/?$'
,
$rules
))
{
if
(
!
array_key_exists
(
$DEFAULTSLUG
.
'/([^/]+)/?$'
,
$rules
))
{
update_option
(
'need_rewrite_flush'
,
1
);
update_option
(
'need_rewrite_flush'
,
1
);
sexhack_log
(
"REWRITE: Need to add and flush our rules!"
);
sexhack_log
(
"REWRITE: Need to add and flush our rules!"
);
}
}
else
{
sexhack_log
(
"WE DON'T NEED REWRITE!!!!!!!!!!!!!!!!!!!!!!"
);
//sexhack_log($rules);
}
}
}
public
static
function
add_rewrites
()
public
static
function
add_rewrites
()
...
@@ -154,7 +158,7 @@ if(!class_exists('SH_PostTypes')) {
...
@@ -154,7 +158,7 @@ if(!class_exists('SH_PostTypes')) {
//update_option('need_rewrite_flush', 1);
//update_option('need_rewrite_flush', 1);
sexhack_log
(
$wp_rewrite
->
wp_rewrite_rules
());
//
sexhack_log($wp_rewrite->wp_rewrite_rules());
}
}
...
...
sexhackme.php
View file @
e110388b
...
@@ -489,7 +489,9 @@ if(!class_exists('SexHackMe_Plugin')) {
...
@@ -489,7 +489,9 @@ if(!class_exists('SexHackMe_Plugin')) {
// Initialize Custom post_types
// Initialize Custom post_types
add_action
(
'init'
,
array
(
'wp_SexHackMe\SH_PostTypes'
,
'init'
));
add_action
(
'init'
,
array
(
'wp_SexHackMe\SH_PostTypes'
,
'init'
));
add_action
(
'sh_rewrite_flushed'
,
array
(
'wp_SexHackMe\SH_PostTypes'
,
'add_rewrites'
)
);
//add_action( 'sh_rewrite_flushed', array( 'wp_SexHackMe\SH_PostTypes', 'add_rewrites') );
//add_action( 'sh_before_rewrite_flush_rules', array( 'wp_SexHackMe\SH_PostTypes', 'add_rewrites') );
add_action
(
'init'
,
array
(
'wp_SexHackMe\SH_PostTypes'
,
'add_rewrites'
));
// Initialize shortcodes
// Initialize shortcodes
add_action
(
'init'
,
array
(
'wp_SexHackMe\SH_Shortcodes'
,
'init'
)
);
add_action
(
'init'
,
array
(
'wp_SexHackMe\SH_Shortcodes'
,
'init'
)
);
...
@@ -552,6 +554,7 @@ if(!class_exists('SexHackMe_Plugin')) {
...
@@ -552,6 +554,7 @@ if(!class_exists('SexHackMe_Plugin')) {
if
(
get_option
(
'need_rewrite_flush'
))
if
(
get_option
(
'need_rewrite_flush'
))
{
{
sexhack_log
(
"FLUSHING REWRITE RULES"
);
sexhack_log
(
"FLUSHING REWRITE RULES"
);
do_action
(
'sh_before_rewrite_flush_rules'
);
//flush_rewrite_rules(false);
//flush_rewrite_rules(false);
flush_rewrite_rules
();
flush_rewrite_rules
();
update_option
(
'need_rewrite_flush'
,
0
);
update_option
(
'need_rewrite_flush'
,
0
);
...
...
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