Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Problem Theme do Wordpress
firioth
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 13.11.2014

Ostrzeżenie: (0%)
-----


Witam serdecznie.

Ostatnio zakupiłem dosyć ciekawy Theme do wordpressa, jednak dopiero teraz miałem czas się z nim pobawić. Niestety zabawa rozpoczęła się na dosyć wczesnym etapie. Po wgraniu Theme na serwer i aktywowaniu go w panelu administratora od razu pojawił się błąd:

Cytat
Parse error: syntax error, unexpected '{' in /virtual/gamersden.cba.pl/wp-content/themes/gameaddict/themeOptions/functions.php on line 1


Na szczęście kod nie jest długi także pozwolę sobie go tutaj zacytować:

  1. <?php
  2. if ( !function_exists( 'optionsframework_init' ) ) {
  3. /*-----------------------------------------------------------------------------------*/
  4. /* Options Framework Theme
  5. /*-----------------------------------------------------------------------------------*/
  6. /* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */
  7.  
  8. define('OPTIONS_FRAMEWORK_URL', get_template_directory() . '/themeOptions/admin/');
  9. define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/themeOptions/admin/');
  10.  
  11. require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');
  12. }
  13. /*
  14.  * This is an example of how to add custom scripts to the options panel.
  15.  * This one shows/hides the an option when a checkbox is clicked.
  16.  */
  17. add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
  18. function optionsframework_custom_scripts() { ?>
  19. <script type="text/javascript">
  20. jQuery(document).ready(function() {
  21. jQuery('#example_showhidden').click(function() {
  22. jQuery('#section-example_text_hidden').fadeToggle(400);
  23. });
  24. if (jQuery('#example_showhidden:checked').val() !== undefined) {
  25. jQuery('#section-example_text_hidden').show();
  26. }
  27. });
  28. </script>
  29. <?php
  30. }
  31. /*
  32.  * Turns off the default options panel from Twenty Eleven
  33.  */
  34. add_action('after_setup_theme','remove_twentyeleven_options', 100);
  35. function remove_twentyeleven_options() {
  36. remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
  37. }
  38. ?>


Dziwi mnie trochę to że wywala błąd w 1 linijce, w której znajduje się tylko <?php.

Z góry dziękuje za pomoc i pozdrawiam.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 6.10.2025 - 15:13