/**
* Sticky Header - Customizer.
*
* @package Astra Addon
* @since 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! class_exists( 'Astra_Ext_Transparent_Header_Loader' ) ) {
/**
* Customizer Initialization
*
* @since 1.0.0
*/
class Astra_Ext_Transparent_Header_Loader {
/**
* Member Variable
*
* @var instance
*/
private static $instance;
/**
* Initiator
*/
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Constructor
*/
public function __construct() {
add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) );
add_action( 'customize_preview_init', array( $this, 'preview_scripts' ) );
add_action( 'customize_register', array( $this, 'customize_register' ), 2 );
}
/**
* Set Options Default Values
*
* @param array $defaults Astra options default value array.
* @return array
*/
public function theme_defaults( $defaults ) {
// Header - Transparent.
$defaults['transparent-header-logo'] = '';
$defaults['transparent-header-retina-logo'] = '';
$defaults['different-transparent-logo'] = 0;
$defaults['different-transparent-retina-logo'] = 0;
$defaults['transparent-header-logo-width'] = array(
'desktop' => 150,
'tablet' => 120,
'mobile' => 100,
);
$defaults['transparent-header-enable'] = 0;
$defaults['transparent-header-disable-archive'] = 1;
$defaults['transparent-header-disable-latest-posts-index'] = 1;
$defaults['transparent-header-on-devices'] = 'both';
$defaults['transparent-header-main-sep'] = '';
$defaults['transparent-header-main-sep-color'] = '';
/**
* Transparent Header
*/
$defaults['transparent-header-bg-color'] = '';
$defaults['transparent-header-color-site-title'] = '';
$defaults['transparent-header-color-h-site-title'] = '';
$defaults['transparent-menu-bg-color'] = '';
$defaults['transparent-menu-color'] = '';
$defaults['transparent-menu-h-color'] = '';
$defaults['transparent-submenu-bg-color'] = '';
$defaults['transparent-submenu-color'] = '';
$defaults['transparent-submenu-h-color'] = '';
/**
* Transparent Header Responsive Colors
*/
$defaults['transparent-header-bg-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-header-color-site-title-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-header-color-h-site-title-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-menu-bg-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-menu-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-menu-h-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-submenu-bg-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-submenu-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-submenu-h-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-content-section-text-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-content-section-link-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-content-section-link-h-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
return $defaults;
}
/**
* Add postMessage support for site title and description for the Theme Customizer.
*
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
public function customize_register( $wp_customize ) {
// @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
/**
* Register Panel & Sections
*/
require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/class-astra-transparent-header-panels-and-sections.php';
/**
* Sections
*/
require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/sections/class-astra-customizer-colors-transparent-header-configs.php';
// Check Transparent Header is activated.
require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/sections/class-astra-customizer-transparent-header-configs.php';
// @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
}
/**
* Customizer Preview
*/
public function preview_scripts() {
/**
* Load unminified if SCRIPT_DEBUG is true.
*/
/* Directory and Extension */
$dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified';
$file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min';
wp_enqueue_script( 'astra-transparent-header-customizer-preview-js', ASTRA_THEME_TRANSPARENT_HEADER_URI . 'assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true );
// Localize variables for further JS.
wp_localize_script(
'astra-transparent-header-customizer-preview-js',
'AstraBuilderTransparentData',
array(
'is_astra_hf_builder_active' => Astra_Builder_Helper::$is_header_footer_builder_active,
'is_flex_based_css' => Astra_Builder_Helper::apply_flex_based_css(),
)
);
}
}
}
/**
* Kicking this off by calling 'get_instance()' method
*/
Astra_Ext_Transparent_Header_Loader::get_instance();
The brand new bad news is that PMI will become necessary just in case you cannot put 20% upon their house when they buy it.
First, when you have paid off the home loan so you’re able to 80% of your brand spanking new loan, you could potentially phone call your loan company and request the PMI feel canceled.
2nd, for many who have not paid down their home loan down to 80% but have done advancements to your house you to definitely improved the benefits, you can get your house appraised. If for example the matter leftover on your financial x step 1.twenty-five try below brand new appraised value of your residence, you could demand the PMI getting canceled.
For example, say you https://availableloan.net/installment-loans-ok/clearview/ borrowed $170,one hundred thousand on your own household plus it just appraised to possess $220,one hundred thousand due to a property redesign. Take $170,100000 x step one.25= $212,500. $212,five-hundred was lower than the worth of your house ($220,000) to help you consult your own PMI becoming terminated.

3rd, if the prices have left up in your area since you purchased your residence, you can have your house appraised. In the event your matter leftover on your own home loan x 1.twenty five was below the newest appraised value of your residence, you might demand the PMI end up being canceled.
For example, I purchased a fixer-top household (pre and post photographs here) having 40k over the fresh assessment really worth (reasons out of as to why right here) and you may first started expenses PMI for the financial. Then business went right up considerably exactly as i had complete all of our recovery. We’d the house theoretically appraised from the an official appraiser and you will our very own equity ran to 70k.
Next, for those who have purchased the loan for 50 % of their time-frame/plan (fifteen years into the a 30 seasons loan), you could consult that PMI be canceled.
Instance, state you may have an effective balloon notice mortgage or a loan and this is actually greatly top weighted inside desire, you have produced money to own 15 years into the a 30 seasons mortgage and never yet , reached brand new 20% guarantee required to terminate PMI. Even after perhaps not getting 20% guarantee, once you strike the half-way I cancellation.
5th, initiate investing additional toward dominating and you will automate the amount of time body type you really have if you don’t very own 20% collateral of your property. We reveal in this article step three secrets to save yourself more than $100,100 on your own home loan you to definitely financial institutions do not want one to know precisely how easily wearing equity may appear by boosting costs so you can dominating.
Sixth, If you will become able to put down 20% on your the fresh mortgage, you could test refinancing. Refinancing might be a costly decision. Before you re-finance see my personal Benefits and drawbacks off refinancing here.
Going so it station will cost you days from PMI repayments whenever you could officially request a termination once you have repaid 20% of your own financing as opposed to twenty two%. So i i do not recommend prepared right up until the bank automatically cancels.
Canceling your own PMI immediately is a fantastic means to put an extra $50-$400+ returning to their wallet each month.
]]>