Settings'; array_unshift($links, $settings_link); return $links; } } add_filter("plugin_action_links_".plugin_basename(__FILE__), 'aklamatorPro_plugin_settings_link',10 ,2); /* * Adds featured images from posts to your site's RSS feed output, */ if(!function_exists('akla_pro_featured_images_in_rss')) { function akla_pro_featured_images_in_rss($content){ global $post; if (has_post_thumbnail($post->ID)) { $featured_images_in_rss_size = 'thumbnail'; $featured_images_in_rss_css_code = 'display: block; margin-bottom: 5px; clear:both;'; $content = get_the_post_thumbnail($post->ID, $featured_images_in_rss_size, array('style' => $featured_images_in_rss_css_code)) . $content; } return $content; } } if(get_option('aklamatorProFeatured2Feed')) { add_filter('the_excerpt_rss', 'akla_pro_featured_images_in_rss', 1000, 1); add_filter('the_content_feed', 'akla_pro_featured_images_in_rss', 1000, 1); } /* * Activation Hook */ register_activation_hook( __FILE__, 'set_up_optionsPro' ); function set_up_optionsPro(){ add_option('aklamatorProApplicationID', ''); add_option('aklamatorProPoweredBy', ''); add_option('aklamatorProFeatured2Feed', 'on'); add_option('aklamatorProSingleWidgetID', ''); add_option('aklamatorProPageWidgetID', ''); add_option('aklamatorProSingleWidgetTitle', ''); // Ads codes add_option('aklamatorProAds', ''); add_option('aklamatorProAds2', ''); add_option('aklamatorProAds3', ''); // Custom Ads names add_option('aklamatorProAds1Name', ''); add_option('aklamatorProAds2Name', ''); add_option('aklamatorProAds3Name', ''); } /* * Uninstall Hook */ register_uninstall_hook(__FILE__, 'aklamatorPro_uninstall'); function aklamatorPro_uninstall() { delete_option('aklamatorProApplicationID'); delete_option('aklamatorProPoweredBy'); delete_option('aklamatorProFeatured2Feed'); delete_option('aklamatorProSingleWidgetID'); delete_option('aklamatorProPageWidgetID'); delete_option('aklamatorProSingleWidgetTitle'); // Ads codes delete_option('aklamatorProAds'); delete_option('aklamatorProAds2'); delete_option('aklamatorProAds3'); // Custom Ad names delete_option('aklamatorProAds1Name'); delete_option('aklamatorProAds2Name'); delete_option('aklamatorProAds3Name'); } if (!function_exists("bottom_of_every_postPro")) { function bottom_of_every_postPro($content) { /* we want to change `the_content` of posts, not pages and the text file must exist for this to work */ if (is_single()) { $widget_id = get_option('aklamatorProSingleWidgetID'); } elseif (is_page()) { $widget_id = get_option('aklamatorProPageWidgetID'); } else { /* if `the_content` belongs to a page or our file is missing the result of this filter is no change to `the_content` */ return $content; } $title = ""; if (get_option('aklamatorProSingleWidgetTitle') !== '') { $title .= "