Committer: ailyin
LJSUP-13980 (remove settings for friends page)U trunk/cgi-bin/LJ/Hooks/Customize.pm
Modified: trunk/cgi-bin/LJ/Hooks/Customize.pm =================================================================== --- trunk/cgi-bin/LJ/Hooks/Customize.pm 2012-11-26 06:49:42 UTC (rev 12941) +++ trunk/cgi-bin/LJ/Hooks/Customize.pm 2012-11-26 07:36:27 UTC (rev 12942) @@ -378,4 +378,28 @@ }); +# TODO: after friendsfeed is live, these props need to be added to core1.s2 +# as 'property hide $prop', along with the following hook removed +my @friends_page_props = qw( + page_friends_items + friends_show_date + friends_show_upic + friends_show_meta +); + +LJ::register_hook( 'augment_s2_layers', sub { + my @lids = @_; + + return if LJ::is_enabled('friendsfeed_optout'); + + foreach my $lid (@lids) { + my $layertype = S2::get_layer_info( $lid, 'type' ); + next unless $layertype && $layertype eq 'core'; + + foreach my $prop (@friends_page_props) { + S2::register_property_hide( $lid, $prop ); + } + } +} ); + 1;