|
@@ -21,7 +21,7 @@ discard block |
|
|
block discarded – undo |
|
21
|
21
|
parent::__construct( |
|
22
|
22
|
'podlove_subscribe_button_wp_plugin_widget', |
|
23
|
23
|
( self::is_podlove_publisher_active() ? 'Podlove Subscribe Button (WordPress plugin)' : 'Podlove Subscribe Button' ), |
|
24
|
|
- array( 'description' => __( 'Adds a Podlove Subscribe Button to your Sidebar', 'podlove-subscribe-button' ), ) |
|
|
24
|
+ array( 'description' => __( 'Adds a Podlove Subscribe Button to your Sidebar', 'podlove-subscribe-button' ),) |
|
25
|
25
|
); |
|
26
|
26
|
|
|
27
|
27
|
} |
|
@@ -38,7 +38,7 @@ discard block |
|
|
block discarded – undo |
|
38
|
38
|
public function widget( $args, $instance ) { |
|
39
|
39
|
// Fetch the (network)button by it's name |
|
40
|
40
|
if ( ! $button = \PodloveSubscribeButton\Model\Button::get_button_by_name( $instance[ 'button' ] ) ) { |
|
41
|
|
- return sprintf( __( 'Oops. There is no button with the ID "%s".', 'podlove-subscribe-button' ), $args['button'] ); |
|
|
41
|
+ return sprintf( __( 'Oops. There is no button with the ID "%s".', 'podlove-subscribe-button' ), $args[ 'button' ] ); |
|
42
|
42
|
} |
|
43
|
43
|
|
|
44
|
44
|
echo $args[ 'before_widget' ]; |
|
@@ -61,14 +61,14 @@ discard block |
|
|
block discarded – undo |
|
61
|
61
|
} |
|
62
|
62
|
|
|
63
|
63
|
public function form( $instance ) { |
|
64
|
|
- $title = isset( $instance[ 'title' ] ) ? $instance[ 'title' ] : ''; |
|
65
|
|
- $button = isset( $instance[ 'button' ] ) ? $instance[ 'button' ] : ''; |
|
66
|
|
- $size = isset( $instance[ 'size' ] ) ? $instance[ 'size' ] : 'big'; |
|
67
|
|
- $style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : 'filled'; |
|
68
|
|
- $format = isset( $instance[ 'format' ] ) ? $instance[ 'format' ] : 'cover'; |
|
|
64
|
+ $title = isset( $instance[ 'title' ] ) ? $instance[ 'title' ] : ''; |
|
|
65
|
+ $button = isset( $instance[ 'button' ] ) ? $instance[ 'button' ] : ''; |
|
|
66
|
+ $size = isset( $instance[ 'size' ] ) ? $instance[ 'size' ] : 'big'; |
|
|
67
|
+ $style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : 'filled'; |
|
|
68
|
+ $format = isset( $instance[ 'format' ] ) ? $instance[ 'format' ] : 'cover'; |
|
69
|
69
|
$autowidth = isset( $instance[ 'autowidth' ] ) ? $instance[ 'autowidth' ] : true; |
|
70
|
|
- $infotext = isset( $instance[ 'infotext' ] ) ? $instance[ 'infotext' ] : ''; |
|
71
|
|
- $color = isset( $instance[ 'color' ] ) ? $instance[ 'color' ] : '#75ad91'; |
|
|
70
|
+ $infotext = isset( $instance[ 'infotext' ] ) ? $instance[ 'infotext' ] : ''; |
|
|
71
|
+ $color = isset( $instance[ 'color' ] ) ? $instance[ 'color' ] : '#75ad91'; |
|
72
|
72
|
|
|
73
|
73
|
$buttons = \PodloveSubscribeButton\Model\Button::all(); |
|
74
|
74
|
if ( is_multisite() ) { |