';
$fields['email'] = '';
$fields['url'] = '';
return apply_filters( 'aces_comment_form_default_fields_markup', $fields );
}
}
add_filter( 'comment_form_default_fields', 'aces_comment_form_default_fields_markup' );
function my_update_comment_field( $comment_field ) {
$comment_field =
'';
return $comment_field;
}
add_filter( 'comment_form_field_comment', 'my_update_comment_field' );
/**
* Template for comments and pingbacks.
*/
if ( ! function_exists( 'aces_theme_comment' ) ) {
/**
* Template for comments and pingbacks.
*
* To override this walker in a child theme without modifying the comments template
* simply create your own aces_theme_comment(), and that function will be used instead.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @param string $comment Comment.
* @param array $args Comment arguments.
* @param number $depth Depth.
* @return mixed Comment markup.
*/
function aces_theme_comment( $comment, $args, $depth ) {
switch ( $comment->comment_type ) {
case 'pingback':
case 'trackback':
// Display trackbacks differently than normal comments.
?>
id="comment-">
', '' ); ?>
id="li-comment-">
urlencode( implode( '|', $fonts ) ),
'subset' => urlencode( $subsets ),
), '//fonts.googleapis.com/css' );
}
return $fonts_url;
}
endif;
if ( !function_exists( 'aces_secondary_fonts_url' ) ) :
/**
* Return Font's URL.
*
* @since 1.0.0
* @return string Fonts URL.
*/
function aces_secondary_fonts_url() {
$fonts_url = '';
$fonts = array();
$subsets = 'latin,latin-ext';
/* translators: If there are characters in your language that are not supported by Merriweather, translate this to 'off'. Do not translate into your own language. */
if ('off' !== _x('on', 'Montserrat font: on or off', 'aces')) {
$fonts[] = 'Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i';
}
/* translators: If there are characters in your language that are not supported by Merriweather, translate this to 'off'. Do not translate into your own language. */
if ('off' !== _x('on', 'Montserrat font: on or off', 'aces')) {
$fonts[] = 'Montserrat:400,400i,600,600i,700,700i';
}
$fonts = array_unique( $fonts );
if ( $fonts ) {
$fonts_url = add_query_arg( array(
'family' => urlencode( implode( '|', $fonts ) ),
'subset' => urlencode( $subsets ),
), '//fonts.googleapis.com/css' );
}
return $fonts_url;
}
endif;
/**
* Return padding/margin values for customizer
*
* @since 1.4.9
*/
if ( ! function_exists( 'aces_spacing_css' ) ) {
function aces_spacing_css( $top, $right, $bottom, $left ) {
// Add px and 0 if no value
$s_top = ( isset( $top ) && '' !== $top ) ? intval( $top ) . 'px ' : '0px ';
$s_right = ( isset( $right ) && '' !== $right ) ? intval( $right ) . 'px ' : '0px ';
$s_bottom = ( isset( $bottom ) && '' !== $bottom ) ? intval( $bottom ) . 'px ' : '0px ';
$s_left = ( isset( $left ) && '' !== $left ) ? intval( $left ) . 'px' : '0px';
// Return one value if it is the same on every inputs
if ( ( intval( $s_top ) === intval( $s_right ) )
&& ( intval( $s_right ) === intval( $s_bottom ) )
&& ( intval( $s_bottom ) === intval( $s_left ) ) ) {
return $s_left;
}
// Return
return $s_top . $s_right . $s_bottom . $s_left;
}
}
/**
* Minify CSS
*
* @since 1.0.0
*/
if ( ! function_exists( 'aces_minify_css' ) ) {
function aces_minify_css( $css = '' ) {
// Return if no CSS
if ( ! $css ) return;
// Normalize whitespace
$css = preg_replace( '/\s+/', ' ', $css );
// Remove ; before }
$css = preg_replace( '/;(?=\s*})/', '', $css );
// Remove space after , : ; { } */ >
$css = preg_replace( '/(,|:|;|\{|}|\*\/|>) /', '$1', $css );
// Remove space before , ; { }
$css = preg_replace( '/ (,|;|\{|})/', '$1', $css );
// Strips leading 0 on decimal values (converts 0.5px into .5px)
$css = preg_replace( '/(:| )0\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css );
// Strips units if value is 0 (converts 0px to 0)
$css = preg_replace( '/(:| )(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $css );
// Trim
$css = trim( $css );
// Return minified CSS
return $css;
}
}
/**
* Translation support
*
* @since 1.1.4
*/
if ( ! function_exists( 'aces_tm_translation' ) ) {
function aces_tm_translation( $id, $val = '' ) {
// Translate theme mod val
if ( $val ) {
// Polylang Translation
if ( function_exists( 'pll__' ) && $id ) {
$val = pll__( $val );
}
// Return the value
return $val;
}
}
}
/**
* Returns array of Social Options
*
* @since 1.0.0
*/
if ( ! function_exists( 'aces_social_option' ) ) {
function aces_social_option() {
return apply_filters( 'aces_social_option', array(
'twitter' => array(
'label' => esc_html__( 'Twitter', 'aces' ),
'icon_class' => 'fab fa-twitter',
),
'facebook' => array(
'label' => esc_html__( 'Facebook', 'aces' ),
'icon_class' => 'fab fa-facebook',
),
'googleplus' => array(
'label' => esc_html__( 'Google Plus', 'aces' ),
'icon_class' => 'fab fa-google-plus',
),
'pinterest' => array(
'label' => esc_html__( 'Pinterest', 'aces' ),
'icon_class' => 'fab fa-pinterest-p',
),
'dribbble' => array(
'label' => esc_html__( 'Dribbble', 'aces' ),
'icon_class' => 'fab fa-dribbble',
),
'vk' => array(
'label' => esc_html__( 'VK', 'aces' ),
'icon_class' => 'fab fa-vk',
),
'instagram' => array(
'label' => esc_html__( 'Instagram', 'aces' ),
'icon_class' => 'fab fa-instagram',
),
'linkedin' => array(
'label' => esc_html__( 'LinkedIn', 'aces' ),
'icon_class' => 'fab fa-linkedin',
),
'tumblr' => array(
'label' => esc_html__( 'Tumblr', 'aces' ),
'icon_class' => 'fab fa-tumblr',
),
'github' => array(
'label' => esc_html__( 'Github', 'aces' ),
'icon_class' => 'fab fa-github-alt',
),
'flickr' => array(
'label' => esc_html__( 'Flickr', 'aces' ),
'icon_class' => 'fab fa-flickr',
),
'skype' => array(
'label' => esc_html__( 'Skype', 'aces' ),
'icon_class' => 'fab fa-skype',
),
'youtube' => array(
'label' => esc_html__( 'Youtube', 'aces' ),
'icon_class' => 'fab fa-youtube',
),
'vimeo' => array(
'label' => esc_html__( 'Vimeo', 'aces' ),
'icon_class' => 'fab fa-vimeo-square',
),
'vine' => array(
'label' => esc_html__( 'Vine', 'aces' ),
'icon_class' => 'fab fa-vine',
),
'xing' => array(
'label' => esc_html__( 'Xing', 'aces' ),
'icon_class' => 'fab fa-xing',
),
'yelp' => array(
'label' => esc_html__( 'Yelp', 'aces' ),
'icon_class' => 'fab fa-yelp',
),
'tripadvisor' => array(
'label' => esc_html__( 'Tripadvisor', 'aces' ),
'icon_class' => 'fab fa-tripadvisor',
),
'rss' => array(
'label' => esc_html__( 'RSS', 'aces' ),
'icon_class' => 'fa fa-rss',
),
'email' => array(
'label' => esc_html__( 'Email', 'aces' ),
'icon_class' => 'fa fa-envelope',
),
) );
}
}