HEX
Server: Apache/2.4.6 (CloudLinux) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16
System: Linux s1.gigspace.ru 3.10.0-962.3.2.lve1.5.77.el7.x86_64 #1 SMP Mon Dec 12 07:06:14 EST 2022 x86_64
User: samok164 (6070)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /var/www/samok164/data/www2/mirneboskrebov.ru/wp-content/themes/skyscraper/functions.php
<?php
function the_content_limit($max_char, $more_link_text = '(Читать полностью &rarr;)', $stripteaser = 0, $more_file = '') {
			$content = get_the_content($more_link_text, $stripteaser, $more_file);
			$content = apply_filters('the_content', $content);
			$content = str_replace(']]>', ']]&gt;', $content);
			$content = strip_tags($content);

		if ((strlen($_GET['p']) > 0) && ($espacio = strpos($content, " ", $max_char ))) {
			 $content = substr($content, 0, $espacio);
			  $content = $content;
			  echo "<p>";
			  echo $content;
			  echo "&nbsp;<a href='";
			 the_permalink();
			 echo "'>"."Далее &raquo;</a>";
			  echo "</p>";
		   }
		   else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
			   $content = substr($content, 0, $espacio);
				$content = $content;
				echo "<p>";
				echo $content;
				echo "...";
				echo "&nbsp;<a href='";
			   the_permalink();
			   echo "'>".$more_link_text."</a>";
				echo "</p>";
		   }
		   else {
			  echo "<p>";
			  echo $content;
			  echo "&nbsp;<a href='";
			 the_permalink();
			 echo "'>"."Далее &raquo;</a>";
			  echo "</p>";
		   }
		}
?>