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


PHP TitanFramework::getURL方法代码示例

本文整理汇总了PHP中TitanFramework::getURL方法的典型用法代码示例。如果您正苦于以下问题:PHP TitanFramework::getURL方法的具体用法?PHP TitanFramework::getURL怎么用?PHP TitanFramework::getURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TitanFramework的用法示例。


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

示例1: enqueueDatepicker

 /**
  * Enqueues the jQuery UI scripts
  *
  * @return	void
  * @since	1.4
  */
 public function enqueueDatepicker()
 {
     wp_enqueue_script('jquery-ui-core');
     wp_enqueue_script('jquery-ui-slider');
     wp_enqueue_script('jquery-ui-datepicker');
     wp_enqueue_script('tf-jquery-ui-timepicker-addon', TitanFramework::getURL('js/min/jquery-ui-timepicker-addon-min.js', __FILE__), array('jquery-ui-datepicker', 'jquery-ui-slider'));
 }
开发者ID:ahmadawais,项目名称:Titan-Framework,代码行数:13,代码来源:class-option-date.php

示例2: loadUploaderScript

 public function loadUploaderScript()
 {
     wp_enqueue_media();
     wp_enqueue_script('tf-theme-customizer-serialize', TitanFramework::getURL('js/serialize.js', __FILE__));
     wp_enqueue_style('tf-admin-theme-customizer-styles', TitanFramework::getURL('css/admin-theme-customizer-styles.css', __FILE__));
     wp_enqueue_style('tf-font-awesome', TitanFramework::getURL('css/font-awesome/css/font-awesome.min.css', __FILE__));
 }
开发者ID:JDjimenezdelgado,项目名称:old-mmexperience,代码行数:7,代码来源:class-theme-customizer-section.php

示例3: loadUploaderScript

 public function loadUploaderScript()
 {
     wp_enqueue_media();
     wp_enqueue_script('tf-theme-customizer-admin', TitanFramework::getURL('js/admin.js', __FILE__));
     wp_enqueue_style('tf-admin-theme-customizer-styles', TitanFramework::getURL('css/admin.css', __FILE__));
     wp_enqueue_script('tf-theme-customizer-jquery.fileDownload', TitanFramework::getURL('js/jquery.fileDownload.js', __FILE__));
     wp_enqueue_script('tf-theme-customizer-serialize', TitanFramework::getURL('js/serialize.js', __FILE__));
     wp_enqueue_style('tf-admin-theme-customizer-styles', TitanFramework::getURL('css/admin-theme-customizer-styles.css', __FILE__));
 }
开发者ID:vinhnq1211,项目名称:funy,代码行数:9,代码来源:thim-class-customizer-section.php

示例4: loadUploaderScript

 public function loadUploaderScript()
 {
     wp_enqueue_media();
     wp_enqueue_script('tf-theme-customizer-serialize', TitanFramework::getURL('../js/min/serialize-min.js', __FILE__));
     wp_enqueue_style('tf-admin-theme-customizer-styles', TitanFramework::getURL('../css/admin-theme-customizer-styles.css', __FILE__));
 }
开发者ID:spgandhi,项目名称:daiict-hmc,代码行数:6,代码来源:class-customizer.php

示例5: loadAdminScripts

 /**
  * Loads the ACE library for displaying our syntax highlighted code editor
  *
  * @return	void
  * @since	1.3
  */
 public function loadAdminScripts()
 {
     wp_enqueue_script('tf-ace', TitanFramework::getURL('js/ace-min-noconflict/ace.js', __FILE__));
     wp_enqueue_script('tf-ace-theme-' . $this->settings['theme'], TitanFramework::getURL('js/ace-min-noconflict/theme-' . $this->settings['theme'] . '.js', __FILE__));
     wp_enqueue_script('tf-ace-mode-' . $this->settings['lang'], TitanFramework::getURL('js/ace-min-noconflict/mode-' . $this->settings['lang'] . '.js', __FILE__));
 }
开发者ID:vinhnq1211,项目名称:funy,代码行数:12,代码来源:class-option-code.php

示例6: loadAdminScripts

 public function loadAdminScripts()
 {
     wp_enqueue_media();
     wp_enqueue_script('tf-serialize', TitanFramework::getURL('js/serialize.js', __FILE__));
     wp_enqueue_script('tf-styling', TitanFramework::getURL('js/admin-styling.js', __FILE__));
     wp_enqueue_style('tf-admin-styles', TitanFramework::getURL('css/admin-styles.css', __FILE__));
     wp_enqueue_style('tf-font-awesome', TitanFramework::getURL('css/font-awesome/css/font-awesome.min.css', __FILE__));
 }
开发者ID:JDjimenezdelgado,项目名称:old-mmexperience,代码行数:8,代码来源:class-titan-framework.php

示例7: createFontScript


//.........这里部分代码省略.........

				// Update save field on change
				$(this).find('select,.tf-font-sel-dark').change(function() {
					tf_select_font_update_preview( $(this).parents('.tf-font:eq(0)'), true );
				});

				// Trigger for toggling light/dark preview backgrounds
				$(this).find('.btn-dark').click(function() {
					var darkInput = $(this).parent().find('.tf-font-sel-dark');
					if ( darkInput.val() == '' ) {
						darkInput.val('dark').trigger('change');
					} else {
						darkInput.val('').trigger('change');
					}
				})

				// initialize preview
				tf_select_font_update_preview( $(this), true );

				// We have to do this after 1ms for the theme customizer, or else the field's value
				// gets changed to a weird value
				var $this = $(this);
				setTimeout( function() {
					tf_select_font_update_preview( $this, false )
				}, 1 );
			});

			$('body.wp-customizer').on('click', function(e) {
				$('.tf-font .wp-color-result').each(function() {
					if ( $(this).hasClass('wp-picker-open') ) {
						$(this).parents('label:eq(0)').addClass('tf-picker-open');
					} else {
						if ( $(this).parents('label:eq(0)').hasClass('tf-picker-open') ) {
							$(this).parents('label:eq(0)').removeClass('tf-picker-open');
						}
					}
				});
			});
		});


		// Updates the option elements
		function tf_select_font_update_preview( $container, doTrigger ) {
			"use strict";
			var $ = jQuery;

			// Show / hide shadow fields
			if ( $container.find(".tf-font-sel-location").val() == 'none'
				 || $container.find('.tf-font-sel-location').parents('label:eq(0)').attr('data-visible') == 'false' ) {
				$container.find(".tf-font-sel-distance").parents('label:eq(0)').fadeOut();
				$container.find(".tf-font-sel-blur").parents('label:eq(0)').fadeOut();
				$container.find(".tf-font-sel-shadow-color").parents('label:eq(0)').fadeOut();
				$container.find(".tf-font-sel-opacity").parents('label:eq(0)').fadeOut();
			} else {
				$container.find(".tf-font-sel-distance").parents('label:eq(0)').fadeIn();
				$container.find(".tf-font-sel-blur").parents('label:eq(0)').fadeIn();
				$container.find(".tf-font-sel-shadow-color").parents('label:eq(0)').fadeIn();
				$container.find(".tf-font-sel-opacity").parents('label:eq(0)').fadeIn();
			}

			var family = $container.find('.tf-font-sel-family').val();

			// These are all our parameters
			var params = {
				'font-family': family,
				'font-type': $container.find(".tf-font-sel-family option[value='" + family + "']").parent().attr('class'),
				'color': $container.find(".tf-font-sel-color").val(),
				'font-size': $container.find(".tf-font-sel-size").val(),
				'font-weight': $container.find(".tf-font-sel-weight").val(),
				'font-style': $container.find(".tf-font-sel-style").val(),
				'line-height': $container.find(".tf-font-sel-height").val(),
				'letter-spacing': $container.find(".tf-font-sel-spacing").val(),
				'text-transform': $container.find(".tf-font-sel-transform").val(),
				'font-variant': $container.find(".tf-font-sel-variant").val(),
				'text-shadow-location': $container.find(".tf-font-sel-location").val(),
				'text-shadow-distance': $container.find(".tf-font-sel-distance").val(),
				'text-shadow-blur': $container.find(".tf-font-sel-blur").val(),
				'text-shadow-color': $container.find(".tf-font-sel-shadow-color").val(),
				'text-shadow-opacity': $container.find(".tf-font-sel-opacity").val(),
				'dark': $container.find(".tf-font-sel-dark").val(),
				'text': $container.find("iframe").attr('data-preview-text')
			}

			// Update preview
			if ( $container.find('iframe').is(':not([data-visible=false])') ) {
				$container.find('iframe').attr('src', '<?php 
        echo TitanFramework::getURL('iframe-font-preview.php?', __FILE__);
        ?>
' + $.param(params) );
			}

			// Update hidden save field
			$container.find('.tf-for-saving').val(serialize(params));
			if ( doTrigger ) {
				$container.find('.tf-for-saving').trigger('change');
			}
		}
		</script>
		<?php 
    }
开发者ID:hasinhayder,项目名称:Titan-Framework,代码行数:101,代码来源:class-option-font.php

示例8: loadAdminScripts

 /**
  * Loads all the admin scripts used by Titan Framework
  *
  * @since 1.0
  *
  * @param string $hook The slug of admin page that called the enqueue.
  *
  * @return void
  */
 public function loadAdminScripts($hook)
 {
     // Get all options panel IDs.
     $panel_ids = array();
     if (!empty($this->mainContainers['admin-page'])) {
         foreach ($this->mainContainers['admin-page'] as $admin_panel) {
             $panel_ids[] = $admin_panel->panelID;
         }
     }
     // Only enqueue scripts if we're on a Titan options page.
     if (in_array($hook, $panel_ids) || !empty($this->mainContainers['meta-box'])) {
         wp_enqueue_media();
         wp_enqueue_script('tf-serialize', TitanFramework::getURL('../js/min/serialize-min.js', __FILE__));
         wp_enqueue_script('tf-styling', TitanFramework::getURL('../js/min/admin-styling-min.js', __FILE__));
         wp_enqueue_style('tf-admin-styles', TitanFramework::getURL('../css/admin-styles.css', __FILE__));
     }
 }
开发者ID:adamg511,项目名称:Titan-Framework,代码行数:26,代码来源:class-titan-framework.php

示例9: loadAdminScripts

 public function loadAdminScripts($hook)
 {
     // Get all options panel IDs
     $panel_ids = array();
     foreach ($this->adminPanels as $admin_panel) {
         $panel_ids[] = $admin_panel->panelID;
     }
     // Only enqueue scripts if we're on a Titan options page
     if (in_array($hook, $panel_ids) || count($this->metaBoxes)) {
         wp_enqueue_media();
         wp_enqueue_script('tf-serialize', TitanFramework::getURL('js/serialize.js', __FILE__));
         wp_enqueue_script('tf-styling', TitanFramework::getURL('js/admin-styling.js', __FILE__));
         wp_enqueue_style('tf-admin-styles', TitanFramework::getURL('css/admin-styles.css', __FILE__));
     }
 }
开发者ID:jason-herndon,项目名称:bas-intranet,代码行数:15,代码来源:class-titan-framework.php

示例10: load_select_scripts

 /**
  * Load the multicheck-selectall script
  *
  * @since 1.11
  * @return void
  */
 public function load_select_scripts()
 {
     wp_enqueue_script('tf-multicheck-select-all', TitanFramework::getURL('../js/multicheck-select-all.js', __FILE__), array('jquery'), TF_VERSION, true);
 }
开发者ID:gambitph,项目名称:titan-framework,代码行数:10,代码来源:class-option-multicheck.php

示例11: enqueueColorPickerScript

 /**
  * Enqueue the colorpicker scripts
  *
  * @since 1.9
  *
  * @return void
  */
 public function enqueueColorPickerScript()
 {
     wp_enqueue_script('wp-color-picker');
     wp_enqueue_style('wp-color-picker');
     wp_enqueue_script('wp-color-picker-alpha', TitanFramework::getURL('../js/min/wp-color-picker-alpha-min.js', __FILE__), array('wp-color-picker'), TF_VERSION);
 }
开发者ID:majick777,项目名称:Titan-Framework,代码行数:13,代码来源:class-option-color.php

示例12: display

    public function display()
    {
        $this->echoOptionHeader(true);
        // set a default value
        $value = $this->getValue();
        if (is_serialized($value)) {
            $value = unserialize($value);
        }
        if ($value == array() || empty($value['name']) || empty($value['variants']) || empty($value['subsets'])) {
            $value = array('name' => 'Open Sans', 'variants' => array('400'), 'subsets' => array('latin'));
        }
        if (self::$firstLoad) {
            self::$firstLoad = false;
            self::createScript();
        }
        $allFonts = titan_get_googlefonts();
        ?>
<select class='tf-select-googlefont'><?php 
        foreach ($allFonts as $key => $fontStuff) {
            printf("<option value='%s' data-subset='%s' data-variants='%s'>%s</option>", esc_attr($key), esc_attr(json_encode($fontStuff['subsets'])), esc_attr(json_encode($fontStuff['variants'])), $fontStuff['name']);
        }
        ?>
</select><?php 
        // preview
        printf("<iframe src='%s'></iframe>", TitanFramework::getURL('iframe-googlefont-preview.php?f=' . $value['name'], __FILE__));
        // select variants
        echo "<p class='description tf-variants'>Choose the styles to include:</p>";
        echo "<fieldset>";
        $allVariants = array('100', '100italic', '200', '200italic', '300', '300italic', '400', 'italic', '500', '500italic', '600', '600italic', '700', '700italic', '800', '800italic', '900', '900italic');
        foreach ($allVariants as $key => $variant) {
            printf("<label style='display: none'><input type='checkbox' class='variant' data-variant='%s'/> %s</label>", esc_attr($variant), self::getVariantName($variant));
        }
        echo "</fieldset>";
        // select charsets
        echo "<p class='description tf-subsets'>Choose the subsets to include:</p>";
        echo "<fieldset>";
        $allSubsets = array("latin", "latin-ext", "greek", "vietnamese", "cyrillic", "cyrillic-ext", "khmer", "greek-ext");
        foreach ($allSubsets as $key => $subset) {
            printf("<label style='display: none'><input type='checkbox' class='subset' data-subset='%s'/> %s</label>", esc_attr($subset), $subset);
        }
        echo "</fieldset>";
        if (!is_serialized($value)) {
            $value = serialize($value);
        }
        printf("<input type='hidden' value='%s' name='%s' class='large-text'/>", esc_attr($value), esc_attr($this->getID()));
        $this->echoOptionFooter(false);
    }
开发者ID:JDjimenezdelgado,项目名称:old-mmexperience,代码行数:47,代码来源:class-option-select-googlefont.php

示例13: addTinyMCEPlugin

 /**
  * Adds the our shortcode drop down plugin to TinyMCE
  *
  * @param 	array $plugins a list of enabled plugins in TinyMCE
  * @return	array TinyMCE plugins
  * @since	1.0
  **/
 public function addTinyMCEPlugin($plugins)
 {
     if (empty($plugins[self::JS_SHORTCODE_VAR])) {
         $plugins[self::JS_SHORTCODE_VAR] = TitanFramework::getURL('admin-shortcodes.js', __FILE__);
     }
     return $plugins;
 }
开发者ID:JDjimenezdelgado,项目名称:old-mmexperience,代码行数:14,代码来源:class-titan-shortcode.php

示例14: createFontScript


//.........这里部分代码省略.........
				// Trigger for toggling light/dark preview backgrounds
				$(this).find('.btn-dark').click(function() {
					var darkInput = $(this).parent().find('.tf-font-sel-dark');
					if ( darkInput.val() == '' ) {
						darkInput.val('dark').trigger('change');
					} else {
						darkInput.val('').trigger('change');
					}
				})

				// initialize preview
				tf_select_font_update_preview( $(this), true );

				// We have to do this after 1ms for the theme customizer, or else the field's value
				// gets changed to a weird value
				var $this = $(this);
				setTimeout( function() {
					tf_select_font_update_preview( $this, false )
				}, 1 );
			});

			$('body.wp-customizer').on('click', function(e) {
				$('.tf-font .wp-color-result').each(function() {
					if ( $(this).hasClass('wp-picker-open') ) {
						$(this).parents('label:eq(0)').addClass('tf-picker-open');
					} else {
						if ( $(this).parents('label:eq(0)').hasClass('tf-picker-open') ) {
							$(this).parents('label:eq(0)').removeClass('tf-picker-open');
						}
					}
				});
			});

			// chosen font
			$(".chosen-select").chosen({
				allow_single_deselect: true,
				width: '60%'
			});
		});


		// Updates the option elements
		function tf_select_font_update_preview( $container, doTrigger ) {
			"use strict";
			var $ = jQuery;

			// Show / hide shadow fields
			if ( $container.find(".tf-font-sel-location").val() == 'none'
				 || $container.find('.tf-font-sel-location').parents('label:eq(0)').attr('data-visible') == 'false' ) {
				$container.find(".tf-font-sel-distance").parents('label:eq(0)').fadeOut();
				$container.find(".tf-font-sel-blur").parents('label:eq(0)').fadeOut();
				$container.find(".tf-font-sel-shadow-color").parents('label:eq(0)').fadeOut();
				$container.find(".tf-font-sel-opacity").parents('label:eq(0)').fadeOut();
			} else {
				$container.find(".tf-font-sel-distance").parents('label:eq(0)').fadeIn();
				$container.find(".tf-font-sel-blur").parents('label:eq(0)').fadeIn();
				$container.find(".tf-font-sel-shadow-color").parents('label:eq(0)').fadeIn();
				$container.find(".tf-font-sel-opacity").parents('label:eq(0)').fadeIn();
			}

			var family = $container.find('.tf-font-sel-family').val();

			// These are all our parameters
			var params = {
				'font-family': family,
				'font-type': $container.find(".tf-font-sel-family option[value='" + family + "']").parent().attr('class'),
				'color-opacity': $container.find(".tf-font-sel-color").val(),
				'font-size': $container.find(".tf-font-sel-size").val(),
				'font-weight': $container.find(".tf-font-sel-weight").val(),
				'font-style': $container.find(".tf-font-sel-style").val(),
				'line-height': $container.find(".tf-font-sel-height").val(),
				'letter-spacing': $container.find(".tf-font-sel-spacing").val(),
				'text-transform': $container.find(".tf-font-sel-transform").val(),
				'font-variant': $container.find(".tf-font-sel-variant").val(),
				'text-shadow-location': $container.find(".tf-font-sel-location").val(),
				'text-shadow-distance': $container.find(".tf-font-sel-distance").val(),
				'text-shadow-blur': $container.find(".tf-font-sel-blur").val(),
				'text-shadow-color': $container.find(".tf-font-sel-shadow-color").val(),
				'text-shadow-opacity': $container.find(".tf-font-sel-opacity").val(),
				'dark': $container.find(".tf-font-sel-dark").val(),
				'text': $container.find("iframe").attr('data-preview-text')
			}

			// Update preview
			if ( $container.find('iframe').is(':not([data-visible=false])') ) {
				$container.find('iframe').attr('src', '<?php 
        echo TitanFramework::getURL('iframe-font-preview.php?', __FILE__);
        ?>
' + $.param(params) );
			}

			// Update hidden save field
			$container.find('.tf-for-saving').val(serialize(params));
			if ( doTrigger ) {
				$container.find('.tf-for-saving').trigger('change');
			}
		}
		</script>
		<?php 
    }
开发者ID:vinhnq1211,项目名称:funy,代码行数:101,代码来源:class-option-font-color.php

示例15: load_select_scripts

 /**
  * Register and load the select2 script
  *
  * @since 1.9.3
  * @return void
  */
 public function load_select_scripts()
 {
     wp_enqueue_script('tf-select2', TitanFramework::getURL('../js/select2/select2.min.js', __FILE__), array('jquery'), TF_VERSION, true);
     wp_enqueue_style('tf-select2-style', TitanFramework::getURL('../css/select2/select2.min.css', __FILE__), null, TF_VERSION, 'all');
     wp_enqueue_style('tf-select-option-style', TitanFramework::getURL('../css/class-option-select.css', __FILE__), null, TF_VERSION, 'all');
 }
开发者ID:gambitph,项目名称:titan-framework,代码行数:12,代码来源:class-option-select.php


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