| Conditions | 7 | 
| Paths | 2 | 
| Total Lines | 30 | 
| Code Lines | 22 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 27 | public function defaultSliderSettings()  | 
            ||
| 28 |     { | 
            ||
| 29 | $ct = 0;  | 
            ||
| 30 | |||
| 31 |         $objects = ClassInfo::subclassesFor('DataObject'); | 
            ||
| 32 |         if ($objects) { | 
            ||
| 33 | unset($objects['DataObject']);  | 
            ||
| 34 |             foreach ($objects as $object) { | 
            ||
| 35 |                 if (singleton($object)->hasExtension('FlexSlider')) { | 
            ||
| 36 |                     foreach ($object::get() as $result) { | 
            ||
| 37 | $result->Loop = 1;  | 
            ||
| 38 | $result->Animate = 1;  | 
            ||
| 39 | $result->SliderControlNav = 1;  | 
            ||
| 40 | $result->SliderDirectionNav = 1;  | 
            ||
| 41 | $result->CarouselControlNav = 0;  | 
            ||
| 42 | $result->CarouselDirectionNav = 1;  | 
            ||
| 43 | $result->CarouselThumbnailCt = 6;  | 
            ||
| 44 |                         if ($result InstanceOf SiteTree || singleton($object)->hasExtension('VersionedDataobject')) { | 
            ||
| 45 |                             $result->writeToStage('Stage'); | 
            ||
| 46 |                             $result->publish('Stage', 'Live'); | 
            ||
| 47 |                         } else { | 
            ||
| 48 | $result->write();  | 
            ||
| 49 | }  | 
            ||
| 50 | $ct++;  | 
            ||
| 51 | }  | 
            ||
| 52 | }  | 
            ||
| 53 | }  | 
            ||
| 54 | }  | 
            ||
| 55 | echo '<p>'.$ct.' Sliders updated.</p>';  | 
            ||
| 56 | }  | 
            ||
| 57 | }  |