当前位置: 首页>>代码示例>>PHP>>正文


PHP ae_get_option函数代码示例

本文整理汇总了PHP中ae_get_option函数的典型用法代码示例。如果您正苦于以下问题:PHP ae_get_option函数的具体用法?PHP ae_get_option怎么用?PHP ae_get_option使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ae_get_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: widget

    /**
     * Outputs the HTML for this widget.
     *
     * @param array  An array of standard parameters for widgets in this theme
     * @param array  An array of settings for this widget instance
     * @return void Echoes it's output
     **/
    function widget($args, $instance)
    {
        extract($args, EXTR_SKIP);
        echo $before_widget;
        echo $before_title;
        echo $instance['title'];
        // Can set this with a widget option, or omit altogether
        echo $after_title;
        ?>
        <ul class="social-list-footer">
            <?php 
        if (ae_get_option('site_facebook')) {
            echo '<li><a href="' . ae_get_option('site_facebook') . '"><span><i class="fa fa-facebook"></i></span>' . __("Facebook", 'widgets-backend') . '</a></li>';
        }
        ?>
            <?php 
        if (ae_get_option('site_twitter')) {
            echo '<li><a href="' . ae_get_option('site_twitter') . '"><span><i class="fa fa-twitter"></i></span>' . __("Twitter", 'widgets-backend') . '</a></li>';
        }
        ?>

            <?php 
        if (ae_get_option('site_google')) {
            echo '<li><a href="' . ae_get_option('site_google') . '"><span><i class="fa fa-google-plus"></i></span>' . __("Google+", 'widgets-backend') . '</a></li>';
        }
        ?>
        </ul>
    <?php 
        echo $after_widget;
    }
开发者ID:linniepinski,项目名称:perssistant,代码行数:37,代码来源:widgets.php

示例2: fre_register_tax_skill

/**
 * Create a taxonomy
 *
 * @uses  Inserts new taxonomy object into the list
 * @uses  Adds query vars
 *
 * @param string  Name of taxonomy object
 * @param array|string  Name of the object type for the taxonomy object.
 * @param array|string  Taxonomy arguments
 * @return null|WP_Error WP_Error if errors, otherwise null.
 */
function fre_register_tax_skill()
{
    $status = false;
    $switch_skill = ae_get_option('switch_skill');
    if ($switch_skill) {
        $status = true;
    }
    $labels = array('name' => _x('Skills', 'Taxonomy plural name', 'profiles-backend'), 'singular_name' => _x('Skill', 'Taxonomy singular name', 'profiles-backend'), 'search_items' => __('Search Skills', 'profiles-backend'), 'popular_items' => __('Popular Skills', 'profiles-backend'), 'all_items' => __('All Skills', 'profiles-backend'), 'parent_item' => __('Parent Skill', 'profiles-backend'), 'parent_item_colon' => __('Parent Skill', 'profiles-backend'), 'edit_item' => __('Edit Skill', 'profiles-backend'), 'update_item' => __('Update Skill ', 'profiles-backend'), 'add_new_item' => __('Add New Skill ', 'profiles-backend'), 'new_item_name' => __('New Skill Name', 'profiles-backend'), 'add_or_remove_items' => __('Add or remove skill', 'profiles-backend'), 'choose_from_most_used' => __('Choose from most used enginetheme', 'profiles-backend'), 'menu_name' => __('Skills', 'profiles-backend'));
    $args = array('labels' => $labels, 'public' => true, 'show_in_nav_menus' => true, 'show_admin_column' => true, 'hierarchical' => $status, 'show_tagcloud' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => ae_get_option('skill_slug', 'skill')), 'query_var' => true, 'capabilities' => array('manage_terms', 'edit_terms', 'delete_terms', 'assign_terms'));
    register_taxonomy('skill', array(PROFILE, PORTFOLIO, PROJECT), $args);
}
开发者ID:linniepinski,项目名称:perssistant,代码行数:22,代码来源:profiles.php

示例3: after_register

 function after_register($result)
 {
     $user = new WP_User($result);
     // add key confirm for user
     if (ae_get_option('user_confirm')) {
         update_user_meta($result, 'register_status', 'unconfirm');
         update_user_meta($result, 'key_confirm', md5($user->user_email));
     }
     /* === Send Email Register === */
     $this->mail->register_mail($result);
 }
开发者ID:maratdev,项目名称:alllancer,代码行数:11,代码来源:user_actions.php

示例4: get_current_style

 public function get_current_style()
 {
     $current_style_id = ae_get_option('map_center_default', null);
     if ($current_style_id !== null && isset($current_style_id['style'])) {
         $current_style_id = $current_style_id['style'];
         $style_object = $this->get_style($current_style_id);
         if (!is_wp_error($style_object)) {
             return $style_object;
         }
     }
     return null;
 }
开发者ID:maratdev,项目名称:alllancer,代码行数:12,代码来源:class-ae-mapstyle.php

示例5: __construct

 public function __construct()
 {
     parent::__construct('google', 'et_google_id', array('title' => __('SIGN IN WITH GOOGLE+', ET_DOMAIN), 'content' => __("This seems to be your first time signing in using your Google+ account.If you already have an account, please log in using the form below to link it to your Facebook account. Otherwise, please enter an email address and a password on the form, and a username on the next page to create an account.You will only do this step ONCE. Next time, you'll get logged in right away.", ET_DOMAIN), 'content_confirm' => __("Please provide a username to continue", ET_DOMAIN)));
     $this->add_ajax('ae_gplus_auth', 'ae_gplus_redirect');
     $this->gplus_client_id = ae_get_option('gplus_client_id');
     $this->gplus_secret_key = ae_get_option('gplus_secret_id');
     $this->gplus_base_url = 'https://accounts.google.com/o/oauth2/auth';
     $this->gplus_exchange_url = 'https://www.googleapis.com/oauth2/v3/token';
     $this->gplus_token_info_url = 'https://www.googleapis.com/oauth2/v1/userinfo';
     if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'gplus_auth_callback') {
         if (!empty($this->gplus_client_id) && !empty($this->gplus_secret_key) && !is_user_logged_in()) {
             $this->auth_google();
         } else {
             _e('Please enter your Google client id and secret key in setting page!', ET_DOMAIN);
             exit;
         }
     }
 }
开发者ID:maratdev,项目名称:alllancer,代码行数:18,代码来源:google.php

示例6: __construct

 public function __construct()
 {
     parent::__construct('linkedin', 'et_linkedin_id', array('title' => __('SIGN IN WITH LINKEDIN', ET_DOMAIN), 'content' => __("This seems to be your first time signing in using your LinkedIn account.If you already have an account, please log in using the form below to link it to your LinkedIn account. Otherwise, please enter an email address and a password on the form, and a username on the next page to create an account.You will only do this step ONCE. Next time, you'll get logged in right away.", ET_DOMAIN), 'content_confirm' => __("Please provide a username to continue", ET_DOMAIN)));
     $this->state = md5(uniqid());
     $this->add_ajax('ae_linked_auth', 'lkin_redirect');
     $this->linkedin_api_key = ae_get_option('linkedin_api_key');
     $this->linkedin_secret_key = ae_get_option('linkedin_secret_key');
     $this->linkedin_base_url = 'https://www.linkedin.com/uas/oauth2/authorization';
     $this->linkedin_token_url = 'https://www.linkedin.com/uas/oauth2/accessToken';
     $this->linkedin_people_url = 'https://api.linkedin.com/v1/people/~:(id,location,picture-url,specialties,public-profile-url,email-address,formatted-name)?format=json';
     if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'linked_auth_callback') {
         if (!empty($this->linkedin_api_key) && !empty($this->linkedin_secret_key) && !is_user_logged_in()) {
             $this->linked_auth();
         } else {
             _e('Please enter your Linkedin App id and secret key!', ET_DOMAIN);
             exit;
         }
     }
 }
开发者ID:maratdev,项目名称:alllancer,代码行数:19,代码来源:linkedin.php

示例7: __construct

 /**
  * description
  * @param $appID
  * @param $api_username
  * @param $api_password
  * @param $api_signature
  * @param $enpoint_url
  * @since 1.2
  * @author Dakachi
  */
 function __construct($data = array())
 {
     // if (isset($DataArray['Sandbox'])) $this->Sandbox = $DataArray['Sandbox'];
     // elseif (isset($DataArray['BetaSandbox'])) $this->Sandbox = $DataArray['BetaSandbox'];
     // else $this->Sandbox = true;
     $api = ae_get_option('escrow_paypal_api');
     $this->api_username = isset($api['username']) ? $api['username'] : 'dinhle1987-biz_api1.yahoo.com';
     $this->api_password = isset($api['password']) ? $api['password'] : '1362804968';
     $this->api_signature = isset($api['signature']) ? $api['signature'] : 'A6LFoneN6dpKOQkj2auJBwoVZBiLAE-QivfFWXkjxrvJZ6McADtMu8Pe';
     $this->appID = isset($api['appID']) ? $api['appID'] : 'APP-80W284485P519543T';
     $testmode = ae_get_option('test_mode');
     // test mod is on
     $this->endpoint = 'https://svcs.sandbox.paypal.com/AdaptivePayments/';
     $this->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=';
     // live mod is on
     if (!$testmode) {
         $this->endpoint = 'https://svcs.paypal.com/AdaptivePayments/';
         $this->paypal_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=';
     }
 }
开发者ID:maratdev,项目名称:alllancer,代码行数:30,代码来源:ppadaptive.php

示例8: print_scripts

 public function print_scripts()
 {
     $this->add_existed_script('jquery');
     // tam thoi add de xai
     $this->add_script('jquery-validator', TEMPLATEURL . '/js/libs/jquery.validate.min.js', 'jquery');
     $this->add_script('ae-colorpicker', ae_get_url() . '/assets/js/colorpicker.js', array('jquery'));
     // ae core js appengine
     $this->add_script('appengine', ae_get_url() . '/assets/js/appengine.js', array('jquery', 'underscore', 'backbone', 'plupload', 'ae-colorpicker'));
     // control backend user list
     $this->add_script('backend-user', ae_get_url() . '/assets/js/user-list.js', array('appengine'));
     //  option settings and save
     $this->add_script('option-view', ae_get_url() . '/assets/js/option-view.js', array('appengine'));
     // control option translate
     $this->add_script('language-view', ae_get_url() . '/assets/js/language-view.js', array('appengine', 'option-view'));
     // control pack view add delete update pack
     $this->add_script('pack-view', ae_get_url() . '/assets/js/pack-view.js', array('appengine', 'option-view'));
     // backend js it should be separate by theme
     $this->add_script('backend', ae_get_url() . '/assets/js/backend.js', array('appengine'));
     wp_localize_script('appengine', 'ae_globals', array('ajaxURL' => apply_filters('ae_ajax_url', admin_url('admin-ajax.php')), 'pending_answers' => ae_get_option("pending_answers", 0), 'imgURL' => ae_get_url() . '/assets/img/', 'jsURL' => ae_get_url() . '/assets/js/', 'loadingImg' => '<img class="loading loading-wheel" src="' . ae_get_url() . '/assets/img/loading.gif" alt="' . __('Loading...', ET_DOMAIN) . '">', 'loading' => __('Loading', ET_DOMAIN), 'plupload_config' => array('max_file_size' => '3mb', 'url' => admin_url('admin-ajax.php'), 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), 'filters' => array(array('title' => __('Image Files', ET_DOMAIN), 'extensions' => 'jpg,jpeg,gif,png')))));
 }
开发者ID:callmeaatrey,项目名称:zap-query,代码行数:20,代码来源:class-ae-page.php

示例9: ae_ppdigital_render_button

function ae_ppdigital_render_button()
{
    $ppdigital_key = ae_get_option('ppdigital');
    if (!isset($ppdigital_key['username'])) {
        return;
    }
    if (!$ppdigital_key['username'] || !$ppdigital_key['password'] || !$ppdigital_key['signature']) {
        return false;
    }
    if (!isset($ppdigital_key['title']) || !$ppdigital_key['title']) {
        $ppdigital_key['title'] = __("Paypal DG", ET_DOMAIN);
    }
    if (!isset($ppdigital_key['desc']) || !$ppdigital_key['desc']) {
        $ppdigital_key['desc'] = __("Send your payment to our Paypal account", ET_DOMAIN);
    }
    ?>
    <li id="ppdigital-payment">
        <form action="" method="post" id="ppexpress_form" class="ppexpress-form" style="margin-top:0;">
            <span class="title-plan ppdigital-payment" data-type="ppdigital">
                <?php 
    echo $ppdigital_key['title'];
    ?>
                <span><?php 
    echo $ppdigital_key['desc'];
    ?>
</span>
            </span>
            <button href="#" class="btn btn-submit-price-plan other-payment" id="ppdigital-button" data-type="ppdigital"><?php 
    _e("Select", ET_DOMAIN);
    ?>
</button>
        </form>
    </li>
    
<?php 
}
开发者ID:linniepinski,项目名称:perssistant,代码行数:36,代码来源:ae_ppdigital.php

示例10: _e

                <button type="button" class="close" data-dismiss="modal"><i class="fa fa-times"></i>
                </button>
                <?php 
if (!(ae_get_option('invited_to_bid') && !fre_check_invited($user_ID, $post->ID))) {
    ?>
                    <h4 class="modal-title"><?php 
    _e('Set your bid:', 'modal-add-bid');
    ?>
</h4>
                <?php 
}
?>
            </div>
            <div class="modal-body">
                <?php 
if (ae_get_option('invited_to_bid') && !fre_check_invited($user_ID, $post->ID)) {
    echo '<p class="lead  warning">';
    _e("Oops, You must be invited to bid this project", 'modal-add-bid');
    echo '</p>';
} else {
    ?>

                    <form id="bid_form" class="bid-form">
                        <div class="form-group">
                            <label for="bid_budget">
                                <?php 
    if (get_post_meta($post->ID, 'type_budget', true) == 'hourly_rate') {
        _e('Hourly rate', 'modal-add-bid');
    } else {
        _e('Budget', 'modal-add-bid');
    }
开发者ID:linniepinski,项目名称:perssistant,代码行数:31,代码来源:modal-bid.php

示例11: get_post_meta

<?php

/**
 * The template for displaying admin control button to edit project
 * @since 1.0
 * @author Dakachi
 */
global $post;
$featured = get_post_meta($post->ID, 'et_featured', true);
if (current_user_can('manage_options')) {
    ?>
    <?php 
    if ($post->post_status == 'complete' && ae_get_option('use_escrow')) {
        // success update order data
        $bid_id_accepted = get_post_meta($post->ID, 'accepted', true);
        $order = get_post_meta($bid_id_accepted, 'fre_bid_order', true);
        $order_status = get_post_field('post_status', $order);
        if ($order_status != 'finish') {
            ?>
            <a class="btn btn-project-status btn-excecute-project manual-transfer"  title="<?php 
            _e("Transfer Money To Freelancer", ET_DOMAIN);
            ?>
" href="#">
                <?php 
            _e("Transfer Money", ET_DOMAIN);
            ?>
            </a>
        <?php 
        } else {
            ?>
            <a class="btn btn-project-status btn-excecute-project"  href="#">
开发者ID:linniepinski,项目名称:perssistant,代码行数:31,代码来源:admin-project-control.php

示例12: limit_free_plan

 public static function limit_free_plan($package)
 {
     // check and limit seller user free plan
     $limit_free_plan = ae_get_option('limit_free_plan');
     $instance = self::get_instance();
     $package = $instance->get($package);
     $response = array('success' => false);
     if ($package && $package->et_price == 0 && $limit_free_plan) {
         /**
          * update number of free plan seller used
          */
         $number = self::update_used_free_plan();
         if ($number > $limit_free_plan) {
             $response['success'] = true;
             $response['msg'] = __("You have reached the maximum number of Free posts. Please select another plan.", 'aecore-class-ae-package-backend');
             return $response;
         }
     }
     return $response;
 }
开发者ID:linniepinski,项目名称:perssistant,代码行数:20,代码来源:class-ae-package.php

示例13: get_template_part

    $class_trans = 'class="trans-color"';
} else {
    $class_trans = 'class="not-page-home"';
}
?>
<!-- HEADER -->
<?php 
if (has_nav_menu('et_header') || !has_nav_menu('et_header_standard')) {
    get_template_part('head/fullscreen', 'header');
} else {
    get_template_part('head/standard', 'header');
}
?>

<!-- HEADER / END -->

<?php 
if (is_page_template('page-home.php')) {
    if (ae_get_option('header_youtube_id')) {
        get_template_part('head/video', 'youtube');
    } else {
        get_template_part('head/video', 'background');
    }
}
if (!is_user_logged_in()) {
    get_template_part('template-js/header', 'login');
}
global $user_ID;
if ($user_ID) {
    echo '<script type="data/json"  id="user_id">' . json_encode(array('id' => $user_ID, 'ID' => $user_ID)) . '</script>';
}
开发者ID:linniepinski,项目名称:perssistant,代码行数:31,代码来源:header.php

示例14: ae_get_option

<?php

global $wp_query, $ae_post_factory, $post;
$post_object = $ae_post_factory->get('testimonial');
$currency = ae_get_option('content_currency', array('align' => 'left', 'code' => 'USD', 'icon' => '$'));
?>
<div class="header-sub-wrapper header-sub-wrapper-tan">   
    <div class="number-project-wrapper">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <h2 class="number-project">
                    <?php 
$found_posts = '<span class="found_post">' . $wp_query->found_posts . '</span>';
$plural = sprintf(__('%s Testimonials for you', ET_DOMAIN), $found_posts);
$singular = sprintf(__('%s testimonial for you', ET_DOMAIN), $found_posts);
?>
                        <span class="plural <?php 
if ($wp_query->found_posts <= 1) {
    echo 'hide';
}
?>
" >
                            <?php 
echo $plural;
?>
                        </span>
                        <span class="singular <?php 
if ($wp_query->found_posts > 1) {
    echo 'hide';
}
开发者ID:maratdev,项目名称:alllancer,代码行数:31,代码来源:filter-testimonials.php

示例15: validate_data

 /**
  * validate data
  */
 public function validate_data($data)
 {
     global $user_ID;
     if (is_wp_error($data)) {
         return $data;
     }
     $require_fields = apply_filters('fre_project_required_fields', array('et_budget', 'project_category'));
     if (!current_user_can('manage_options')) {
         if (isset($data['renew']) && !isset($data['et_payment_package']) && $this->disable_plan) {
             return new WP_Error('empty_package', __("Cannot create a place with an empty package.", 'projects-backend'));
         }
         if (!isset($data['post_content']) || $data['post_content'] == '') {
             return new WP_Error('ad_empty_content', __("You should enter short description for your place.", 'projects-backend'));
         }
         if (!isset($data['post_title']) || $data['post_title'] == '') {
             return new WP_Error('ad_empty_content', __("Your place should have a title.", 'projects-backend'));
         }
         if (!isset($data['project_category']) && in_array('project_category', $require_fields) && !is_admin()) {
             return new WP_Error('invalid_category', __("Your project should has a category!", 'projects-backend'));
         }
         if (!isset($data['et_budget']) && in_array('et_budget', $require_fields)) {
             return new WP_Error('invalid_budget', __("Your have to enter a budget for your requirement!", 'projects-backend'));
         }
     }
     if (in_array('et_budget', $require_fields) && $data['et_budget'] <= 0) {
         return new WP_Error('budget_less_than_zero', __("Your budget have to greater than zero!", 'projects-backend'));
     }
     /**
      * unsert featured et_featured param if user cannot  edit others posts
      */
     if (!ae_user_can('edit_others_posts')) {
         unset($data['et_featured']);
         // unset($data['post_status']);
         unset($data['et_expired_date']);
         unset($data['post_views']);
     }
     /**
      * check payment package is valid or not
      * set up featured if this package is featured
      */
     if (isset($data['et_payment_package'])) {
         /**
          * check package plan exist or not
          */
         global $ae_post_factory;
         $package = $ae_post_factory->get('pack');
         $plan = $package->get($data['et_payment_package']);
         if (!$plan) {
             return new WP_Error('invalid_plan', __("You have selected an invalid plan.", 'projects-backend'));
         }
         /**
          * if user can not edit others posts the et_featured will no be unset and check,
          * this situation should happen when user edit/add post in backend.
          * Force to set featured post
          */
         if (!isset($data['et_featured']) || !$data['et_featured']) {
             $data['et_featured'] = 0;
             if (isset($plan->et_featured) && $plan->et_featured) {
                 $data['et_featured'] = 1;
             }
         }
     }
     /**
      * check max category options, filter ad category
      */
     $max_cat = ae_get_option('max_cat', 3);
     if ($max_cat && !current_user_can('edit_others_posts')) {
         /**
          * check max category user can set for a place
          */
         $num_of_cat = count($data['project_category']);
         if ($max_cat < $num_of_cat) {
             for ($i = $max_cat; $i < $num_of_cat; $i++) {
                 unset($data['place_category'][$i]);
             }
         }
     }
     return apply_filters('fre_project_validate_data', $data);
 }
开发者ID:linniepinski,项目名称:perssistant,代码行数:82,代码来源:projects.php


注:本文中的ae_get_option函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。