This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Estimate Reading Time | |
*----------------*/ | |
if( !function_exists('rb_timeline_eta') ) { | |
function rb_timeline_eta(){ | |
global $post; | |
$words_per_minute = 270; | |
$words_per_second = $words_per_minute / 60; | |
$post_content = $post->post_content; | |
$word_count = str_word_count(strip_tags($post_content)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Experts List | |
*/ | |
get_header(); ?> | |
<div id="content"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<article <?php post_class(); ?>> | |
<header class="page-header"> | |
<h1 class="page-title"><?php the_title(); ?></h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
global $dwqa_options; | |
if( ( $dwqa_options['pages']['archive-question'] && is_page( $dwqa_options['pages']['archive-question'] ) ) || is_archive() ) { ?> | |
</div> | |
<div id="secondary"> | |
<?php if (is_user_logged_in()) : ?> | |
<?php dwqa_get_ask_question_link( true, false, 'btn btn-block btn-success' ); ?> | |
<?php else : ?> | |
<a data-toggle="modal" class="open-login-modal btn btn-block btn-success" data-referer="http://www.designwall.com/ask-question/" href="#loginModal" alt="signin-tab">Login to Ask question</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dwqa_submit_question_form_varius_category_shortcode($atts){ | |
global $dwqa_sript_vars, $script_version; | |
extract( shortcode_atts( array( | |
'category' => 0 | |
), $atts ) ); | |
if( ! $category ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header('dwqa'); ?> | |
<?php do_action( 'dwqa_before_page' ) ?> | |
<div id="submit-question" class="dwqa-submit-question"> | |
<?php | |
global $dwqa_options, $dwqa_current_error; | |
if( is_wp_error( $dwqa_current_error ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header('dwqa'); ?> | |
<?php do_action( 'dwqa_before_page' ) ?> | |
<?php if (is_user_logged_in()) : ?> | |
<div id="submit-question" class="dwqa-submit-question"> | |
<?php | |
global $dwqa_options, $dwqa_current_error; | |
if( is_wp_error( $dwqa_current_error ) ) { | |
$error_messages = $dwqa_current_error->get_error_messages(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function time_stamp($from){ | |
$cmt_date = $from; | |
$from = strtotime($from); | |
if ( empty($to) ) | |
$to = time(); | |
$diff = (int) abs($to - $from); | |
if($diff <= 1){ | |
$since = '1 second'; | |
} else if($diff <= 60 ){ | |
$since = sprintf(_n('%s second', '%s seconds', $diff), $diff); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SetEnd(txt) { | |
if (txt.createTextRange) { | |
//IE | |
var FieldRange = txt.createTextRange(); | |
FieldRange.moveStart('character', txt.value.length); | |
FieldRange.collapse(); | |
FieldRange.select(); | |
} | |
else { | |
//Firefox and Opera |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$password_regular = 'A(?=[-_a-zA-Z0-9]*?[A-Z])(?=[-_a-zA-Z0-9]*?[a-z])(?=[-_a-zA-Z0-9]*?[0-9])[-_a-zA-Z0-9]{6,}z' |
OlderNewer