false,
'home-page-default' => false,
'home-template' => 'home-panels.php',
'post-types' => array('page', 'post'),
'bundled-widgets' => get_option( 'siteorigin_panels_is_using_bundled', false ),
'responsive' => true,
'mobile-width' => 780,
'margin-bottom' => 30,
'margin-sides' => 30,
'affiliate-id' => apply_filters( 'siteorigin_panels_affiliate_id', false ),
'copy-content' => true,
'animations' => true,
'inline-css' => true,
) ) );
$settings = wp_parse_args( $current_settings, $settings);
// Filter these settings
$settings = apply_filters('siteorigin_panels_settings', $settings);
}
if( !empty( $key ) ) return isset( $settings[$key] ) ? $settings[$key] : null;
return $settings;
}
/**
* Add the options page
*/
function siteorigin_panels_options_admin_menu() {
add_options_page( __('SiteOrigin Page Builder', 'siteorigin-panels'), __('SiteOrigin Page Builder', 'siteorigin-panels'), 'manage_options', 'siteorigin_panels', 'siteorigin_panels_options_page' );
}
add_action( 'admin_menu', 'siteorigin_panels_options_admin_menu' );
/**
* Display the admin page.
*/
function siteorigin_panels_options_page(){
include plugin_dir_path(SITEORIGIN_PANELS_BASE_FILE) . '/tpl/options.php';
}
/**
* Display the field for selecting the post types
*/
function siteorigin_panels_options_field_post_types( $panels_post_types ){
$all_post_types = array_values( array_merge( array( 'page' => 'page', 'post' => 'post' ), get_post_types( array( '_builtin' => false ) ) ) );
// These are post types we know we don't want to show
$all_post_types = array_diff($all_post_types, array(
// Meta Slider
'ml-slider'
) );
foreach($all_post_types as $type){
$info = get_post_type_object($type);
if(empty($info->labels->name)) continue;
$checked = in_array(
$type,
$panels_post_types
);
?>