Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class awempire extends WP_Widget {
- public function __construct() {
- // Instantiate the parent object
- parent::__construct(
- 'awempire',
- 'SD8 AWEmpire',
- array(
- 'description' => 'AWEmpire ads'
- )
- );
- }
- public function widget( $args, $instance ) {
- echo $args['before_widget'];
- echo '<p>This is some text in a widget which won\'t show if WPML is activated.</p>';
- echo $args['after_widget'];
- }
- }
- function my_theme_enqueue_styles() {
- wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
- }
- add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
- function sd_register_widgets() {
- register_widget( 'awempire' );
- }
- add_action( 'widgets_init', 'sd_register_widgets' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement