رفتن به مطلب

سوال فوری ارسال پست مهمان


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

سلام و عرض ادب خدمت استادان محترم

بنده از افزونه ای برای ارسال پست توسط کاربران استفاده میکنم میخواستم برام اگه میشه دو تا فیلد متنی همانند جایی که عنوان وارد میشه ایجاد شه اما نتونستم کاری بکنم ، اگر کسی میتونه این کار برای بنده بکنه و کد فراخوانی فیلدم بهم لطف کنه بگه

این کد کل فایل


<div class="userpro userpro-<?php echo $i; ?> userpro-<?php echo $layout; ?>" <?php userpro_args_to_data( $args ); ?>>
<a href="#" class="userpro-close-popup"><?php _e('Close','userpro'); ?></a>

<div class="userpro-head">
<div class="userpro-left"><?php echo $args["{$template}_heading"]; ?></div>
<?php if (isset($args["{$template}_side"])) { ?>
<div class="userpro-right"><a href="#" data-template="<?php echo $args["{$template}_side_action"]; ?>"><?php echo $args["{$template}_side"]; ?></a></div>
<?php } ?>
<div class="userpro-clear"></div>
</div>

<div class="userpro-body">

<?php do_action('userpro_pre_form_message'); ?>
<form action="" method="post" data-action="<?php echo $template; ?>">

<input type="hidden" name="user_id-<?php echo $i; ?>" id="user_id-<?php echo $i; ?>" value="<?php echo $user_id; ?>" />

<?php // Hook into fields $args, $user_id
if (!isset($user_id)) $user_id = 0;
$hook_args = array_merge($args, array('user_id' => $user_id, 'unique_id' => $i));
do_action('userpro_before_fields', $hook_args);
?>

<!-- Begin Publisher -->

<?php if (isset($args['publish_field_order'])) { ?>
<?php
$order = explode(',',$args['publish_field_order']);
foreach($order as $k) {

switch($k) {
case 'title':
echo userpro_edit_field_misc( $i, 'post_title', $args, null, null, __('Enter post title here...','userpro') );
break;
case 'content':
echo userpro_post_editor( $i, 'userpro_editor', $args );
break;
case 'featured_image':
echo userpro_edit_field_misc( $i, 'post_featured_image', $args );
break;
case 'post_type':
if ( count(userpro_publish_types($args)) > 1 ) {
echo userpro_edit_field_misc( $i, 'post_type', $args, __('Post Type','userpro') ); } else { ?>
<input type="hidden" name="post_type-<?php echo $i; ?>" id="post_type-<?php echo $i; ?>" value="<?php if (isset($args['post_type'])) echo $args['post_type']; ?>" /><?php }
break;
case 'category':
if (isset($args['taxonomy']) && isset($args['category'])){ ?>
<input type="hidden" name="taxonomy-<?php echo $i; ?>" id="taxonomy-<?php echo $i; ?>" value="<?php echo $args['taxonomy']; ?>" />
<input type="hidden" name="category-<?php echo $i; ?>" id="category-<?php echo $i; ?>" value="<?php echo $args['category']; ?>" />
<?php } else { echo userpro_edit_field_misc( $i, 'post_categories', $args, null, null, __('Select Categories','userpro') ); }
break;
default:
if (isset($args['post_meta']) && isset($args['post_meta_labels']) ) {
$post_meta = explode(',',$args['post_meta']);
$post_meta = array_combine( $post_meta, explode(',', $args['post_meta_labels']) );
foreach($post_meta as $meta_key => $meta_label) {
if ($meta_key == $k) {
echo userpro_edit_field_misc( $i, $meta_key, $args, $meta_label );
}
}
}
break;
}
}

?>

<?php } else { ?>

<?php echo userpro_edit_field_misc( $i, 'post_title', $args, null, null, __('Enter post title here...','userpro') ); ?>
<?php echo userpro_post_editor( $i, 'userpro_editor', $args ); ?>

<?php echo userpro_edit_field_misc( $i, 'post_featured_image', $args ); ?>

<?php if ( count(userpro_publish_types($args)) > 1 ) { echo userpro_edit_field_misc( $i, 'post_type', $args, __('Post Type','userpro') ); } else { ?>
<input type="hidden" name="post_type-<?php echo $i; ?>" id="post_type-<?php echo $i; ?>" value="<?php if (isset($args['post_type'])) echo $args['post_type']; ?>" />
<?php } ?>
<?php if (isset($args['taxonomy']) && isset($args['category'])){ ?>

<input type="hidden" name="taxonomy-<?php echo $i; ?>" id="taxonomy-<?php echo $i; ?>" value="<?php echo $args['taxonomy']; ?>" />
<input type="hidden" name="category-<?php echo $i; ?>" id="category-<?php echo $i; ?>" value="<?php echo $args['category']; ?>" />
<?php
} else {
echo userpro_edit_field_misc( $i, 'post_categories', $args, null, null, __('Select Categories','userpro') );
}
?>
<?php
if (isset($args['post_meta']) && isset($args['post_meta_labels']) ) {
$post_meta = explode(',',$args['post_meta']);
$post_meta = array_combine( $post_meta, explode(',', $args['post_meta_labels']) );
foreach($post_meta as $meta_key => $meta_label) {
echo userpro_edit_field_misc( $i, $meta_key, $args, $meta_label );
}
}
?>

<?php } ?>

<!-- End of Publisher -->
<?php // Hook into fields $args, $user_id
if (!isset($user_id)) $user_id = 0;
$hook_args = array_merge($args, array('user_id' => $user_id, 'unique_id' => $i));
do_action('userpro_after_fields', $hook_args);
?>

<?php // Hook into fields $args, $user_id
if (!isset($user_id)) $user_id = 0;
$hook_args = array_merge($args, array('user_id' => $user_id, 'unique_id' => $i));
do_action('userpro_before_form_submit', $hook_args);
?>

<?php if ( isset( $args["{$template}_button_primary"] ) || isset( $args["{$template}_button_secondary"] ) ) { ?>
<div class="userpro-field userpro-submit userpro-column">

<?php if (isset($args["{$template}_button_primary"]) ) { ?>
<input type="submit" value="<?php echo $args["{$template}_button_primary"]; ?>" class="userpro-button" />
<?php } ?>
<img src="<?php echo $userpro->skin_url(); ?>loading.gif" alt="" class="userpro-loading" />
<div class="userpro-clear"></div>

</div>
<?php } ?>

</form>

</div>
</div>

لینک به ارسال

دوست عزیز قوانین رو بخونید در این انجمن رعایت قوانین خیلی سفت و سخت رعایت می شه

شما یکبار همین تایپیک را مطرح کردید و پاسختون رو هم گرفتید

لطف کنید از طریق همون تایپیک مشکلتون رو پیگیری کنید

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...