Error con theme luego de cambiar a PHP 7

  • Autor Autor luismt
  • Fecha de inicio Fecha de inicio

luismt

Delta
Verificación en dos pasos activada
Verificado por Whatsapp
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Buenas gente, acabo de cambiar a PHP 7 y el theme (Novavideo) comenzó a devolver estos errores. ¿A alguien se les ocurre cual puede ser la causa?

PHP:
[12-Dec-2016 21:16:17 UTC] PHP Warning:  Declaration of Walker_Nav_Menu_Dropdown::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = Array, $id = 0) in /home/gfwqapsj/public_html/misitio.com/wp-content/themes/novavideo/_front/mobile-nav.php on line 41

[12-Dec-2016 21:16:17 UTC] PHP Warning:  Declaration of Walker_Nav_Menu_Dropdown::end_el(&$output, $item, $depth) should be compatible with Walker_Nav_Menu::end_el(&$output, $item, $depth = 0, $args = Array) in /home/gfwqapsj/public_html/misitio.com/wp-content/themes/novavideo/_front/mobile-nav.php on line 41

[12-Dec-2016 21:16:17 UTC] PHP Warning:  Declaration of Walker_Nav_Menu_Dropdown::start_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /home/gfwqapsj/public_html/misitio.com/wp-content/themes/novavideo/_front/mobile-nav.php on line 41

El theme ya no tiene soporte, por esto les solicito ayuda. 🙁

- - - Actualizado - - -

Este es el contenido de mobile-nav.php y la linea 41 es la última:

PHP:
<?php

/**** Selectnav ****/
class Walker_Nav_Menu_Dropdown extends Walker_Nav_Menu{
    function start_lvl(&$output, $depth){
      $indent = str_repeat("\t", $depth); // don't output children opening tag ('<ul>')
    }

    function end_lvl(&$output, $depth){
      $indent = str_repeat("\t", $depth); // don't output children closing tag
    }
    
    function start_el(&$output, $item, $depth, $args){
      // add spacing to the title based on the depth
      $item->title  = str_repeat("&nbsp;", $depth * 4) . $item->title;
      $class_names  = isset( $class_names ) ? $class_names : null;
      $indent       = isset( $indent ) ? $indent : null;
      $value        = isset( $value ) ? $value : null;
      $item_output  = isset( $item_output ) ? $item_output : null;
      

        $output .= '<option'. $indent . $value . $class_names;  
        $attributes  = ! empty( $item->attr_title ) ? ' title="'  . esc_attr( $item->attr_title ) . '"' : '';  
        $attributes .= ! empty( $item->target )     ? ' target="' . esc_attr( $item->target     ) . '"' : '';  
        $attributes .= ! empty( $item->xfn )        ? ' rel="'    . esc_attr( $item->xfn        ) . '"' : '';  
        $attributes .= ! empty( $item->url )        ? ' value="'  . esc_attr( $item->url        ) . '"' : '';  
        
        $item_output .= $attributes . '>';  
        $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID );  
        $item_output .= '';  
        
        $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );    

      // no point redefining this method too, we just replace the li tag...
      $output = str_replace('<li', '<option', $output);
    }

    function end_el(&$output, $item, $depth){
      $output .= "</option>\n"; // replace closing </li> with the option tag
    }
}
 
El theme ya no tiene soporte, por esto les solicito ayuda.

Mirá, yo te recomiendo que busques un theme con soporte y que esté al día con actualizaciones. Porque esto es una falla bastante grande de seguridad que podría ser utilizada para atacar tu sitio.-
 
Mirá, yo te recomiendo que busques un theme con soporte y que esté al día con actualizaciones. Porque esto es una falla bastante grande de seguridad que podría ser utilizada para atacar tu sitio.-
Gracias alessandro15, ya estoy en eso. El problema es que los campos personalizados del nuevo theme no son los mismos y tendre que adaptarlo, sino perdería todo.

No tengo la menor idea de lo que estoy haciendo, pero dejo de dar error con estos cambios 😱:

PHP:
function start_lvl(&$output, $depth){
function start_lvl(&$output, $depth = 0, $args = array() ){

function end_lvl(&$output, $depth){
function end_lvl(&$output, $depth = 0, $args = array() ){

function start_el(&$output, $item, $depth, $args){
function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0 ){

function end_el(&$output, $item, $depth){
function end_el(&$output, $item, $depth = 0, $args = array() ){