| 1 |
<?php |
| 2 |
class NX_CONSTANTS { |
| 3 |
public static $COMMENT_SECTIONS = array( |
| 4 |
'comment_themes', |
| 5 |
'comment_design', |
| 6 |
'comment_image_design', |
| 7 |
'comment_typography' |
| 8 |
); |
| 9 |
public static $COMMENT_FIELDS = array( |
| 10 |
'comments_source', |
| 11 |
'comment_advance_edit', |
| 12 |
'comments_template_new', |
| 13 |
'comments_template_new_adv', |
| 14 |
'comments_template', |
| 15 |
'link_options', |
| 16 |
'show_avatar', |
| 17 |
); |
| 18 |
|
| 19 |
public static $CONVERSION_SECTIONS = array( |
| 20 |
'themes', |
| 21 |
'design', |
| 22 |
'image_design', |
| 23 |
'typography' |
| 24 |
); |
| 25 |
public static $CONVERSION_FIELDS = array( |
| 26 |
'conversion_from', |
| 27 |
'advance_edit', |
| 28 |
'woo_template_new', |
| 29 |
'woo_template_new_adv', |
| 30 |
'woo_template', |
| 31 |
'product_control', |
| 32 |
'product_list', |
| 33 |
'category_list', |
| 34 |
'product_exclude_by', |
| 35 |
'exclude_categories', |
| 36 |
'exclude_products', |
| 37 |
'conversion_url', |
| 38 |
); |
| 39 |
|
| 40 |
public static function themeSource( $name, $type = 'press_bar' ) { |
| 41 |
switch( $type ) { |
| 42 |
case 'comments' : |
| 43 |
$source = NotificationX_Helper::comment_colored_themes(); |
| 44 |
break; |
| 45 |
case 'conversions' : |
| 46 |
$source = NotificationX_Helper::colored_themes(); |
| 47 |
break; |
| 48 |
case 'reviews' : |
| 49 |
$source = NotificationX_Helper::designs_for_review(); |
| 50 |
break; |
| 51 |
case 'download_stats' : |
| 52 |
$source = NotificationX_Helper::designs_for_stats(); |
| 53 |
break; |
| 54 |
case 'press_bar' : |
| 55 |
$source = NotificationX_Helper::bar_colored_themes(); |
| 56 |
break; |
| 57 |
default : |
| 58 |
$source = apply_filters( 'nx_theme_source', array(), $type ); |
| 59 |
break; |
| 60 |
} |
| 61 |
|
| 62 |
if( ! empty( $source ) && isset( $source[ $name ] ) ) { |
| 63 |
return $source[ $name ]; |
| 64 |
} |
| 65 |
} |
| 66 |
} |