@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | parent::__construct( |
29 | 29 | 'podlove_subscribe_button_wp_plugin_widget', |
30 | 30 | ( Helpers::is_podlove_publisher_active() ? 'Podlove Subscribe Button (WordPress plugin)' : 'Podlove Subscribe Button' ), |
31 | - array( 'description' => __( 'Adds a Podlove Subscribe Button to your Sidebar', 'podlove-subscribe-button' ), ) |
|
31 | + array( 'description' => __( 'Adds a Podlove Subscribe Button to your Sidebar', 'podlove-subscribe-button' ),) |
|
32 | 32 | ); |
33 | 33 | |
34 | 34 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | public function widget( $args, $instance ) { |
37 | 37 | // Fetch the (network)button by it's name |
38 | 38 | if ( ! $button = Model\Button::get_button_by_name( $instance[ 'button' ] ) ) { |
39 | - return sprintf( __( 'Oops. There is no button with the ID "%s".', 'podlove-subscribe-button' ), $args['button'] ); |
|
39 | + return sprintf( __( 'Oops. There is no button with the ID "%s".', 'podlove-subscribe-button' ), $args[ 'button' ] ); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | echo $args[ 'before_widget' ]; |
@@ -62,15 +62,15 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | public function form( $instance ) { |
65 | - $title = isset( $instance[ 'title' ] ) ? $instance[ 'title' ] : ''; |
|
66 | - $button = isset( $instance[ 'button' ] ) ? $instance[ 'button' ] : ''; |
|
67 | - $size = isset( $instance[ 'size' ] ) ? $instance[ 'size' ] : 'big'; |
|
68 | - $style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : 'filled'; |
|
69 | - $format = isset( $instance[ 'format' ] ) ? $instance[ 'format' ] : 'cover'; |
|
65 | + $title = isset( $instance[ 'title' ] ) ? $instance[ 'title' ] : ''; |
|
66 | + $button = isset( $instance[ 'button' ] ) ? $instance[ 'button' ] : ''; |
|
67 | + $size = isset( $instance[ 'size' ] ) ? $instance[ 'size' ] : 'big'; |
|
68 | + $style = isset( $instance[ 'style' ] ) ? $instance[ 'style' ] : 'filled'; |
|
69 | + $format = isset( $instance[ 'format' ] ) ? $instance[ 'format' ] : 'cover'; |
|
70 | 70 | $autowidth = isset( $instance[ 'autowidth' ] ) ? $instance[ 'autowidth' ] : true; |
71 | - $infotext = isset( $instance[ 'infotext' ] ) ? $instance[ 'infotext' ] : ''; |
|
72 | - $color = isset( $instance[ 'color' ] ) ? $instance[ 'color' ] : '#75ad91'; |
|
73 | - $language = isset( $instance[ 'language' ] ) ? $instance[ 'language' ] : Defaults::options()['language']; |
|
71 | + $infotext = isset( $instance[ 'infotext' ] ) ? $instance[ 'infotext' ] : ''; |
|
72 | + $color = isset( $instance[ 'color' ] ) ? $instance[ 'color' ] : '#75ad91'; |
|
73 | + $language = isset( $instance[ 'language' ] ) ? $instance[ 'language' ] : Defaults::options()[ 'language' ]; |
|
74 | 74 | |
75 | 75 | $buttons = \PodloveSubscribeButton\Model\Button::all(); |
76 | 76 | if ( is_multisite() ) { |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | if ( $network_wide ) { |
18 | 18 | Model\NetworkButton::build(); |
19 | - set_time_limit(0); // may take a while, depending on network size |
|
19 | + set_time_limit( 0 ); // may take a while, depending on network size |
|
20 | 20 | $blogids = $wpdb->get_col( "SELECT blog_id FROM " . $wpdb->blogs ); |
21 | 21 | foreach ( $blogids as $blog_id ) { |
22 | 22 | switch_to_blog( $blog_id ); |
@@ -97,19 +97,19 @@ |
||
97 | 97 | */ |
98 | 98 | private function get_feeds_as_array( $feeds = array() ) { |
99 | 99 | foreach ( $feeds as $feed ) { |
100 | - if ( isset( Defaults::media_types()[ $feed['format'] ]['extension'] ) ) { |
|
100 | + if ( isset( Defaults::media_types()[ $feed[ 'format' ] ][ 'extension' ] ) ) { |
|
101 | 101 | $new_feed = array( |
102 | 102 | 'type' => 'audio', |
103 | - 'format' => Defaults::media_types()[ $feed['format'] ]['extension'], |
|
104 | - 'url' => $feed['url'], |
|
103 | + 'format' => Defaults::media_types()[ $feed[ 'format' ] ][ 'extension' ], |
|
104 | + 'url' => $feed[ 'url' ], |
|
105 | 105 | 'variant' => 'high', |
106 | 106 | ); |
107 | 107 | |
108 | - if ( isset( $feed['itunesfeedid'] ) && $feed['itunesfeedid'] > 0 ) { |
|
109 | - $new_feed['directory-url-itunes'] = "https://itunes.apple.com/podcast/id" . $feed['itunesfeedid']; |
|
108 | + if ( isset( $feed[ 'itunesfeedid' ] ) && $feed[ 'itunesfeedid' ] > 0 ) { |
|
109 | + $new_feed[ 'directory-url-itunes' ] = "https://itunes.apple.com/podcast/id" . $feed[ 'itunesfeedid' ]; |
|
110 | 110 | } |
111 | 111 | |
112 | - $feeds[] = $new_feed; |
|
112 | + $feeds[ ] = $new_feed; |
|
113 | 113 | |
114 | 114 | } |
115 | 115 | } |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | // Version control |
39 | 39 | require( 'version.php' ); |
40 | 40 | |
41 | -register_activation_hook( __FILE__, array( 'PodloveSubscribeButton\Setup', 'activation' ) ); |
|
41 | +register_activation_hook( __FILE__, array( 'PodloveSubscribeButton\Setup', 'activation' ) ); |
|
42 | 42 | register_deactivation_hook( __FILE__, array( 'PodloveSubscribeButton\Setup', 'deactivation' ) ); |
43 | -register_uninstall_hook( __FILE__, array( 'PodloveSubscribeButton\Setup', 'uninstall' ) ); |
|
43 | +register_uninstall_hook( __FILE__, array( 'PodloveSubscribeButton\Setup', 'uninstall' ) ); |
|
44 | 44 | |
45 | 45 | PodloveSubscribeButton::run(); |
46 | 46 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | // CSS Stylesheet |
91 | - wp_register_style( 'podlove-subscribe-button', \PodloveSubscribeButton\Helpers::get_url( '' ) . 'css/style.css' , false, self::$version ); |
|
91 | + wp_register_style( 'podlove-subscribe-button', \PodloveSubscribeButton\Helpers::get_url( '' ) . 'css/style.css', false, self::$version ); |
|
92 | 92 | wp_enqueue_style( 'podlove-subscribe-button' ); |
93 | 93 | |
94 | 94 | // Admin JS |