HEX
Server: nginx/1.18.0
System: Linux vps-9dcdb12e 5.15.0-176-generic #186-Ubuntu SMP Fri Mar 13 11:01:42 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.24
Disabled: exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
Upload Files
File: /var/www/lascalaswidnik.pl/wp-content/plugins/related-post/includes/shortcodes.php
<?php




if (!defined('ABSPATH')) exit; // if direct access 


add_shortcode('related_post', 'related_post_display');

function related_post_display($atts, $content = null)
{

  $atts = shortcode_atts(
    array(
      'post_id' => "",
      'post_ids' => "",
      'headline' => "",
      'view_type' => "",
    ),
    $atts
  );

  $related_post_settings = get_option('related_post_settings');

  $post_id = isset($atts['post_id']) ? (int) $atts['post_id'] : get_the_ID();
  $related_post_enable = get_post_meta($post_id, 'related_post_enable', true);

  if ($related_post_enable == 'yes') return false;

  $post_type = get_post_type($post_id);

  $atts['settings'] = $related_post_settings;
  $atts['post_type'] = $post_type;

  $atts = apply_filters('related_post_atts', $atts);

  $view_type = isset($atts['view_type']) ?  esc_html($atts['view_type']) : 'grid';
  $layout_type = !empty($view_type) ? $view_type :  esc_html($related_post_settings['layout_type']);



  require_once(related_post_plugin_dir . 'templates/related-post-hook.php');





  ob_start();

?>
  <div class="related-post <?php echo esc_attr($layout_type); ?>">
    <?php

    do_action('related_post_main', $atts);

    ?>
  </div>
<?php



  return ob_get_clean();
}