50, 'showlabels' => true, 'showcredits' => true, 'animate' => true, 'mode' => 'horizontal', 'leftsrc' => '', 'leftlabel' => '', 'leftcredit' => '', 'rightsrc' => '', 'rightlabel' => '', 'rightcredit' => '', 'width' => '' ), $atts ) ); $out = << EOT; return $out; } static function sciba_add_mce_button() { global $typenow; if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) { return; } if( !in_array( $typenow, array( 'post', 'page' ) ) ) return; if ( 'true' == get_user_option( 'rich_editing' ) ) { add_filter( 'mce_external_plugins', array(__CLASS__, 'sciba_add_tinymce_script') ); add_filter( 'mce_buttons', array(__CLASS__, 'sciba_register_mce_button') ); } } static function sciba_add_admin_css() { echo ''; } static function sciba_add_tinymce_script( $plugin_array ) { $plugin_array['sciba_mce_button'] = SCIBA_PLUGIN_DIR .'/js/sciba-button.js'; return $plugin_array; } static function sciba_register_mce_button( $buttons ) { array_push( $buttons, 'sciba_mce_button' ); return $buttons; } static function sciba_header_localize_scripts() { global $typenow; if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) { return; } if( !in_array( $typenow, array( 'post', 'page' ) ) ) return; wp_register_script( 'sciba-button', SCIBA_PLUGIN_DIR.'/js/sciba-button.js', array('jquery') ); wp_enqueue_script( 'sciba-button' ); wp_localize_script( 'sciba-button', 'l10nSciba', array( 'title' => __( 'Insert shortcode Sciba', 'sciba' ), 'urlImgLeft' => __( 'Link to the image on the left', 'sciba' ), 'labelTextLeft' => __( 'Label left', 'sciba' ), 'urlImgRight' => __( 'Link to the image on the right', 'sciba' ), 'labelTextRight' => __( 'Label right', 'sciba' ), 'modeListbox' => __( 'Mode', 'sciba' ), 'modeHorizontal' => __( 'Horizontal', 'sciba' ), 'modeVertical' => __( 'Vertical ', 'sciba' ), 'selectImage' => __( 'Select Image ', 'sciba' ), 'width' => __( 'Width ', 'sciba' ) ) ); } static function init() { wp_register_script( 'juxtapose', "//s3.amazonaws.com/cdn.knightlab.com/libs/juxtapose/latest/js/juxtapose.js", array( 'jquery' ), '', true ); } static function wp_footer() { if(self::$shortcode_show){ wp_enqueue_style( 'juxtapose', "//s3.amazonaws.com/cdn.knightlab.com/libs/juxtapose/latest/css/juxtapose.css" ); } } } SCIBA::initialize();