'method_name',
'wp_head' => array(
'function_to_add' => 'inline_css',
'priority' => PHP_INT_MAX - 100,
),
'wp_print_footer_scripts' => array(
'function_to_add' => 'inline_javascript',
'priority' => PHP_INT_MAX - 100,
),
);
}
/**
* Minify object
*
* @var Minify
*/
protected $minify;
/**
* Constructor
*
* @param string $value [description]
* @return string [description]
*/
public function __construct( Minify $minify ) {
$this->minify = $minify;
}
/**
* Print inline script in footer after all and before shotdown hook.
*
* @todo Creare un sistema che appenda regolarmente dopo gli script
* e tenga presente delle dipendenze da jquery
*/
public function inline_javascript() {
$script = apply_filters( 'italystrap_custom_inline_script', Inline_Script::get() );
if ( ! $script ) {
return;
}
printf(
'',
// strip_tags( $this->minify->js( $script ) )
$this->minify->js( $script )
);
}
/**
* Print inline script in footer after all and before shotdown hook.
*
* @todo Creare un sistema che appenda regolarmente dopo gli script
* e tenga presente delle dipendenze da jquery
*/
public function inline_json() {
$script = apply_filters( 'italystrap_custom_inline_script', Inline_Script::get() );
if ( ! $script ) {
return;
}
// "' . "\n"
printf(
'',
// strip_tags( $this->minify->js( $script ) )
$this->minify->js( $script )
);
}
/**
* Print inline css.
*/
public function inline_css() {
$css = apply_filters( 'italystrap_custom_inline_style', Inline_Style::get() );
if ( empty( $css ) ) {
return;
}
printf(
'',
strip_tags( $this->minify->css( $css ) )
);
}
}