PluginProbe
Social Share Buttons / 0.9
Social Share Buttons v0.9
trunk 0.9 1.0 1.1 1.1.1 1.1.2 1.10 1.11 1.12 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.3 1.30 1.4 1.5 1.6 1.7 1.8 1.9
share-button / classes / class-styles.php

class-styles.php in Social Share Buttons 0.9, at classes/class-styles.php

43 lines 766 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace MBSocial;
3 defined('ABSPATH') or die('No direct access permitted');
4
5
6 class styles
7 {
8 protected static $style_classes;
9 //protected static $styles;
10
11 public static function registerStyle($style_name, $order)
12 {
13
14 if (! isset (static::$style_classes[$order]))
15 static::$style_classes[$order] = array( new $style_name);
16 else
17 static::$style_classes[$order][] = new $style_name;
18
19 ksort(static::$style_classes);
20 }
21
22
23 public static function getStyles()
24 {
25
26 return self::$style_classes;
27 }
28
29 public static function getStyle($name)
30 {
31 foreach (self::$style_classes as $order => $styles)
32 {
33 foreach($styles as $style_class)
34 {
35 if ($style_class->name == $name)
36 return $style_class;
37 }
38 }
39 return false;
40 }
41
42 }
43