¿Supiste lo que acaba de lanzar LagriHost? Sí, como lo estabas esperando, ahora vendemos Web Hosting y Dominios. Conoce más :)


Calificación:
  • 0 voto(s) - 0 Media
  • 1
  • 2
  • 3
  • 4
  • 5
SOLUCIONADO Parse error: syntax error, unexpected?
#1
0
Cuando trato de activar mi tema en wordpress tengo este error:

Parse error: syntax error, unexpected '}' in /home/ducati/public_html/wp-content/themes/themeforest-6771881-game-addict-clan-war-gaming-theme/gameaddict/themeOptions/functions.php on line 1


El código en el archivo es:



Código PHP:
<?php if ( !function_exists'optionsframework_init' ) ) {
/*-----------------------------------------------------------------------------------*/
/* Options Framework Theme
/*-----------------------------------------------------------------------------------*/
/* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */


 
   define('OPTIONS_FRAMEWORK_URL'get_template_directory() . '/themeOptions/admin/');
 
   define('OPTIONS_FRAMEWORK_DIRECTORY'get_template_directory_uri() . '/themeOptions/admin/');


require_once (
OPTIONS_FRAMEWORK_URL 'options-framework.php');
}
/*
 * This is an example of how to add custom scripts to the options panel.
 * This one shows/hides the an option when a checkbox is clicked.
 */
add_action('optionsframework_custom_scripts''optionsframework_custom_scripts');
function 
optionsframework_custom_scripts() { ?>
<script type="text/javascript">
jQuery(document).ready(function() {
    jQuery('#example_showhidden').click(function() {
          jQuery('#section-example_text_hidden').fadeToggle(400);
    });
    if (jQuery('#example_showhidden:checked').val() !== undefined) {
        jQuery('#section-example_text_hidden').show();
    }
});
</script>
<?php
}
/*
 * Turns off the default options panel from Twenty Eleven
 */
add_action('after_setup_theme','remove_twentyeleven_options'100);
function 
remove_twentyeleven_options() {
 
   remove_action'admin_menu''twentyeleven_theme_options_add_page' );
}
?>

Alguna idea de lo que está mal?

#2
0
Posiblemente le falte cerrar una llave, veo que es de themeforest debes pedir soporte al creador del theme, ya que esto de códigos paso xD
Reglas de LagriHost | WIKI/Ayuda-FAQ | Nuestro Equipo | Solicita tu Hosting en 7 Pasos
No doy soporte por MP! Para eso esta el foro Guiño


[Imagen: banner-colabora.gif][Imagen: 8mt2wBp.jpg]

#3
0
Intenta con este codigo

Tenia una llave De mas

Código:
<?php  
    if ( !function_exists( 'optionsframework_init' ) )
    {
/*-----------------------------------------------------------------------------------*/
/* Options Framework Theme
/*-----------------------------------------------------------------------------------*/
/* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */

    define('OPTIONS_FRAMEWORK_URL', get_template_directory() . '/themeOptions/admin/');
    define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/themeOptions/admin/');

require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');
}

/*
* This is an example of how to add custom scripts to the options panel.
* This one shows/hides the an option when a checkbox is clicked.
*/

add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
    function optionsframework_custom_scripts()
?>
    <script type="text/javascript">
    jQuery(document).ready(function() {
    jQuery('#example_showhidden').click(function() {
          jQuery('#section-example_text_hidden').fadeToggle(400);
    });

    if (jQuery('#example_showhidden:checked').val() !== undefined)
    {
        jQuery('#section-example_text_hidden').show();
    }

});
</script>
<?php
/*
* Turns off the default options panel from Twenty Eleven
*/
add_action('after_setup_theme','remove_twentyeleven_options', 100);
function remove_twentyeleven_options() {
    remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
}
?>
♪Desde hoy las emisoras las detesto, por estar tocando cancioncitas de amor♫
♪ La television hace daño! que mueran las novelas de amor♫

#4
0
(08-09-2014, 11:27 PM)Eloy escribió: Intenta con este codigo

Tenia una llave De mas


Código:
<?php  
    if ( !function_exists( 'optionsframework_init' ) )
    {
/*-----------------------------------------------------------------------------------*/
/* Options Framework Theme
/*-----------------------------------------------------------------------------------*/
/* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */

   define('OPTIONS_FRAMEWORK_URL', get_template_directory() . '/themeOptions/admin/');
   define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/themeOptions/admin/');

require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');
}

/*
* This is an example of how to add custom scripts to the options panel.
* This one shows/hides the an option when a checkbox is clicked.
*/

add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
    function optionsframework_custom_scripts()
?>
    <script type="text/javascript">
    jQuery(document).ready(function() {
   jQuery('#example_showhidden').click(function() {
         jQuery('#section-example_text_hidden').fadeToggle(400);
   });

   if (jQuery('#example_showhidden:checked').val() !== undefined)
   {
       jQuery('#section-example_text_hidden').show();
   }

});
</script>
<?php
/*
* Turns off the default options panel from Twenty Eleven
*/
add_action('after_setup_theme','remove_twentyeleven_options', 100);
function remove_twentyeleven_options() {
   remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
}
?>


Hola, con tu solucion tira este error ahora:

Parse error: syntax error, unexpected ';', expecting '{' in /home/ducati/public_html/wp-content/themes/themeforest-6771881-game-addict-clan-war-gaming-theme/gameaddict/themeOptions/functions.php on line 22

#5
0
Esa funcion anda fuera de las etiquetas php

Ese theme es nullificado? o has instalado algun plugin que modifique el codigo interno del archivo
♪Desde hoy las emisoras las detesto, por estar tocando cancioncitas de amor♫
♪ La television hace daño! que mueran las novelas de amor♫

#6
0
SOLUCIONADO!

#7
0
Me alegro mucho, lo cierro.
Reglas de LagriHost | WIKI/Ayuda-FAQ | Nuestro Equipo | Solicita tu Hosting en 7 Pasos
No doy soporte por MP! Para eso esta el foro Guiño


[Imagen: banner-colabora.gif][Imagen: 8mt2wBp.jpg]





Usuarios navegando en este tema:
1 invitado(s)


Forum software by © MyBB Theme © Kevinex & iAndrew 2018