Suporte » Plugins » Parse error: syntax error, unexpected ‘var’ (T_VAR)

  • Resolvido maysamkt

    (@maysamkt)


    Estou com esse erro no site
    Parse error: syntax error, unexpected ‘var’ (T_VAR) in /home2/msaklcor/public_html/wp-content/plugins/wpcat2tag-importer/wpcat2tag-importer.php on line 31

    Não consigo acessar o painel do wordpress para desinstalar esse plugin, baixei o arquivo mas não consigo saber onde está o erro para corrigir, se alguém puder me dar uma luz, não entendo nada de PHP – o Trecho que se refere está aí abaixo.

    `/**
    * Categories to Tags Converter Importer
    *
    * @package WordPress
    * @subpackage Importer
    */
    if ( class_exists( ‘WP_Importer’ ) ) {
    var $categories_to_convert = array();
    var $all_categories = array();
    var $tags_to_convert = array();
    var $all_tags = array();
    var $hybrids_ids = array();

    function header() {
    echo ‘<div class=”wrap”>’;
    if ( ! current_user_can(‘manage_categories’) ) {
    echo ‘<div class=”narrow”>’;
    echo ‘<p>’ . __(‘Cheatin’ uh?’, ‘wpcat2tag-importer’) . ‘</p>’;
    echo ‘</div>’;
    } else { ?>
    <div class=”tablenav”><p style=”margin:4px”><?php _e( “Categories to Tags” , ‘wpcat2tag-importer’); ?>
    <?php _e( “Tags to Categories” , ‘wpcat2tag-importer’); ?></p></div>
    <?php }
    }

    function footer() {
    echo ‘</div>’;
    }

    function populate_cats() {

    $categories = get_categories(array(‘get’ => ‘all’));
    foreach ( $categories as $category ) {
    $this->all_categories[] = $category;
    if ( term_exists( $category->slug, ‘post_tag’ ) )
    $this->hybrids_ids[] = $category->term_id;
    }
    }

    function populate_tags() {

    $tags = get_terms( array(‘post_tag’), array(‘get’ => ‘all’) );
    foreach ( $tags as $tag ) {
    $this->all_tags[] = $tag;
    if ( term_exists( $tag->slug, ‘category’ ) )
    $this->hybrids_ids[] = $tag->term_id;
    }
    }

    function categories_tab() {
    $this->populate_cats();
    $cat_num = count($this->all_categories);

    echo ‘<br class=”clear” />’;

    if ( $cat_num > 0 ) {
    screen_icon();
    echo ‘<h2>’ . sprintf( _n( ‘Convert Category to Tag.’, ‘Convert Categories (%d) to Tags.’, $cat_num , ‘wpcat2tag-importer’), $cat_num ) . ‘</h2>’;
    echo ‘<div class=”narrow”>’;
    echo ‘<p>’ . __(‘Hey there. Here you can selectively convert existing categories to tags. To get started, check the categories you wish to be converted, then click the Convert button.’, ‘wpcat2tag-importer’) . ‘</p>’;
    echo ‘<p>’ . __(‘Keep in mind that if you convert a category with child categories, the children become top-level orphans.’, ‘wpcat2tag-importer’) . ‘</p></div>’;

    $this->categories_form();
    } else {
    echo ‘<p>’.__(‘You have no categories to convert!’, ‘wpcat2tag-importer’).'</p>’;
    }
    }

    function categories_form() { ?>

    <script type=”text/javascript”>
    /* <![CDATA[ */
    var checkflag = “false”;
    function check_all_rows() {
    field = document.catlist;
    if ( ‘false’ == checkflag ) {
    for ( i = 0; i < field.length; i++ ) {
    if ( ‘cats_to_convert[]’ == field[i].name )
    field[i].checked = true;
    }
    checkflag = ‘true’;
    return ‘<?php _e(‘Uncheck All’, ‘wpcat2tag-importer’) ?>’;
    } else {
    for ( i = 0; i < field.length; i++ ) {
    if ( ‘cats_to_convert[]’ == field[i].name )
    field[i].checked = false;
    }
    checkflag = ‘false’;
    return ‘<?php _e(‘Check All’, ‘wpcat2tag-importer’) ?>’;
    }
    }
    /* ]]> */

    A página que eu preciso de ajuda: [fazer login para ver o link]

  • Você deve estar conectado para responder a este tópico.