'; echo ' ' . get_the_date('M') . ''; echo ' ' . get_the_date('j') . ','; echo ' ' . get_the_date('Y') . ''; } } if( !function_exists('_html_decode') ) { function _html_decode($string) { return htmlspecialchars_decode( stripslashes_deep($string) ); } } if( !function_exists('_html_encode') ) { function _html_encode($string) { return htmlspecialchars( $string ); } } if ( !function_exists('articled_meta')): function articled_meta( $metaID ) { global $post; $get_value = get_post_meta($post->ID, $metaID, true); if ( $get_value == 'default' || $get_value == 'show' || $get_value == '') { $get_value = true; } elseif( $get_value == 'hide' ) { $get_value = false; } else{ $get_value = $get_value; } return $get_value; } endif; $get_articled_options = get_option('articled_options'); if ( ! function_exists('articled_options')): function articled_options($id) { global $get_articled_options; $output = _html_decode( articled_ekey( $id , $get_articled_options, false )); return $output; } endif; if ( !function_exists('articled_mod')): function articled_mod($name, $default = false, $echo = false) { $output = get_theme_mod( $name, $default ); if($echo) { echo $output; } else { return $output; } } endif; if( !function_exists('articled_post_type')): function articled_post_type($post_id) { return get_post_format( $post_id ); } endif; if( !function_exists('articled_video_attachments') ) : function articled_video_attachments($videoID, $echo){ $video_url = wp_get_attachment_url($videoID); $video_e = ''; if($echo) { echo $video_e; } else { return $video_e; } } endif; if( !function_exists('articled_edit_delete_post') ) : function articled_edit_delete_post(){ if( is_user_logged_in() && current_user_can( 'edit_posts' ) ) { echo '['; edit_post_link( __( 'Edit', 'articled' ), '', '', null, 'edit-post-link' ); echo ''.__( 'Delete', 'articled' ).']' ; }; } endif; if( ! function_exists('articled_remove_extr_space') ){ function articled_remove_extr_space($str, $echo = false){ if( $echo ) { echo trim( preg_replace( '/\s+/', ' ', $str ) ); } else { return trim( preg_replace( '/\s+/', ' ', $str ) ); } } } if( ! function_exists('articled_blog_post_layout') ){ function articled_blog_post_layout($type = null, $echo = true) { if( $type == 'main' ) { if( get_theme_mod('articled_blog_post_layout', '2') == '2' || get_theme_mod('articled_blog_post_layout', '2') == '4' || get_theme_mod('articled_blog_post_layout', '2') == '6') { $o = 'col-md-9'; } else { $o = 'col-md-12'; } } elseif( $type == 'sidebar' ) { if ( get_theme_mod('articled_blog_post_layout', '2') == '2' || get_theme_mod('articled_blog_post_layout', '2') == '4' || get_theme_mod('articled_blog_post_layout', '2') == '6') { $o = true; } else { $o = false; } } else { $o = ''; } if( $echo ) { echo esc_attr( $o ); } else { return $o ; } } } if( ! function_exists('articled_is_masonry') ){ function articled_is_masonry($place = null, $echo = true){ $o = null; $masonry = get_theme_mod('articled_blog_post_layout', '2'); if( $place == 'top' ) { if( $masonry == '6' || $masonry == '5' ) { $o = '
'; }; } else { $o = (( ($masonry == '6') || ($masonry == '5') ) ? '
' : ''); } if( $echo ) { echo $o ; } else { return esc_attr( $o ); } } } if( ! function_exists('articled_footer_widget_cols') ){ function articled_footer_widget_cols(){ $get_widget_cols = get_theme_mod('articled_footer_widget_cols', '4'); $e_widget_cols = ''; switch($get_widget_cols) { case 2 : $e_widget_cols = 'two'; break; case 3 : $e_widget_cols = 'three'; break; case 4 : $e_widget_cols = 'four'; break; default: $e_widget_cols = 'four'; } return $e_widget_cols; } } if( ! function_exists('articled_insert_contents') ){ function articled_insert_contents($id = null, $echo = true){ $o = ''; $o .= '
' . articled_options( $id ) . '
'; if( $echo ) { echo $o ; } else { return esc_attr( $o ); } } } // the_content() data imageg out

tags if( ! function_exists('articled_content_img_out_from_p') ){ function articled_content_img_out_from_p($content){ return preg_replace('/

\s*()?\s*()\s*(\/a>)?\s*<\/p>/iU', '\1\2\3', $content); } add_filter('the_content', 'articled_content_img_out_from_p'); } if( ! function_exists('articled_google_fonts') ){ function articled_google_fonts(){ global $articled_control_arrays_fonts; $boths = array(); foreach ($articled_control_arrays_fonts as $key => $value) { $family = get_theme_mod($key.'_font_family'); $varie = get_theme_mod($key.'_font_variets'); if(empty($family)) continue; $boths[] .= $family.':'.$varie; } return $boths; } } if( ! function_exists('articled_current_file_name') ) { function articled_current_file_name() { if( is_admin() || !current_user_can( 'administrator' ) ) { return; } if(ABU_CURRENT_FILE) { global $template; function articled_file_title($t){ $t = basename( $template ); return $t; } add_filter( 'wp_title', 'articled_file_title' ); } } add_action( 'wp_head' , 'articled_current_file_name', -1000 ); } // init actions if ( current_user_can('edit_others_posts') ) { if( !function_exists('articled_delete_post_url') ): function articled_delete_post_url() { // run only for single post page if (is_single() && in_the_loop() && is_main_query() || is_home() || is_author() ) { // add query arguments: action, post, nonce $url = add_query_arg(array( 'action' => 'articled_delete_post', 'post' => get_the_ID(), 'nonce' => wp_create_nonce('articled_delete_post_nonce'), ), home_url() ); return esc_url($url); } return null; } endif; /** * Request handler */ function artiled_delete_post() { if ( isset($_GET['action']) && isset($_GET['nonce']) && $_GET['action'] === 'articled_delete_post' && wp_verify_nonce($_GET['nonce'], 'articled_delete_post_nonce') ) { // verify we have a post id $post_id = (isset($_GET['post'])) ? ($_GET['post']) : (null); // verify there is a post with such a number $post = get_post((int)$post_id); if ( empty($post) ) { return; } // Moving the post to trash wp_trash_post($post_id); // redirect to admin page $current_url = home_url(add_query_arg(array(),$wp->request)); wp_safe_redirect($current_url); die; } } add_action('init', 'artiled_delete_post'); } if( ! function_exists('articled_minify') ) { function articled_minify( $content = '', $tpye = 'css' ) { if( $tpye == 'css' ) { $content = str_replace(array("\n","\r"),'', $content); $content = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $content); $content = str_replace(': ', ':', $content); $content = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $content); } return $content; } } /* License Notice */ function articled_license_notice() { if ( ( articled_mod('articled_license_notice') == false ) && ( articled_mod('articled_license_notice') == false ) ) { ?>

&articled_license_notice_ignored=1">