private function maybe_make_standard_image_sizes_facebook_ready()
 {
     $old_value = Genesis_Club_Display::get_option('facebook_sized_images');
     if (!$old_value && array_key_exists('facebook_sized_images', $_POST)) {
         $image_width = apply_filters('genesis-club-large-image-width', 960);
         //large size for post images
         $image_height = apply_filters('genesis-club-large-image-height', round($image_width / Genesis_Club_Display::FACEBOOK_IMAGE_SCALE_FACTOR));
         update_option('large_size_w', $image_width);
         update_option('large_size_h', $image_height);
         $image_width = apply_filters('genesis-club-medium-image-width', 320);
         //medium size for post images
         $image_height = apply_filters('genesis-club-medium-image-height', round($image_width / Genesis_Club_Display::FACEBOOK_IMAGE_SCALE_FACTOR));
         update_option('medium_size_w', $image_width);
         update_option('medium_size_h', $image_height);
         $image_width = apply_filters('genesis-club-thumbnail-image-width', 160);
         //thumbnail size for archives
         $image_height = apply_filters('genesis-club-thumbnail-image-height', round($image_width / Genesis_Club_Display::FACEBOOK_IMAGE_SCALE_FACTOR));
         update_option('thumbnail_size_w', $image_width);
         update_option('thumbnail_size_h', $image_height);
     }
 }
Beispiel #2
0
 private static function maybe_override_opengraph_terms($archive)
 {
     if (array_key_exists('og_title', $archive) && (self::$og_title = $archive['og_title']) || array_key_exists('og_desc', $archive) && (self::$og_desc = $archive['og_desc']) || array_key_exists('og_image', $archive) && (self::$og_image = $archive['og_image'])) {
         add_action('wpseo_opengraph', array(__CLASS__, 'override_opengraph_terms'), 5);
     }
 }