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
861e1b3f
Commit
861e1b3f
authored
Jul 18, 2022
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Continue developement of video page
parent
d38c3330
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
423 additions
and
73 deletions
+423
-73
class-meta-box.php
includes/class-meta-box.php
+26
-20
class-post_types.php
includes/class-post_types.php
+1
-1
class-query.php
includes/class-query.php
+120
-2
class-shortcodes.php
includes/class-shortcodes.php
+1
-0
class-video.php
includes/class-video.php
+176
-0
class-videogallery.php
includes/class-videogallery.php
+3
-3
functions-core.php
includes/functions-core.php
+29
-0
sexhackme.php
sexhackme.php
+42
-47
metabox_video.php
templates/admin/metabox_video.php
+25
-0
No files found.
includes/class-meta-box.php
View file @
861e1b3f
...
...
@@ -31,36 +31,30 @@ if(!class_exists('SH_MetaBox')) {
public
static
function
add_video_metaboxes
(
$post
=
false
)
{
add_meta_box
(
'sh-mbox-videodescription'
,
'Video Description'
,
array
(
__CLASS__
,
'::load_metabox_videodescription'
),
'sexhack_video'
,
'normal'
,
'default'
);
add_meta_box
(
'sh-mbox-video'
,
'Video locations'
,
array
(
__CLASS__
,
'::load_metabox_videolocations'
),
'sexhack_video'
,
'normal'
,
'default'
);
//remove_meta_box( 'postimagediv', 'sexhack_video', 'side' );
add_meta_box
(
'sh-mbox-videodescription'
,
'Videos'
,
'wp_SexHackMe\SH_MetaBox::load_metabox_video'
,
'sexhack_video'
,
'normal'
,
'default'
);
remove_meta_box
(
'postimagediv'
,
'sexhack_video'
,
'side'
);
add_meta_box
(
'postimagediv'
,
'Video Thumbnail'
,
'post_thumbnail_meta_box'
,
'sexhack_video'
,
'side'
,
'default'
);
}
public
static
function
load_metabox_video
description
(
$post
)
public
static
function
load_metabox_video
(
$post
)
{
wp_nonce_field
(
'video_description_nonce'
,
'sh_video_description_nonce'
);
$value
=
get_post_meta
(
$post
->
ID
,
'video_description'
,
true
);
echo
'<textarea style="width:100%" id="video_description" name="video_description">'
.
esc_attr
(
$value
)
.
'</textarea>'
;
}
public
static
function
load_metabox_videolocations
(
$post
)
//($object, $box)
{
wp_nonce_field
(
'global_notice_nonce'
,
'global_notice_nonce'
);
$video
=
sh_get_video_from_post
(
$post
->
ID
);
if
(
!
$video
)
$video
=
new
SH_Video
();
$video
->
post_id
=
$post
->
ID
;
$video
->
post
=
$post
;
sh_get_template
(
"admin/metabox_video.php"
,
array
(
'video'
=>
$video
,
'post'
=>
$post
));
$value
=
get_post_meta
(
$post
->
ID
,
'_global_notice'
,
true
);
echo
'<textarea style="width:100%" id="global_notice" name="global_notice">'
.
esc_attr
(
$value
)
.
'</textarea>'
;
}
public
static
function
save_meta_box_data
(
$post_id
)
{
return
$this
->
save_sexhack_video_meta_box_data
(
$post_id
);
return
SH_MetaBox
::
save_sexhack_video_meta_box_data
(
$post_id
);
}
public
function
save_sexhack_video_meta_box_data
(
$post_id
)
public
static
function
save_sexhack_video_meta_box_data
(
$post_id
)
{
...
...
@@ -94,16 +88,28 @@ if(!class_exists('SH_MetaBox')) {
if
(
!
isset
(
$_POST
[
'video_description'
]
)
)
{
return
;
}
$video
=
sh_get_video_from_post
(
$post_id
);
if
(
!
$video
)
$video
=
new
SH_Video
();
$video
->
post_id
=
$post_id
;
$post
=
$video
->
get_post
();
$video
->
title
=
$post
->
post_title
;
$video
->
slug
=
$post
->
post_name
;
sexhack_log
(
$post
);
// Sanitize user input.
$
my_data
=
sanitize_text_field
(
$_POST
[
'video_description'
]
);
$
video
->
description
=
sanitize_text_field
(
$_POST
[
'video_description'
]
);
// Update the meta field in the database.
update_post_meta
(
$post_id
,
'video_description'
,
$my_data
);
//update_post_meta( $post_id, 'video_description', $my_data );
sh_save_video
(
$video
);
}
}
add_action
(
'save_post'
,
array
(
'wp_SexHackMe\SH_MetaBox'
,
'::save_meta_box_data'
)
);
add_action
(
'save_post'
,
'wp_SexHackMe\SH_MetaBox::save_meta_box_data'
);
}
...
...
includes/class-post_types.php
View file @
861e1b3f
...
...
@@ -90,7 +90,7 @@ if(!class_exists('SH_PostTypes')) {
'query_var'
=>
true
,
'has_archive'
=>
true
,
'supports'
=>
array
(
'title'
),
// 'thumbnail', 'editor','excerpt','trackbacks','custom-fields','comments','revisions','author','page-attributes'),
'taxonomies'
=>
array
(
'category'
,
'post_tag'
),
// TODO Shouldn't we have a "video_type" taxonomy for VR or flat?
'taxonomies'
=>
array
(
),
//'category'), //
,'post_tag'), // TODO Shouldn't we have a "video_type" taxonomy for VR or flat?
));
$DEFAULTSLUG
=
get_option
(
'sexhack_gallery_slug'
,
'v'
);
$projects_structure
=
'/'
.
$DEFAULTSLUG
.
'/%wooprod%/'
;
...
...
includes/class-query.php
View file @
861e1b3f
...
...
@@ -28,8 +28,97 @@ if ( ! defined( 'ABSPATH' ) ) exit;
if
(
!
class_exists
(
'SH_Query'
))
{
class
SH_Query
{
public
static
function
save_Video
(
$video
)
{
global
$wpdb
;
if
(
is_object
(
$video
))
{
$fieldsarray
=
$video
->
get_sql_array
();
$fields
=
""
;
$keys
=
""
;
$values
=
""
;
$count
=
0
;
foreach
(
$fieldsarray
as
$k
=>
$v
)
{
$v
=
$wpdb
->
_real_escape
(
$v
);
$adds
=
"
\n
"
;
$fields
.=
$k
.
" = '
$v
'"
;
$keys
.=
$k
;
$values
.=
"'
$v
'"
;
if
(
$count
<
count
(
$fieldsarray
)
-
1
)
$adds
=
",
\n
"
;
$fields
.=
$adds
;
$keys
.=
$adds
;
$values
.=
$adds
;
$count
++
;
}
if
(
$video
->
id
||
(
is_long
(
$video
->
id
)
&&
$video
->
id
>
0
))
{
// Save an already existing video entry
$sql
=
"UPDATE
{
$wpdb
->
prefix
}
"
.
SH_PREFIX
.
"videos SET
{
$fields
}
WHERE
id =
{
$video
->
id
}
;"
;
$wpdb
->
query
(
$sql
);
}
else
{
// Save a new video
$sql
=
"INSERT INTO
{
$wpdb
->
prefix
}
"
.
SH_PREFIX
.
"videos
(
{
$keys
}
)
VALUES
(
{
$values
}
);"
;
$wpdb
->
query
(
$sql
);
$video
->
id
=
$wpdb
->
insert_id
;
}
return
$video
;
}
}
public
static
function
get_Video
(
$id
,
$idtype
=
''
)
{
global
$wpdb
;
switch
(
$idtype
)
{
case
"product"
:
case
"post"
:
$idtype
=
$idtype
.
"_id"
;
break
;
default
:
$idtype
=
"id"
;
}
// TODO sanitize query
$sql
=
"SELECT * from
{
$wpdb
->
prefix
}
"
.
SH_PREFIX
.
"videos WHERE
{
$idtype
}
="
.
intval
(
$id
);
$dbres
=
$wpdb
->
get_results
(
$sql
);
if
(
is_array
(
$dbres
)
&&
count
(
$dbres
)
>
0
)
{
return
new
SH_Video
((
array
)
$dbres
[
0
]);
}
return
false
;
}
public
static
function
get_Videos
(
$vcat
=
false
)
{
global
$wpdb
;
// XXX TODO This filtering using a $_GET in the query class is SHIT.
// Move it in the gallery interface, and pass a fucking argument
$filter
=
false
;
if
(
isset
(
$_GET
[
'sexhack_vselect'
]))
{
...
...
@@ -44,8 +133,36 @@ if(!class_exists('SH_Query')) {
}
}
$queryarr
=
array
(
$result
=
array
();
//$sql = $wpdb->prepare("SELECT * from {$wpdb->prefix}{$prefix}videos");
$sql
=
"SELECT * from
{
$wpdb
->
prefix
}
"
.
SH_PREFIX
.
"videos"
;
$dbres
=
$wpdb
->
get_results
(
$sql
);
foreach
(
$dbres
as
$row
)
{
$result
[]
=
new
SH_Video
(
$row
);
}
}
public
static
function
get_Products
(
$vcat
=
false
)
{
$filter
=
false
;
if
(
isset
(
$_GET
[
'sexhack_vselect'
]))
{
switch
(
$_GET
[
'sexhack_vselect'
])
{
case
'premium'
:
case
'members'
:
case
'public'
:
case
'preview'
:
$filter
=
$_GET
[
'sexhack_vselect'
];
break
;
}
}
$queryarr
=
array
(
/*
* We're limiting the results to 100 products, change this as you
* see fit. -1 is for unlimted but could introduce performance issues.
...
...
@@ -103,8 +220,9 @@ if(!class_exists('SH_Query')) {
//sexhack_log(var_dump($products));
return
$products
;
}
}
}
...
...
includes/class-shortcodes.php
View file @
861e1b3f
...
...
@@ -123,6 +123,7 @@ if(!class_exists('SH_Shortcodes')) {
),
$attr
));
$html
=
"<div class='sexhack_gallery'>"
;
//<h3>SexHack VideoGallery</h3>";
if
(
isset
(
$_GET
[
'SHDEV'
]))
$html
.=
'<h3>DEVELOPEMENT MODE</h3>'
;
$html
.=
'<ul class="products columns-4">'
;
$products
=
$sh_videogallery
->
getProducts
();
while
(
$products
->
have_posts
()
)
{
...
...
includes/class-video.php
0 → 100644
View file @
861e1b3f
<?php
/**
* Copyright: 2022 (c)Franco (nextime) Lanza <franco@nexlab.it>
* License: GNU/GPL version 3.0
*
* This file is part of SexHackMe Wordpress Plugin.
*
* SexHackMe Wordpress Plugin is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* SexHackMe Wordpress Plugin is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with SexHackMe Wordpress Plugin. If not, see <https://www.gnu.org/licenses/>.
*/
namespace
wp_SexHackMe
;
// Exit if accessed directly
if
(
!
defined
(
'ABSPATH'
)
)
exit
;
if
(
!
class_exists
(
'SH_Video'
))
{
class
SH_Video
{
protected
$attributes
=
array
(
'id'
=>
0
,
'user_id'
=>
0
,
'post_id'
=>
0
,
'product_id'
=>
0
,
'status'
=>
'creating'
,
'private'
=>
'N'
,
'visible'
=>
'Y'
,
'title'
=>
''
,
'description'
=>
''
,
'uploaded'
=>
false
,
'slug'
=>
''
,
'price'
=>
0
,
'video_type'
=>
'FLAT'
,
'vr_projection'
=>
'VR180_LR'
,
'preview'
=>
false
,
'hls_public'
=>
false
,
'hls_members'
=>
false
,
'hls_premium'
=>
false
,
'thumbnail'
=>
false
,
'gif'
=>
false
,
'download_public'
=>
false
,
'download_members'
=>
false
,
'download_premium'
=>
false
,
'size_public'
=>
false
,
'size_members'
=>
false
,
'size_premium'
=>
false
,
'format_public'
=>
false
,
'format_members'
=>
false
,
'format_premium'
=>
false
,
'duration_public'
=>
false
,
'duration_members'
=>
false
,
'duration_premium'
=>
false
,
'resolution_public'
=>
false
,
'resolution_members'
=>
false
,
'resolution_premium'
=>
false
,
'views_public'
=>
0
,
'views_members'
=>
0
,
'views_premium'
=>
0
,
'sells'
=>
0
);
public
function
__construct
(
$attr
=
false
)
{
$this
->
attributes
[
'uploaded'
]
=
date
(
'Y-m-d H:i:s'
);
if
(
is_array
(
$attr
))
$this
->
setAttributes
(
$attr
);
}
function
setAttributes
(
$attr
,
$post
=
false
,
$wcprod
=
false
)
{
// XXX TODO Validate the $attr array
if
(
!
is_array
(
$attr
))
return
false
;
foreach
(
$attr
as
$k
=>
$v
)
{
if
(
array_key_exists
(
$k
,
$this
->
attributes
))
$this
->
attributes
[
$k
]
=
$v
;
}
if
(
$post
&&
is_object
(
$post
))
$this
->
__set
(
'post'
,
$post
);
else
if
(
$post
&&
is_array
(
$post
)
&&
(
count
(
$post
)
>
0
)
&&
is_object
(
$post
[
0
]))
$this
->
__set
(
'post'
,
$post
[
0
]);
//else if(array_key_exists('post_id', $attributes) && is_integer($attributes['post_id']) && ($attributes['post_id'] > 0))
// $this->__set('post', get_post($attributes['post_id']);
if
(
$wcprod
&&
is_object
(
$wcprod
))
$this
->
__set
(
'product'
,
$wcprod
);
else
if
(
$wcprod
&&
is_array
(
$wcprod
)
&&
(
count
(
$wcprod
)
>
0
)
&&
is_object
(
$wcprod
[
0
]))
$this
->
__set
(
'product'
,
$wcprod
[
0
]);
//else if(array_key_exists('product_id', $attributes) && is_integer($attributes['product_id']) && ($attributes['product_id'] > 0))
// $this->__set('product', wc_get_product($attributes['product_id']);
}
public
function
__get
(
$key
){
if
(
!
array_key_exists
(
$key
,
$this
->
attributes
))
return
null
;
return
$this
->
attributes
[
$key
];
}
public
function
__set
(
$key
,
$value
=
false
)
{
$this
->
attributes
[
$key
]
=
$value
;
}
public
function
__unset
(
$key
)
{
unset
(
$this
->
attributes
[
$key
]);
}
public
function
__isset
(
$key
)
{
return
isset
(
$this
->
attributes
[
'key'
]);
}
public
function
get_post
()
{
if
(
isset
(
$this
->
attributes
[
'post'
]))
return
$this
->
post
;
if
(
array_key_exists
(
'post_id'
,
$this
->
attributes
))
{
$this
->
__set
(
'post'
,
get_post
(
$this
->
post_id
));
return
$this
->
post
;
}
return
false
;
}
public
function
get_product
()
{
if
(
isset
(
$this
->
attributes
[
'product'
]))
return
$this
->
product
;
if
(
array_key_exists
(
'product'
,
$this
->
attributes
))
{
$this
->
__set
(
'product'
,
wc_get_product
(
$this
->
post_id
));
return
$this
->
product
;
}
return
false
;
}
// Repopulate the object from $post or $post->ID
public
function
update_video_from_post
(
$p
)
{
$post
=
false
;
if
(
is_object
(
$p
))
$post
=
$p
;
else
if
(
is_integer
(
$p
))
$post
=
get_post
(
$post
);
if
(
$post
)
{
$this
->
post
=
clone
$post
;
}
return
false
;
}
public
function
get_sql_array
()
{
$r
=
array
();
foreach
(
$this
->
attributes
as
$k
=>
$v
)
{
if
((
$v
)
&&
!
in_array
(
$k
,
array
(
'post'
,
'product'
))
)
$r
[
$k
]
=
$v
;
}
return
$r
;
}
}
$GLOBALS
[
'sh_video'
]
=
new
SH_Video
();
do_action
(
'sh_video_ready'
);
}
?>
includes/class-videogallery.php
View file @
861e1b3f
...
...
@@ -59,7 +59,7 @@ if(!class_exists('SH_VideoGallery')) {
public
function
sexhack_video_template
(
$template
)
{
$template
=
'video.php'
;
if
(
isset
(
$_GET
[
'S
EXHACKDEBUG
'
]))
$template
=
'newvideo.php'
;
if
(
isset
(
$_GET
[
'S
HDEV
'
]))
$template
=
'newvideo.php'
;
$is_sexhack_video
=
get_query_var
(
'wooprod'
,
false
);
if
(
$is_sexhack_video
)
{
set_query_var
(
'post_type'
,
'sexhack_video'
);
...
...
@@ -86,8 +86,8 @@ if(!class_exists('SH_VideoGallery')) {
public
function
getProducts
(
$vcat
=
false
)
{
if
(
!
$this
->
productlist
&&
!
$vcat
)
$this
->
productlist
=
SH_Query
::
get_
Video
s
(
$vcat
);
//$this->_getProducts($vcat);
else
if
(
$vcat
)
return
SH_Query
::
get_
Video
s
(
$vcat
);
//$this->_getProducts($vcat);
if
(
!
$this
->
productlist
&&
!
$vcat
)
$this
->
productlist
=
SH_Query
::
get_
Product
s
(
$vcat
);
//$this->_getProducts($vcat);
else
if
(
$vcat
)
return
SH_Query
::
get_
Product
s
(
$vcat
);
//$this->_getProducts($vcat);
return
$this
->
productlist
;
...
...
includes/functions-core.php
View file @
861e1b3f
...
...
@@ -33,6 +33,35 @@ function sh_get_template($tmpl, $args=array())
}
function
sh_save_video
(
$video
)
{
return
SH_Query
::
save_Video
(
$video
);
}
function
sh_get_videos
(
$vcat
=
false
)
{
return
SH_Query
::
get_Videos
(
$vcat
);
}
function
sh_get_video
(
$id
)
{
return
SH_Query
::
get_Video
(
$id
);
}
function
sh_get_video_from_post
(
$p
)
{
if
(
is_int
(
$p
)
&&
$p
>
0
)
return
SH_Query
::
get_Video
(
$p
,
'post'
);
else
if
(
is_object
(
$p
))
return
SH_Query
::
get_Video
(
$p
->
ID
,
'post'
);
return
false
;
}
function
sh_get_video_from_product
(
$p
)
{
if
(
is_int
(
$p
)
and
$p
>
0
)
return
SH_Query
::
get_Video
(
$p
,
'product'
);
else
if
(
is_object
(
$p
))
return
SH_Query
::
get_Video
(
$p
->
get_id
(),
'product'
);
return
false
;
}
function
sh_get_subscription_plans
()
{
return
pms_get_subscription_plans
();
...
...
sexhackme.php
View file @
861e1b3f
...
...
@@ -54,6 +54,7 @@ if(!class_exists('SexHackMe_Plugin')) {
// The prefix of the plugin
$this
->
prefix
=
'sh_'
;
define
(
'SH_PREFIX'
,
$this
->
prefix
);
// Install needed components on plugin activation
register_activation_hook
(
__FILE__
,
array
(
$this
,
'install'
)
);
...
...
@@ -166,7 +167,7 @@ if(!class_exists('SexHackMe_Plugin')) {
$sql_query
=
"CREATE TABLE
{
$wpdb
->
prefix
}{
$this
->
prefix
}
videos (
id bigint(20) AUTO_INCREMENT NOT NULL,
user_id bigint(20) NOT NULL,
post_id bi
ting
(20) NOT NULL,
post_id bi
gint
(20) NOT NULL,
product_id bigint(20) NOT NULL DEFAULT '0',
status ENUM('creating', 'uploading', 'queue', 'processing', 'ready','published','error') NOT NULL DEFAULT 'creating',
private ENUM('Y', 'N') NOT NULL DEFAULT 'N',
...
...
@@ -195,7 +196,7 @@ if(!class_exists('SexHackMe_Plugin')) {
format_premium varchar(256) DEFAULT NULL,
duration_public varchar(256) DEFAULT NULL,
duration_members varchar(256) DEFAULT NULL,
duration_premiu
nt
varchar(256) DEFAULT NULL,
duration_premiu
m
varchar(256) DEFAULT NULL,
resolution_public varchar(256) DEFAULT NULL,
resolution_members varchar(256) DEFAULT NULL,
resolution_premium varchar(256) DEFAULT NULL,
...
...
@@ -298,6 +299,22 @@ if(!class_exists('SexHackMe_Plugin')) {
}
private
function
file_include
(
$file
)
{
if
(
isset
(
$_GET
[
'SHDEV'
])
||
isset
(
$_POST
[
'SHDEV'
]))
{
$devar
=
explode
(
'/'
,
$file
);
$devar
[
count
(
$devar
)
-
1
]
=
'dev-'
.
$devar
[
count
(
$devar
)
-
1
];
$devfile
=
implode
(
'/'
,
$devar
);
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
$devfile
))
return
include_once
SH_PLUGIN_DIR_PATH
.
$devfile
;
}
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
$file
)
)
return
include_once
SH_PLUGIN_DIR_PATH
.
$file
;
return
false
;
}
/*
* Function to include the files needed
*
...
...
@@ -305,91 +322,69 @@ if(!class_exists('SexHackMe_Plugin')) {
public
function
include_dependencies
()
{
/*
if( file_exists( SH_PLUGIN_DIR_PATH . 'includes/' ) )
include_once( SH_PLUGIN_DIR_PATH . 'includes/' );
*/
/* Manage Plugin Dependencies */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-tgm-plugin-activation.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-tgm-plugin-activation.php'
;
$this
->
file_include
(
'includes/class-tgm-plugin-activation.php'
);
/* Utils */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/functions-utils.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/functions-utils.php'
;
$this
->
file_include
(
'includes/functions-utils.php'
);
/* Core functions */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/functions-core.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/functions-core.php'
;
$this
->
file_include
(
'includes/functions-core.php'
);
/* Custom Post Types declarations */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-post_types.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-post_types.php'
;
$this
->
file_include
(
'includes/class-post_types.php'
);
/* Meta Boxes */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-meta-box.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-meta-box.php'
;
$this
->
file_include
(
'includes/class-meta-box.php'
);
/* DB Query */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-query.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-query.php'
;
$this
->
file_include
(
'includes/class-query.php'
);
/* Admin interface */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-admin.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-admin.php'
;
$this
->
file_include
(
'includes/class-admin.php'
);
/* Hooks compatibility/translation */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/functions-hooks.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/functions-hooks.php'
;
$this
->
file_include
(
'includes/functions-hooks.php'
);
/* Cryptocurrencies utils */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/functions-crypto.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/functions-crypto.php'
;
$this
->
file_include
(
'includes/functions-crypto.php'
);
/* Paid Member Subscription utils */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-paid-member-subscriptions-integration.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-paid-member-subscriptions-integration.php'
;
$this
->
file_include
(
'includes/class-paid-member-subscriptions-integration.php'
);
/* Video Players */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-video-players.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-video-players.php'
;
$this
->
file_include
(
'includes/class-video-players.php'
);
/* Advertising support */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/functions-advert.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/functions-advert.php'
;
$this
->
file_include
(
'includes/functions-advert.php'
);
/* Cam4 and Chaturbate support */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-livecam-site-support.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-livecam-site-support.php'
;
$this
->
file_include
(
'includes/class-livecam-site-support.php'
);
/* WooCommerce support functions */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/functions-woocommerce-support.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/functions-woocommerce-support.php'
;
$this
->
file_include
(
'includes/functions-woocommerce-support.php'
);
/* WooCommerce support class */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-woocommerce-support.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-woocommerce-support.php'
;
$this
->
file_include
(
'includes/class-woocommerce-support.php'
);
/* Storefront customization support */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-storefront.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-storefront.php'
;
$this
->
file_include
(
'includes/class-storefront.php'
);
/* Unlock integration class */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-unlock-support.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-unlock-support.php'
;
$this
->
file_include
(
'includes/class-unlock-support.php'
);
/* Video */
$this
->
file_include
(
'includes/class-video.php'
);
/* Video Gallery */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-videogallery.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-videogallery.php'
;
$this
->
file_include
(
'includes/class-videogallery.php'
);
/* Shortcodes */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-shortcodes.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-shortcodes.php'
;
$this
->
file_include
(
'includes/class-shortcodes.php'
);
/* Widgets */
if
(
file_exists
(
SH_PLUGIN_DIR_PATH
.
'includes/class-widgets.php'
)
)
include_once
SH_PLUGIN_DIR_PATH
.
'includes/class-widgets.php'
;
$this
->
file_include
(
'includes/class-widgets.php'
);
/* Hook to include needed files */
do_action
(
'pms_include_files'
);
...
...
templates/admin/metabox_video.php
0 → 100644
View file @
861e1b3f
<?php
/**
* Copyright: 2022 (c)Franco (nextime) Lanza <franco@nexlab.it>
* License: GNU/GPL version 3.0
*
* This file is part of SexHackMe Wordpress Plugin.
*
* SexHackMe Wordpress Plugin is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* SexHackMe Wordpress Plugin is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with SexHackMe Wordpress Plugin. If not, see <https://www.gnu.org/licenses/>.
*/
// Exit if accessed directly
if
(
!
defined
(
'ABSPATH'
)
)
exit
;
?>
<textarea
style=
"width:100%"
id=
"video_description"
name=
"video_description"
>
<?php
echo
esc_attr
(
$video
->
description
);
?>
</textarea>
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