advantage_fonts_array

The Advantage advantage fonts array function.

Description

advantage_fonts_array(); 

Usage

  1. if ( !function_exists( 'advantage_fonts_array' ) ) { 
  2. require_once '/inc/lib-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = advantage_fonts_array(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/lib-functions.php  
  1. function advantage_fonts_array() { 
  2. global $advantage_options; 
  3. $fonts = array( 
  4. '0' => array( 'key' => '0',  
  5. 'label' => 'Default',  
  6. 'url' => '',  
  7. 'family' => "'Helvetica Neue', Helvetica, Arial, sans-serif",  
  8. 'type' => 'Sans' ),  
  9. //Sans 
  10. '100' => array( 'key' => '100',  
  11. 'label' => 'Arial',  
  12. 'url' => '',  
  13. 'family' => "Arial, Helvetica, sans-serif",  
  14. 'type' => 'Sans' ),  
  15. '101' => array( 'key' => '101',  
  16. 'label' => 'Arial Black',  
  17. 'url' => '',  
  18. 'family' => "Arial Black, Gadget, sans-serif",  
  19. 'type' => 'Sans' ),  
  20. '102' => array( 'key' => '102',  
  21. 'label' => 'Impact',  
  22. 'url' => '',  
  23. 'family' => "Impact, Charcoal, sans-serif",  
  24. 'type' => 'Sans' ),  
  25. '103' => array( 'key' => '103',  
  26. 'label' => 'Lucida Sans',  
  27. 'url' => '',  
  28. 'family' => "'Lucida Sans Unicode', 'Lucida Grande', sans-serif",  
  29. 'type' => 'Sans' ),  
  30. '104' => array( 'key' => '104',  
  31. 'label' => 'Tahoma',  
  32. 'url' => '',  
  33. 'family' => "Tahoma, Geneva, sans-serif",  
  34. 'type' => 'Sans',  
  35. ),  
  36. '105' => array( 'key' => '105',  
  37. 'label' => 'Trebuchet MS',  
  38. 'url' => '',  
  39. 'family' => "'Trebuchet MS', sans-serif",  
  40. 'type' => 'Sans' ),  
  41. '106' => array( 'key' => '106',  
  42. 'label' => 'Verdana',  
  43. 'url' => '',  
  44. 'family' => "Verdana, Geneva, sans-serif",  
  45. 'type' => 'Sans' ),  
  46. '107' => array( 'key' => '107',  
  47. 'label' => 'MS Sans Serif',  
  48. 'url' => '',  
  49. 'family' => "'MS Sans Serif', Geneva, sans-serif",  
  50. 'type' => 'Sans' ),  
  51. //Sans Webs 
  52. '200' => array( 'key' => '200',  
  53. 'label' => 'Open Sans',  
  54. 'url' => '//fonts.googleapis.com/css?family=Open+Sans:400, 400italic, 700, 700italic',  
  55. 'family' => "'Open Sans', sans-serif",  
  56. 'type' => 'Sans' ),  
  57. '201' => array( 'key' => '201',  
  58. 'label' => 'Ubuntu',  
  59. 'url' => '//fonts.googleapis.com/css?family=Ubuntu:400, 400italic, 700italic, 700',  
  60. 'family' => "'Ubuntu', sans-serif;",  
  61. 'type' => 'Sans' ),  
  62. /** Other popular google font 
  63. Myriad Pro, League Gothic, Cabin, Corbel, Museo Slab 
  64. Bebas Neue, Lobster, Franchise, PT Serif 
  65. */  
  66. //Serif 
  67. '400' => array( 'key' => '400',  
  68. 'label' => 'Georgia',  
  69. 'url' => '',  
  70. 'family' => "Georgia, serif",  
  71. 'type' => 'Serif' ),  
  72. '401' => array( 'key' => '401',  
  73. 'label' => 'Palatino',  
  74. 'url' => '',  
  75. 'family' => "'Palatino Linotype', 'Book Antiqua', Palatino, serif",  
  76. 'type' => 'Serif' ),  
  77. '402' => array( 'key' => '402',  
  78. 'label' => 'Times New Roman',  
  79. 'url' => '',  
  80. 'family' => "'Times New Roman', Times, serif",  
  81. 'type' => 'Serif' ),  
  82. '403' => array( 'key' => '403',  
  83. 'label' => 'MS Serif',  
  84. 'url' => '',  
  85. 'family' => "'MS Serif', 'New York', serif",  
  86. 'type' => 'Serif' ),  
  87. //Serif Webfonts 
  88.  
  89. //Monospae 
  90. '600' => array( 'key' => '600',  
  91. 'label' => 'Courier New',  
  92. 'url' => '',  
  93. 'family' => "'Courier New', monospace",  
  94. 'type' => 'Monospace' ),  
  95. '601' => array( 'key' => '601',  
  96. 'label' => 'Lucida Console',  
  97. 'url' => '',  
  98. 'family' => "'Lucida Console', Monaco, monospace",  
  99. 'type' => 'Monospace' ),  
  100. //Monospae Webfonts 
  101.  
  102. //Cursive 
  103. '800' => array( 'key' => '800',  
  104. 'label' => 'Comic Sans MS',  
  105. 'url' => '',  
  106. 'family' => "'Comic Sans MS', cursive",  
  107. 'type' => 'Cursive' ),  
  108. //Cursive Webfonts 
  109. '900' => array( 'key' => '900',  
  110. 'label' => 'Berkshire Swash',  
  111. 'url' => '//fonts.googleapis.com/css?family=Berkshire+Swash',  
  112. 'family' => "'Berkshire Swash', cursive",  
  113. 'type' => 'Cursive',  
  114. ),  
  115. '901' => array( 'key' => '901',  
  116. 'label' => 'Lobster',  
  117. 'url' => '//fonts.googleapis.com/css?family=Lobster:400, 400italic, 700, 700italic',  
  118. 'family' => "'Lobster', cursive",  
  119. 'type' => 'Cursive' ),  
  120. //Cursive Webfonts 
  121. ); 
  122. //User defined google fonts 
  123. if ( ! empty( $advantage_options['otherfont1'] ) ) { 
  124. $fonts['1001'] = array( 'key' => '1001',  
  125. 'label' => $advantage_options['otherfont1'],  
  126. 'url' => advantage_google_font_url( $advantage_options['otherfont1']),  
  127. 'family' => "'" . $advantage_options['otherfont1'] ."', Helvetica, Arial, sans-serif",  
  128. 'type' => 'Others' ); 
  129. else { 
  130. $fonts['1001'] = array( 'key' => '1001',  
  131. 'label' => __( 'Other Font 1', 'advantage' ),  
  132. 'url' => '',  
  133. 'family' => "Helvetica, Arial, sans-serif",  
  134. 'type' => 'Others' );  
  135. }  
  136. if ( ! empty( $advantage_options['otherfont2'] ) ) { 
  137. $fonts['1002'] = array( 'key' => '1002',  
  138. 'label' => $advantage_options['otherfont2'],  
  139. 'url' => advantage_google_font_url( $advantage_options['otherfont2']),  
  140. 'family' => "'" . $advantage_options['otherfont2'] ."', Helvetica, Arial, sans-serif",  
  141. 'type' => 'Others' ); 
  142. else { 
  143. $fonts['1002'] = array( 'key' => '1002',  
  144. 'label' => __( 'Other Font 2', 'advantage' ),  
  145. 'url' => '',  
  146. 'family' => "Helvetica, Arial, sans-serif",  
  147. 'type' => 'Others' );  
  148. }  
  149. if ( ! empty( $advantage_options['otherfont3'] ) ) { 
  150. $fonts['1003'] = array( 'key' => '1003',  
  151. 'label' => $advantage_options['otherfont3'],  
  152. 'url' => advantage_google_font_url( $advantage_options['otherfont3']),  
  153. 'family' => "'" . $advantage_options['otherfont3'] ."', Helvetica, Arial, sans-serif",  
  154. 'type' => 'Others' ); 
  155. else { 
  156. $fonts['1003'] = array( 'key' => '1003',  
  157. 'label' => __( 'Other Font 3', 'advantage' ),  
  158. 'url' => '',  
  159. 'family' => "Helvetica, Arial, sans-serif",  
  160. 'type' => 'Others' );  
  161. }  
  162. if ( ! empty( $advantage_options['otherfont4'] ) ) { 
  163. $fonts['1004'] = array( 'key' => '1004',  
  164. 'label' => $advantage_options['otherfont4'],  
  165. 'url' => advantage_google_font_url( $advantage_options['otherfont4']),  
  166. 'family' => "'" . $advantage_options['otherfont4'] ."', Helvetica, Arial, sans-serif",  
  167. 'type' => 'Others' ); 
  168. }  
  169. else { 
  170. $fonts['1004'] = array( 'key' => '1004',  
  171. 'label' => __( 'Other Font 4', 'advantage' ),  
  172. 'url' => '',  
  173. 'family' => "Helvetica, Arial, sans-serif",  
  174. 'type' => 'Others' );  
  175. }  
  176. return apply_filters( 'advantage_fonts_array', $fonts );