0 )
{
mega_register_block( 'Mega_Block_Newsletter' );
mega_register_block( 'Mega_Block_Login' );
mega_register_block( 'Mega_Block_Follow_Counter' );
mega_register_block( 'Mega_Block_Register' );
mega_register_block( 'Mega_Block_Contact' );
mega_register_block( 'Mega_Block_Ads' );
mega_register_block( 'Mega_Block_Feature_Custom' );
}
//Register Blocks
mega_register_block( 'Mega_Block_CTA' );
mega_register_block( 'Mega_Block_Logo' );
mega_register_block( 'Mega_Block_Meta' );
//mega_register_block( 'Mega_Block_Meta_Tags' );
//mega_register_block( 'Mega_Block_Meta_Cats' );
mega_register_block( 'Mega_Block_Content' );
mega_register_block( 'Mega_Block_Paginate' );
mega_register_block( 'Awake_Block_Comments_Loop' );
mega_register_block( 'Mega_Block_Comments_Form' );
mega_register_block( 'Mega_Block_Breadcrumbs' );
mega_register_block( 'Mega_Block_Tax_Desc' );
mega_register_block( 'Awake_Block_Toolbar' );
mega_register_block( 'Mega_Block_Slider' );
mega_register_block( 'Mega_Block_Feature_Auto' );
mega_register_block( 'Mega_Block_Feature_Image' );
mega_register_block( 'Mega_Block_Tabs' );
mega_register_block( 'Awake_Settings' );
}
public function sidebars()
{
mega_register_location( array(
'id' => 'slider',
'name' => esc_html__( 'Slider', 'awake' ),
'pages' => true,
'sidebar' => false,
'statics' => array( $this, 'slider_statics' )
));
mega_register_location( array(
'id' => 'front_box_1_1',
'name' => esc_html__( 'Front Page Box 1 Column 1', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 1, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'excerpt_count' => '115', 'show_button' => true, 'button_as_text' => true, 'alignment' => 'left', 'gfx' => false, 'title_count' => 15 ))
)
));
mega_register_location( array(
'id' => 'front_box_1_2',
'name' => esc_html__( 'Front Page Box 1 Column 2', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 2, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'excerpt_count' => '115', 'gfx_type' => 'ion', 'icon2' => 'ion-ios-alarm-outline', 'title_count' => 15 ))
)
));
mega_register_location( array(
'id' => 'front_box_1_3',
'name' => esc_html__( 'Front Page Box 1 Column 3', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 3, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'excerpt_count' => '115', 'gfx_type' => 'ion', 'icon2' => 'ion-ios-lightbulb-outline', 'title_count' => 15 ))
)
));
mega_register_location( array(
'id' => 'front_box_1_4',
'name' => esc_html__( 'Front Page Box 1 Column 4', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 4, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'excerpt_count' => '115', 'gfx_type' => 'ion', 'icon2' => 'ion-ios-monitor-outline', 'title_count' => 15 ))
)
));
mega_register_location( array(
'id' => 'front_box_2_0',
'name' => esc_html__( 'Front Page Box 2 Column 0', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 5, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'gfx' => false, 'show_button' => false, 'cta_boost' => 1, 'excerpt_count' => 160, 'title_count' => 35, 'title_desc' => esc_html__( 'Try this theme', 'awake' )))
)
));
mega_register_location( array(
'id' => 'front_box_2_1',
'name' => esc_html__( 'Front Page Box 2 Column 1', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 5, 'id_base' => 'Mega_Block_Feature_Image', 'settings' => array( 'max_height' => 570, 'ph_color' => 'e6eeee' ))
)
));
mega_register_location( array(
'id' => 'front_box_2_2',
'name' => esc_html__( 'Front Page Box 2 Column 2', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 6, 'id_base' => 'Mega_Block_Feature_Image', 'settings' => array( 'max_height' => 570, 'ph_color' => 'fff' ))
)
));
mega_register_location( array(
'id' => 'front_box_3_1',
'name' => esc_html__( 'Front Page Box 3 Column 1', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 6, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'gfx_position' => 'left', 'alignment' => 'left', 'gfx_width' => 13, 'excerpt_count' => 135, 'gfx_type' => 'ion', 'icon2' => 'ion-bag' )),
array( 'id' => 7, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'gfx_position' => 'left', 'alignment' => 'left', 'gfx_width' => 13, 'excerpt_count' => 135, 'gfx_type' => 'ion', 'icon2' => 'ion-paper-airplane' ))
)
));
mega_register_location( array(
'id' => 'front_box_3_2',
'name' => esc_html__( 'Front Page Box 3 Column 2', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 8, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'gfx_position' => 'left', 'alignment' => 'left', 'gfx_width' => 13, 'excerpt_count' => 135, 'gfx_type' => 'ion', 'icon2' => 'ion-social-youtube-outline' )),
array( 'id' => 9, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'gfx_position' => 'left', 'alignment' => 'left', 'gfx_width' => 13, 'excerpt_count' => 135, 'gfx_type' => 'ion', 'icon2' => 'ion-social-html5-outline' ))
)
));
mega_register_location( array(
'id' => 'front_box_3_3',
'name' => esc_html__( 'Front Page Box 3 Column 3', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 10, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'gfx_position' => 'left', 'alignment' => 'left', 'gfx_width' => 13, 'excerpt_count' => 135, 'gfx_type' => 'ion', 'icon2' => 'ion-android-notifications-none' )),
array( 'id' => 11, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'gfx_position' => 'left', 'alignment' => 'left', 'gfx_width' => 13, 'excerpt_count' => 135, 'gfx_type' => 'ion', 'icon2' => 'ion-android-cloud-outline' ))
)
));
mega_register_location( array(
'id' => 'front_box_4',
'name' => esc_html__( 'Front Page Box 4 (CTA)', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 12, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'excerpt_count' => 125, 'alignment' => mega_float(), 'gfx_position' => mega_float( 'right' ), 'gfx_width' => 50, 'title_count' => 35, 'max_height' => 450, 'image_url1' => AWAKE_IMG_DIR_URI . '/009.jpg', 'title_desc' => esc_html__( 'Try this theme', 'awake' ), 'show_button' => true, 'cta_boost' => 1, 'button_as_text' => true ))
)
));
mega_register_location( array(
'id' => 'front_box_44',
'name' => esc_html__( 'Front Page Box 4 (Blog)', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 0, 'id_base' => 'Mega_Block_Timeline', 'settings' => array( 'length' => 100, 'count' => 3 ))
)
));
mega_register_location( array(
'id' => 'front_box_5',
'name' => esc_html__( 'Front Page Box 5 (CTA)', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 0, 'id_base' => 'Mega_Block_CTA', 'settings' => array( 'cta' => esc_html__( 'Not sure which plan is right for your Business? Get a free 30 day trial today.', 'awake' )))
)
));
mega_register_location( array(
'id' => 'front_box_6',
'name' => esc_html__( 'Front Page Box 6', 'awake' ),
'pages' => array( 'front_page', 'template-home.php' ),
'statics' => array(
array( 'id' => 5, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'gfx' => false, 'show_button' => true, 'cta_boost' => 1, 'excerpt_count' => 160, 'title_count' => 35, 'title_desc' => esc_html__( 'Try this theme', 'awake' )))
)
));
mega_register_location( array(
'id' => 'r-sidebar',
'name' => esc_html__( 'Right Location', 'awake' ),
'pages' => true,//array( 'index' ),
'exclude' => array( mega_option( 'show_front' ) ? 'front_page' : '', 'template-home.php' ),
'statics' => array(
array( 'id' => 0, 'id_base' => 'WP_Widget_Search' ),
array( 'id' => 0, 'id_base' => 'WP_Widget_Archives' ),
array( 'id' => 0, 'id_base' => 'WP_Widget_Tag_Cloud' ),
array( 'id' => 0, 'id_base' => 'Mega_Block_Newsletter' ),
array( 'id' => 0, 'id_base' => 'Mega_Block_Feature_Auto', 'settings' => array( 'show_button' => 1, 'image' => 1, 'image_url' => AWAKE_IMG_DIR_URI . '/001.jpg', 'title_count' => 15 )),
array( 'id' => 0, 'id_base' => 'Mega_Block_Login' )
)
));
mega_register_location( array(
'id' => 'footer1',
'name' => esc_html__( 'Footer Column 1', 'awake' ),
'pages' => true,
'statics' => array( $this, 'footer1_statics' )
));
mega_register_location( array(
'id' => 'footer2',
'name' => esc_html__( 'Footer Column 2', 'awake' ),
'pages' => true,
'statics' => array( $this, 'footer2_statics' )
));
mega_register_location( array(
'id' => 'footer3',
'name' => esc_html__( 'Footer Column 3', 'awake' ),
'pages' => true,
'statics' => array( $this, 'footer3_statics' )
));
mega_register_location( array(
'id' => 'contact_page_right',
'name' => esc_html__( 'Contact Page Right Column', 'awake' ),
'pages' => array( 'template-contact.php' ),
'statics' => array(
array( 'id' => 0, 'id_base' => 'Mega_Block_Contact' )
)
));
mega_register_location( array(
'id' => 'contact_page_left',
'name' => esc_html__( 'Contact Page Left Column', 'awake' ),
'pages' => array( 'template-contact.php' ),
'statics' => array( $this, 'contact_page_right_statics' )
));
mega_register_location( array(
'id' => 'contact_page_top',
'name' => esc_html__( 'Contact Page Top Column', 'awake' ),
'sidebar' => false,
'pages' => array( 'template-contact.php' ),
'statics' => array(
array( 'id' => 0, 'id_base' => 'Mega_Block_Map', 'settings' => array( 'title' => '' ))
)
));
mega_register_location( array(
'id' => 'three_columns_1',
'name' => esc_html__( 'Three Columns Page Column 1', 'awake' ),
'pages' => true
));
mega_register_location( array(
'id' => 'three_columns_2',
'name' => esc_html__( 'Three Columns Page Column 2', 'awake' ),
'pages' => true
));
mega_register_location( array(
'id' => 'three_columns_3',
'name' => esc_html__( 'Three Columns Page Column 3', 'awake' ),
'pages' => true
));
}
public function slider_statics( $location )
{
$location->addStatic( 0, 'Mega_Block_Slider' );
}
public function footer1_statics( $location )
{
if ( mega_option( 'show_footer' ))
{
$location->addStatic( 0, 'Mega_Block_About' );
$location->addStatic( 0, 'Mega_Block_Follow', array( 'title' => '' ));
}
}
public function footer2_statics( $location )
{
if ( mega_option( 'show_footer' ))
{
$location->addStatic( 0, 'Mega_Block_Contact_Info' );
}
}
public function footer3_statics( $location )
{
if ( mega_option( 'show_footer' ))
{
$location->addStatic( 0, 'WP_Widget_Search', array( 'title' => esc_html__( 'Search', 'awake' )));
$location->addStatic( 0, 'Mega_Block_Copyright' );
}
}
public function contact_page_right_statics( $location )
{
$location->addStatic( 0, 'Mega_Block_Contact_Info', array( 'text' => mega_option( 'default_contact_info_text' )));
}
public function mega_block_meta_settings()
{
return array(
'meta' => '[date][author][tag]'
);
}
public function mega_block_posts_settings()
{
return array(
'layout' => '[title][meta]',
'meta' => '[date]',
'width' => 40,
'height' => 40,
'title_length' => 22
);
}
public function mega_block_timeline_settings()
{
return array(
'image' => 1,
'width' => 100,
'max_height' => 250,
//'length' => 180
);
}
public function mega_block_comments_settings()
{
return array(
'avatar_size' => 40,
'layout' => '[meta][title][excerpt]',
'meta' => '[date]'
);
}
public function mega_block_slider_settings()
{
return array(
'source' => 'custom',
'auto_image_width' => 1100,
'auto_image_height' => 400,
'excerpt_count' => 180,
'custom_1' => 1,
'custom_1_width' => 1048,
'custom_1_height' => 210,
'custom_1_title' => esc_html__( 'Simple design layout', 'awake' ),
'custom_1_text' => wp_kses( __( 'Lorem ipsum dolor sit amet, vivendum voluptatum qui id. His evertitur interpretaris et voluptua adipis magna vehicula ullamcorper id at arcu. Etiam rhoncus velit vel tristique.', 'awake' ), array( 'strong' => true )),
'custom_1_button_label' => esc_html__( 'Continue reading', 'awake' ),
'custom_1_image' => false,
'custom_1_bg_image_url' => AWAKE_IMG_DIR_URI . '/bookshelf.jpg',
'custom_1_bg_top' => 'rgba(233, 239, 239, 0.95)',
'custom_1_bg_bottom' => 'rgba(230, 234, 234, 0.95)'
);
}
public function mega_block_404_args( $args )
{
$args['before'] = '