添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
爽快的春卷  ·  http - Java ...·  1 年前    · 
温文尔雅的铁链  ·  Error: ...·  1 年前    · 
火爆的围巾  ·  iOS AFN Error ...·  1 年前    · 

我想把我的wordpress网站转移到其他服务器上。 当我移动它时,我想打开我的主页,却出现了这个错误。

"Parse error: syntax error, unexpected end of file in /var/www/spontex/public_html/wp-content/plugins/kamikaze-hotspots/kamikaze-hotspots.php on line 185"

你能告诉我,我必须做什么吗?

有一个kamikaze-hotspots.php文件。

wp_enqueue_style( 'khotspot_index_css' , plugins_url( 'page.css' , __FILE__ )); add_action( 'init' , function ( ) { register_post_type( 'khotspot' , array ( 'labels' => array ( 'name' => 'Hotspot' , 'singular_name' => 'Hotspot' 'public' => true , 'has_archive' => true , 'supports' => array ( 'title' , 'thumbnail' , 'meta-box' , 'custom-fields' ) add_action( 'add_meta_boxes' , function ( $post_type , $post ) { add_meta_box( 'khotspot_image' , __( 'Zdjęcie' ), function ( $post ) wp_enqueue_style( 'khotspot_css' , plugins_url( 'admin.css' , __FILE__ )); $image = wp_get_attachment_url( get_post_thumbnail_id( $post ->ID)); if ( empty ( $image )) echo '<p>Proszę wgrać obrazek korzystając z funkcjonalności po prawo.</p>' ; return ; echo '<p>Proszę pamiętać, że położenie punktów w czasie edycji i na stronie może różnić się. Dla upewnienia się, że punkty zostały poprawnie umieszczone proszę sprawdzić wygląd strony po zapisaniu zmian. Złap za punkt i przeciągnij go myszką.</p>' ; echo '<div class="khotspot_container">' ; echo '<img src="' . $image . '" alt="" />' ; $meta = get_post_meta( $post ->ID, '_points' ); $data = new stdClass ; if (! empty ( $meta [ 0 ])) { $data = unserialize( $meta [ 0 ]); foreach ( $data as $k => $v ) $v = ( object ) $v ; $style = '' ; if ( $v ->position) $style = 'style="left: ' .str_replace( ';' , 'px; top:' , $v ->position). 'px"' ; echo '<span class="point" data-id="' .( $k + 1 ). '" ' . $style . '>' .( $k + 1 ). '</span>' ; echo '</div>' ; <script> var draggable = null ; jQuery( '.khotspot_container' ).mousemove( function ( e ) if (draggable == null ) return ; var offset = jQuery( '.khotspot_container' ).offset(); var x = e.pageX - offset.left; var y = e.pageY - offset.top; console.log( 'dragging ...' ); draggable.css({ top: (y - 16 ) + 'px' , left: x + 'px' , jQuery( '.khotspot_container .point' ).mousedown( function ( el ) draggable = jQuery(this); return false ; jQuery( '.khotspot_container .point' ).mouseup( function ( el ) jQuery( '#khotspotposition' + draggable.data( 'id' )).val(parseInt(draggable[ 0 ].style.left)+ ';' +parseInt(draggable[ 0 ].style.top)); draggable = null ; </script> 'khotspot' , 'normal' , 'default' $image = get_post_thumbnail_id( $post ->ID); if (! $image ) return ; $current = 0 ; $meta = get_post_meta( $post ->ID, '_points' ); if (! empty ( $meta [ 0 ])) { $current = count(unserialize( $meta [ 0 ])); for ( $p = 1 ; $p <= $current + 1 ; $p ++) $_GET [ 'kLoop' ] = $p ; add_meta_box( 'khotspot_point_' . $p , __( 'Punkt #' . $p ), 'point_editor' , 'khotspot' , 'normal' , 'default' }, 10 , 2 ); function point_editor ( $post ) static $count = 0 ; $count ++; $meta = get_post_meta( $post ->ID, '_points' ); $data = new stdClass ; if (! empty ( $meta [ 0 ])) { $data = unserialize( $meta [ 0 ]); if ( isset ( $data [ $count - 1 ])) $data = $data [ $count - 1 ]; $data = ( object ) $data ; <label>Nazwa punktu:</label><br /> <input type= "text" name= "khotspotname[<?= $count ; ?>]" value= "<?= htmlspecialchars(stripslashes( $data ->name)); ?>" style= "width: 100%; margin: 5px 0" /> <label>Kolor punktu (niebieski: #0E5CA7, czerwony: #EE2F25):</label><br /> <input type= "text" name= "khotspotcolor[<?= $count ; ?>]" value= "<?= $data ->color ? $data ->color : '#EE2F25'; ?>" style= "width: 100%; margin: 5px 0" /> <label>Adres URL przekierowania:</label><br /> <input type= "text" name= "khotspoturl[<?= $count ; ?>]" value= "<?= $data ->url; ?>" style= "width: 100%; margin: 5px 0" /> <label>Położenie punktu (po dodaniu nowego punktu możliwe będzie umiejscowoenie go na obrazku):</label><br /> <input type= "text" id= "khotspotposition<?= $count ; ?>" name= "khotspotposition[<?= $count ; ?>]" value= "<?= $data ->position; ?>" style= "width: 100%; margin: 5px 0" /> wp_editor(stripslashes( $data ->text), 'khotspoteditor' . $count , array ( 'textarea_name' => 'khotspottext[' . $count . ']' , 'textarea_rows' => 10 )); add_action( 'save_post' , function ( $post_id ) $post = get_post( $post_id ); if ( $post ->post_type != 'khotspot' ) return ; $points = array (); if ( isset ( $_POST [ 'khotspotname' ])) foreach ( $_POST [ 'khotspotname' ] as $k => $v ) if (! empty ( $_POST [ 'khotspotname' ][ $k ])) $points [] = array ( 'name' => ( $_POST [ 'khotspotname' ][ $k ]), 'color' => $_POST [ 'khotspotcolor' ][ $k ], 'url' => $_POST [ 'khotspoturl' ][ $k ], 'position' => $_POST [ 'khotspotposition' ][ $k ], 'text' => ( $_POST [ 'khotspottext' ][ $k ]), update_post_meta( $post_id , '_points' , addslashes(serialize( $points )) );
php
wordpress
apache2
krzysie_1997
krzysie_1997
发布于 2019-01-07
1 个回答
kangaswad
kangaswad
发布于 2019-01-07
0 人赞同