HEX
Server: Apache
System: Linux c119.dattaweb.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: c1190199 (57165)
PHP: 7.4.33
Disabled: mail, system, shell, exec, system_exec, shell_exec, mysql_pconnect, passthru, popen, proc_open, proc_close, proc_nice, proc_terminate, proc_get_status, escapeshellarg, escapeshellcmd, eval, dl, imap_mail, libvirt_connect, gnupg_init, unsetenv, apache_setenv, pcntl_exec, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_get_handler, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_getpriority, pcntl_setpriority, pcntl_async_signals, opcache_get_status, opcache_reset, opcache_get_configuration
Upload Files
File: /home/c1190199/public_html/wp-content/wptouch-data/themes/classic-redux/default/functions.php
<?php

add_action( 'wp_enqueue_scripts', 'classic_enqueue_scripts' );
add_filter( 'amp_should_show_featured_image_in_header', 'classic_should_show_thumbnail' );

function classic_enqueue_scripts() {
	wp_enqueue_script(
		'classic-js',
		CLASSIC_URL . '/default/classic.min.js',
		array( 'jquery' ),
		CLASSIC_THEME_VERSION,
		true
	);
}

function classic_should_show_thumbnail() {
	$settings = classic_get_settings();

	switch( $settings->use_thumbnails ) {
		case 'none':
			return false;
		case 'index':
			return is_home();
		case 'index_single':
			return is_home() || is_single();
		case 'all':
			return is_home() || is_single() || is_page() || is_archive() || is_search();
		default:
			// in case we add one at some point
			return false;
	}
}

function classic_should_show_taxonomy() {
	$classic_settings = classic_get_settings();

	if ( $classic_settings->show_taxonomy ) {
		return true;
	} else {
		return false;
	}
}

function classic_should_show_author() {
	$classic_settings = classic_get_settings();

	if ( $classic_settings->show_author ) {
		return true;
	} else {
		return false;
	}
}

function classic_should_show_date() {
	$classic_settings = classic_get_settings();

	if ( $classic_settings->show_date ) {
		return true;
	} else {
		return false;
	}
}

function classic_show_menu_button_text() {
	$classic_settings = classic_get_settings();

	if ( $classic_settings->menu_button_as_text ) {
		return true;
	} else {
		return false;
	}
}

function classic_show_page_titles() {
	$classic_settings = classic_get_settings();

	if ( $classic_settings->show_page_titles ) {
		return true;
	} else {
		return false;
	}
}
// Get URL of first image in a post
function catch_that_image() {
  global $post, $posts;
  $first_img = '';
  ob_start();
  ob_end_clean();
  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
  $first_img = $matches[1][0];

  if(empty($first_img)) {
    $first_img = "https://mysteryplanet.com.ar/blank.jpg";
  }
  return $first_img;
}
function get_fbimage() {
  $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), '', '' );
  if ( has_post_thumbnail($post->ID) ) {
    $fbimage = $src[0];
  } else {
    global $post, $posts;
    $fbimage = '';
    $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i',
    $post->post_content, $matches);
    $fbimage = $matches [1] [0];
  }
  if(empty($fbimage)) {
    $fbimage = "https://mysteryplanet.com.ar/mplogo-fb.jpg";
  }
  return $fbimage;
}

// CROP N' RISIZE:
if ( function_exists( 'add_image_size' ) ) add_theme_support( 'post-thumbnails' );

if ( function_exists( 'add_image_size' ) ) { 
    add_image_size( 'index-thumb', 120, 120, true );
	add_image_size( 'related-thumb', 120, 120, true );
}