Current Path: > home > ivftiowh > greeceivf.com > wp-content > plugins > > jetpack
Operation : Linux premium88.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 Software : Apache Server IP : 185.61.154.216 | Your IP: 216.73.216.44 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
3rd-party | Directory | - | - | |
_inc | Directory | - | - | |
css | Directory | - | - | |
images | Directory | - | - | |
json-endpoints | Directory | - | - | |
languages | Directory | - | - | |
modules | Directory | - | - | |
scss | Directory | - | - | |
views | Directory | - | - | |
.svnignore | File | 151 bytes | October 14 2024 11:06:00. | |
changelog.txt | File | 100323 bytes | October 14 2024 11:06:00. | |
class.jetpack-admin.php | File | 8636 bytes | October 14 2024 11:06:00. | |
class.jetpack-autoupdate.php | File | 6955 bytes | October 14 2024 11:06:00. | |
class.jetpack-bbpress-json-api-compat.php | File | 3271 bytes | October 14 2024 11:06:00. | |
class.jetpack-cli.php | File | 21094 bytes | October 14 2024 11:06:00. | |
class.jetpack-client-server.php | File | 7569 bytes | October 14 2024 11:06:00. | |
class.jetpack-client.php | File | 8998 bytes | October 14 2024 11:06:00. | |
class.jetpack-data-https.php | File | 26683 bytes | October 14 2024 11:06:00. | |
class.jetpack-data.php | File | 4100 bytes | October 14 2024 11:06:00. | |
class.jetpack-debugger.php | File | 17013 bytes | October 14 2024 11:06:00. | |
class.jetpack-error.php | File | 47 bytes | October 14 2024 11:06:00. | |
class.jetpack-heartbeat.php | File | 4692 bytes | October 14 2024 11:06:00. | |
class.jetpack-ixr-client.php | File | 3213 bytes | October 14 2024 11:06:00. | |
class.jetpack-jitm.php | File | 18931 bytes | October 14 2024 11:06:00. | |
class.jetpack-modules-list-table.php | File | 12097 bytes | October 14 2024 11:06:00. | |
class.jetpack-network-sites-list-table.php | File | 3956 bytes | October 14 2024 11:06:00. | |
class.jetpack-network.php | File | 22982 bytes | October 14 2024 11:06:00. | |
class.jetpack-options.php | File | 9576 bytes | October 14 2024 11:06:00. | |
class.jetpack-post-images.php | File | 17110 bytes | October 14 2024 11:06:00. | |
class.jetpack-signature.php | File | 6432 bytes | October 14 2024 11:06:00. | |
class.jetpack-sync.php | File | 34764 bytes | October 14 2024 11:06:00. | |
class.jetpack-tracks.php | File | 2787 bytes | October 14 2024 11:06:00. | |
class.jetpack-twitter-cards.php | File | 8923 bytes | October 14 2024 11:06:00. | |
class.jetpack-user-agent.php | File | 45099 bytes | October 14 2024 11:06:00. | |
class.jetpack-xmlrpc-server.php | File | 12601 bytes | October 14 2024 11:06:00. | |
class.jetpack.php | File | 243573 bytes | October 14 2024 11:06:00. | |
class.json-api-endpoints.php | File | 68525 bytes | October 14 2024 11:06:00. | |
class.json-api.php | File | 19659 bytes | October 14 2024 11:06:00. | |
class.media-extractor-boolean.php | File | 185495 bytes | October 14 2024 11:06:00. | |
class.media-extractor.php | File | 17156 bytes | October 14 2024 11:06:00. | |
class.media-summary.php | File | 10013 bytes | October 14 2024 11:06:00. | |
class.photon.php | File | 30226 bytes | October 14 2024 11:06:00. | |
composer.json | File | 345 bytes | October 14 2024 11:06:00. | |
functions.compat.php | File | 2445 bytes | October 14 2024 11:06:00. | |
functions.gallery.php | File | 2310 bytes | October 14 2024 11:06:00. | |
functions.opengraph.php | File | 13917 bytes | October 14 2024 11:06:00. | |
functions.photon.php | File | 8303 bytes | October 14 2024 11:06:00. | |
jetpack.php | File | 4545 bytes | October 14 2024 11:06:00. | |
json-api-config.php | File | 255 bytes | October 14 2024 11:06:00. | |
json-endpoints.php | File | 120716 bytes | October 14 2024 11:06:00. | |
locales-part.php | File | 185495 bytes | October 14 2024 11:06:00. | |
locales.php | File | 60933 bytes | October 14 2024 11:06:00. | |
readme.txt | File | 23297 bytes | October 14 2024 11:06:00. | |
require-lib.php | File | 982 bytes | October 14 2024 11:06:00. | |
uninstall.php | File | 625 bytes | October 14 2024 11:06:00. | |
wpml-config.xml | File | 213 bytes | October 14 2024 11:06:00. |
<?php /** * Class Jetpack_Media_Summary * * embed [video] > gallery > image > text */ class Jetpack_Media_Summary { static function get( $post_id, $blog_id = 0, $args = array() ) { $defaults = array( 'max_words' => 16, 'max_chars' => 256, ); $args = wp_parse_args( $args, $defaults ); $switched = false; if ( !empty( $blog_id ) && $blog_id != get_current_blog_id() && function_exists( 'switch_to_blog' ) ) { switch_to_blog( $blog_id ); $switched = true; } else { $blog_id = get_current_blog_id(); } $post = get_post( $post_id ); $permalink = get_permalink( $post_id ); $return = array( 'type' => 'standard', 'permalink' => $permalink, 'image' => '', 'excerpt' => '', 'word_count' => 0, 'secure' => array( 'image' => '', ), 'count' => array( 'image' => 0, 'video' => 0, 'word' => 0, 'link' => 0, ), ); if ( empty( $post->post_password ) ) { $return['excerpt'] = self::get_excerpt( $post->post_content, $post->post_excerpt, $args['max_words'], $args['max_chars'] ); $return['count']['word'] = self::get_word_count( $post->post_content ); $return['count']['word_remaining'] = self::get_word_remaining_count( $post->post_content, $return['excerpt'] ); $return['count']['link'] = self::get_link_count( $post->post_content ); } $extract = Jetpack_Media_Meta_Extractor::extract( $blog_id, $post_id, Jetpack_Media_Meta_Extractor::ALL ); if ( empty( $extract['has'] ) ) return $return; // Prioritize [some] video embeds if ( !empty( $extract['has']['shortcode'] ) ) { foreach ( $extract['shortcode'] as $type => $data ) { switch ( $type ) { case 'wpvideo': if ( 0 == $return['count']['video'] ) { $return['type'] = 'video'; $return['video'] = esc_url_raw( 'http://s0.videopress.com/player.swf?guid=' . $extract['shortcode']['wpvideo']['id'][0] . '&isDynamicSeeking=true' ); $return['image'] = self::get_video_poster( 'videopress', $extract['shortcode']['wpvideo']['id'][0] ); $return['secure']['video'] = preg_replace( '@http://[^\.]+.videopress.com/@', 'https://v0.wordpress.com/', $return['video'] ); $return['secure']['image'] = str_replace( 'http://videos.videopress.com', 'https://videos.files.wordpress.com', $return['image'] ); } $return['count']['video']++; break; case 'youtube': if ( 0 == $return['count']['video'] ) { $return['type'] = 'video'; $return['video'] = esc_url_raw( 'http://www.youtube.com/watch?feature=player_embedded&v=' . $extract['shortcode']['youtube']['id'][0] ); $return['image'] = self::get_video_poster( 'youtube', $extract['shortcode']['youtube']['id'][0] ); $return['secure']['video'] = self::https( $return['video'] ); $return['secure']['image'] = self::https( $return['image'] ); } $return['count']['video']++; break; case 'vimeo': if ( 0 == $return['count']['video'] ) { $return['type'] = 'video'; $return['video'] = esc_url_raw( 'http://vimeo.com/' . $extract['shortcode']['vimeo']['id'][0] ); $return['secure']['video'] = self::https( $return['video'] ); $poster_image = get_post_meta( $post_id, 'vimeo_poster_image', true ); if ( !empty( $poster_image ) ) { $return['image'] = $poster_image; $poster_url_parts = parse_url( $poster_image ); $return['secure']['image'] = 'https://secure-a.vimeocdn.com' . $poster_url_parts['path']; } } $return['count']['video']++; break; } } } if ( !empty( $extract['has']['embed'] ) ) { foreach( $extract['embed']['url'] as $embed ) { if ( preg_match( '/((youtube|vimeo|dailymotion)\.com|youtu.be)/', $embed ) ) { if ( 0 == $return['count']['video'] ) { $return['type'] = 'video'; $return['video'] = 'http://' . $embed; $return['secure']['video'] = self::https( $return['video'] ); if ( false !== strpos( $embed, 'youtube' ) ) { $return['image'] = self::get_video_poster( 'youtube', jetpack_get_youtube_id( $return['video'] ) ); $return['secure']['image'] = self::https( $return['image'] ); } else if ( false !== strpos( $embed, 'youtu.be' ) ) { $youtube_id = jetpack_get_youtube_id( $return['video'] ); $return['video'] = 'http://youtube.com/watch?v=' . $youtube_id . '&feature=youtu.be'; $return['secure']['video'] = self::https( $return['video'] ); $return['image'] = self::get_video_poster( 'youtube', jetpack_get_youtube_id( $return['video'] ) ); $return['secure']['image'] = self::https( $return['image'] ); } else if ( false !== strpos( $embed, 'vimeo' ) ) { $poster_image = get_post_meta( $post_id, 'vimeo_poster_image', true ); if ( !empty( $poster_image ) ) { $return['image'] = $poster_image; $poster_url_parts = parse_url( $poster_image ); $return['secure']['image'] = 'https://secure-a.vimeocdn.com' . $poster_url_parts['path']; } } else if ( false !== strpos( $embed, 'dailymotion' ) ) { $return['image'] = str_replace( 'dailymotion.com/video/','dailymotion.com/thumbnail/video/', $embed ); $return['image'] = parse_url( $return['image'], PHP_URL_SCHEME ) === null ? 'http://' . $return['image'] : $return['image']; $return['secure']['image'] = self::https( $return['image'] ); } } $return['count']['video']++; } } } // Do we really want to make the video the primary focus of the post? if ( 'video' == $return['type'] ) { $content = wpautop( strip_tags( $post->post_content ) ); $paragraphs = explode( '</p>', $content ); $number_of_paragraphs = 0; foreach ( $paragraphs as $i => $paragraph ) { // Don't include blank lines as a paragraph if ( '' == trim( $paragraph ) ) { unset( $paragraphs[$i] ); continue; } $number_of_paragraphs++; } $number_of_paragraphs = $number_of_paragraphs - $return['count']['video']; // subtract amount for videos.. // More than 2 paragraph? The video is not the primary focus so we can do some more analysis if ( $number_of_paragraphs > 2 ) $return['type'] = 'standard'; } // If we don't have any prioritized embed... if ( 'standard' == $return['type'] ) { if ( ( ! empty( $extract['has']['gallery'] ) || ! empty( $extract['shortcode']['gallery']['count'] ) ) && ! empty( $extract['image'] ) ) { //... Then we prioritize galleries first (multiple images returned) $return['type'] = 'gallery'; $return['images'] = $extract['image']; foreach ( $return['images'] as $image ) { $return['secure']['images'][] = array( 'url' => self::ssl_img( $image['url'] ) ); $return['count']['image']++; } } else if ( ! empty( $extract['has']['image'] ) ) { // ... Or we try and select a single image that would make sense $content = wpautop( strip_tags( $post->post_content ) ); $paragraphs = explode( '</p>', $content ); $number_of_paragraphs = 0; foreach ( $paragraphs as $i => $paragraph ) { // Don't include 'actual' captions as a paragraph if ( false !== strpos( $paragraph, '[caption' ) ) { unset( $paragraphs[$i] ); continue; } // Don't include blank lines as a paragraph if ( '' == trim( $paragraph ) ) { unset( $paragraphs[$i] ); continue; } $number_of_paragraphs++; } $return['image'] = $extract['image'][0]['url']; $return['secure']['image'] = self::ssl_img( $return['image'] ); $return['count']['image']++; if ( $number_of_paragraphs <= 2 && 1 == count( $extract['image'] ) ) { // If we have lots of text or images, let's not treat it as an image post, but return its first image $return['type'] = 'image'; } } } if ( $switched ) { restore_current_blog(); } return $return; } static function https( $str ) { return str_replace( 'http://', 'https://', $str ); } static function ssl_img( $url ) { if ( false !== strpos( $url, 'files.wordpress.com' ) ) { return self::https( $url ); } else { return self::https( jetpack_photon_url( $url ) ); } } static function get_video_poster( $type, $id ) { if ( 'videopress' == $type ) { if ( function_exists( 'video_get_highest_resolution_image_url' ) ) { return video_get_highest_resolution_image_url( $id ); } else if ( class_exists( 'VideoPress_Video' ) ) { $video = new VideoPress_Video( $id ); return $video->poster_frame_uri; } } else if ( 'youtube' == $type ) { return 'http://img.youtube.com/vi/'.$id.'/0.jpg'; } } static function clean_text( $text ) { return trim( preg_replace( '/[\s]+/', ' ', preg_replace( '@https?://[\S]+@', '', strip_shortcodes( strip_tags( $text ) ) ) ) ); } static function get_excerpt( $post_content, $post_excerpt, $max_words = 16, $max_chars = 256 ) { if ( function_exists( 'wpcom_enhanced_excerpt_extract_excerpt' ) ) { return self::clean_text( wpcom_enhanced_excerpt_extract_excerpt( array( 'text' => $post_content, 'excerpt_only' => true, 'show_read_more' => false, 'max_words' => $max_words, 'max_chars' => $max_chars, 'read_more_threshold' => 25, ) ) ); } else { /** This filter is documented in core/src/wp-includes/post-template.php */ $post_excerpt = apply_filters( 'get_the_excerpt', $post_excerpt ); return self::clean_text( $post_excerpt ); } } static function get_word_count( $post_content ) { return str_word_count( self::clean_text( $post_content ) ); } static function get_word_remaining_count( $post_content, $excerpt_content ) { return str_word_count( self::clean_text( $post_content ) ) - str_word_count( self::clean_text( $excerpt_content ) ); } static function get_link_count( $post_content ) { return preg_match_all( '/\<a[\> ]/', $post_content, $matches ); } }
SILENT KILLER Tool