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
bfa30bcd
Commit
bfa30bcd
authored
Sep 04, 2024
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed permalink for video post
parent
42362899
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
sexhackme_header.css
css/sexhackme_header.css
+3
-1
class-post_types.php
includes/class-post_types.php
+22
-1
class-shortcodes.php
includes/class-shortcodes.php
+3
-1
No files found.
css/sexhackme_header.css
View file @
bfa30bcd
...
@@ -104,7 +104,9 @@ div.etn-single-event-media img.wp-post-image {
...
@@ -104,7 +104,9 @@ div.etn-single-event-media img.wp-post-image {
left
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
border-radius
:
15px
;
border-radius
:
15px
;
min-width
:
400px
;
min-width
:
300px
;
max-height
:
83%
;
overflow-y
:
auto
;
}
}
.site-header-shmlogin
:hover
>
li
.shmlogin
>
a
{
.site-header-shmlogin
:hover
>
li
.shmlogin
>
a
{
...
...
includes/class-post_types.php
View file @
bfa30bcd
...
@@ -24,6 +24,15 @@ namespace wp_SexHackMe;
...
@@ -24,6 +24,15 @@ namespace wp_SexHackMe;
// Exit if accessed directly
// Exit if accessed directly
if
(
!
defined
(
'ABSPATH'
)
)
exit
;
if
(
!
defined
(
'ABSPATH'
)
)
exit
;
/*
function replace__permalink( $post_link, $post, $leavename, $sample ) {
if ( 'custom_post_type' === $post->post_type ) {
$slug = 'custom-post-type';
$post_link = str_replace( '%' . $post->post_type . '%', $slug, $post_link );
}
return $post_link;
}
*/
if
(
!
class_exists
(
'SH_PostTypes'
))
{
if
(
!
class_exists
(
'SH_PostTypes'
))
{
class
SH_PostTypes
class
SH_PostTypes
...
@@ -56,6 +65,8 @@ if(!class_exists('SH_PostTypes')) {
...
@@ -56,6 +65,8 @@ if(!class_exists('SH_PostTypes')) {
add_filter
(
'manage_sexhackadv_posts_columns'
,
'wp_SexHackMe\advert_add_id_column'
,
5
);
add_filter
(
'manage_sexhackadv_posts_columns'
,
'wp_SexHackMe\advert_add_id_column'
,
5
);
add_action
(
'manage_sexhackadv_posts_custom_column'
,
'wp_SexHackMe\advert_id_column_content'
,
5
,
2
);
add_action
(
'manage_sexhackadv_posts_custom_column'
,
'wp_SexHackMe\advert_id_column_content'
,
5
,
2
);
// Fix the permalink for video pages
add_filter
(
'post_type_link'
,
__CLASS__
.
"::replace_permalink"
,
10
,
4
);
// SexHack Videos
// SexHack Videos
// TODO: the idea is to have custom post type for models profiles and for videos.
// TODO: the idea is to have custom post type for models profiles and for videos.
...
@@ -126,6 +137,16 @@ if(!class_exists('SH_PostTypes')) {
...
@@ -126,6 +137,16 @@ if(!class_exists('SH_PostTypes')) {
}
}
public
static
function
replace_permalink
(
$post_link
,
$post
,
$leavename
,
$sample
)
{
if
(
'sexhack_video'
===
$post
->
post_type
)
{
$video
=
sh_get_video_from_post
(
$post
);
$post_link
=
get_site_url
()
.
"/"
.
get_option
(
'sexhack_gallery_slug'
,
'v'
)
.
"/"
.
$video
->
slug
;
}
return
$post_link
;
}
public
static
function
add_rewrites
()
public
static
function
add_rewrites
()
{
{
global
$wp_rewrite
;
global
$wp_rewrite
;
...
...
includes/class-shortcodes.php
View file @
bfa30bcd
...
@@ -313,7 +313,9 @@ if(!class_exists('SH_Shortcodes')) {
...
@@ -313,7 +313,9 @@ if(!class_exists('SH_Shortcodes')) {
}
}
if
(
$popup
)
{
if
(
$popup
)
{
$script
.=
" shinc.addClass('"
.
$shmclass
.
"');"
;
$script
.=
" shinc.addClass('"
.
$shmclass
.
"');"
;
if
(
$campaign
!=
''
)
$script
.=
" shinc.find('form').submit(function(){\$.post('/content/plugins/matomo/app/matomo.php', {'idsite':1, 'rec': '1','mtm_campaign': '"
.
$campaign
.
"','mtm_kwd': shinc.attr('data-shmname') })});"
;
if
(
$campaign
!=
''
)
$action
=
"function(){\$.post('/content/plugins/matomo/app/matomo.php', {'idsite':1, 'rec': '1','mtm_campaign': '"
.
$campaign
.
"','mtm_kwd': shinc.attr('data-shmname') })}"
;
if
(
$campaign
!=
''
)
$script
.=
" shinc.find('form').submit("
.
$action
.
");"
;
if
(
$campaign
!=
''
)
$script
.=
" shinc.find('a').click("
.
$action
.
");"
;
}
}
if
(
$random
||
$popup
)
{
if
(
$random
||
$popup
)
{
...
...
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