1, "title" => ''); $sfsi_plus_section8_options = get_option("sfsi_plus_section8_options"); $sfsi_plus_section8_options = unserialize($sfsi_plus_section8_options); $sfsi_plus_place_item_manually = $sfsi_plus_section8_options['sfsi_plus_place_item_manually']; if($sfsi_plus_place_item_manually == "yes") { $return = ''; if(!isset($before_widget)): $before_widget =''; endif; if(!isset($after_widget)): $after_widget =''; endif; /*Our variables from the widget settings. */ $title = apply_filters('widget_title', $instance['title'] ); $show_info = isset( $instance['show_info'] ) ? $instance['show_info'] : false; global $is_floter; $return.= $before_widget; /* Display the widget title */ if ( $title ) $return .= $before_title . $title . $after_title; $return .= '
'; $return .= $after_widget; return $return; } else { return __('Kindly go to setting page and check the option "Place them manually"', SFSI_PLUS_DOMAIN); } } //adding some meta tags for facebook news feed {Monad} function sfsi_plus_checkmetas() { if ( ! function_exists( 'get_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $all_plugins = get_plugins(); foreach($all_plugins as $key => $plugin) { if(is_plugin_active($key)) { if(preg_match("/(seo|search engine optimization|meta tag|open graph|opengraph|og tag|ogtag)/im", $plugin['Name']) || preg_match("/(seo|search engine optimization|meta tag|open graph|opengraph|og tag|ogtag)/im", $plugin['Description'])) { update_option("adding_plustags", "no"); break; } else { update_option("adding_plustags", "yes"); } } } } if ( ! is_admin() ) { sfsi_plus_checkmetas(); } add_action('wp_head', 'ultimateplusfbmetatags'); function ultimateplusfbmetatags() { $metarequest = get_option("adding_plustags"); $post_id = get_the_ID(); $feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id')); $verification_code = get_option('sfsi_plus_verificatiom_code'); if(!empty($feed_id) && !empty($verification_code) && $verification_code != "no" ) { echo ''; } if($metarequest == 'yes' && !empty($post_id)) { $post = get_post( $post_id ); $attachment_id = get_post_thumbnail_id($post_id); $title = str_replace('"', "", strip_tags(get_the_title($post_id))); $description = $post->post_content; $description = str_replace('"', "", strip_tags($description)); $url = get_permalink($post_id); //checking for disabling viewport meta tag $option5 = unserialize(get_option('sfsi_plus_section5_options',false)); if(isset($option5['sfsi_plus_disable_viewport'])) { $sfsi_plus_disable_viewport = $option5['sfsi_plus_disable_viewport']; } else { $sfsi_plus_disable_viewport = 'no'; } if($sfsi_plus_disable_viewport == 'no') { echo ' '; } //checking for disabling viewport meta tag if($attachment_id) { $feat_image = wp_get_attachment_url( $attachment_id ); if (preg_match('/https/',$feat_image)) { echo ''; } else { echo ''; } $metadata = wp_get_attachment_metadata( $attachment_id ); if(isset($metadata) && !empty($metadata)) { if(isset($metadata['sizes']['post-thumbnail'])) { $image_type = $metadata['sizes']['post-thumbnail']['mime-type']; } else { $image_type = ''; } if(isset($metadata['width'])) { $width = $metadata['width']; } else { $width = ''; } if(isset($metadata['height'])) { $height = $metadata['height']; } else { $height = ''; } } else { $image_type = ''; $width = ''; $height = ''; } echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; } } } //Get verification code if(is_admin()) { $code = sanitize_text_field(get_option('sfsi_plus_verificatiom_code')); $feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id')); if(empty($code) && !empty($feed_id)) { add_action("init", "sfsi_plus_getverification_code"); } } function sfsi_plus_getverification_code() { $feed_id = sanitize_text_field(get_option('sfsi_plus_feed_id')); $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => 'http://www.specificfeeds.com/wordpress/getVerifiedCode_plugin', CURLOPT_USERAGENT => 'sf get verification', CURLOPT_POST => 1, CURLOPT_POSTFIELDS => array( 'feed_id' => $feed_id ) )); // Send the request & save response to $resp $resp = curl_exec($curl); $resp = json_decode($resp); update_option('sfsi_plus_verificatiom_code', $resp->code); curl_close($curl); } //functionality for before and after single posts add_filter( 'the_content', 'sfsi_plus_beforaftereposts' ); function sfsi_plus_beforaftereposts( $content ) { $org_content = $content; $icons_before = ''; $icons_after = ''; if(is_single()) { $option8= unserialize(get_option('sfsi_plus_section8_options',false)); $lineheight = $option8['sfsi_plus_post_icons_size']; $lineheight = sfsi_plus_getlinhght($lineheight); $sfsi_plus_display_button_type = $option8['sfsi_plus_display_button_type']; $txt=(isset($option8['sfsi_plus_textBefor_icons']))? $option8['sfsi_plus_textBefor_icons'] : "Please follow and like us:" ; $float = $option8['sfsi_plus_icons_alignment']; if($float == "center") { $style_parent= 'text-align: center;'; $style = 'float:none; display: inline-block;'; } else { $style_parent= ''; $style = 'float:'.$float; } if($option8['sfsi_plus_display_before_posts'] == "yes" && $option8['sfsi_plus_show_item_onposts'] == "yes") { $icons_before .= '