string(4419) "// Source: https://shibashake.com/wordpress-theme/create-pop-up-windows-in-your-wordpress-blog-with-thickbox
add_action('init', 'init_theme_method');
function init_theme_method() {
add_thickbox();
}
function debug_to_console( $data ) {
$output = '';
// new and smaller version, easier to maintain
$output .= 'console.info( \'Debug in Console via Debug Objects Plugin:\' );';
$output .= 'console.log(' . json_encode( $data ) . ');';
echo $output;
}
function _admin_see_all_send () {
echo 'POST: '; foreach ($_POST as $name => $value) { echo $name .': '. $value .', '; } echo '
';
echo 'SESSION: '; foreach ($_SESSION as $name => $value) { echo $name .': '. $value .', '; } echo '
';
echo 'GET: '; foreach ($_GET as $name => $value) { echo $name .': '. $value .', '; } echo '
';
}
function isMobileDevice(){
$aMobileUA = array(
'/iphone/i' => 'iPhone',
'/ipod/i' => 'iPod',
'/ipad/i' => 'iPad',
'/android/i' => 'Android',
'/blackberry/i' => 'BlackBerry',
'/webos/i' => 'Mobile'
);
//Return true if Mobile User Agent is detected
foreach($aMobileUA as $sMobileKey => $sMobileOS){
if(preg_match($sMobileKey, $_SERVER['HTTP_USER_AGENT'])){
return true;
}
}
//Otherwise return false..
return false;
}
/* Sort Snippets bei name */
add_filter( 'code_snippets/list_table/default_orderby', function ( $orderby ) {
return 'name';
} );
/* PHP in Post & Page */
/*function php_execute($html){
if(strpos($html,"<"."?php")!==false){ ob_start(); eval("?".">".$html);
$html=ob_get_contents();
ob_end_clean();
}
return $html;
}
add_filter('widget_text','php_execute',100);*/
/*function bootstrap_jquery_scripts() {
// Register the script
wp_register_script( 'my-script', get_template_directory_uri() . '/bootstrap/js/bootstrap.js', array( 'jquery' ) );
// Enqueue the script:
wp_enqueue_script( 'my-script' );
}
add_action( 'wp_enqueue_scripts', 'bootstrap_jquery_scripts' );
function register()
{
// wp_deregister_script('jquery');
wp_register_script('myjquery', ('https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'), false, '3.2.1');
wp_enqueue_script('myjquery');
wp_deregister_script('jquery-ui');
wp_register_script('myjquery-ui', ('http://ajax.aspnetcdn.com/ajax/jquery.ui/1.11.4/jquery-ui.js'), false, '1.11.4');
wp_enqueue_script('myjquery-ui');
}
add_action( 'wp_enqueue_scripts', 'register' );
/* jQuery UI Load to Wordpress correctly
-------------------------------------------
function load_JQuislider(){
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-ui-slider');
//Enqueue the jQuery UI theme css file from google:
$wp_scripts = wp_scripts();
wp_enqueue_style(
'jquery-ui-theme-smoothness', //select ui theme: base...
sprintf(
'https://ajax.googleapis.com/ajax/libs/jqueryui/%s/themes/smoothness/jquery-ui.css',
$wp_scripts->registered['jquery-ui-core']->ver
)
);
}
add_action('wp_enqueue_scripts', 'load_JQuislider');
/* Load jQuery */
/*function load_jquery_ui() {
global $wp_scripts;
// get registered script object for jquery-ui
$ui = $wp_scripts->query('jquery-ui-core');
// tell WordPress to load jQuery UI tabs
wp_enqueue_script('jquery-ui-tabs');
// tell WordPress to load the Smoothness theme from Google CDN
$protocol = is_ssl() ? 'https' : 'http';
$url = "$protocol://ajax.googleapis.com/ajax/libs/jqueryui/{$ui->ver}/themes/smoothness/jquery-ui.min.css";
wp_enqueue_style('jquery-ui-smoothness', $url, false, null);
}
add_action('init', 'load_jquery_ui');
*/
// enqueue tabs script
/*function my_scripts_tabs() {
if ( !is_admin() ) {
wp_enqueue_script('jquery-ui-tabs');
wp_enqueue_script( 'custom-tabs', get_stylesheet_directory_uri() . '/assets/js/tabs.js', array('jquery'));
}
}
add_action('wp_enqueue_scripts', 'my_scripts_tabs');
$wp_scripts = wp_scripts();
wp_enqueue_style('plugin_name-admin-ui-css',
'https://ajax.googleapis.com/ajax/libs/jqueryui/' . $wp_scripts->registered['jquery-ui-core']->ver . '/themes/' . $pluginOptions['jquery_ui_theme'] . '/jquery-ui.css',
false,
PLUGIN_VERSION,
false);
"
Parse error: Unterminated comment starting line 124 in /var/www/vhosts/archiv.global/de.archiv.global/web/app/plugins/code-snippets/php/snippet-ops.php(471) : eval()'d code on line 124