• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP includes_url函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ac_gallery_get_upload_meta_data

function ac_gallery_get_upload_meta_data()
{
    $plupload_init = array('runtimes' => 'html5,silverlight,flash,html4', 'browse_button' => 'plupload-browse-button', 'container' => 'plupload-upload-ui', 'drop_element' => 'drag-drop-area', 'file_data_name' => 'async-upload', 'multiple_queues' => true, 'max_file_size' => wp_max_upload_size() . 'b', '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' => __('Allowed Files', 'alleycat'), 'extensions' => '*')), 'multipart' => true, 'urlstream_upload' => true, 'multipart_params' => array('_ajax_nonce' => wp_create_nonce('photo-upload'), 'action' => 'photo_gallery_upload'));
    // Get the data values
    $plupload_init = apply_filters('plupload_init', $plupload_init);
    return $plupload_init;
}
开发者ID:Jhorton4,项目名称:Bohldfeys_Portfolio,代码行数:7,代码来源:dd-gallery-admin.php


示例2: initStyleScript

 /**
  * Load JS and CSS need for admin features.
  *
  */
 function initStyleScript($hook_sufix)
 {
     global $taxonomy;
     if ($hook_sufix == 'edit-tags.php') {
         if ($taxonomy != $this->taxo->name) {
             return false;
         }
         foreach ($this->sidebars_fields as $name => $sidebar) {
             if ($name == 'cf_inactive_fields' || empty($sidebar) || !is_array($sidebar)) {
                 continue;
             }
             foreach ($sidebar as $widget) {
                 $idbase = $this->cf_registered_fields[$widget]['classname'];
                 // Allow composant to add JS/CSS
                 do_action('cf-fields-scriptstyles-' . $idbase);
             }
         }
         $this->_editTags = true;
         // Add CSS for boxes
         wp_enqueue_style('simple-custom-types-object', SCF_URL . '/inc/css/admin.css', array(), SCF_VERSION);
         wp_enqueue_script("tiny_mce", includes_url('js/tinymce') . '/tiny_mce.js');
         return true;
     }
     return false;
 }
开发者ID:emaxees,项目名称:elpandecadadia,代码行数:29,代码来源:class.admin.object.taxo.php


示例3: html5press_register_scripts

function html5press_register_scripts()
{
    /**
     * Modernizr enables HTML5 elements & feature detects
     * For optimal performance, use a custom Modernizr build: www.modernizr.com/download/
     */
    wp_enqueue_script('modernizr', get_stylesheet_directory_uri() . '/js/modernizr-2.0.6.min.js', '', '2.0.6');
    // Make sure jQuery is loaded after Modernizr
    wp_deregister_script('jquery');
    wp_enqueue_script('jquery', includes_url('js/jquery/jquery.js'), array('modernizr'), null);
    wp_enqueue_script('easing', get_stylesheet_directory_uri() . '/js/easing.min.js', array('jquery'), '1.1.2', true);
    global $html5press_options;
    $html5press_settings = get_option('html5press_options', $html5press_options);
    // If back to top is enabled, add easing and the back to top javascript.
    if ($html5press_settings['back_to_top'] == 1) {
        wp_enqueue_script('totop', get_stylesheet_directory_uri() . '/js/jquery.ui.totop.js', array('jquery'), '1.1', true);
    }
    if ($html5press_settings['enable_slimbox'] == 1) {
        wp_enqueue_script('slimbox2', get_stylesheet_directory_uri() . '/js/slimbox2.js', array('jquery'), '2.04', true);
    }
    if (!empty($html5press_settings['featured_cat'])) {
        wp_enqueue_script('bxslider', get_stylesheet_directory_uri() . '/js/jquery.bxSlider.min.js', array('jquery'), '3.0', true);
        wp_enqueue_script('bxslider-load', get_stylesheet_directory_uri() . '/js/bxslider-load.js', array('bxslider'), '1.0', true);
    }
    if ($html5press_settings['fuzzy_timestamps'] == 1) {
        wp_enqueue_script('timeago', get_stylesheet_directory_uri() . '/js/jquery.timeago.js', array('jquery'), '0.9.3', true);
    }
}
开发者ID:NAzT,项目名称:html5press,代码行数:28,代码来源:functions.php


示例4: to_json

 /**
  * Returns an array that holds the field data, suitable for JSON representation.
  * This data will be available in the Underscore template and the Backbone Model.
  *
  * @param bool $load  Should the value be loaded from the database or use the value from the current instance.
  * @return array
  */
 public function to_json($load)
 {
     $field_data = parent::to_json($load);
     $url = '';
     $thumb_url = '';
     $default_thumb_url = includes_url('/images/media/default.png');
     $file_ext = '';
     $file_type = '';
     $value = $this->get_value();
     if ($value) {
         $url = is_numeric($value) ? wp_get_attachment_url($value) : $value;
         $filetype = wp_check_filetype($url);
         $file_ext = $filetype['ext'];
         // png, mp3, etc..
         $file_type = preg_replace('~\\/.+$~', '', $filetype['type']);
         // image, video, etc..
         if ($file_type == 'image') {
             $thumb_url = $url;
             if ($this->value_type == 'id') {
                 $thumb_src = wp_get_attachment_image_src($value, 'thumbnail');
                 $thumb_url = $thumb_src[0];
             }
         } else {
             $thumb_url = $default_thumb_url;
         }
     }
     $field_data = array_merge($field_data, array('url' => (string) $url, 'thumb_url' => $thumb_url, 'default_thumb_url' => $default_thumb_url, 'file_ext' => $file_ext, 'file_type' => $file_type, 'button_label' => $this->button_label, 'window_button_label' => $this->window_button_label, 'window_label' => $this->window_label, 'type_filter' => $this->field_type, 'value_type' => $this->value_type));
     return $field_data;
 }
开发者ID:Falkvinge,项目名称:BlogTheme2016,代码行数:36,代码来源:File_Field.php


示例5: amr_ical_support_links

function amr_ical_support_links()
{
    echo '<div class="postbox" style="padding:1em 2em; width: 600px;">
	<p>
	<a href="http://icalevents.com/documentation" title="documentation for amr-ical-events-list and amr-events">';
    _e('Documentation', 'amr-ical-events-list');
    echo '</a>&nbsp;&nbsp;
	<a href="http://icalevents.com/support/" title="Support Forum">';
    _e('Support', 'amr-ical-events-list');
    /*	echo '</a>&nbsp;&nbsp;
    	<a href="http://icalevents.com/videos" title="Events plugin videos">';
    	_e('Videos', 'amr-ical-events-list');
    	*/
    echo '</a>&nbsp;&nbsp;
	<a href="https://wordpress.org/support/plugin/amr-ical-events-list" title="If you like it rate it...">';
    _e('Rate or Review', 'amr-ical-events-list');
    echo '</a>&nbsp;&nbsp;<a href="http://icalevents.com/feed/">';
    _e('Plugin feed', 'amr-ical-events-list');
    echo '</a>&nbsp;<img src="';
    echo includes_url();
    echo 'images/rss.png" alt="Rss icon" style="vertical-align:middle;" />';
    /*echo '&nbsp;&nbsp;
    	<a href="http://icalevents.com/forums/feed">';
    	_e('Forum feed', 'amr-ical-events-list');
    	echo '</a>&nbsp;<img src="';
    	echo includes_url(); 
    	echo 'images/rss.png" alt="Rss icon" style="vertical-align:middle;" />';*/
    echo '</p>';
    echo '</div>';
}
开发者ID:greg3560,项目名称:plailly,代码行数:30,代码来源:amr-ical-list-admin.php


示例6: get_preview_from_url

 public static function get_preview_from_url($url)
 {
     $preview = '';
     $images = array('jpg', 'jpeg', 'bmp', 'gif', 'png');
     if (filter_var($url, FILTER_VALIDATE_URL) !== FALSE) {
         // check for extension, if it has extension then use it
         $info = pathinfo($url);
         if (isset($info['extension'])) {
             if (in_array($info['extension'], $images)) {
                 $preview = $url;
             } else {
                 $type = wp_ext2type($info['extension']);
                 if (is_null($type)) {
                     $type = 'default';
                 }
                 $preview = includes_url() . 'images/crystal/' . $type . '.png';
             }
         } else {
             // if no extension, try to discover from mime
             $mime = wp_remote_head($url);
             if (!is_wp_error($mime)) {
                 $mime = $mime['headers']['content-type'];
                 if (strpos($mime, 'image') === 0) {
                     $preview = $url;
                 } else {
                     $preview = wp_mime_type_icon($mime);
                 }
             } else {
                 $preview = includes_url() . 'images/crystal/' . 'default' . '.png';
             }
         }
     }
     return $preview;
 }
开发者ID:ntnvu,项目名称:tcb_online,代码行数:34,代码来源:res.php


示例7: sz_google_ajax_load_scripts

function sz_google_ajax_load_scripts()
{
    wp_enqueue_style('sz-google-style-admin', plugin_dir_url(SZ_PLUGIN_GOOGLE_MAIN) . 'admin/files/css/sz-google-style-admin.css', array(), SZ_PLUGIN_GOOGLE_VERSION);
    wp_enqueue_script('sz-google-javascript-widgets', plugin_dir_url(SZ_PLUGIN_GOOGLE_MAIN) . 'admin/files/js/jquery.szgoogle.widgets.js', array('jquery'), SZ_PLUGIN_GOOGLE_VERSION, false);
    wp_enqueue_script('tiny_mce_popup', includes_url('js/tinymce/tiny_mce_popup.js'), array('jquery'), SZ_PLUGIN_GOOGLE_VERSION, false);
    wp_enqueue_script('tiny_mce_component', plugin_dir_url(SZ_PLUGIN_GOOGLE_MAIN) . 'admin/mce/js/' . SZGOOGLE_AJAX_NAME . '.js', array('tiny_mce_popup'), SZ_PLUGIN_GOOGLE_VERSION, false);
}
开发者ID:omaharry,项目名称:stmaryomaha,代码行数:7,代码来源:SZGoogleBaseHeader.php


示例8: test_wysiwyg_field

    public function test_wysiwyg_field()
    {
        global $wp_version;
        $this->field_test['fields'][0]['type'] = 'wysiwyg';
        $cmb = new CMB2($this->field_test);
        $field = cmb2_get_field($this->field_test['id'], 'field_test_field', $this->post_id);
        $this->assertInstanceOf('CMB2_Field', $field);
        $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
        $version = 'ver=' . $wp_version;
        $field_gen = '
		<div class="cmb-row cmb-type-wysiwyg cmb2-id-field-test-field">
			<div class="cmb-td">
				<label for="field_test_field">Name</label>
				<div id="wp-field_test_field-wrap" class="wp-core-ui wp-editor-wrap html-active">
					<link rel=\'stylesheet\' id=\'dashicons-css\' href=\'' . includes_url("css/dashicons{$suffix}.css?{$version}") . '\' type=\'text/css\' media=\'all\' />
					<link rel=\'stylesheet\' id=\'editor-buttons-css\' href=\'' . includes_url("css/editor{$suffix}.css?{$version}") . '\' type=\'text/css\' media=\'all\' />
					<div id="wp-field_test_field-editor-container" class="wp-editor-container">
						<textarea class="wp-editor-area" rows="20" cols="40" name="field_test_field" id="field_test_field">
						</textarea>
					</div>
				</div>
				<p class="cmb2-metabox-description">This is a description</p>
			</div>
		</div>
		';
        $this->assertEquals($this->clean_string($this->render_field($field)), $this->clean_string($field_gen));
    }
开发者ID:Raptor831,项目名称:RFStockalike-Generator,代码行数:27,代码来源:test-cmb-types.php


示例9: index_action

 function index_action($return = FALSE)
 {
     // If the site was accessed as http://foobar.com but the iframe/site_url() is http://www.foobar.com,
     // then the JS will generate cross origin framing errors
     if (isset($_GET['ngg_fix_cross_origins']) && isset($_SERVER['HTTP_REFERER'])) {
         $referrer = parse_url($_SERVER['HTTP_REFERER']);
         $host = parse_url(site_url());
         $referrer = $referrer['host'];
         $host = $host['host'];
         if ($host != $referrer) {
             $parts = explode('.', $host);
             $host = implode('.', array_slice($parts, -2, 2));
             if ($host == $referrer) {
                 header("X-Frame-Options: ALLOW-FROM {$host}");
             }
         }
     }
     $this->object->expires("1 year");
     // IMPORTANT: The Displayed Gallery has already been fetched by the
     // parent frame, and is available on the client side as
     // window.galleries.gallery_[id] and therefore fetching the
     // displayed gallery on the server side is strongly discouraged as it's
     // a redundant database query. Instead, find a way to make use of the
     // client side object
     $protect_images = !empty(C_NextGen_Settings::get_instance()->protect_images) ? TRUE : FALSE;
     return $this->object->render_view('photocrati-galleria#galleria_iframe', array('id' => $this->param('id'), 'jquery_url' => includes_url('/js/jquery/jquery.js'), 'galleria_url' => $this->get_static_url('photocrati-galleria#galleria-1.2.9.min.js'), 'galleria_instance_js' => $this->object->galleria_instance_js(), 'ngg_settings' => array('protect_images' => $protect_images)), $return);
 }
开发者ID:CodeNoEvil,项目名称:mbp_web_infrastructure,代码行数:27,代码来源:class.galleria_iframe_controller.php


示例10: __construct

 /**
  * constructeur
  */
 public function __construct()
 {
     $this->_sPluginsURL = plugins_url();
     $this->_sIncludesURL = includes_url();
     // fonction de load js
     add_action('wp_print_scripts', array($this, 'loadJS'));
 }
开发者ID:birdy10,项目名称:projetWordpress,代码行数:10,代码来源:Highcharts.class.php


示例11: et_fb_enqueue_assets

function et_fb_enqueue_assets()
{
    global $wp_version;
    et_fb_load_portability();
    $ver = ET_BUILDER_VERSION;
    $root = ET_BUILDER_URI;
    $app = ET_FB_URI;
    $assets = ET_FB_ASSETS_URI;
    // Get WP major version
    $wp_major_version = substr($wp_version, 0, 3);
    // Register styles.
    // wp_enqueue_style( 'et-frontend-builder', "{$assets}/css/frontend-builder.css", null, $ver );
    // Register scripts.
    // wp_register_script( 'minicolors', "{$root}/scripts/ext/jquery.minicolors.js" );
    wp_register_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
    wp_register_script('wp-color-picker', admin_url('js/color-picker.min.js'), array('iris'), false, 1);
    wp_register_script('wp-color-picker-alpha', "{$root}/scripts/ext/wp-color-picker-alpha.min.js", array('wp-color-picker'));
    $colorpicker_l10n = array('clear' => esc_html__('Clear', 'et_builder'), 'defaultString' => esc_html__('Default', 'et_builder'), 'pick' => esc_html__('Select Color', 'et_builder'), 'current' => esc_html__('Current Color', 'et_builder'));
    wp_localize_script('wp-color-picker', 'wpColorPickerL10n', $colorpicker_l10n);
    wp_register_script('react-tiny-mce', "{$assets}/vendors/tinymce.min.js");
    if (version_compare($wp_major_version, '4.5', '<')) {
        wp_register_script('et_pb_admin_date_js', "{$root}/scripts/ext/jquery-ui-1.10.4.custom.min.js", array('jquery'), $ver, true);
    } else {
        wp_register_script('et_pb_admin_date_js', "{$root}/scripts/ext/jquery-ui-1.11.4.custom.min.js", array('jquery'), $ver, true);
    }
    wp_register_script('et_pb_admin_date_addon_js', "{$root}/scripts/ext/jquery-ui-timepicker-addon.js", array('et_pb_admin_date_js'), $ver, true);
    wp_register_script('wp-shortcode', includes_url() . '/js/shortcode.js', array(), $wp_version);
    $fb_bundle_dependencies = apply_filters('et_fb_bundle_dependencies', array('jquery', 'jquery-ui-core', 'jquery-ui-draggable', 'jquery-ui-resizable', 'underscore', 'jquery-ui-sortable', 'jquery-effects-core', 'iris', 'wp-color-picker', 'wp-color-picker-alpha', 'react-tiny-mce', 'easypiechart', 'et_pb_admin_date_addon_js', 'salvattore', 'hashchange', 'wp-shortcode'));
    // Enqueue scripts.
    wp_enqueue_script('et-frontend-builder', "{$app}/bundle.js", $fb_bundle_dependencies, $ver, true);
    // Enqueue failure notice script.
    wp_enqueue_script('et-frontend-builder-failure', "{$assets}/scripts/failure_notice.js", array(), $ver, true);
    wp_localize_script('et-frontend-builder-failure', 'et_fb_options', array('ajaxurl' => admin_url('admin-ajax.php'), 'et_admin_load_nonce' => wp_create_nonce('et_admin_load_nonce'), 'memory_limit_increased' => esc_html__('Your memory limit has been increased', 'et_builder'), 'memory_limit_not_increased' => esc_html__("Your memory limit can't be changed automatically", 'et_builder')));
    do_action('et_fb_enqueue_assets');
}
开发者ID:pacificano,项目名称:pacificano,代码行数:35,代码来源:assets.php


示例12: enqueue_image_editor_scripts

 function enqueue_image_editor_scripts()
 {
     $suffix = function_exists('rtm_get_script_style_suffix') ? rtm_get_script_style_suffix() : '.min';
     wp_enqueue_script('wp-ajax-response');
     wp_enqueue_script('rtmedia-image-edit', admin_url("js/image-edit{$suffix}.js"), array('jquery', 'json2', 'imgareaselect'), false, 1);
     wp_enqueue_style('rtmedia-image-area-select', includes_url('/js/imgareaselect/imgareaselect.css'));
 }
开发者ID:fs-contributor,项目名称:rtMedia,代码行数:7,代码来源:RTMediaTemplate.php


示例13: _tcg_load_theme_files

/**
* Load theme scripts in the footer
*
* Big thanks to Chris Ferdinandi on this one!
* ref: http://gomakethings.com/inlining-critical-css-for-better-web-performance/
*/
function _tcg_load_theme_files()
{
    // If stylesheet is in browser cache, load it the traditional way
    // Otherwise, inline critical CSS and load full stylesheet asynchronously
    // See _tcg_initialize_theme_detects()
    // Load theme fonts
    wp_enqueue_style('_tcg-fonts', '//fonts.googleapis.com/css?family=Poiret+One');
    // Load comment script from origina _s
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    // Re-enable & test this if browser paint delays
    if (isset($_COOKIE['fullCSS']) && $_COOKIE['fullCSS'] === 'true') {
        wp_enqueue_style('_tcg-theme-styles', get_template_directory_uri() . '/style.css', null, null, 'all');
    }
    // Move jquery to the footer
    // it's being defer'd instead of async'd - move to header and load renderblocking in case of bugginess
    // get rid of jquery-migrate cause we're too cocky and smart for that shit.
    wp_deregister_script('jquery');
    wp_dequeue_script('jquery');
    wp_register_script('jquery-core', includes_url('/js/jquery/jquery.js'), false, NULL, true);
    wp_enqueue_script('jquery-core');
    // Add dependency to jquery-core for Asset Queue Manager, DO NOT load in footer or aqm fails
    wp_register_script('asset-queue-manager', '/wp-content/plugins/asset-queue-manager/assets/js/aqm.min.js', 'jquery-core', NULL, false);
    // Apparently enqueueing isn't necessary, may want to research this more
    // wp_enqueue_script( 'asset-queue-manager' );
    wp_register_script('_tcg-theme-scripts', get_template_directory_uri() . '/js/main.min.js', 'jquery-core', null, true);
    wp_enqueue_script('_tcg-theme-scripts');
}
开发者ID:dylanjharris,项目名称:tcg,代码行数:35,代码来源:enqueue.php


示例14: tshirt_designer_init_scripts

function tshirt_designer_init_scripts()
{
    $tshirt_designer_sticker_size = get_option('tshirt_designer_sticker_size');
    if (empty($tshirt_designer_sticker_size)) {
        $tshirt_designer_sticker_size = intval(2 * 1000 * 1000);
    } else {
        $tshirt_designer_sticker_size = intval($tshirt_designer_sticker_size * 1000 * 1000);
    }
    wp_enqueue_script('jquery');
    wp_enqueue_script('jquery-ui-core');
    wp_enqueue_script('jquery-ui-widget');
    wp_enqueue_script('jquery-ui-mouse');
    wp_enqueue_script('jquery-ui-draggable');
    wp_enqueue_script('jquery-ui-resizable');
    wp_enqueue_style('jquery-ui.css', tshirt_designer_plugin_url . 'css/jquery-ui.css');
    wp_enqueue_script('html2canvas.js', plugins_url('/js/html2canvas.js', __FILE__), array('jquery'), '1.0', false);
    //wp_enqueue_script( 'circletype.js', plugins_url( '/js/circletype.js', __FILE__ ), array('jquery'), '1.0', false);
    wp_enqueue_script('jscolor.js', plugins_url('/js/jscolor.js', __FILE__), array('jquery'), '1.0', false);
    wp_enqueue_script('tshirt_designer_js', plugins_url('/js/scripts.js', __FILE__), array('jquery'));
    wp_localize_script('tshirt_designer_js', 'tshirt_designer_ajax', array('tshirt_designer_ajaxurl' => admin_url('admin-ajax.php')));
    wp_enqueue_style('tshirt_designer_style', tshirt_designer_plugin_url . 'css/style.css');
    wp_enqueue_style('wp-color-picker');
    wp_enqueue_script('tshirt_designer_color_picker', plugins_url('/js/color-picker.js', __FILE__), false, true);
    //ParaAdmin
    wp_enqueue_style('ParaAdmin', tshirt_designer_plugin_url . 'ParaAdmin/css/ParaAdmin.css');
    //wp_enqueue_style('ParaDashboard', tshirt_designer_plugin_url.'ParaAdmin/css/ParaDashboard.css');
    //wp_enqueue_style('ParaIcons', tshirt_designer_plugin_url.'ParaAdmin/css/ParaIcons.css');
    wp_enqueue_script('ParaAdmin', plugins_url('ParaAdmin/js/ParaAdmin.js', __FILE__), array('jquery'));
    wp_enqueue_script('plupload-handlers');
    wp_enqueue_script('sticker_upload', tshirt_designer_plugin_url . 'js/upload-sticker.js', array('jquery'));
    wp_localize_script('sticker_upload', 'sticker_upload', array('ajaxurl' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('sticker_upload'), 'remove' => wp_create_nonce('sticker_remove'), 'number' => 5, 'upload_enabled' => true, 'confirmMsg' => __('Are you sure you want to delete this?'), 'plupload' => array('runtimes' => 'html5,flash,html4', 'browse_button' => 'sticker-uploader', 'container' => 'sticker-upload-container', 'file_data_name' => 'sticker_upload_file', 'max_file_size' => $tshirt_designer_sticker_size . 'b', 'url' => admin_url('admin-ajax.php') . '?action=sticker_upload&nonce=' . wp_create_nonce('sticker_allow'), 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), 'filters' => array(array('title' => __('Allowed Files'), 'extensions' => 'gif,png')), 'multipart' => true, 'urlstream_upload' => true)));
}
开发者ID:riddbengkok,项目名称:tshirt-designer,代码行数:32,代码来源:tshirt-designer.php


示例15: register_scripts

 static function register_scripts()
 {
     if (!wp_script_is('plupload-all')) {
         wp_enqueue_script('plupload-all');
     }
     wp_enqueue_script('rtmedia-backbone', RTMEDIA_URL . 'app/assets/js/rtMedia.backbone.js', array('plupload-all', 'backbone'), false, true);
     if (is_rtmedia_album_gallery()) {
         $template_url = esc_url(add_query_arg(array("action" => 'rtmedia_get_template', "template" => "album-gallery-item"), admin_url("admin-ajax.php")), null, '');
     } else {
         $template_url = esc_url(add_query_arg(array("action" => 'rtmedia_get_template', "template" => apply_filters('rtmedia_backbone_template_filter', "media-gallery-item")), admin_url("admin-ajax.php")), null, '');
     }
     wp_localize_script('rtmedia-backbone', 'template_url', $template_url);
     $url = trailingslashit($_SERVER["REQUEST_URI"]);
     $rtmedia_slug = "/" . RTMEDIA_MEDIA_SLUG;
     // check position of media slug from end of the URL
     if (strrpos($url, $rtmedia_slug) !== false) {
         // split the url upto the last occurance of media slug
         $url_upload = substr($url, 0, strrpos($url, $rtmedia_slug));
         $url = trailingslashit($url_upload) . "upload/";
     } else {
         $url = trailingslashit($url) . "upload/";
     }
     $params = array('url' => $url, 'runtimes' => 'html5,flash,html4', 'browse_button' => 'rtMedia-upload-button', 'container' => 'rtmedia-upload-container', 'drop_element' => 'drag-drop-area', 'filters' => apply_filters('rtmedia_plupload_files_filter', array(array('title' => "Media Files", 'extensions' => get_rtmedia_allowed_upload_type()))), 'max_file_size' => min(array(ini_get('upload_max_filesize'), ini_get('post_max_size'))), 'multipart' => true, 'urlstream_upload' => true, 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), 'file_data_name' => 'rtmedia_file', 'multi_selection' => true, 'multipart_params' => apply_filters('rtmedia-multi-params', array('redirect' => 'no', 'action' => 'wp_handle_upload', '_wp_http_referer' => $_SERVER['REQUEST_URI'], 'mode' => 'file_upload', 'rtmedia_upload_nonce' => RTMediaUploadView::upload_nonce_generator(false, true))), 'max_file_size_msg' => apply_filters("rtmedia_plupload_file_size_msg", min(array(ini_get('upload_max_filesize'), ini_get('post_max_size')))));
     if (wp_is_mobile()) {
         $params['multi_selection'] = false;
     }
     $params = apply_filters("rtmedia_modify_upload_params", $params);
     wp_localize_script('rtmedia-backbone', 'rtMedia_plupload_config', $params);
     wp_localize_script('rtmedia-backbone', 'rMedia_loading_file', admin_url("/images/loading.gif"));
 }
开发者ID:prdanielmota,项目名称:faama-site,代码行数:30,代码来源:RTMediaGalleryShortcode.php


示例16: __output

 protected function __output()
 {
     $num = $this->property['num_posts'] ? $this->property['num_posts'] : 4;
     $url = $this->property['url'];
     while (stristr($url, 'http') != $url) {
         $url = substr($url, 1);
     }
     if (empty($url)) {
         return;
     }
     $rss = fetch_feed($url);
     $desc = '';
     $link = '';
     if (!is_wp_error($rss)) {
         $desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
         if (empty($title)) {
             $title = esc_html(strip_tags($rss->get_title()));
         }
         $link = esc_url(strip_tags($rss->get_permalink()));
         while (stristr($link, 'http') != $link) {
             $link = substr($link, 1);
         }
     }
     $icon = includes_url('images/rss.png');
     if ($title) {
         $title = "<a class='rsswidget' href='{$url}' title='" . esc_attr__('Assinar feed', 'tnb') . "'><img style='border:0' width='14' height='14' src='{$icon}' alt='RSS' /></a> <a class='rsswidget' href='{$link}' title='{$desc}'>{$title}</a>";
     }
     echo $title;
     $show_author = $this->property['exibir_autor'] == 1 ? 1 : 0;
     $show_date = $this->property['exibir_data'] == 1 ? 1 : 0;
     $show_summary = $this->property['exibir_resumo'] == 1 ? 1 : 0;
     $items = $this->property['num_posts'] ? $this->property['num_posts'] : 5;
     $default_args = array('show_author' => $show_author, 'show_date' => $show_date, 'show_summary' => $show_summary, 'items' => $items);
     wp_widget_rss_output($rss, $default_args);
 }
开发者ID:hacklabr,项目名称:toquenobrasil,代码行数:35,代码来源:_widget_rss.class.php


示例17: print_scripts

 public function print_scripts()
 {
     if (!isset($_REQUEST['page'])) {
         return;
     }
     $this->add_existed_script('jquery');
     $this->add_existed_script('plupload');
     //add de sort category
     $this->add_existed_script('jquery-ui-sortable');
     $this->add_script('lib-nested-sortable', ae_get_url() . '/assets/js/jquery.nestedSortable.js', array('jquery', 'jquery-ui-sortable'));
     // tam thoi add de xai
     $this->add_script('jquery-validator', ae_get_url() . '/assets/js/jquery.validate.min.js', 'jquery');
     $this->add_script('ae-colorpicker', ae_get_url() . '/assets/js/colorpicker.js', array('jquery'));
     $this->add_script('marionette', ae_get_url() . '/assets/js/marionette.js', array('jquery', 'underscore', 'backbone'));
     // control backend user list
     $this->add_script('gmap', ae_get_url() . '/assets/js/gmap.js', array('et-googlemap-api'));
     // ae core js appengine
     $this->add_script('appengine', ae_get_url() . '/assets/js/appengine.js', array('jquery', 'underscore', 'backbone', 'marionette', 'plupload', 'ae-colorpicker'));
     // control backend user list
     $this->add_script('backend-user', ae_get_url() . '/assets/js/user-list.js', array('appengine'));
     // control backend order list
     $this->add_script('order-list', ae_get_url() . '/assets/js/payment-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' => admin_url('admin-ajax.php'), 'imgURL' => ae_get_url() . '/assets/img/', 'jsURL' => ae_get_url() . '/assets/js/', 'themeImgURL' => get_template_directory_uri() . '/img/', 'loadingImg' => '<img class="loading loading-wheel" src="' . ae_get_url() . '/assets/img/loading.gif" alt="' . __('Loading...', 'aecore-class-ae-page-backend') . '">', 'loading' => __('Loading', 'aecore-class-ae-page-backend'), 'texts' => array('limit_category_level' => __("Categories' level is limited to 3", 'aecore-class-ae-page-backend')), 'ae_is_mobile' => et_load_mobile() ? 1 : 0, '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', 'aecore-class-ae-page-backend'), 'extensions' => 'jpg,jpeg,gif,png')))));
 }
开发者ID:linniepinski,项目名称:perssistant,代码行数:32,代码来源:class-ae-page.php


示例18: load_scripts_and_styles

 function load_scripts_and_styles()
 {
     if (is_admin()) {
         //Load any admin side scripts here
         //Album page
         if (strpos($_SERVER['QUERY_STRING'], 'page=wppg') !== false) {
             if ($_GET['page'] == 'wppg_album') {
                 //media upload stuff
                 wp_enqueue_script('media-upload');
                 wp_enqueue_script('thickbox');
                 wp_register_script('wppg-media-upload', WP_PHOTO_URL . '/js/wppg_album_thumb_uploader.js', array('jquery', 'media-upload', 'thickbox'));
                 wp_enqueue_style('dialogStylesheet', includes_url() . 'css/jquery-ui-dialog.css');
                 wp_enqueue_script('wppg-media-upload');
                 wp_enqueue_style('thickbox');
                 //style sheet for thickbox
             }
         }
     } else {
         //Load front end side scripts here
         wp_enqueue_style('wppg-photo-css', WP_PHOTO_URL . '/css/wppg-photo.css', null, WP_PHOTO_VERSION, 'all');
         wp_register_style('wppg-slider-custom-css', WP_PHOTO_URL . '/js/flexslider/flexslider-custom.css', null, WP_PHOTO_VERSION, 'all');
         wp_register_style('wppg-slider-css', WP_PHOTO_URL . '/js/flexslider/flexslider.css', null, WP_PHOTO_VERSION, 'all');
         wp_enqueue_script('jquery-lightbox', WP_PHOTO_URL . '/js/jquery-lightbox/js/jquery.lightbox-0.5.js', array('jquery'), WP_PHOTO_VERSION);
         wp_register_script('wppg-flex-slider', WP_PHOTO_URL . '/js/flexslider/jquery.flexslider-min.js', array('jquery'), WP_PHOTO_VERSION, true);
         //Load this script only for pages with the slider shortcode
         //wp_register_script('wppg-slider-related', WP_PHOTO_URL . '/js/wppg-slider-related.js', array('jquery'), WP_PHOTO_VERSION, true); //Load this script only for pages with the slider shortcode
     }
 }
开发者ID:stvnfrancisco,项目名称:art_portfolio_wordpress,代码行数:28,代码来源:wppg-photo-general-init-tasks.php


示例19: render

 public function render($configuration)
 {
     $configuration = wp_parse_args($configuration, array('flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap')));
     $this->javascript->set('media-uploader-data', $configuration);
     $this->javascript->localize('media-uploader-strings', array('upload-restrictions-images-others-videos' => __('You can upload <images-left> images of up to <images-max-file-size> each, <videos-left> videos of up to <videos-max-file-size> each and <others-left> other files of up to <others-max-file-size> each.', 'AWPCP'), 'upload-restrictions-images-others' => __('You can upload <images-left> images of up to <images-max-file-size> each and <others-left> other files (no videos) of up to <others-max-file-size> each.', 'AWPCP'), 'upload-restrictions-images-videos' => __('You can upload <images-left> images of up to <images-max-file-size> each and <videos-left> videos of up to <videos-max-file-size> each.', 'AWPCP'), 'upload-restrictions-others-videos' => __('You can upload <videos-left> videos of up to <videos-max-file-size> each and <others-left> other files (no images) of up to <others-max-file-size> each.', 'AWPCP'), 'upload-restrictions-images' => __('You can upload <images-left> images of up to <images-max-file-size> each.', 'AWPCP'), 'upload-restrictions-others' => __('You can upload <others-left> files (no videos or images) of up to <others-max-file-size> each.', 'AWPCP'), 'upload-restrictions-videos' => __('You can upload <videos-left> videos of up to <videos-max-file-size> each.', 'AWPCP'), 'cannot-add-more-files' => $this->validation_errors->get_cannot_add_more_files_of_type_error_message(), 'file-is-too-large' => $this->validation_errors->get_file_is_too_large_error_message()));
     return $this->render_component();
 }
开发者ID:sabdev1,项目名称:ljcdevsab,代码行数:7,代码来源:class-media-uploader-component.php


示例20: js_wp_editor

function js_wp_editor($settings = array())
{
    if (!class_exists('_WP_Editors')) {
        require ABSPATH . WPINC . '/class-wp-editor.php';
    }
    $set = _WP_Editors::parse_settings('apid', $settings);
    if (!current_user_can('upload_files')) {
        $set['media_buttons'] = false;
    }
    if ($set['media_buttons']) {
        wp_enqueue_script('thickbox');
        wp_enqueue_style('thickbox');
        wp_enqueue_script('media-upload');
        $post = get_post();
        if (!$post && !empty($GLOBALS['post_ID'])) {
            $post = $GLOBALS['post_ID'];
        }
        wp_enqueue_media(array('post' => $post));
    }
    _WP_Editors::editor_settings('apid', $set);
    $ap_vars = array('url' => get_home_url(), 'includes_url' => includes_url());
    wp_register_script('ap_wpeditor_init', get_template_directory_uri() . '/functions/js-wp-editor.js', array('jquery'), '1.1', true);
    wp_localize_script('ap_wpeditor_init', 'ap_vars', $ap_vars);
    wp_enqueue_script('ap_wpeditor_init');
}
开发者ID:rsantellan,项目名称:wordpress-ecommerce,代码行数:25,代码来源:js-wp-editor.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP incompleteAnsFilterState函数代码示例发布时间:2022-05-15
下一篇:
PHP include_title函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap