This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error_reporting(E_ALL); ini_set(‘display_errors’,1); | |
define(‘WP_DEBUG’, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE text/javascript | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE image/x-icon | |
AddOutputFilterByType DEFLATE image/svg+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.site-content-contain { | |
background-color: #d5ffa0; | |
position: relative; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type='text/javascript' src='http://hostinger-tutorials.com/wp-includes/js/jquery/jquery.js'></script> | |
<script type='text/javascript' src='http://hostinger-tutorials.com/wp-includes/js/jquery/jquery-migrate.min.js'></script> | |
<link rel='https://api.w.org/' href='http://hostinger-tutorials.com/wp-json/' /> | |
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://hostinger-tutorials.com/xmlrpc.php?rsd" /> | |
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://hostinger-tutorials.com/wp-includes/wlwmanifest.xml" /> | |
<meta name="generator" content="WordPress 4.8" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class hstngr_widget extends WP_Widget { | |
//Insert 4 functions here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class hstngr_widget extends WP_Widget { | |
//Insert functions here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hstngr_register_widget() { | |
register_widget( 'hstngr_widget' ); | |
} | |
add_action( 'widgets_init', 'hstngr_register_widget' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function update( $new_instance, $old_instance ) { | |
$instance = array(); | |
$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : ''; | |
return $instance; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function form( $instance ) { | |
if ( isset( $instance[ 'title' ] ) ) | |
$title = $instance[ 'title' ]; | |
else | |
$title = __( 'Default Title', 'hstngr_widget_domain' ); | |
?> | |
<p> | |
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label> | |
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /> | |
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function widget( $args, $instance ) { | |
$title = apply_filters( 'widget_title', $instance['title'] ); | |
echo $args['before_widget']; | |
//if title is present | |
if ( ! empty( $title ) ) | |
echo $args['before_title'] . $title . $args['after_title']; | |
//output | |
echo __( 'Hello, World from Hostinger.com', 'hstngr_widget_domain' ); | |
echo $args['after_widget']; | |
} |
OlderNewer