Added Patreon and PayPal social media options
This commit is contained in:
parent
219b5aefbd
commit
12819aa9c3
@ -119,11 +119,11 @@ add_action( 'widgets_init', 'portage_widgets_init' );
|
||||
*/
|
||||
function portage_scripts() {
|
||||
wp_enqueue_style( 'portage-googlefont', 'https://fonts.googleapis.com/css?family=IM+Fell+English:400,400italic', 'portage-style', wp_get_theme() -> get( 'Version' ), 'all' );
|
||||
|
||||
/*
|
||||
if ( !wp_style_is( 'font-awesome.min.css', 'enqueued' ) ) {
|
||||
wp_enqueue_style( 'portage-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', 'portage-style', wp_get_theme() -> get( 'Version' ), 'all' );
|
||||
}
|
||||
|
||||
*/
|
||||
wp_enqueue_style( 'portage-style', get_stylesheet_uri() );
|
||||
|
||||
wp_enqueue_style( 'portage-menus', get_template_directory_uri() . '/styles/menus.css', array( 'portage-style' ), wp_get_theme() -> get( 'Version' ) );
|
||||
@ -135,13 +135,16 @@ if ( !wp_style_is( 'font-awesome.min.css', 'enqueued' ) ) {
|
||||
wp_enqueue_script( 'portage-menumaker', get_template_directory_uri() . '/js/menumaker.js', array( 'jquery' ), wp_get_theme() -> get( 'Version' ), true );
|
||||
|
||||
wp_enqueue_script( 'portage-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), wp_get_theme() -> get( 'Version' ), true );
|
||||
|
||||
|
||||
wp_enqueue_script( 'portage-font-awesome', 'https://kit.fontawesome.com/7a45e15014.js', array(), wp_get_theme() -> get( 'Version' ), true );
|
||||
|
||||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'portage_scripts' );
|
||||
|
||||
|
||||
/**
|
||||
* Enable live changes in the customizer
|
||||
*/
|
||||
|
@ -642,6 +642,31 @@ $default_copyright = '<a rel="license" href="http://creativecommons.org/licenses
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'portage_patreon', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'portage_sanitize_url',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'portage_patreon', array(
|
||||
'section' => 'portage_social_media',
|
||||
'type' => 'url',
|
||||
'label' => __( 'Enter Patreon URL', 'portage'),
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'portage_paypal', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'portage_sanitize_url',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'portage_paypal', array(
|
||||
'section' => 'portage_social_media',
|
||||
'type' => 'url',
|
||||
'label' => __( 'Enter PayPal URL', 'portage'),
|
||||
) );
|
||||
|
||||
|
||||
|
||||
|
||||
// Mobile Menu Options
|
||||
|
@ -312,6 +312,16 @@ function portage_social_media_display() {
|
||||
echo '<a href="' . get_theme_mod( 'portage_amazon' ) . '" target="_blank" class="sm-amazon"><span class="fa fa-amazon"></span></a>';
|
||||
}
|
||||
|
||||
$afpa = get_theme_mod( 'portage_patreon' );
|
||||
if ( !empty( $afpa ) ) {
|
||||
echo '<a href="' . get_theme_mod( 'portage_patreon' ) . '" target="_blank" class="sm-patreon"><span class="fab fa-patreon"></span></a>';
|
||||
}
|
||||
|
||||
$afpp = get_theme_mod( 'portage_paypal' );
|
||||
if ( !empty( $afpp ) ) {
|
||||
echo '<a href="' . get_theme_mod( 'portage_paypal' ) . '" target="_blank" class="sm-paypal"><span class="fa fa-paypal"></span></a>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -649,6 +649,12 @@ ul#footermenu-ul {
|
||||
#social-media-menu a.sm-amazon:hover {
|
||||
color: #F3A847;
|
||||
}
|
||||
#social-media-menu a.sm-patreon:hover {
|
||||
color: #f96854;
|
||||
}
|
||||
#social-media-menu a.sm-paypal:hover {
|
||||
color: #3b7bbf;
|
||||
}
|
||||
|
||||
/**********************************/
|
||||
/* 14. Required by WordPress */
|
||||
|
Loading…
Reference in New Issue
Block a user