本文整理汇总了PHP中TitanFramework::getAllInstances方法的典型用法代码示例。如果您正苦于以下问题:PHP TitanFramework::getAllInstances方法的具体用法?PHP TitanFramework::getAllInstances怎么用?PHP TitanFramework::getAllInstances使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TitanFramework
的用法示例。
在下文中一共展示了TitanFramework::getAllInstances方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ajaxGenerateCustomizerCSS
/**
* Ajax handler for generating CSS based on the existing options with values changed to
* match the customizer modified values.
*
* @since 1.9.2
*
* @return void
*/
public function ajaxGenerateCustomizerCSS()
{
// This value is passed back to the live preview ajax handler in $this->livePreviewMainScript()
$generated = array('css' => '');
foreach (TitanFramework::getAllInstances() as $framework) {
// Modify the values of the options for the generation of CSS with the values from the customizer $_POST.
$namespace = $framework->optionNamespace;
add_filter("tf_pre_get_value_{$namespace}", array($this, 'useCustomizerModifiedValue'), 10, 3);
// Generate our new CSS based on the customizer values
$css = $framework->cssInstance->generateCSS();
$generated['css'] .= $css;
/**
* Allow options to add customizer live preview parameters. The tf_generate_customizer_preview_js hook allows for manipulating these values.
*
* @since 1.9.2
*
* @see tf_generate_customizer_preview_js
*/
$generated = apply_filters("tf_generate_customizer_preview_css_{$namespace}", $generated);
}
wp_send_json_success($generated);
}