@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | height: 42px; |
115 | 115 | } |
116 | 116 | <?php |
117 | - } |
|
117 | + } |
|
118 | 118 | } else { |
119 | 119 | ?> |
120 | 120 | |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | } |
124 | 124 | |
125 | 125 | <?php |
126 | - } |
|
127 | - ?> |
|
126 | + } |
|
127 | + ?> |
|
128 | 128 | </style> |
129 | 129 | <div id="lasso--controls" class="lasso-post-status--<?php echo sanitize_html_class( $status );?> <?php echo sanitize_html_class( $custom_classes );?>" data-post-id="<?php echo get_the_ID();?>" > |
130 | 130 | |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $toolbar_class = $toolbar_headings ? 'toolbar-extended' : false; |
234 | 234 | |
235 | 235 | // mobile styles |
236 | - $mobile_class = $is_mobile ? 'lasso-mobile' : false; |
|
236 | + $mobile_class = $is_mobile ? 'lasso-mobile' : false; |
|
237 | 237 | $mobile_style =$is_mobile ? 'style="bottom:0px;"' : null; |
238 | 238 | |
239 | 239 | //show color |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | |
457 | 457 | //editor options |
458 | 458 | $allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor'); |
459 | - $allow_edit_excerpt = lasso_editor_get_option('allow_edit_excerpt', 'lasso_editor'); |
|
459 | + $allow_edit_excerpt = lasso_editor_get_option('allow_edit_excerpt', 'lasso_editor'); |
|
460 | 460 | $no_url_setting = lasso_editor_get_option('no_url_setting', 'lasso_editor'); |
461 | 461 | |
462 | 462 | // are we singular |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | // do we support pending status |
470 | 470 | $no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor'); |
471 | 471 | |
472 | - $excerpt = $post->post_excerpt; |
|
472 | + $excerpt = $post->post_excerpt; |
|
473 | 473 | |
474 | 474 | ?> |
475 | 475 | <div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>"> |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | }?> |
549 | 549 | <?php |
550 | 550 | if ($allow_change_date) { |
551 | - $dateformat = get_option( 'date_format' ); |
|
551 | + $dateformat = get_option( 'date_format' ); |
|
552 | 552 | ?> |
553 | 553 | <label><?php _e( 'Post Date', 'lasso' ); ?></label> |
554 | 554 | <input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/> |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | if ( !empty( $types ) ) { |
664 | 664 | // get the first element |
665 | 665 | $keys = array_keys($types); |
666 | - $type =$keys[0]; |
|
666 | + $type =$keys[0]; |
|
667 | 667 | $type = preg_replace( '/s\b/','', $type ); |
668 | 668 | printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) ); |
669 | 669 | } |
@@ -691,8 +691,8 @@ discard block |
||
691 | 691 | global $post; |
692 | 692 | |
693 | 693 | global $wp_post_types; |
694 | - $labels = &$wp_post_types['post']->labels; |
|
695 | - $labels->name = 'Articles'; |
|
694 | + $labels = &$wp_post_types['post']->labels; |
|
695 | + $labels->name = 'Articles'; |
|
696 | 696 | |
697 | 697 | ob_start(); |
698 | 698 | |
@@ -835,8 +835,8 @@ discard block |
||
835 | 835 | function lasso_editor_options_blob() { |
836 | 836 | |
837 | 837 | $codes = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : array(); |
838 | - $codes = add_wpimg_options( $codes ); |
|
839 | - $codes = apply_filters( 'lasso_custom_options', $codes ); |
|
838 | + $codes = add_wpimg_options( $codes ); |
|
839 | + $codes = apply_filters( 'lasso_custom_options', $codes ); |
|
840 | 840 | $galleries = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery'; |
841 | 841 | |
842 | 842 | $nonce = wp_create_nonce( 'lasso_gallery' ); |
@@ -938,9 +938,9 @@ discard block |
||
938 | 938 | $return .= '</form>'; |
939 | 939 | |
940 | 940 | // extra JS codes |
941 | - if (isset($shortcode['codes'])) { |
|
942 | - $return .= $shortcode['codes']; |
|
943 | - } |
|
941 | + if (isset($shortcode['codes'])) { |
|
942 | + $return .= $shortcode['codes']; |
|
943 | + } |
|
944 | 944 | $blob[$slug] = $return; |
945 | 945 | } |
946 | 946 | |
@@ -949,59 +949,59 @@ discard block |
||
949 | 949 | |
950 | 950 | |
951 | 951 | function add_wpimg_options( $shortcodes ) { |
952 | - $custom = array( |
|
953 | - 'wpimg' => array( |
|
954 | - 'name' => __( 'Image', 'lasso' ), |
|
955 | - 'type' => 'single', |
|
956 | - 'atts' => array( |
|
957 | - 'img' => array( |
|
958 | - 'type' => 'media_upload', |
|
959 | - 'default' => '', |
|
960 | - 'desc' => __( 'Image URL', 'lasso' ), |
|
961 | - 'tip' => __( 'URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core' ) |
|
962 | - ), |
|
952 | + $custom = array( |
|
953 | + 'wpimg' => array( |
|
954 | + 'name' => __( 'Image', 'lasso' ), |
|
955 | + 'type' => 'single', |
|
956 | + 'atts' => array( |
|
957 | + 'img' => array( |
|
958 | + 'type' => 'media_upload', |
|
959 | + 'default' => '', |
|
960 | + 'desc' => __( 'Image URL', 'lasso' ), |
|
961 | + 'tip' => __( 'URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core' ) |
|
962 | + ), |
|
963 | 963 | |
964 | - 'imgwidth' => array( |
|
965 | - 'type' => 'text_small', |
|
966 | - 'default' => '300px', |
|
967 | - 'desc' => __( 'Image Width', 'lasso' ), |
|
968 | - 'tip' => __( 'Width of the image. You can enter the size in pixels or percentage such as <code>40%</code> or <code>500px</code>.', 'aesop-core' ) |
|
969 | - ), |
|
970 | - 'imgheight' => array( |
|
971 | - 'type' => 'text_small', |
|
972 | - 'default' => '', |
|
973 | - 'desc' => __( 'Image Height', 'lasso' ), |
|
974 | - 'tip' => __( 'Used only for the Panorama mode. Can be set using pixel values such as <code>500px</code>. If unspecified, the original height would be used. ', 'aesop-core' ) |
|
975 | - ), |
|
964 | + 'imgwidth' => array( |
|
965 | + 'type' => 'text_small', |
|
966 | + 'default' => '300px', |
|
967 | + 'desc' => __( 'Image Width', 'lasso' ), |
|
968 | + 'tip' => __( 'Width of the image. You can enter the size in pixels or percentage such as <code>40%</code> or <code>500px</code>.', 'aesop-core' ) |
|
969 | + ), |
|
970 | + 'imgheight' => array( |
|
971 | + 'type' => 'text_small', |
|
972 | + 'default' => '', |
|
973 | + 'desc' => __( 'Image Height', 'lasso' ), |
|
974 | + 'tip' => __( 'Used only for the Panorama mode. Can be set using pixel values such as <code>500px</code>. If unspecified, the original height would be used. ', 'aesop-core' ) |
|
975 | + ), |
|
976 | 976 | |
977 | - 'link' => array( |
|
978 | - 'type' => 'text', |
|
979 | - 'default' => '', |
|
980 | - 'desc' => __( 'Link', 'lasso' ), |
|
981 | - 'tip' => __( 'URL link', 'lasso' ) |
|
982 | - ), |
|
983 | - 'alt' => array( |
|
984 | - 'type' => 'text', |
|
985 | - 'default' => '', |
|
986 | - 'desc' => __( 'Image ALT', 'lasso' ), |
|
987 | - 'tip' => __( 'ALT tag used for the image. Primarily used for SEO purposes.', 'lasso' ) |
|
988 | - ), |
|
977 | + 'link' => array( |
|
978 | + 'type' => 'text', |
|
979 | + 'default' => '', |
|
980 | + 'desc' => __( 'Link', 'lasso' ), |
|
981 | + 'tip' => __( 'URL link', 'lasso' ) |
|
982 | + ), |
|
983 | + 'alt' => array( |
|
984 | + 'type' => 'text', |
|
985 | + 'default' => '', |
|
986 | + 'desc' => __( 'Image ALT', 'lasso' ), |
|
987 | + 'tip' => __( 'ALT tag used for the image. Primarily used for SEO purposes.', 'lasso' ) |
|
988 | + ), |
|
989 | 989 | |
990 | - 'caption' => array( |
|
991 | - 'type' => 'text_area', |
|
992 | - 'default' => '', |
|
993 | - 'desc' => __( 'Caption', 'lasso' ), |
|
994 | - 'tip' => __( 'Optional caption for the image.', 'lasso' ) |
|
995 | - ), |
|
990 | + 'caption' => array( |
|
991 | + 'type' => 'text_area', |
|
992 | + 'default' => '', |
|
993 | + 'desc' => __( 'Caption', 'lasso' ), |
|
994 | + 'tip' => __( 'Optional caption for the image.', 'lasso' ) |
|
995 | + ), |
|
996 | 996 | |
997 | 997 | |
998 | - ), |
|
999 | - 'desc' => __( 'An image.', 'aesop-core' ), |
|
1000 | - 'codes' => '' |
|
1001 | - ) |
|
1002 | - ); |
|
998 | + ), |
|
999 | + 'desc' => __( 'An image.', 'aesop-core' ), |
|
1000 | + 'codes' => '' |
|
1001 | + ) |
|
1002 | + ); |
|
1003 | 1003 | |
1004 | - return array_merge( $shortcodes, $custom ); |
|
1004 | + return array_merge( $shortcodes, $custom ); |
|
1005 | 1005 | } |
1006 | 1006 | |
1007 | 1007 | /** |
@@ -1046,23 +1046,23 @@ discard block |
||
1046 | 1046 | * @return string |
1047 | 1047 | */ |
1048 | 1048 | function lasso_editor_adjustBrightness($hex, $steps) { |
1049 | - $steps = max(-255, min(255, $steps)); |
|
1049 | + $steps = max(-255, min(255, $steps)); |
|
1050 | 1050 | |
1051 | - // Normalize into a six character long hex string |
|
1052 | - $hex = str_replace('#', '', $hex); |
|
1053 | - if (strlen($hex) == 3) { |
|
1054 | - $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2); |
|
1055 | - } |
|
1051 | + // Normalize into a six character long hex string |
|
1052 | + $hex = str_replace('#', '', $hex); |
|
1053 | + if (strlen($hex) == 3) { |
|
1054 | + $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2); |
|
1055 | + } |
|
1056 | 1056 | |
1057 | - // Split into three parts: R, G and B |
|
1058 | - $color_parts = str_split($hex, 2); |
|
1059 | - $return = '#'; |
|
1057 | + // Split into three parts: R, G and B |
|
1058 | + $color_parts = str_split($hex, 2); |
|
1059 | + $return = '#'; |
|
1060 | 1060 | |
1061 | - foreach ($color_parts as $color) { |
|
1062 | - $color = hexdec($color); // Convert to decimal |
|
1063 | - $color = max(0,min(255,$color + $steps)); // Adjust color |
|
1064 | - $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code |
|
1065 | - } |
|
1061 | + foreach ($color_parts as $color) { |
|
1062 | + $color = hexdec($color); // Convert to decimal |
|
1063 | + $color = max(0,min(255,$color + $steps)); // Adjust color |
|
1064 | + $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code |
|
1065 | + } |
|
1066 | 1066 | |
1067 | - return $return; |
|
1067 | + return $return; |
|
1068 | 1068 | } |