本文整理汇总了PHP中et_get_page_link函数的典型用法代码示例。如果您正苦于以下问题:PHP et_get_page_link函数的具体用法?PHP et_get_page_link怎么用?PHP et_get_page_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了et_get_page_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ce_payment_setup
/**
* filter payment setup response if free return direct link to process payment
*/
function ce_payment_setup($response, $paymentType, $order)
{
$order_pay = $order->generate_data_to_pay();
if ($order_pay['total'] <= 0) {
//$session = et_read_session();
$ad_id = $order_pay['product_id'];
$response = array('success' => true, 'data' => array('ACK' => true, 'url' => et_get_page_link('process-payment', array('paymentType' => 'coupon', 'ad_id' => $ad_id))));
update_post_meta($order_pay['ID'], 'et_order_gateway', 'cash');
et_update_post_field($ad_id, 'ad_paid', 1);
$o = (array) et_get_post_field($ad_id, 'ad_order');
if (empty($o)) {
$o = array();
}
$o[] = $order_pay['ID'];
et_update_post_field($ad_id, 'ad_order', $o);
}
if ((isset($response['success']) && $response['success'] || isset($response['ACK']) && $response['ACK'] == 'Success') && isset($_REQUEST['coupon_code'])) {
// update coupon used.
global $user_ID;
$coupon_code = trim($_REQUEST['coupon_code']);
$coupon_data = $this->generate_coupon_response($coupon_code);
$pre = intval(get_user_meta($user_ID, 'ce_coupon_used_' . $coupon_code, true));
$pre++;
update_user_meta($user_ID, 'ce_coupon_used_' . $coupon_code, $pre);
$used_time = intval($coupon_data['have_been_used']);
$used_time++;
update_post_meta($coupon_data['ID'], 'ce_coupon_have_been_used', $used_time);
}
return $response;
}
示例2: add_return_param
function add_return_param()
{
global $wp_rewrite;
$link = et_get_page_link('process-payment', array('paymentType' => $this->_payment_type));
foreach ($this->_settings as $key => $value) {
$this->_settings[$key] = $link;
}
return $this->_settings;
}
示例3: __construct
public function __construct($type, $social_option, $labels = array())
{
$this->social_type = $type;
$this->social_option = $social_option;
$this->auth_url = add_query_arg('type', $this->social_type, et_get_page_link('social-connect'));
$this->labels = $labels;
$this->add_action('wp_enqueue_scripts', 'enqueue_scripts');
$this->add_action('template_redirect', 'social_redirect');
$this->add_ajax('et_authentication_' . $type, 'authenticate_user');
$this->add_ajax('et_confirm_username_' . $type, 'confirm_username');
}
示例4: forgot_mail
/**
* user forgot pass mail
* @param Int $user_id
* @param String $key Activate key
*/
function forgot_mail($user_id, $key)
{
$user = new WP_User($user_id);
$user_email = $user->user_email;
$user_login = $user->user_login;
$message = ae_get_option('forgotpass_mail_template');
$activate_url = add_query_arg(array('user_login' => $user_login, 'key' => $key), et_get_page_link('reset-pass'));
$activate_url = '<a href="' . $activate_url . '">' . __("Activate Link", ET_DOMAIN) . '</a>';
$message = str_ireplace('[activate_url]', $activate_url, $message);
if (is_multisite()) {
$blogname = $GLOBALS['current_site']->site_name;
} else {
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
}
$subject = sprintf(__('[%s] Password Reset', ET_DOMAIN), $blogname);
$subject = apply_filters('et_retrieve_password_title', $subject);
$this->wp_mail($user_email, $subject, $message, array('user_id' => $user_id));
}
示例5: je_payment_setup
/**
* filter payment setup response if free return direct link to process payment
*/
function je_payment_setup($response, $paymentType, $order)
{
$order_pay = $order->generate_data_to_pay();
if ($order_pay['total'] <= 0) {
//$session = et_read_session();
$job_id = $order_pay['product_id'];
$response = array('success' => true, 'data' => array('ACK' => true, 'url' => et_get_page_link('process-payment', array('paymentType' => 'coupon', 'job_id' => $job_id))));
update_post_meta($order_pay['ID'], 'et_order_gateway', 'cash');
et_update_post_field($job_id, 'job_paid', 1);
$o = et_get_post_field($job_id, 'job_order');
if (empty($o)) {
$o = array();
}
$o[] = $order_pay['ID'];
et_update_post_field($job_id, 'job_order', $o);
}
return $response;
}
示例6: setup_payment
function setup_payment($response, $paymentType, $order)
{
if ($paymentType == 'STRIPE') {
$order_pay = $order->generate_data_to_pay();
// echo "<pre>";
// print_r($order_pay) ;
// echo "</pre>";
$token = $_POST['token'];
$job_id = $order_pay['product_id'];
$stripe = $this->get_api();
global $user_email;
try {
Stripe::setApiKey($stripe['secret_key']);
$customer = Stripe_Customer::create(array('card' => $token, 'description' => 'Customer from ' . home_url(), 'email' => $user_email));
$customer_id = $customer->id;
$charge = Stripe_Charge::create(array('amount' => $order_pay['total'] * 100, 'currency' => $order_pay['currencyCodeType'], 'customer' => $customer_id));
$value = $charge->__toArray();
$id = $value['id'];
$token = md5($id);
$order->set_payment_code($token);
$order->set_payer_id($id);
$order->update_order();
$returnURL = et_get_page_link('process-payment', array('paymentType' => 'stripe', 'token' => $token));
$response = array('success' => true, 'data' => array('url' => $returnURL), 'paymentType' => 'stripe');
} catch (Exception $e) {
$value = $e->getJsonBody();
$response = array('success' => false, 'msg' => $value['error']['message'], 'paymentType' => 'stripe');
}
}
return $response;
}
示例7: fre_escrow_bid
/**
* ajax callback process bid escrow and send redirect url to client
*
* @author Dakachi
*/
function fre_escrow_bid()
{
global $user_ID;
$error = array('success' => false, 'msg' => __('Invalid bid', ET_DOMAIN));
if (!isset($_REQUEST['bid_id'])) {
wp_send_json($error);
}
$bid_id = $_REQUEST['bid_id'];
$bid = get_post($bid_id);
// check bid is valid
if (!$bid || is_wp_error($bid) || $bid->post_type != BID) {
wp_send_json($error);
}
// currency settings
$currency = ae_get_option('content_currency');
$currency = $currency['code'];
$bid_budget = get_post_meta($bid_id, 'bid_budget', true);
// get commission settings
$commission = ae_get_option('commission');
$commission_fee = $commission;
// caculate commission fee by percent
$commission_type = ae_get_option('commission_type');
if ($commission_type == 'percent') {
$commission_fee = $bid_budget * $commission / 100;
}
$payer_of_commission = ae_get_option('payer_of_commission', 'project_owner');
if ($payer_of_commission == 'project_owner') {
$total = (double) $bid_budget + (double) $commission_fee;
} else {
$total = $bid_budget;
$bid_budget = (double) $total - (double) $commission_fee;
}
$receiver = get_user_meta($bid->post_author, 'paypal', true);
// paypal adaptive process payment and send reponse to client
$ppadaptive = AE_PPAdaptive::get_instance();
// get paypal adaptive settings
$ppadaptive_settings = ae_get_option('escrow_paypal');
// the admin's paypal business account
$primary = $ppadaptive_settings['business_mail'];
// get from setting
$feesPayer = $ppadaptive_settings['paypal_fee'];
/**
* paypal adaptive order data
*/
$order_data = array('actionType' => 'PAY_PRIMARY', 'returnUrl' => et_get_page_link('process-accept-bid', array('paymentType' => 'paypaladaptive')), 'cancelUrl' => et_get_page_link('process-accept-bid', array('paymentType' => 'paypaladaptive')), 'currencyCode' => $currency, 'feesPayer' => $feesPayer, 'receiverList.receiver(0).amount' => $total, 'receiverList.receiver(0).email' => $primary, 'receiverList.receiver(0).primary' => true, 'receiverList.receiver(1).amount' => $bid_budget, 'receiverList.receiver(1).email' => $receiver, 'receiverList.receiver(1).primary' => false, 'requestEnvelope.errorLanguage' => 'en_US');
//dinhle1987-pers@yahoo.com
// dinhle1987-pers2@yahoo.com
$response = $ppadaptive->Pay($order_data);
if (is_array($response) && isset($response['success']) && !$response['success']) {
wp_send_json(array('success' => false, 'msg' => $response['msg']));
}
// create order
$order_post = array('post_type' => 'fre_order', 'post_status' => 'pending', 'post_parent' => $bid_id, 'post_author' => $user_ID, 'post_title' => 'Pay for accept bid', 'post_content' => 'Pay for accept bid ' . $bid_id);
if (strtoupper($response->responseEnvelope->ack) == 'SUCCESS') {
$order_id = wp_insert_post($order_post);
update_post_meta($order_id, 'fre_paykey', $response->payKey);
update_post_meta($order_id, 'gateway', 'PPadaptive');
update_post_meta($bid_id, 'fre_bid_order', $order_id);
update_post_meta($bid_id, 'fre_paykey', $response->payKey);
et_write_session('payKey', $response->payKey);
et_write_session('order_id', $order_id);
et_write_session('bid_id', $bid_id);
et_write_session('ad_id', $bid->post_parent);
$response->redirect_url = $ppadaptive->paypal_url . $response->payKey;
wp_send_json($response);
} else {
wp_send_json(array('success' => false, 'msg' => $response->error[0]->message));
}
}
示例8: _e
</p>
<?php
}
?>
</div>
<div class="clearfix"></div>
<button type="submit" class="btn-submit btn-sumary btn-sub-create" <?php
if ($wp_query->found_posts == 0) {
echo 'disabled="disabled"';
}
?>
>
<?php
_e('Invite', 'modal-invite');
?>
</button>
</form>
<?php
} else {
echo '<p class="lead text-info">';
_e("Currently, you do not have any project available to invite this user.", 'modal-invite');
echo ' <a href="' . et_get_page_link('submit-project') . '" >' . __("Create a project now", 'modal-invite') . '</a>';
echo '</p>';
}
?>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php
wp_reset_query();
示例9: et_get_page_link
?>
" />
<i class="fa fa-chevron-circle-right"></i>
</form>
</div>
</div><!-- END SELECT-CATEGORY -->
<div class="row question-filter">
<div class="col-md-6 col-xs-6 sort-questions">
<!-- order by -->
<ul>
<li>
<a class="<?php
echo !isset($_GET['sort']) ? 'active' : '';
?>
" href="<?php
echo et_get_page_link("tags");
?>
"><?php
_e("Name", ET_DOMAIN);
?>
</a>
</li>
<li>
<a class="<?php
echo isset($_GET['sort']) ? 'active' : '';
?>
" href="<?php
echo add_query_arg(array('sort' => 'popular'));
?>
"><?php
_e("Popular", ET_DOMAIN);
示例10: filter_link_redirect_register
function filter_link_redirect_register($result)
{
if (!is_wp_error($result)) {
// $user_info = get_userdata($result->ID);
$role = ae_user_role($result->ID);
} else {
$role = '';
}
$redirect_url = $role == "employer" && AE_Users::is_activate($result->ID) ? et_get_page_link('submit-project') : et_get_page_link('profile');
$result->redirect_url = apply_filters('ae_after_register_link', $redirect_url);
$result->do = "register";
return $result;
}
示例11: _e
?>
">
<i class="fa fa-key"></i>
</span>
</p>
</div>
</div>
</div>
<div class="col-md-12">
<p class="terms-intro">
<?php
_e("By clicking \"Sign Up\" you indicate that you have read and agree to the", ET_DOMAIN);
?>
<a target="_blank" href="<?php
echo et_get_page_link('term');
?>
"><?php
_e("Terms of Service.", ET_DOMAIN);
?>
</a>
</p>
</div>
<div class="col-md-12">
<p class="btn-submit-intro">
<span class="your-submit mobile-device">
<input type="submit" name="" value="<?php
_e("Sign up", ET_DOMAIN);
?>
" class="btn-submit" />
</span>
示例12: get_template_part
// template/post-place-step4.php
get_template_part('template/post-project', 'step4');
}
?>
</div>
<?php
/**
* tos agreement
*/
$tos = et_get_page_link('tos', array(), false);
if ($tos) {
?>
<div class="term-of-use">
<?php
printf(__('By posting your project, you agree to our <a href="%s">Term of Use and Privacy policy</a>', 'page-submit-project'), et_get_page_link('tos'));
?>
</div>
<?php
}
?>
<!-- Column left / End -->
</div>
<!-- Column right -->
<?php
/*
<div class="col-md-3 col-sm-12 col-xs-12 page-sidebar" id="right_content">
<!-- <div class="widget user_payment_status"> -->
<?php
ob_start();
示例13: et_get_page_link
echo et_get_page_link('categories');
?>
">
<?php
_e("Name", ET_DOMAIN);
?>
</a>
</li>
<li class="<?php
if (isset($_GET['sort']) && $_GET['sort'] == 'popular') {
echo 'active';
}
?>
">
<a href="<?php
echo add_query_arg(array('sort' => 'popular'), et_get_page_link('categories'));
?>
">
<?php
_e("Popular", ET_DOMAIN);
?>
</a>
</li>
</ul>
</div>
</div>
</div>
</section>
<!-- MIDDLE BAR / END -->
<!-- LIST CATEGORIES -->
示例14: et_get_page_link
}
echo '</span>';
}
?>
</li>
</ul>
</div>
<div class="col-lg-4 col-md-12 col-sm-12">
<div class="info-project-item-right">
<?php
if (fre_share_role() || ae_user_role() == 'employer' || ae_user_role() == 'administrator') {
?>
<span class="link-clone">
<a href="<?php
echo et_get_page_link(array('page_type' => 'submit-project', 'post_title' => __("Submit project", ET_DOMAIN)));
?>
" title="">
<i class="fa fa-plus-circle"></i><?php
_e('Create a Project like this', ET_DOMAIN);
?>
</a>
</span>
<?php
}
?>
<ul class="list-share-social addthis_toolbox addthis_default_style" >
<li><a href="#" title="" class="addthis_button_facebook"><i class="fa fa-facebook "></i></a></li>
<li><a href="#" title="" class="addthis_button_twitter"><i class="fa fa-twitter "></i></a></li>
<li><a href="https://plus.google.com/share?url=<?php
the_permalink();
示例15: et_get_page_link
</button>
</div>
</form>
<div class="container">
<div class="row">
<div class="col-md-12">
<?php
/**
* tos agreement
*/
$tos = et_get_page_link('tos', array(), false);
if (!get_theme_mod('termofuse_checkbox', false) && $tos) {
?>
<p class="text-policy">
<?php
printf(__('By creating an account, you agree to our <a href="%s">Term of Use and Privacy policy</a>', 'page-auth-mobile'), et_get_page_link('tos'));
?>
</p>
<?php
}
?>
<a href="#" class="change-link-login">
<?php
_e("You have account ? Click here !", 'page-auth-mobile');
?>
</a>
<?php
// if( function_exists('ae_render_social_button')){
// $before_string = __("You can also sign in by:", 'page-auth-mobile');
// ae_render_social_button( array(), array(), $before_string );
// }