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


PHP learn_press_get_admin_view函数代码示例

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


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

示例1: html

 /**
  * Get field HTML
  *
  * @param mixed $meta
  * @param array $field
  *
  * @return string
  */
 static function html($meta, $field)
 {
     global $post;
     $course = LP_Course::get_course($post);
     $view = learn_press_get_admin_view('meta-boxes/course/curriculum.php');
     ob_start();
     include $view;
     return ob_get_clean();
 }
开发者ID:thonysmith,项目名称:LearnPress,代码行数:17,代码来源:class-curriculum-field.php

示例2: admin_interface

 function admin_interface($args = array())
 {
     ob_start();
     $view = learn_press_get_admin_view('meta-boxes/question/multi-choice-options.php');
     include $view;
     $output = ob_get_clean();
     if (!isset($args['echo']) || isset($args['echo']) && $args['echo'] === true) {
         echo $output;
     }
     return $output;
 }
开发者ID:thonysmith,项目名称:LearnPress,代码行数:11,代码来源:class-lp-question-multi-choice.php

示例3: learn_press_admin_view

/**
 * Find a full path of a view and display the content in admin
 *
 * @param            $name
 * @param array      $args
 * @param bool|false $include_once
 *
 * @return bool
 */
function learn_press_admin_view($name, $args = array(), $include_once = false)
{
    $view = learn_press_get_admin_view($name);
    if (file_exists($view)) {
        // extract parameters as local variables if passed
        is_array($args) && extract($args);
        do_action('learn_press_before_display_admin_view', $name, $args);
        if ($include_once) {
            include_once $view;
        } else {
            include $view;
        }
        do_action('learn_press_after_display_admin_view', $name, $args);
        return true;
    }
    return false;
}
开发者ID:taibeo1905,项目名称:LearnPress,代码行数:26,代码来源:lp-admin-functions.php

示例4: foreach

?>
"></a>
		</p>
	</h3>

	<div id="learn-press-list-questions">
		<?php 
if ($questions) {
    $index = 0;
    ?>
			<?php 
    foreach ($questions as $question) {
        ?>
				<?php 
        $question = LP_Question_Factory::get_question($question);
        $question_view = learn_press_get_admin_view('meta-boxes/quiz/question.php');
        include $question_view;
        ?>
			<?php 
    }
    ?>
			<?php 
    $exclude_ids = array_keys($questions);
}
?>
	</div>
	<div class="question-actions">
		<input type="text" class="regular-text no-submit" name="lp-new-question-name" placeholder="<?php 
_e('The name of new question and hit enter', 'learn_press');
?>
" />
开发者ID:hernanimattos,项目名称:LearnPress,代码行数:31,代码来源:questions.php

示例5: _e

</th>
				<th class="align-right"><?php 
_e('Amount', 'learn_press');
?>
</th>
			</tr>
			</thead>
			<tbody>
			<?php 
if ($items = $order->get_items()) {
    ?>
				<?php 
    foreach ($items as $item) {
        ?>
					<?php 
        include learn_press_get_admin_view('meta-boxes/order/order-item.php');
        ?>
				<?php 
    }
    ?>
			<?php 
}
?>
			<tr class="no-order-items<?php 
echo $items ? ' hide-if-js' : '';
?>
">
				<td colspan="4"><?php 
_e('No order items', 'learn_press');
?>
</td>
开发者ID:hernanimattos,项目名称:LearnPress,代码行数:31,代码来源:details.php

示例6: output_section_general

 function output_section_general()
 {
     $view = learn_press_get_admin_view('settings/pages.php');
     require_once $view;
 }
开发者ID:thonysmith,项目名称:LearnPress,代码行数:5,代码来源:class-lp-settings-pages.php

示例7: output_field

 function output_field($options)
 {
     if (!isset($options['type'])) {
         return;
     }
     if (!isset($options['id'])) {
         $options['id'] = '';
     }
     if (!isset($options['title'])) {
         $options['title'] = isset($options['name']) ? $options['name'] : '';
     }
     if (!isset($options['class'])) {
         $options['class'] = '';
     }
     if (!isset($options['css'])) {
         $options['css'] = '';
     }
     if (!isset($options['default'])) {
         $options['default'] = '';
     }
     if (!isset($options['desc'])) {
         $options['desc'] = '';
     }
     if (!isset($options['desc_tip'])) {
         $options['desc_tip'] = false;
     }
     if (!isset($options['placeholder'])) {
         $options['placeholder'] = '';
     }
     $custom_attributes = array();
     if (!empty($options['custom_attributes']) && is_array($options['custom_attributes'])) {
         foreach ($options['custom_attributes'] as $attribute => $attribute_value) {
             $custom_attributes[] = esc_attr($attribute) . '="' . esc_attr($attribute_value) . '"';
         }
     }
     if (!empty($options['desc'])) {
         $description = sprintf('<p class="description">%s</p>', $options['desc']);
     } else {
         $description = '';
     }
     $file = $options['type'];
     if (in_array($file, array('text', 'email', 'color', 'password', 'number'))) {
         $file = 'text';
     }
     require learn_press_get_admin_view('settings/fields/' . $file . '.php');
 }
开发者ID:hernanimattos,项目名称:LearnPress,代码行数:46,代码来源:class-lp-settings-base.php

示例8: _become_a_teacher_request

 private function _become_a_teacher_request()
 {
     $view = learn_press_get_admin_view('settings/emails/become-a-teacher-request.php');
     include_once $view;
 }
开发者ID:thonysmith,项目名称:LearnPress,代码行数:5,代码来源:class-lp-settings-emails.php

示例9: admin_options

 function admin_options($settings_class)
 {
     $view = learn_press_get_admin_view('settings/emails/published-course.php');
     include_once $view;
 }
开发者ID:hernanimattos,项目名称:LearnPress,代码行数:5,代码来源:class-lp-email-published-course.php

示例10: review_logs_content

 function review_logs_content($post)
 {
     global $wpdb;
     $view_all = learn_press_get_request('view_all_review');
     $query = $wpdb->prepare("\n\t\t\t\tSELECT SQL_CALC_FOUND_ROWS *\n\t\t\t\tFROM {$wpdb->learnpress_review_logs}\n\t\t\t\tWHERE course_id = %d\n\t\t\t\tORDER BY `date` DESC" . ($view_all ? "" : " LIMIT 0, 10") . "\n\t\t\t", $post->ID);
     $reviews = $wpdb->get_results($query);
     $total_reviews = $wpdb->get_var("SELECT FOUND_ROWS()");
     $count_reviews = sizeof($reviews);
     $view = learn_press_get_admin_view('meta-boxes/course/review-logs.php');
     include $view;
 }
开发者ID:thonysmith,项目名称:LearnPress,代码行数:11,代码来源:course.php

示例11: update_repair_database

 /**
  * Repair Database step page
  */
 function update_repair_database()
 {
     $view = learn_press_get_admin_view('updates/1.0/step-repair-database.php');
     include $view;
 }
开发者ID:taibeo1905,项目名称:LearnPress,代码行数:8,代码来源:learnpress-update-1.0.php

示例12: add_item_to_order

 /**
  * Add new course to order
  */
 static function add_item_to_order()
 {
     // ensure that user has permission
     if (!current_user_can('edit_lp_orders')) {
         die(__('Permission denied', 'learn_press'));
     }
     // verify nonce
     $nonce = learn_press_get_request('nonce');
     if (!wp_verify_nonce($nonce, 'add_item_to_order')) {
         die(__('Check nonce failed', 'learn_press'));
     }
     // validate order
     $order_id = learn_press_get_request('order_id');
     if (!is_numeric($order_id) || get_post_type($order_id) != 'lp_order') {
         die(__('Order invalid', 'learn_press'));
     }
     // validate item
     $item_id = learn_press_get_request('item_id');
     $post = get_post($item_id);
     if (!$post || 'lp_course' !== $post->post_type) {
         die(__('Course invalid', 'learn_press'));
     }
     $course = learn_press_get_course($post->ID);
     $order = learn_press_get_order($order_id);
     $item = array('course_id' => $course->id, 'name' => $course->get_title(), 'quantity' => 1, 'subtotal' => $course->get_price(), 'total' => $course->get_price());
     // Add item
     $item_id = learn_press_add_order_item($order_id, array('order_item_name' => $item['name']));
     $item['id'] = $item_id;
     // Add item meta
     if ($item_id) {
         $item = apply_filters('learn_press_ajax_order_item', $item);
         learn_press_add_order_item_meta($item_id, '_course_id', $item['course_id']);
         learn_press_add_order_item_meta($item_id, '_quantity', $item['quantity']);
         learn_press_add_order_item_meta($item_id, '_subtotal', $item['subtotal']);
         learn_press_add_order_item_meta($item_id, '_total', $item['total']);
         do_action('learn_press_ajax_add_order_item_meta', $item);
     }
     $order_data = learn_press_update_order_items($order_id);
     $currency_symbol = learn_press_get_currency_symbol($order_data['currency']);
     $order_data['subtotal_html'] = learn_press_format_price($order_data['subtotal'], $currency_symbol);
     $order_data['total_html'] = learn_press_format_price($order_data['total'], $currency_symbol);
     ob_start();
     include learn_press_get_admin_view('meta-boxes/order/order-item.php');
     $item_html = ob_get_clean();
     learn_press_send_json(array('result' => 'success', 'item_html' => $item_html, 'order_data' => $order_data));
 }
开发者ID:hernanimattos,项目名称:LearnPress,代码行数:49,代码来源:class-lp-admin-ajax.php

示例13: printf

" />

			<p class="description">
				<?php 
printf(__('Email heading, default: <code>%s</code>', 'learn_press'), $this->default_heading);
?>
			</p>
		</td>
	</tr>
	<tr>
		<th scope="row">
			<label for="learn-press-emails-enrolled-course-email-format"><?php 
_e('Email format', 'learn_press');
?>
</label>
		</th>
		<td>
			<?php 
learn_press_email_formats_dropdown(array('name' => $settings_class->get_field_name('emails_enrolled_course[email_format]'), 'id' => 'learn_press_email_formats', 'selected' => $settings->get('emails_enrolled_course.email_format')));
?>
		</td>
	</tr>
	<?php 
$view = learn_press_get_admin_view('settings/emails/email-template.php');
include_once $view;
?>
	<?php 
do_action('learn_press_after_' . $this->id . '_' . $this->section['id'] . '_settings_fields', $settings);
?>
	</tbody>
</table>
开发者ID:hernanimattos,项目名称:LearnPress,代码行数:31,代码来源:enrolled-course.php

示例14: output_section_paypal

 /**
  * Print admin options for paypal section
  */
 function output_section_paypal()
 {
     $view = learn_press_get_admin_view('settings/payments.php');
     include_once $view;
 }
开发者ID:thonysmith,项目名称:LearnPress,代码行数:8,代码来源:class-lp-settings-payments.php

示例15: admin_interface_foot

 /**
  * Prints the header of a question in admin mode
  * should call this function before in the bottom of admin_interface in extends class
  *
  * @param array $args
  *
  * @return void
  */
 function admin_interface_foot($args = array())
 {
     $view = learn_press_get_admin_view('meta-boxes/question/footer.php');
     include $view;
 }
开发者ID:hernanimattos,项目名称:LearnPress,代码行数:13,代码来源:abstract-lp-question.php


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