summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/presentations.php')
-rw-r--r--plugins/jetpack/modules/shortcodes/presentations.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/jetpack/modules/shortcodes/presentations.php b/plugins/jetpack/modules/shortcodes/presentations.php
index 8914b874..c8f27d4b 100644
--- a/plugins/jetpack/modules/shortcodes/presentations.php
+++ b/plugins/jetpack/modules/shortcodes/presentations.php
@@ -53,7 +53,7 @@ use Automattic\Jetpack\Assets;
* properly, however.
* - Exiting fullscreen mode will not properly reset the scroll locations in Safari
*
- * @package Jetpack
+ * @package automattic/jetpack
*/
if ( ! class_exists( 'Presentations' ) ) :
@@ -89,10 +89,10 @@ if ( ! class_exists( 'Presentations' ) ) :
$this->scripts_and_style_included = false;
// Registers shortcodes.
- add_action( 'wp_head', array( &$this, 'add_scripts' ), 1 );
+ add_action( 'wp_head', array( $this, 'add_scripts' ), 1 );
- add_shortcode( 'presentation', array( &$this, 'presentation_shortcode' ) );
- add_shortcode( 'slide', array( &$this, 'slide_shortcode' ) );
+ add_shortcode( 'presentation', array( $this, 'presentation_shortcode' ) );
+ add_shortcode( 'slide', array( $this, 'slide_shortcode' ) );
}
/**
@@ -187,11 +187,11 @@ if ( ! class_exists( 'Presentations' ) ) :
}
if ( '' !== trim( $atts['scale'] ) ) {
- $this->presentation_settings['scale'] = floatval( $atts['scale'] );
+ $this->presentation_settings['scale'] = (float) $atts['scale'];
}
if ( '' !== trim( $atts['rotate'] ) ) {
- $this->presentation_settings['rotate'] = floatval( $atts['rotate'] );
+ $this->presentation_settings['rotate'] = (float) $atts['rotate'];
}
if ( '' !== trim( $atts['fade'] ) ) {
@@ -204,27 +204,27 @@ if ( ! class_exists( 'Presentations' ) ) :
// Set any settings the slides don't care about.
if ( '' !== trim( $atts['duration'] ) ) {
- $duration = floatval( $atts['duration'] ) . 's';
+ $duration = (float) $atts['duration'] . 's';
} else {
$duration = '1s';
}
// Autoplay durations are set in milliseconds.
if ( '' !== trim( $atts['autoplay'] ) ) {
- $autoplay = floatval( $atts['autoplay'] ) * 1000;
+ $autoplay = (float) $atts['autoplay'] * 1000;
} else {
$autoplay = 0;
} // No autoplay
// Set the presentation size as specified or with some nicely sized dimensions.
if ( '' !== trim( $atts['width'] ) ) {
- $this->presentation_settings['width'] = intval( $atts['width'] );
+ $this->presentation_settings['width'] = (int) $atts['width'];
} else {
$this->presentation_settings['width'] = 480;
}
if ( '' !== trim( $atts['height'] ) ) {
- $this->presentation_settings['height'] = intval( $atts['height'] );
+ $this->presentation_settings['height'] = (int) $atts['height'];
} else {
$this->presentation_settings['height'] = 370;
}
@@ -316,7 +316,7 @@ if ( ! class_exists( 'Presentations' ) ) :
if ( '' === trim( $atts['scale'] ) ) {
$scale = 1;
} else {
- $scale = floatval( $atts['scale'] );
+ $scale = (float) $atts['scale'];
}
if ( $scale < 0 ) {
@@ -331,7 +331,7 @@ if ( ! class_exists( 'Presentations' ) ) :
if ( '' === trim( $atts['rotate'] ) ) {
$rotate = 0;
} else {
- $rotate = floatval( $atts['rotate'] );
+ $rotate = (float) $atts['rotate'];
}
// Setting if the content should fade.