';
for ($i = 1; $i < 8; $i++) :
$social = esc_attr(get_theme_mod('abnomize_social_'.$i));
if ( ($social != 'none') && ($social != '') ) : ?>
';
}
endif;
/* ----------------------------------------------------------------------------------- */
/* Get Comment Numbers
/*----------------------------------------------------------------------------------- */
function abnomize_commentnumber(){ ?>
';
//get all categories of current post
global $post;
$topchildof = absint(get_theme_mod('topcateid'));
$taxonomy = 'category';
// Get the term IDs assigned to post.
$post_terms = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) );
// Separator between links.
$separator = ', ';
if ( ! empty( $post_terms ) && ! is_wp_error( $post_terms ) ) {
$term_ids = implode( ',' , $post_terms );
$terms = wp_list_categories( array(
'title_li' => '',
'style' => 'none',
'show_option_none' => '',
'child_of' => $topchildof,
'echo' => false,
'taxonomy' => $taxonomy,
'include' => $term_ids
) );
$terms = rtrim( trim( str_replace( '
', $separator, $terms ) ), $separator );
// Display post categories.
echo wp_kses_post($terms);
}
echo '';
}
function abnomize_featuredright(){
$topchildof = absint(get_theme_mod('rightcateid'));
global $post;
$taxonomy = 'category';
// Get the term IDs assigned to post.
$post_terms = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) );
// Separator between links.
$separator = ', ';
if ( ! empty( $post_terms ) && ! is_wp_error( $post_terms ) ) {
$term_ids = implode( ',' , $post_terms );
$terms = wp_list_categories( array(
'title_li' => '',
'style' => 'none',
'show_option_none' => '',
'child_of' => $topchildof,
'echo' => false,
'taxonomy' => $taxonomy,
'include' => $term_ids
) );
$terms = rtrim( trim( str_replace( '
', $separator, $terms ) ), $separator );
// Display post categories.
echo wp_kses_post($terms);
}
}
function abnomize_featuredleft(){
$topchildof = absint(get_theme_mod('leftcateid'));
global $post;
$taxonomy = 'category';
// Get the term IDs assigned to post.
$post_terms = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) );
// Separator between links.
$separator = ', ';
if ( ! empty( $post_terms ) && ! is_wp_error( $post_terms ) ) {
$term_ids = implode( ',' , $post_terms );
$terms = wp_list_categories( array(
'title_li' => '',
'style' => 'none',
'show_option_none' => '',
'child_of' => $topchildof,
'echo' => false,
'taxonomy' => $taxonomy,
'include' => $term_ids
) );
$terms = rtrim( trim( str_replace( '
', $separator, $terms ) ), $separator );
// Display post categories.
echo wp_kses_post($terms);
}
}
/* ----------------------------------------------------------------------------------- */
/* Suggested Plugin Jetpack
/*----------------------------------------------------------------------------------- */
require_once get_template_directory() . '/inc/class-tgm-plugin-activation.php';
add_action( 'tgmpa_register', 'abnomize_register_required_plugins' );
function abnomize_register_required_plugins() {
$plugins = array(
array(
'name' => __('Jetpack by WordPress.com','abnomize'),
'slug' => 'jetpack',
'required' => false,
),
);
$config = array(
'id' => 'abnomize', // Unique ID for hashing notices for multiple instances of TGMPA.
'default_path' => '', // Default absolute path to bundled plugins.
'menu' => 'tgmpa-install-plugins', // Menu slug.
'has_notices' => true, // Show admin notices or not.
'dismissable' => true, // If false, a user cannot dismiss the nag message.
'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.
'is_automatic' => false, // Automatically activate plugins after installation or not.
'message' => '', // Message to output right before the plugins table.
);
tgmpa( $plugins, $config );
}
/* ----------------------------------------------------------------------------------- */
/* Customize Comment Form
/*----------------------------------------------------------------------------------- */
add_filter( 'comment_form_default_fields', 'abnomize_comment_form_fields' );
function abnomize_comment_form_fields( $fields ) {
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
$html5 = current_theme_supports( 'html5', 'comment-form' ) ? 1 : 0;
$fields = array(
'author' => '' .
'
',
'email' => '' . '
' .
'
',
'url' => ''
);
return $fields;
}
add_filter( 'comment_form_defaults', 'abnomize_comment_form' );
function abnomize_comment_form( $argsbutton ) {
$argsbutton['class_submit'] = 'float-center button';
return $argsbutton;
}
/* ----------------------------------------------------------------------------------- */
/* Custom CSS Output
/*----------------------------------------------------------------------------------- */
function abnomize_custom_css_output(){
echo '';
}
add_action('wp_head','abnomize_custom_css_output');
if ( function_exists('yoast_breadcrumb') ) {
function abnomize_breadcrumb_support(){
yoast_breadcrumb('','
');
}
add_action('abnomize_before_single_post_title','abnomize_breadcrumb_support');
}
// Install notice
if ( ! defined( 'WPINC' ) ) {
die;
}
function abnomize_notice() {
if ( isset( $_GET['activated'] ) ) {
$return = '';
echo wp_kses_post($return);
}
}
add_action( 'admin_notices', 'abnomize_notice' );
// Custom Header Call
function abnomize_customhead(){
if ( is_front_page() ) { ?>