Keep going...

parent 861e1b3f
img/adv.png

37.7 KB

...@@ -34,6 +34,12 @@ if(!class_exists('SH_MetaBox')) { ...@@ -34,6 +34,12 @@ if(!class_exists('SH_MetaBox')) {
add_meta_box( 'sh-mbox-videodescription', 'Videos', 'wp_SexHackMe\SH_MetaBox::load_metabox_video', 'sexhack_video', 'normal','default'); 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' ); remove_meta_box( 'postimagediv', 'sexhack_video', 'side' );
add_meta_box('postimagediv', 'Video Thumbnail', 'post_thumbnail_meta_box', 'sexhack_video', 'side', 'default'); add_meta_box('postimagediv', 'Video Thumbnail', 'post_thumbnail_meta_box', 'sexhack_video', 'side', 'default');
// XXX Remove Paid Member Subscription meta boxes
remove_meta_box( 'pms_post_content_restriction', 'sexhack_video', 'default');
// XXX Remove Members plugin meta box
remove_meta_box( 'members-cp', 'sexhack_video', 'default');
} }
public static function load_metabox_video($post) public static function load_metabox_video($post)
...@@ -102,6 +108,7 @@ if(!class_exists('SH_MetaBox')) { ...@@ -102,6 +108,7 @@ if(!class_exists('SH_MetaBox')) {
// Sanitize user input. // Sanitize user input.
$video->description = sanitize_text_field( $_POST['video_description'] ); $video->description = sanitize_text_field( $_POST['video_description'] );
sexhack_log($_POST);
// Update the meta field in the database. // 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); sh_save_video($video);
......
...@@ -41,6 +41,7 @@ if(!class_exists('SH_PostTypes')) { ...@@ -41,6 +41,7 @@ if(!class_exists('SH_PostTypes')) {
'show_ui' => true, 'show_ui' => true,
'show_in_menu' => true, // Visibility in admin menu. 'show_in_menu' => true, // Visibility in admin menu.
'menu_position' => 32, 'menu_position' => 32,
'menu_icon' => SH_PLUGIN_DIR_URL . 'img/adv_icon.png',
'capability_type' => 'post', 'capability_type' => 'post',
'hierarchical' => false, 'hierarchical' => false,
'publicly_queryable' => true, 'publicly_queryable' => true,
...@@ -82,6 +83,7 @@ if(!class_exists('SH_PostTypes')) { ...@@ -82,6 +83,7 @@ if(!class_exists('SH_PostTypes')) {
'show_in_menu' => true, 'show_in_menu' => true,
'show_in_rest' => true, 'show_in_rest' => true,
'menu_position' => 32, 'menu_position' => 32,
'menu_icon' => SH_PLUGIN_DIR_URL . 'img/porn_icon.png',
'capability_type' => 'post', // TODO Maybe We should create our own cap type? 'capability_type' => 'post', // TODO Maybe We should create our own cap type?
// 'capabilities' => array(), // Or just select specific capabilities here // 'capabilities' => array(), // Or just select specific capabilities here
'hierarchical' => true, 'hierarchical' => true,
...@@ -89,7 +91,7 @@ if(!class_exists('SH_PostTypes')) { ...@@ -89,7 +91,7 @@ if(!class_exists('SH_PostTypes')) {
'rewrite' => false, 'rewrite' => false,
'query_var' => true, 'query_var' => true,
'has_archive' => true, 'has_archive' => true,
'supports' => array('title'), // 'thumbnail', 'editor','excerpt','trackbacks','custom-fields','comments','revisions','author','page-attributes'), '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'); $DEFAULTSLUG = get_option('sexhack_gallery_slug', 'v');
......
...@@ -609,8 +609,11 @@ if(!class_exists('SexHackMe_Plugin')) { ...@@ -609,8 +609,11 @@ if(!class_exists('SexHackMe_Plugin')) {
if( WP_DEBUG === true ){ if( WP_DEBUG === true ){
// only matched? // only matched?
//add_action("the_post", 'wp_SexHackMe\debug_rewrite_rules'); //add_action("the_post", 'wp_SexHackMe\debug_rewrite_rules');
sexhack_log("REQUEST: ".$_SERVER['REQUEST_URI']." QUERY: ".$_SERVER['QUERY_STRING']. "POST:");
sexhack_log($_POST);
} }
?> ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment