| 1 |
<?php |
| 2 |
|
| 3 |
namespace ShareMyPost; |
| 4 |
|
| 5 |
if(!defined('ABSPATH')){ |
| 6 |
exit; |
| 7 |
} |
| 8 |
|
| 9 |
class Util{ |
| 10 |
|
| 11 |
static function get_default_settings() { |
| 12 |
|
| 13 |
$all_networks = array_keys(\ShareMyPost\Helpers::get_networks()); |
| 14 |
|
| 15 |
$defaults = [ |
| 16 |
// General |
| 17 |
'mobile' => 1, |
| 18 |
'inline_enabled' => 1, |
| 19 |
|
| 20 |
// Inline |
| 21 |
'inline_position' => 'below', |
| 22 |
'inline_post_types' => ['post'], |
| 23 |
'inline_enabled_networks' => [ 'twitter','pinterest','whatsapp','facebook',], |
| 24 |
'inline_network_order' => $all_networks, |
| 25 |
'inline_button_color_type' => 'original', |
| 26 |
'inline_button_color' => '#1f75e1', |
| 27 |
'inline_show_labels' => 'icon_only', |
| 28 |
|
| 29 |
// Shared |
| 30 |
'container_width' => 'auto', |
| 31 |
]; |
| 32 |
|
| 33 |
return apply_filters('sharemypost_default_settings', $defaults); |
| 34 |
} |
| 35 |
|
| 36 |
static function get_settings(){ |
| 37 |
return wp_parse_args(get_option('sharemypost_settings', []), self::get_default_settings()); |
| 38 |
} |
| 39 |
} |