'
. '';
}
}
}
if( ! function_exists( 'fixit_return_post_data' ) ){
function fixit_return_post_data( $data ){
$data = !empty( $data ) ? $data : 'post';
$args_post = $args_id = $args = array();
$services_args = array( 'post_type' => $data, 'posts_per_page' => -1, 'post_status'=> 'publish', 'post__not_in' => get_option("sticky_posts") );
$services_loop = new WP_Query( $services_args );
while ( $services_loop->have_posts() ) : $services_loop->the_post();
if( get_the_title() != '' ) {
$args_post[] = get_the_title();
$args_id[] = get_the_ID();
}
endwhile;
wp_reset_postdata();
if( count( $args_post) == count( $args_id ) && is_array($args_post) && is_array($args_id) && !empty($args_post) && !empty($args_id) ){
return $args = array_combine( $args_id, $args_post);
}else {
return $args = array();
}
return false;
}
}
if( ! function_exists( 'fixit_function_testimonials_star_rating' ) ){
function fixit_function_testimonials_star_rating( $args ){
$star = '';
for( $i = (int) absint($args); $i>= (int) absint('1'); $i-- )
$star .= '';
for( $j = (int) absint($args); $j< (int) absint('5'); $j++ )
$star .= '';
return $star;
}
}
/**
* Social Media Profile Display.
*/
if( !function_exists( 'fixit_function_social_icon' ) ){
function fixit_function_social_icon( $args = array() ){
$social_icon = $social = array();
$social_list = array( 'facebook', 'twitter', 'pinterest', 'linkedin', 'google-plus', 'rss', 'tumblr', 'instagram', 'youtube', 'vimeo',
'behance', 'dribbble', 'flickr', 'git', 'skype', 'weibo', 'foursquare', 'soundcloud' );
$mh_social_icon = array( 'social_facebook', 'social_twitter', 'social_pintrest', 'social_linkedin', 'social_google', 'social_rss',
'social_tumblr', 'social_instagram', 'social_youtube', 'social_vimeo', 'social_behance', 'social_dribble',
'social_flickr', 'social_git', 'social_skype', 'social_weibo', 'social_foursqure', 'social_soundcloude' );
$new_social_args = array_combine( $mh_social_icon, $social_list );
if( isset($args['class']) ){ $social_icon_class = ' class="'. esc_attr( $args['class'] ) .'" '; }
if( isset($args['style']) ){ $social_style = ' style="'. esc_attr( $args['style'] ) .'" '; }
if( isset($args['icon']) == "square" ){
$social['facebook'] = '';
$social['twitter'] = '';
$social['pinterest'] = '';
$social['linkedin'] = '';
$social['google-plus'] = '';
$social['rss'] = '';
$social['tumblr'] = '';
$social['instagram'] = '';
$social['youtube'] = '';
$social['vimeo'] = '';
$social['behance'] = '';
$social['dribbble'] = '';
$social['flickr'] = '';
$social['git'] = '';
$social['skype'] = '';
$social['weibo'] = '';
$social['foursquare'] = '';
$social['soundcloud'] = '';
}
foreach( $social_list as $_icon_ ){
if( $args['icon'] == "simple" ) $social[ $_icon_ ] = '';
if( $args['name'] === true ) $social_name[ $_icon_ ] = ucwords( $_icon_ );
}
foreach( $new_social_args as $key => $value ){
if( mh_get_option( Fixit_Factory::fixit_prefix(). $key ) )
if( isset( $social_name[ $value ] ) )
$social_icon[] = $args['before'] . ''.$social[ $value ]. $social_name[ $value ] .'' . $args['after'];
else
$social_icon[] = $args['before'] . ''.$social[ $value ] .'' . $args['after'];
}
return $social_icon;
}
}
/**
* Post-Formate Diaplay.
*/
if( !function_exists( 'fixit_function_post_formate' ) ){
function fixit_function_post_formate( $args ){
global $post, $wp_query;
if( $args == 'true' or $args == 'false' ):
$post_format = get_post_format();
if ($post_format === false) {
$post_format = 'image';
}
$data = $post_data = $comments = '';
$comments .= ( get_comments_number() == 1 ? (get_comments_number()) : (get_comments_number()) );
$post_data .= '';
switch ($post_format) {
case 'standard':
$style = 0;
$data = '';
break;
case 'image':
if (wp_get_attachment_url(get_post_thumbnail_id($post->ID))) {
$thumbnail_url = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
if( $args == 'false' )
$data .= '