first commit
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( 'Direct access forbidden.' );
|
||||
}
|
||||
|
||||
if ( class_exists( 'Solarify_Comments_Walker' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Walker for comments
|
||||
*/
|
||||
class Solarify_Comments_Walker extends Walker_Comment {
|
||||
|
||||
/**
|
||||
* Output a comment in the HTML5 format.
|
||||
* @see wp_list_comments()
|
||||
*
|
||||
* @param object $comment Comment to display.
|
||||
* @param int $depth Depth of comment.
|
||||
* @param array $args An array of arguments.
|
||||
*/
|
||||
protected function html5_comment( $comment, $depth, $args ) {
|
||||
$tag = ( 'div' === $args['style'] ) ? 'div' : 'li';
|
||||
?>
|
||||
<<?php echo esc_html( $tag ); ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?>>
|
||||
<article id="div-comment-<?php comment_ID(); ?>" class="comment">
|
||||
<div class="comment-author vcard">
|
||||
<?php if ( 0 != $args['avatar_size'] ) {
|
||||
echo get_avatar( $comment, $args['avatar_size'], '', '', array( 'class' => 'media-object' ) );
|
||||
} ?>
|
||||
</div>
|
||||
<!-- .comment-author -->
|
||||
|
||||
<div class="comment-body">
|
||||
<footer class="comment-meta">
|
||||
|
||||
<div class="author_url darklinks"><?php printf( '%s <span class="says">' . '</span>', sprintf( '<span class="fn">%s</span>', get_comment_author_link( $comment ) ) ); ?></div>
|
||||
<div class="comment-date highlight">
|
||||
|
||||
<time datetime="<?php comment_time( 'c' ); ?>">
|
||||
<?php
|
||||
/* translators: 1: comment date, 2: comment time */
|
||||
printf( esc_html__( '%1$s at %2$s', 'solarify' ), get_comment_date( 'Y.m.d', $comment ), get_comment_time() );
|
||||
?>
|
||||
</time>
|
||||
|
||||
</div><!-- .comment-metadata -->
|
||||
|
||||
<?php if ( '0' == $comment->comment_approved ) : ?>
|
||||
<p class="comment-awaiting-moderation"><?php esc_html_e( 'Your comment is awaiting moderation.', 'solarify' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</footer><!-- .comment-meta -->
|
||||
|
||||
<div class="comment-content">
|
||||
<?php comment_text(); ?>
|
||||
</div><!-- .comment-content -->
|
||||
|
||||
<?php
|
||||
comment_reply_link( array_merge( $args, array(
|
||||
'add_below' => 'div-comment',
|
||||
'depth' => $depth,
|
||||
'reply_text' => '<i class="fa fa-reply"></i>',
|
||||
'max_depth' => $args['max_depth'],
|
||||
'before' => '<span class="reply">',
|
||||
'after' => '</span>'
|
||||
) ) );
|
||||
?>
|
||||
</div><!-- .media-left -->
|
||||
</article><!-- .comment-body -->
|
||||
<?php
|
||||
}
|
||||
}
|
||||
1483
wp-content/themes/solarify/inc/sub-includes/icons-rt.php
Normal file
1483
wp-content/themes/solarify/inc/sub-includes/icons-rt.php
Normal file
File diff suppressed because it is too large
Load Diff
204
wp-content/themes/solarify/inc/sub-includes/icons-social.php
Normal file
204
wp-content/themes/solarify/inc/sub-includes/icons-social.php
Normal file
@@ -0,0 +1,204 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( 'Direct access forbidden.' );
|
||||
}
|
||||
|
||||
function solarify_filter_social_icons_icon_set( $sets ) {
|
||||
$sets['social-icons'] = array(
|
||||
'font-style-src' => SOLARIFY_THEME_URI . ( '/css/fonts.css' ),
|
||||
'container-class' => '', // some fonts need special wrapper class to display properly
|
||||
'groups' => array(
|
||||
'all' => esc_html__( 'All', 'solarify' ),
|
||||
),
|
||||
'icons' => array(
|
||||
'social-icon socicon-augment' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-bitbucket' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-fyuse' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-yt-gaming' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-sketchfab' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-mobcrush' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-microsoft' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-pandora' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-messenger' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-gamewisp' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-bloglovin' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-tunein' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-gamejolt' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-trello' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-spreadshirt' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-500px' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-8tracks' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-airbnb' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-alliance' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-amazon' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-amplement' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-android' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-angellist' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-apple' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-appnet' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-baidu' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-bandcamp' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-battlenet' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-mixer' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-bebee' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-bebo' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-behance' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-blizzard' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-blogger' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-buffer' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-chrome' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-coderwall' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-curse' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-dailymotion' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-deezer' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-delicious' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-deviantart' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-diablo' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-digg' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-discord' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-disqus' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-douban' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-draugiem' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-dribbble' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-drupal' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-ebay' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-ello' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-endomodo' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-envato' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-etsy' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-facebook' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-feedburner' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-filmweb' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-firefox' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-flattr' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-flickr' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-formulr' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-forrst' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-foursquare' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-friendfeed' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-github' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-goodreads' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-google' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-googlescholar' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-googlegroups' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-googlephotos' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-googleplus' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-grooveshark' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-hackerrank' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-hearthstone' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-hellocoton' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-heroes' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-hitbox' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-horde' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-houzz' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-icq' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-identica' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-imdb' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-instagram' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-issuu' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-istock' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-itunes' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-keybase' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-lanyrd' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-lastfm' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-line' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-linkedin' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-livejournal' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-lyft' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-macos' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-mail' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-medium' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-meetup' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-mixcloud' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-modelmayhem' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-mumble' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-myspace' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-newsvine' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-nintendo' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-npm' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-odnoklassniki' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-openid' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-opera' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-outlook' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-overwatch' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-patreon' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-paypal' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-periscope' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-persona' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-pinterest' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-play' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-player' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-playstation' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-pocket' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-qq' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-quora' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-raidcall' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-ravelry' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-reddit' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-renren' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-researchgate' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-residentadvisor' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-reverbnation' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-rss' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-sharethis' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-skype' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-slideshare' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-smugmug' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-snapchat' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-songkick' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-soundcloud' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-spotify' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-stackexchange' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-stackoverflow' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-starcraft' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-stayfriends' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-steam' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-storehouse' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-strava' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-streamjar' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-stumbleupon' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-swarm' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-teamspeak' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-teamviewer' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-technorati' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-telegram' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-tripadvisor' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-tripit' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-triplej' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-tumblr' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-twitch' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-twitter' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-uber' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-ventrilo' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-viadeo' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-viber' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-viewbug' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-vimeo' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-vine' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-vkontakte' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-warcraft' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-wechat' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-weibo' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-whatsapp' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-wikipedia' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-wordpress' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-windows' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-wykop' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-xbox' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-xing' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-yahoo' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-yammer' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-yandex' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-yelp' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-younow' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-zynga' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-youtube' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-zapier' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-zerply' => array( 'group' => 'all' ),
|
||||
'social-icon socicon-zomato' => array( 'group' => 'all' ),
|
||||
),
|
||||
);
|
||||
|
||||
return $sets;
|
||||
}
|
||||
|
||||
add_filter( 'fw_option_type_icon_sets', 'solarify_filter_social_icons_icon_set' );
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( 'Direct access forbidden.' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'solarify_post_like_button' ) ) :
|
||||
/**
|
||||
* Print like button
|
||||
*/
|
||||
function solarify_post_like_button( $postID ) {
|
||||
if ( function_exists( 'mwt_post_like_button' ) ) {
|
||||
mwt_post_like_button( $postID );
|
||||
}
|
||||
} //solarify_post_like_button()
|
||||
endif;
|
||||
|
||||
if ( ! function_exists( 'solarify_post_like_count' ) ) :
|
||||
/**
|
||||
* Print like counter value
|
||||
*/
|
||||
function solarify_post_like_count( $postID ) {
|
||||
if ( function_exists( 'mwt_post_like_count' ) ) {
|
||||
mwt_post_like_count( $postID );
|
||||
}
|
||||
|
||||
} //solarify_post_like_count()
|
||||
endif;
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( 'Direct access forbidden.' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'solarify_show_post_views_count' ) ) :
|
||||
function solarify_show_post_views_count() {
|
||||
if ( function_exists( 'mwt_show_post_views_count' ) ) {
|
||||
mwt_show_post_views_count();
|
||||
}
|
||||
} //solarify_show_post_views_count()
|
||||
endif;
|
||||
203
wp-content/themes/solarify/inc/sub-includes/mod-widget-adds.php
Normal file
203
wp-content/themes/solarify/inc/sub-includes/mod-widget-adds.php
Normal file
@@ -0,0 +1,203 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( 'Direct access forbidden.' );
|
||||
}
|
||||
|
||||
//additional fields to widgets
|
||||
if (!function_exists('solarify_action_in_widget_form') ) :
|
||||
function solarify_action_in_widget_form( $t, $return, $instance ) {
|
||||
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '', 'float' => 'none' ) );
|
||||
if ( ! isset( $instance['widget_background'] ) ) {
|
||||
$instance['widget_background'] = null;
|
||||
}
|
||||
|
||||
if ( ! isset( $instance['bootstrap_width'] ) ) {
|
||||
$instance['bootstrap_width'] = null;
|
||||
}
|
||||
|
||||
if ( ! isset( $instance['text_align'] ) ) {
|
||||
$instance['text_align'] = null;
|
||||
}
|
||||
|
||||
if ( isset( $instance[ 'bootstrap_custom_width' ] ) ) {
|
||||
$custom_width = $instance[ 'bootstrap_custom_width' ];
|
||||
} else {
|
||||
$custom_width = '';
|
||||
}
|
||||
?>
|
||||
<p class="widget_background_option">
|
||||
<label for="<?php echo esc_attr( $t->get_field_id( 'widget_background' ) ); ?>"><?php esc_html_e( 'Widget Background:', 'solarify' ); ?></label>
|
||||
<select id="<?php echo esc_attr( $t->get_field_id( 'widget_background' ) ); ?>"
|
||||
name="<?php echo esc_attr( $t->get_field_name( 'widget_background' ) ); ?>">
|
||||
<option <?php selected( $instance['widget_background'], '' ); ?>
|
||||
value=""><?php esc_html_e( 'None', 'solarify' ); ?></option>
|
||||
<option
|
||||
<?php selected( $instance['widget_background'], 'with_background with_padding big-padding' ); ?>value="with_background with_padding big-padding"><?php esc_html_e( 'Light Backgorund', 'solarify' ); ?></option>
|
||||
<option
|
||||
<?php selected( $instance['widget_background'], 'muted_background with_padding big-padding' ); ?>value="muted_background with_padding big-padding"><?php esc_html_e( 'Muted Backgorund', 'solarify' ); ?></option>
|
||||
<option <?php selected( $instance['widget_background'], 'ds ms with_padding big-padding' ); ?>
|
||||
value="ds ms with_padding big-padding"><?php esc_html_e( 'Dark Background', 'solarify' ); ?></option>
|
||||
<option <?php selected( $instance['widget_background'], 'gradient_bg with_padding big-padding' ); ?>
|
||||
value="gradient_bg with_padding big-padding"><?php esc_html_e( 'Gradient Background', 'solarify' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<p class="widget_bootstrap_width">
|
||||
<label
|
||||
for="<?php echo esc_attr( $t->get_field_id( 'bootstrap_width' ) ); ?>"><?php esc_html_e( 'Widget Column Width:', 'solarify' ); ?>
|
||||
</label>
|
||||
<select id="<?php echo esc_attr( $t->get_field_id( 'bootstrap_width' ) ); ?>"
|
||||
name="<?php echo esc_attr( $t->get_field_name( 'bootstrap_width' ) ); ?>">
|
||||
<option <?php selected( $instance['bootstrap_width'], '' ); ?> value=""><?php esc_html_e( 'None', 'solarify' ); ?></option>
|
||||
<option <?php selected( $instance['bootstrap_width'], 'col-md-3 col-sm-6' ); ?>value="col-md-3 col-sm-6">1/4</option>
|
||||
<option <?php selected( $instance['bootstrap_width'], 'col-md-4 col-sm-6' ); ?> value="col-md-4 col-sm-6">1/3</option>
|
||||
<option <?php selected( $instance['bootstrap_width'], 'col-sm-6' ); ?> value="col-sm-6">1/2</option>
|
||||
<option <?php selected( $instance['bootstrap_width'], 'col-sm-12' ); ?>value="col-sm-12"><?php esc_html_e( 'Full Width', 'solarify' ); ?></option>
|
||||
<option <?php selected( $instance['bootstrap_width'], 'previous-column' ); ?>value="previous-column"><?php esc_html_e( 'Put in previous widget column', 'solarify' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
<p class="widget_bootstrap_custom_width">
|
||||
<label
|
||||
for="<?php echo esc_attr( $t->get_field_id( 'bootstrap_custom_width' ) ); ?>"><?php esc_html_e( 'Custom Column Width:', 'solarify' ); ?>
|
||||
</label>
|
||||
<input type="text" id="<?php echo esc_attr( $t->get_field_id( 'bootstrap_custom_width' ) ); ?>"
|
||||
name="<?php echo esc_attr( $t->get_field_name( 'bootstrap_custom_width' ) ); ?>" value="<?php echo esc_attr( $custom_width ); ?>" >
|
||||
</input><br>
|
||||
<?php echo esc_html__( 'Use bootstrap grid classes or left it empty.', 'solarify' ); ?>
|
||||
</p>
|
||||
<p class="widget_text_align">
|
||||
<label
|
||||
for="<?php echo esc_attr( $t->get_field_id( 'text_align' ) ); ?>"><?php esc_html_e( 'Widget Text Align:', 'solarify' ); ?>
|
||||
</label>
|
||||
<select id="<?php echo esc_attr( $t->get_field_id( 'text_align' ) ); ?>"
|
||||
name="<?php echo esc_attr( $t->get_field_name( 'text_align' ) ); ?>">
|
||||
<option <?php selected( $instance['text_align'], '' ); ?> value=""><?php esc_html_e( 'Left', 'solarify' ); ?></option>
|
||||
<option <?php selected( $instance['text_align'], 'text-center' ); ?>value="text-center"><?php esc_html_e( 'Center', 'solarify' ); ?></option>
|
||||
<option <?php selected( $instance['text_align'], 'text-right' ); ?> value="text-right"><?php esc_html_e( 'Right', 'solarify' ); ?></option>
|
||||
</select>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
$return = null;
|
||||
|
||||
return array( $t, $return, $instance );
|
||||
} //solarify_action_in_widget_form()
|
||||
endif;
|
||||
|
||||
if( !function_exists('solarify_filter_in_widget_form_update') ) :
|
||||
function solarify_filter_in_widget_form_update( $instance, $new_instance, $old_instance ) {
|
||||
$instance['widget_background'] = $new_instance['widget_background'];
|
||||
$instance['bootstrap_width'] = $new_instance['bootstrap_width'];
|
||||
$instance['bootstrap_custom_width'] = $new_instance['bootstrap_custom_width'];
|
||||
$instance['text_align'] = $new_instance['text_align'];
|
||||
|
||||
return $instance;
|
||||
} //solarify_filter_in_widget_form_update()
|
||||
endif;
|
||||
|
||||
if( !function_exists( 'solarify_filter_dynamic_sidebar_params' ) ):
|
||||
function solarify_filter_dynamic_sidebar_params( $params ) {
|
||||
|
||||
//only for frontend
|
||||
if ( is_admin() ) {
|
||||
return $params;
|
||||
}
|
||||
global $wp_registered_widgets;
|
||||
|
||||
//widget options
|
||||
$widget_id = $params[0]['widget_id'];
|
||||
$widget_obj = $wp_registered_widgets[ $widget_id ];
|
||||
$widget_opt = get_option( $widget_obj['callback'][0]->option_name );
|
||||
$widget_num = $widget_obj['params'][0]['number'];
|
||||
|
||||
//arrays with widgets that needs to modify they CSS classes
|
||||
$darklinks_widgets = array(
|
||||
'widget_recent_comments',
|
||||
);
|
||||
|
||||
$greylinks_widgets = array(
|
||||
'widget_pages',
|
||||
'widget_nav_menu',
|
||||
'widget_meta',
|
||||
'widget_categories',
|
||||
'widget_archive',
|
||||
'widget_recent_posts'
|
||||
);
|
||||
|
||||
$background_widgets = array();
|
||||
|
||||
if ( in_array( $wp_registered_widgets[ $widget_id ]['classname'], $darklinks_widgets ) ) {
|
||||
$params[0]['before_widget'] = str_replace( 'class="widget ', 'class="darklinks widget ', $params[0]['before_widget'] );
|
||||
}
|
||||
|
||||
if ( in_array( $wp_registered_widgets[ $widget_id ]['classname'], $greylinks_widgets ) ) {
|
||||
$params[0]['before_widget'] = str_replace( 'class="widget ', 'class="greylinks widget ', $params[0]['before_widget'] );
|
||||
}
|
||||
|
||||
if ( in_array( $wp_registered_widgets[ $widget_id ]['classname'], $background_widgets ) ) {
|
||||
$params[0]['before_widget'] = str_replace( 'class="widget ', 'class="with_background widget ', $params[0]['before_widget'] );
|
||||
}
|
||||
|
||||
if ( is_active_widget( false, false, 'monster' ) ) {
|
||||
|
||||
foreach ( $wp_registered_widgets as $key => $widget_instance ) {
|
||||
|
||||
//working inside monster but not outside
|
||||
if ( is_active_widget( false, false, 'monster' ) ) {
|
||||
if ( in_array( $widget_instance['callback'][0]->widget_options['classname'], $darklinks_widgets ) ) {
|
||||
$widget_instance['callback'][0]->widget_options['classname'] .= ' darklinks';
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( in_array( $widget_instance['callback'][0]->widget_options['classname'], $greylinks_widgets ) ) {
|
||||
$widget_instance['callback'][0]->widget_options['classname'] .= ' greylinks';
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( in_array( $wp_registered_widgets[ $key ]['classname'], $background_widgets ) ) {
|
||||
$widget_instance['callback'][0]->widget_options['classname'] .= ' with_background';
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
} //foreach
|
||||
} //if monster widget
|
||||
|
||||
$widget_background = ( !empty( $widget_opt[ $widget_num ]['widget_background'] ) ) ? $widget_opt[ $widget_num ]['widget_background'] : 'widget_no_background';
|
||||
$bootstrap_width = ( !empty( $widget_opt[ $widget_num ]['bootstrap_width'] ) ) ? $widget_opt[ $widget_num ]['bootstrap_width'] : '';
|
||||
$bootstrap_custom_width = ( !empty( $widget_opt[ $widget_num ]['bootstrap_custom_width'] ) ) ? $widget_opt[ $widget_num ]['bootstrap_custom_width'] : '';
|
||||
$text_align = ( !empty( $widget_opt[ $widget_num ]['text_align'] ) ) ? $widget_opt[ $widget_num ]['text_align'] : '';
|
||||
|
||||
//creating columns only in footer widget area
|
||||
if ( $bootstrap_width == 'none' || ( $params[0]['id'] !== 'sidebar-footer' && $params[0]['id'] !== 'sidebar-footer-secondary' ) ) {
|
||||
$bootstrap_width = '';
|
||||
}
|
||||
//if no width set in footer sidebar - set width to 'col-sm-12'
|
||||
if ( ( $bootstrap_width == 'none' || ! $bootstrap_width ) && $params[0]['id'] == 'sidebar-footer' ) {
|
||||
$bootstrap_width = 'col-sm-12';
|
||||
}
|
||||
//if custom width set
|
||||
if ( !empty( $bootstrap_custom_width ) ) {
|
||||
$bootstrap_width = $bootstrap_custom_width;
|
||||
}
|
||||
|
||||
$params[0]['before_widget'] = '<div class="widget-theme-wrapper ' . esc_attr( $widget_background ) . ' ' . esc_attr( $text_align ) . '">' . $params[0]['before_widget'];
|
||||
$params[0]['after_widget'] = $params[0]['after_widget'] . '</div>';
|
||||
|
||||
if ( $bootstrap_width ) {
|
||||
$params[0]['before_widget'] = '<div class="' . esc_attr( $bootstrap_width ) . '">' . $params[0]['before_widget'];
|
||||
$params[0]['after_widget'] = $params[0]['after_widget'] . '</div>';
|
||||
}
|
||||
|
||||
return $params;
|
||||
} //solarify_filter_dynamic_sidebar_params()
|
||||
endif;
|
||||
|
||||
//Add input fields(priority 5, 3 parameters)
|
||||
add_action( 'in_widget_form', 'solarify_action_in_widget_form', 5, 3 );
|
||||
//Callback function for options update (priority 5, 3 parameters)
|
||||
add_filter( 'widget_update_callback', 'solarify_filter_in_widget_form_update', 5, 3 );
|
||||
//add class names (default priority, one parameter)
|
||||
add_filter( 'dynamic_sidebar_params', 'solarify_filter_dynamic_sidebar_params', 1 );
|
||||
|
||||
//eof widgets additional fields
|
||||
@@ -0,0 +1,52 @@
|
||||
jQuery(document).ready(function($) {
|
||||
"use strict";
|
||||
//like button
|
||||
jQuery("a.like_button").click(function(e){
|
||||
e.preventDefault();
|
||||
var $this = jQuery(this);
|
||||
if(!$this.hasClass('like_active_button')) {
|
||||
//return;
|
||||
}
|
||||
var $parent = $this.parent();
|
||||
var id = $parent.data('id'),
|
||||
data = {
|
||||
action: 'add_like',
|
||||
security : MyAjax.security,
|
||||
pID: id
|
||||
};
|
||||
|
||||
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
||||
var post_result = $.post(MyAjax.ajaxurl, data, function(response) {
|
||||
$parent.html('<span class="like_button highlight2"><i class="rt-icon2-checkmark2"></i></span>');
|
||||
jQuery('.votes_count_'+id).html(response);
|
||||
}).done(function() {
|
||||
|
||||
}).fail(function(xhr, textStatus, errorThrown) {
|
||||
console.log(xhr.responseText);
|
||||
}).always(function() {
|
||||
});
|
||||
|
||||
});
|
||||
//$(".like_button").click(function(e){
|
||||
// var id = $(this).parent().data('id'),
|
||||
// data = {
|
||||
// action: 'add_like',
|
||||
// security : MyAjax.security,
|
||||
// pID: id
|
||||
// },
|
||||
// parent = $(this).parent();
|
||||
//
|
||||
// // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
||||
// var post_result = $.post(MyAjax.ajaxurl, data, function(response) {
|
||||
// parent.html('<i class="rt-icon icon-heart3"></i>');
|
||||
// $('.votes_count_'+id).html(response);
|
||||
// }).done(function() {
|
||||
//
|
||||
// }).fail(function(xhr, textStatus, errorThrown) {
|
||||
// console.log(xhr.responseText);
|
||||
// }).always(function() {
|
||||
// });
|
||||
//
|
||||
// e.preventDefault();
|
||||
//});
|
||||
});
|
||||
269
wp-content/themes/solarify/inc/sub-includes/woocommerce.php
Normal file
269
wp-content/themes/solarify/inc/sub-includes/woocommerce.php
Normal file
@@ -0,0 +1,269 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( 'Direct access forbidden.' );
|
||||
}
|
||||
|
||||
|
||||
//remove page title in shop page
|
||||
add_filter( 'woocommerce_show_page_title', 'solarify_filter_remove_shop_title_in_content' );
|
||||
if ( ! function_exists( 'solarify_filter_remove_shop_title_in_content' ) ) :
|
||||
function solarify_filter_remove_shop_title_in_content() {
|
||||
return false;
|
||||
}
|
||||
endif;
|
||||
|
||||
//remove wrappers
|
||||
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
|
||||
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
|
||||
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
|
||||
|
||||
//wrap in col-sm- and .columns-2 all products on shop page
|
||||
add_action( 'woocommerce_before_shop_loop', 'solarify_action_echo_div_wraps_before_shop_loop' );
|
||||
if ( ! function_exists( 'solarify_action_echo_div_wraps_before_shop_loop' ) ) :
|
||||
function solarify_action_echo_div_wraps_before_shop_loop() {
|
||||
$column_classes = solarify_get_columns_classes();
|
||||
$columns_amount = ( $column_classes[ 'main_column_class' ] === 'col-xs-12' ) ? 3 : 2;
|
||||
if ( function_exists( 'wc_get_loop_prop' ) ) {
|
||||
$columns_amount = wc_get_loop_prop( 'columns' );
|
||||
if ( $column_classes[ 'main_column_class' ] === 'col-xs-12' && $columns_amount > 4 ) {
|
||||
$columns_amount = 4;
|
||||
} else if ( $column_classes[ 'main_column_class' ] !== 'col-xs-12' && $columns_amount > 3 ) {
|
||||
$columns_amount = 3;
|
||||
}
|
||||
}
|
||||
|
||||
echo '<div id="content_products" class="' . esc_attr( $column_classes[ 'main_column_class' ] ) . '">';
|
||||
echo '<div class="columns-' . $columns_amount . '">';
|
||||
echo '<div class="form-inline content-justify vertical-center">';
|
||||
}
|
||||
endif;
|
||||
|
||||
//before shop loop - removing breadcrumbs and results count
|
||||
remove_filter( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
|
||||
remove_filter( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
|
||||
//wrapping sort form in div and adding view toggle button
|
||||
add_action( 'woocommerce_before_shop_loop', 'solarify_action_before_shop_loop_wrap_form', 15 );
|
||||
if ( ! function_exists( 'solarify_action_before_shop_loop_wrap_form' ) ) :
|
||||
function solarify_action_before_shop_loop_wrap_form() {
|
||||
echo '<div class="storefront-sorting">';
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( ! function_exists( 'solarify_action_before_shop_loop_wrap_form_close_first' ) ) :
|
||||
function solarify_action_before_shop_loop_wrap_form_close_first() {
|
||||
woocommerce_result_count();
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_before_shop_loop', 'solarify_action_before_shop_loop_wrap_form_close_first', 10 );
|
||||
|
||||
if ( ! function_exists( 'solarify_action_before_shop_loop_wrap_form_close_second' ) ) :
|
||||
function solarify_action_before_shop_loop_wrap_form_close_second() {
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_before_shop_loop', 'solarify_action_before_shop_loop_wrap_form_close_second', 40 );
|
||||
|
||||
//start loop - adding classes to products ul
|
||||
if ( ! function_exists( 'woocommerce_product_loop_start' ) ) :
|
||||
function woocommerce_product_loop_start( $echo = true ) {
|
||||
//id products is necessary for scripts
|
||||
|
||||
$html = '<ul class="products list-unstyled">';
|
||||
$GLOBALS[ 'woocommerce_loop' ][ 'loop' ] = 0;
|
||||
if ( $echo ) {
|
||||
echo wp_kses_post( $html );
|
||||
} else {
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
//loop pagination
|
||||
//closing main column and getting sidebar if exist
|
||||
remove_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination' );
|
||||
add_action( 'woocommerce_after_shop_loop', 'solarify_action_echo_div_columns_after_shop_loop' );
|
||||
if ( ! function_exists( 'solarify_action_echo_div_columns_after_shop_loop' ) ):
|
||||
function solarify_action_echo_div_columns_after_shop_loop() {
|
||||
echo '</div><!-- eof .columns-2 -->';
|
||||
$pagination_html = solarify_bootstrap_paginate_links();
|
||||
if ( $pagination_html ) {
|
||||
echo '<div class="text-center">';
|
||||
echo wp_kses_post( $pagination_html );
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div><!-- eof #content_products -->';
|
||||
$column_classes = solarify_get_columns_classes();
|
||||
if ( $column_classes[ 'sidebar_class' ] ): ?>
|
||||
<!-- main aside sidebar -->
|
||||
<aside class="<?php echo esc_attr( $column_classes[ 'sidebar_class' ] ); ?>">
|
||||
<?php get_sidebar(); ?>
|
||||
</aside>
|
||||
<!-- eof main aside sidebar -->
|
||||
<?php
|
||||
endif;
|
||||
}
|
||||
endif;
|
||||
|
||||
// single product in shop loop
|
||||
remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );
|
||||
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );
|
||||
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
|
||||
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
|
||||
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
|
||||
//start of loop item
|
||||
add_action( 'woocommerce_before_shop_loop_item', 'solarify_action_echo_markup_before_shop_loop_item' );
|
||||
if ( ! function_exists( 'solarify_action_echo_markup_before_shop_loop_item' ) ):
|
||||
function solarify_action_echo_markup_before_shop_loop_item() {
|
||||
echo '<div class="vertical-item content-padding with_background">';
|
||||
echo '<div class="item-media">';
|
||||
|
||||
woocommerce_template_loop_product_link_open();
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_before_shop_loop_item_title', 'solarify_action_echo_markup_before_shop_loop_item_title' );
|
||||
if ( ! function_exists( 'solarify_action_echo_markup_before_shop_loop_item_title' ) ):
|
||||
function solarify_action_echo_markup_before_shop_loop_item_title() {
|
||||
woocommerce_template_loop_product_link_close();
|
||||
echo '</div> <!-- eof .item-media -->';
|
||||
echo '<div class="item-content">';
|
||||
|
||||
woocommerce_template_loop_product_link_open();
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_after_shop_loop_item_title', 'solarify_action_echo_markup_after_shop_loop_item_title' );
|
||||
if ( ! function_exists( 'solarify_action_echo_markup_after_shop_loop_item_title' ) ):
|
||||
function solarify_action_echo_markup_after_shop_loop_item_title() {
|
||||
woocommerce_template_loop_product_link_close();
|
||||
|
||||
woocommerce_template_loop_price();
|
||||
|
||||
woocommerce_template_loop_add_to_cart( array( 'class' => 'theme_button color4' ) );
|
||||
}
|
||||
endif;
|
||||
|
||||
//end of loop item
|
||||
add_action( 'woocommerce_after_shop_loop_item', 'solarify_action_echo_markup_after_shop_loop_item' );
|
||||
if ( ! function_exists( 'solarify_action_echo_markup_after_shop_loop_item' ) ):
|
||||
function solarify_action_echo_markup_after_shop_loop_item() {
|
||||
echo '</div> <!-- eof .item-content -->';
|
||||
echo '</div> <!-- eof .vertical-item -->';
|
||||
}
|
||||
endif;
|
||||
|
||||
//single product view
|
||||
//single product image and summary layout
|
||||
//wrap in col-sm- and .columns-2 all products on shop page
|
||||
add_action( 'woocommerce_before_single_product', 'solarify_action_echo_div_columns_before_single_product' );
|
||||
if ( ! function_exists( 'solarify_action_echo_div_columns_before_single_product' ) ):
|
||||
function solarify_action_echo_div_columns_before_single_product() {
|
||||
$column_classes = solarify_get_columns_classes();
|
||||
echo '<div id="content_product" class="' . esc_attr( $column_classes[ 'main_column_class' ] ) . '">';
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_after_single_product', 'solarify_action_echo_div_columns_after_single_product' );
|
||||
if ( ! function_exists( 'solarify_action_echo_div_columns_after_single_product' ) ):
|
||||
function solarify_action_echo_div_columns_after_single_product() {
|
||||
echo '</div> <!-- eof .col- -->';
|
||||
$column_classes = solarify_get_columns_classes();
|
||||
if ( $column_classes[ 'sidebar_class' ] ): ?>
|
||||
<!-- main aside sidebar -->
|
||||
<aside class="<?php echo esc_attr( $column_classes[ 'sidebar_class' ] ); ?>">
|
||||
<?php get_sidebar(); ?>
|
||||
</aside>
|
||||
<!-- eof main aside sidebar -->
|
||||
<?php
|
||||
endif;
|
||||
}
|
||||
endif;
|
||||
|
||||
remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 );
|
||||
//add_action('woocommerce_product_thumbnails', 'woocommerce_show_product_sale_flash', 9 );
|
||||
add_filter( 'woocommerce_single_product_image_html', 'solarify_filter_put_onsale_span_in_main_image' );
|
||||
if ( ! function_exists( 'solarify_filter_put_onsale_span_in_main_image' ) ):
|
||||
function solarify_filter_put_onsale_span_in_main_image( $html ) {
|
||||
return $html . woocommerce_show_product_sale_flash();
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_product_thumbnails', 'solarify_action_echo_closing_div_before_single_product_thumbnails', 9 );
|
||||
if ( ! function_exists( 'solarify_action_echo_closing_div_before_single_product_thumbnails' ) ):
|
||||
function solarify_action_echo_closing_div_before_single_product_thumbnails() {
|
||||
echo '</div><!--eof .images -->';
|
||||
echo '<div class="thumbnails-wrap">';
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_before_single_product_summary', 'solarify_action_echo_div_columns_before_single_product_summary', 9 );
|
||||
if ( ! function_exists( 'solarify_action_echo_div_columns_before_single_product_summary' ) ):
|
||||
function solarify_action_echo_div_columns_before_single_product_summary() {
|
||||
echo '<div class="row">';
|
||||
echo '<div class="col-sm-6">';
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_before_single_product_summary', 'solarify_action_echo_div_close_first_column_before_single_product_summary', 21 );
|
||||
if ( ! function_exists( 'solarify_action_echo_div_close_first_column_before_single_product_summary' ) ):
|
||||
function solarify_action_echo_div_close_first_column_before_single_product_summary() {
|
||||
echo '</div><!-- eof .col-sm- with single product images -->';
|
||||
echo '<div class="col-sm-6">';
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_after_single_product_summary', 'solarify_action_echo_div_close_columns_after_single_product_summary', 9 );
|
||||
if ( ! function_exists( 'solarify_action_echo_div_close_columns_after_single_product_summary' ) ):
|
||||
function solarify_action_echo_div_close_columns_after_single_product_summary() {
|
||||
echo '</div> <!--eof .col-sm- .summary -->';
|
||||
echo '</div> <!--eof .row -->';
|
||||
}
|
||||
endif;
|
||||
|
||||
//elements in single product summary
|
||||
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
|
||||
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
|
||||
|
||||
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 15 );
|
||||
add_action( 'woocommerce_single_product_summary', 'solarify_action_echo_template_single_meta', 20 );
|
||||
if ( ! function_exists( 'solarify_action_echo_template_single_meta' ) ):
|
||||
function solarify_action_echo_template_single_meta() {
|
||||
echo '<div class="small-text weight-black greylinks">';
|
||||
woocommerce_template_single_meta();
|
||||
echo '</div>';
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_before_add_to_cart_button', 'solarify_action_echo_open_div_before_add_to_cart_button' );
|
||||
if ( ! function_exists( 'solarify_action_echo_open_div_before_add_to_cart_button' ) ):
|
||||
function solarify_action_echo_open_div_before_add_to_cart_button() {
|
||||
if ( function_exists( 'mwt_share_this' ) ) {
|
||||
solarify_share_this( true );
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_after_add_to_cart_button', 'solarify_action_echo_open_div_after_add_to_cart_button' );
|
||||
if ( ! function_exists( 'solarify_action_echo_open_div_after_add_to_cart_button' ) ):
|
||||
function solarify_action_echo_open_div_after_add_to_cart_button() {
|
||||
}
|
||||
endif;
|
||||
|
||||
//account navigation
|
||||
add_action( 'woocommerce_before_account_navigation', 'solarify_action_woocommerce_before_account_navigation' );
|
||||
if ( ! function_exists( 'solarify_action_woocommerce_before_account_navigation' ) ):
|
||||
function solarify_action_woocommerce_before_account_navigation() {
|
||||
echo '<div class="small-text darklinks">';
|
||||
}
|
||||
endif;
|
||||
|
||||
add_action( 'woocommerce_after_account_navigation', 'solarify_action_woocommerce_after_account_navigation' );
|
||||
if ( ! function_exists( 'solarify_action_woocommerce_after_account_navigation' ) ):
|
||||
function solarify_action_woocommerce_after_account_navigation() {
|
||||
echo '</div><!-- eof theme_buttons -->';
|
||||
}
|
||||
endif;
|
||||
Reference in New Issue
Block a user