@@ -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 | |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | |
241 | 241 | $sc_saving_class = ('on' == $shortcodify_disabled || $ase_status == 'ase-not-active') ? 'shortcodify-disabled' : 'shortcodify-enabled'; |
242 | 242 | |
243 | - $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off'); |
|
243 | + $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off'); |
|
244 | 244 | |
245 | 245 | ?> |
246 | 246 | <div class="lasso--text-popup lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>" style="display:none;"> |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | function lasso_editor_text_toolbar() { |
299 | 299 | |
300 | 300 | ob_start(); |
301 | - $text_select_popup = lasso_editor_get_option('text_select_popup', 'lasso_editor', false); |
|
301 | + $text_select_popup = lasso_editor_get_option('text_select_popup', 'lasso_editor', false); |
|
302 | 302 | |
303 | 303 | |
304 | 304 | $is_mobile = wp_is_mobile(); |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $toolbar_class = $toolbar_headings ? 'toolbar-extended' : false; |
318 | 318 | |
319 | 319 | // mobile styles |
320 | - $mobile_class = $is_mobile ? 'lasso-mobile' : false; |
|
320 | + $mobile_class = $is_mobile ? 'lasso-mobile' : false; |
|
321 | 321 | $mobile_style =$is_mobile ? 'style="bottom:0px;"' : null; |
322 | 322 | |
323 | 323 | //show color |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | |
333 | 333 | $sc_saving_class = ('on' == $shortcodify_disabled || $ase_status == 'ase-not-active') ? 'shortcodify-disabled' : 'shortcodify-enabled'; |
334 | 334 | |
335 | - $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off'); |
|
335 | + $use_wp_block_image = lasso_editor_get_option('use_wp_block_image', 'lasso_editor','off'); |
|
336 | 336 | |
337 | 337 | ?> |
338 | 338 | <div class="lasso--toolbar_wrap lasso-editor-controls--wrap <?php echo $toolbar_class.' '.$mobile_class.' '.$ase_status.' '.sanitize_html_class( $custom_classes );?>" <?php echo $mobile_style ?>> |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | |
557 | 557 | //editor options |
558 | 558 | $allow_change_date = lasso_editor_get_option('allow_change_date', 'lasso_editor'); |
559 | - $allow_edit_excerpt = lasso_editor_get_option('allow_edit_excerpt', 'lasso_editor'); |
|
559 | + $allow_edit_excerpt = lasso_editor_get_option('allow_edit_excerpt', 'lasso_editor'); |
|
560 | 560 | $no_url_setting = lasso_editor_get_option('no_url_setting', 'lasso_editor'); |
561 | 561 | $support_custom_taxonomy = lasso_editor_get_option( 'support_custom_taxonomy', 'lasso_editor' ); |
562 | 562 | |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | // do we support pending status |
578 | 578 | $no_pending_status = lasso_editor_get_option('no_pending_status', 'lasso_editor'); |
579 | 579 | |
580 | - $excerpt = $post->post_excerpt; |
|
580 | + $excerpt = $post->post_excerpt; |
|
581 | 581 | |
582 | 582 | ?> |
583 | 583 | <div id="lasso--post-settings__modal" class="lasso--modal lassoShowAnimate <?php echo sanitize_html_class( $custom_classes );?>"> |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | }?> |
675 | 675 | <?php |
676 | 676 | if ($allow_change_date) { |
677 | - $dateformat = get_option( 'date_format' ); |
|
677 | + $dateformat = get_option( 'date_format' ); |
|
678 | 678 | ?> |
679 | 679 | <label><?php _e( 'Post Date', 'lasso' ); ?></label> |
680 | 680 | <input type="text" class="editus_custom_date" name="post_date" value="<?php echo get_the_time($dateformat, $postid);?>"/> |
@@ -768,8 +768,8 @@ discard block |
||
768 | 768 | $types = lasso_post_types_names(); |
769 | 769 | if ( !empty( $types ) ) { |
770 | 770 | foreach( $types as $name => $label ) |
771 | - { |
|
772 | - $type = $name; |
|
771 | + { |
|
772 | + $type = $name; |
|
773 | 773 | //$type = preg_replace( '/s\b/','', $name ); |
774 | 774 | if ($type == 'page' && !current_user_can('edit_pages')) { |
775 | 775 | continue; |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | if ( !empty( $types ) ) { |
792 | 792 | // get the first element |
793 | 793 | $keys = array_keys($types); |
794 | - $type =$keys[0]; |
|
794 | + $type =$keys[0]; |
|
795 | 795 | //$type = preg_replace( '/s\b/','', $type ); |
796 | 796 | printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) ); |
797 | 797 | } |
@@ -819,8 +819,8 @@ discard block |
||
819 | 819 | global $post; |
820 | 820 | |
821 | 821 | global $wp_post_types; |
822 | - $labels = &$wp_post_types['post']->labels; |
|
823 | - $labels->name = 'Articles'; |
|
822 | + $labels = &$wp_post_types['post']->labels; |
|
823 | + $labels->name = 'Articles'; |
|
824 | 824 | |
825 | 825 | ob_start(); |
826 | 826 | |
@@ -880,7 +880,7 @@ discard block |
||
880 | 880 | ob_start(); |
881 | 881 | |
882 | 882 | |
883 | - $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off'); |
|
883 | + $use_old_wpimg = lasso_editor_get_option('use_old_wpimg', 'lasso_editor','off'); |
|
884 | 884 | |
885 | 885 | // let users add custom css classes |
886 | 886 | $custom_classes = apply_filters( 'lasso_wpimg_classes', '' ); |
@@ -982,10 +982,10 @@ discard block |
||
982 | 982 | function lasso_editor_options_blob() { |
983 | 983 | |
984 | 984 | $codes = function_exists( 'aesop_shortcodes' ) ? aesop_shortcodes() : array(); |
985 | - $codes = add_wpimg_options( $codes ); |
|
985 | + $codes = add_wpimg_options( $codes ); |
|
986 | 986 | $codes = add_wpimg_block_options( $codes ); |
987 | 987 | $codes = add_wpcover_block_options( $codes ); |
988 | - $codes = apply_filters( 'lasso_custom_options', $codes ); |
|
988 | + $codes = apply_filters( 'lasso_custom_options', $codes ); |
|
989 | 989 | $galleries = function_exists( 'lasso_editor_galleries_exist' ) && lasso_editor_galleries_exist() ? 'has-galleries' : 'creating-gallery'; |
990 | 990 | |
991 | 991 | $nonce = wp_create_nonce( 'lasso_gallery' ); |
@@ -1087,9 +1087,9 @@ discard block |
||
1087 | 1087 | $return .= '</form>'; |
1088 | 1088 | |
1089 | 1089 | // extra JS codes |
1090 | - if (isset($shortcode['codes'])) { |
|
1091 | - $return .= $shortcode['codes']; |
|
1092 | - } |
|
1090 | + if (isset($shortcode['codes'])) { |
|
1091 | + $return .= $shortcode['codes']; |
|
1092 | + } |
|
1093 | 1093 | $blob[$slug] = $return; |
1094 | 1094 | } |
1095 | 1095 | |
@@ -1098,95 +1098,95 @@ discard block |
||
1098 | 1098 | |
1099 | 1099 | |
1100 | 1100 | function add_wpimg_options( $shortcodes ) { |
1101 | - $custom = array( |
|
1102 | - 'wpimg' => array( |
|
1103 | - 'name' => __( 'Image', 'lasso' ), |
|
1104 | - 'type' => 'single', |
|
1105 | - 'atts' => array( |
|
1106 | - 'img' => array( |
|
1107 | - 'type' => 'media_upload', |
|
1108 | - 'default' => '', |
|
1109 | - 'desc' => __( 'Image URL', 'lasso' ), |
|
1110 | - 'tip' => __( 'URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core' ) |
|
1111 | - ), |
|
1112 | - 'align' => array( |
|
1113 | - 'type' => 'select', |
|
1114 | - 'values' => array( |
|
1115 | - array( |
|
1116 | - 'value' => 'center', |
|
1117 | - 'name' => __( 'Center', 'aesop-core' ) |
|
1118 | - ), |
|
1119 | - array( |
|
1120 | - 'value' => 'left', |
|
1121 | - 'name' => __( 'Left', 'aesop-core' ) |
|
1122 | - ), |
|
1123 | - array( |
|
1124 | - 'value' => 'right', |
|
1125 | - 'name' => __( 'Right', 'aesop-core' ) |
|
1126 | - ), |
|
1127 | - ), |
|
1128 | - 'default' => 'center', |
|
1129 | - 'desc' => __( 'Alignment', 'lasso' ), |
|
1130 | - 'tip'=>'' |
|
1131 | - ), |
|
1101 | + $custom = array( |
|
1102 | + 'wpimg' => array( |
|
1103 | + 'name' => __( 'Image', 'lasso' ), |
|
1104 | + 'type' => 'single', |
|
1105 | + 'atts' => array( |
|
1106 | + 'img' => array( |
|
1107 | + 'type' => 'media_upload', |
|
1108 | + 'default' => '', |
|
1109 | + 'desc' => __( 'Image URL', 'lasso' ), |
|
1110 | + 'tip' => __( 'URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core' ) |
|
1111 | + ), |
|
1112 | + 'align' => array( |
|
1113 | + 'type' => 'select', |
|
1114 | + 'values' => array( |
|
1115 | + array( |
|
1116 | + 'value' => 'center', |
|
1117 | + 'name' => __( 'Center', 'aesop-core' ) |
|
1118 | + ), |
|
1119 | + array( |
|
1120 | + 'value' => 'left', |
|
1121 | + 'name' => __( 'Left', 'aesop-core' ) |
|
1122 | + ), |
|
1123 | + array( |
|
1124 | + 'value' => 'right', |
|
1125 | + 'name' => __( 'Right', 'aesop-core' ) |
|
1126 | + ), |
|
1127 | + ), |
|
1128 | + 'default' => 'center', |
|
1129 | + 'desc' => __( 'Alignment', 'lasso' ), |
|
1130 | + 'tip'=>'' |
|
1131 | + ), |
|
1132 | 1132 | |
1133 | - 'imgwidth' => array( |
|
1134 | - 'type' => 'text_small', |
|
1135 | - 'default' => '300px', |
|
1136 | - 'desc' => __( 'Image Width', 'lasso' ), |
|
1137 | - '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' ) |
|
1138 | - ), |
|
1139 | - 'imgheight' => array( |
|
1140 | - 'type' => 'text_small', |
|
1141 | - 'default' => '', |
|
1142 | - 'desc' => __( 'Image Height', 'lasso' ), |
|
1143 | - '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' ) |
|
1144 | - ), |
|
1145 | - 'linkoption' => array( |
|
1146 | - 'type' => 'select', |
|
1147 | - 'values' => array( |
|
1148 | - array( |
|
1149 | - 'value' => 'none', |
|
1150 | - 'name' => __( 'None', 'aesop-core' ) |
|
1151 | - ), |
|
1152 | - array( |
|
1153 | - 'value' => 'img', |
|
1154 | - 'name' => __( 'Image', 'aesop-core' ) |
|
1155 | - ), |
|
1156 | - array( |
|
1157 | - 'value' => 'url', |
|
1158 | - 'name' => __( 'URL', 'aesop-core' ) |
|
1159 | - ), |
|
1160 | - ), |
|
1161 | - 'default' => 'none', |
|
1162 | - 'desc' => __( 'Link', 'lasso' ), |
|
1163 | - 'tip' => __( 'Click leads to:', 'lasso' ) |
|
1164 | - ), |
|
1133 | + 'imgwidth' => array( |
|
1134 | + 'type' => 'text_small', |
|
1135 | + 'default' => '300px', |
|
1136 | + 'desc' => __( 'Image Width', 'lasso' ), |
|
1137 | + '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' ) |
|
1138 | + ), |
|
1139 | + 'imgheight' => array( |
|
1140 | + 'type' => 'text_small', |
|
1141 | + 'default' => '', |
|
1142 | + 'desc' => __( 'Image Height', 'lasso' ), |
|
1143 | + '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' ) |
|
1144 | + ), |
|
1145 | + 'linkoption' => array( |
|
1146 | + 'type' => 'select', |
|
1147 | + 'values' => array( |
|
1148 | + array( |
|
1149 | + 'value' => 'none', |
|
1150 | + 'name' => __( 'None', 'aesop-core' ) |
|
1151 | + ), |
|
1152 | + array( |
|
1153 | + 'value' => 'img', |
|
1154 | + 'name' => __( 'Image', 'aesop-core' ) |
|
1155 | + ), |
|
1156 | + array( |
|
1157 | + 'value' => 'url', |
|
1158 | + 'name' => __( 'URL', 'aesop-core' ) |
|
1159 | + ), |
|
1160 | + ), |
|
1161 | + 'default' => 'none', |
|
1162 | + 'desc' => __( 'Link', 'lasso' ), |
|
1163 | + 'tip' => __( 'Click leads to:', 'lasso' ) |
|
1164 | + ), |
|
1165 | 1165 | |
1166 | - 'link' => array( |
|
1167 | - 'type' => 'text', |
|
1168 | - 'default' => '', |
|
1169 | - 'desc' => __( 'URL Link', 'lasso' ), |
|
1170 | - 'tip' => __( 'URL link', 'lasso' ) |
|
1171 | - ), |
|
1172 | - 'alt' => array( |
|
1173 | - 'type' => 'text', |
|
1174 | - 'default' => '', |
|
1175 | - 'desc' => __( 'Image ALT', 'lasso' ), |
|
1176 | - 'tip' => __( 'ALT tag used for the image. Primarily used for SEO purposes.', 'lasso' ) |
|
1177 | - ), |
|
1166 | + 'link' => array( |
|
1167 | + 'type' => 'text', |
|
1168 | + 'default' => '', |
|
1169 | + 'desc' => __( 'URL Link', 'lasso' ), |
|
1170 | + 'tip' => __( 'URL link', 'lasso' ) |
|
1171 | + ), |
|
1172 | + 'alt' => array( |
|
1173 | + 'type' => 'text', |
|
1174 | + 'default' => '', |
|
1175 | + 'desc' => __( 'Image ALT', 'lasso' ), |
|
1176 | + 'tip' => __( 'ALT tag used for the image. Primarily used for SEO purposes.', 'lasso' ) |
|
1177 | + ), |
|
1178 | 1178 | |
1179 | - 'caption' => array( |
|
1180 | - 'type' => 'text_area', |
|
1181 | - 'default' => '', |
|
1182 | - 'desc' => __( 'Caption', 'lasso' ), |
|
1183 | - 'tip' => __( 'Optional caption for the image.', 'lasso' ) |
|
1184 | - ), |
|
1179 | + 'caption' => array( |
|
1180 | + 'type' => 'text_area', |
|
1181 | + 'default' => '', |
|
1182 | + 'desc' => __( 'Caption', 'lasso' ), |
|
1183 | + 'tip' => __( 'Optional caption for the image.', 'lasso' ) |
|
1184 | + ), |
|
1185 | 1185 | |
1186 | 1186 | |
1187 | - ), |
|
1188 | - 'desc' => __( 'An image.', 'aesop-core' ), |
|
1189 | - 'codes' => '<script> |
|
1187 | + ), |
|
1188 | + 'desc' => __( 'An image.', 'aesop-core' ), |
|
1189 | + 'codes' => '<script> |
|
1190 | 1190 | jQuery(document).ready(function($){ |
1191 | 1191 | function linkSetting(l){ |
1192 | 1192 | if ( l=="url") { |
@@ -1206,101 +1206,101 @@ discard block |
||
1206 | 1206 | }) |
1207 | 1207 | }); |
1208 | 1208 | </script>' |
1209 | - ) |
|
1210 | - ); |
|
1209 | + ) |
|
1210 | + ); |
|
1211 | 1211 | |
1212 | - return array_merge( $shortcodes, $custom ); |
|
1212 | + return array_merge( $shortcodes, $custom ); |
|
1213 | 1213 | } |
1214 | 1214 | |
1215 | 1215 | function add_wpimg_block_options( $shortcodes ) { |
1216 | - $custom = array( |
|
1217 | - 'wpimg-block' => array( |
|
1218 | - 'name' => __( 'Image', 'lasso' ), |
|
1219 | - 'type' => 'single', |
|
1220 | - 'atts' => array( |
|
1221 | - 'img' => array( |
|
1222 | - 'type' => 'media_upload', |
|
1223 | - 'default' => '', |
|
1224 | - 'desc' => __( 'Image URL', 'lasso' ), |
|
1225 | - 'tip' => __( 'URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core' ) |
|
1226 | - ), |
|
1227 | - 'align' => array( |
|
1228 | - 'type' => 'select', |
|
1229 | - 'values' => array( |
|
1230 | - array( |
|
1231 | - 'value' => 'center', |
|
1232 | - 'name' => __( 'Center', 'aesop-core' ) |
|
1233 | - ), |
|
1234 | - array( |
|
1235 | - 'value' => 'left', |
|
1236 | - 'name' => __( 'Left', 'aesop-core' ) |
|
1237 | - ), |
|
1238 | - array( |
|
1239 | - 'value' => 'right', |
|
1240 | - 'name' => __( 'Right', 'aesop-core' ) |
|
1241 | - ), |
|
1242 | - ), |
|
1243 | - 'default' => 'center', |
|
1244 | - 'desc' => __( 'Alignment', 'lasso' ), |
|
1245 | - 'tip'=>'' |
|
1246 | - ), |
|
1247 | - 'alt' => array( |
|
1248 | - 'type' => 'text', |
|
1249 | - 'default' => '', |
|
1250 | - 'desc' => __( 'Image ALT', 'lasso' ), |
|
1251 | - 'tip' => __( 'ALT tag used for the image. Primarily used for SEO purposes.', 'lasso' ) |
|
1252 | - ), |
|
1253 | - 'caption' => array( |
|
1254 | - 'type' => 'text', |
|
1255 | - 'default' => '', |
|
1256 | - 'desc' => __( 'Caption', 'lasso' ), |
|
1257 | - 'tip' => __( 'Optional caption for the image.', 'lasso' ) |
|
1258 | - ), |
|
1259 | - 'link' => array( |
|
1260 | - 'type' => 'text', |
|
1261 | - 'default' => '', |
|
1262 | - 'desc' => __( 'Link URL', 'lasso' ), |
|
1263 | - 'tip' => __( 'Optional URL to link.', 'lasso' ) |
|
1264 | - ), |
|
1216 | + $custom = array( |
|
1217 | + 'wpimg-block' => array( |
|
1218 | + 'name' => __( 'Image', 'lasso' ), |
|
1219 | + 'type' => 'single', |
|
1220 | + 'atts' => array( |
|
1221 | + 'img' => array( |
|
1222 | + 'type' => 'media_upload', |
|
1223 | + 'default' => '', |
|
1224 | + 'desc' => __( 'Image URL', 'lasso' ), |
|
1225 | + 'tip' => __( 'URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core' ) |
|
1226 | + ), |
|
1227 | + 'align' => array( |
|
1228 | + 'type' => 'select', |
|
1229 | + 'values' => array( |
|
1230 | + array( |
|
1231 | + 'value' => 'center', |
|
1232 | + 'name' => __( 'Center', 'aesop-core' ) |
|
1233 | + ), |
|
1234 | + array( |
|
1235 | + 'value' => 'left', |
|
1236 | + 'name' => __( 'Left', 'aesop-core' ) |
|
1237 | + ), |
|
1238 | + array( |
|
1239 | + 'value' => 'right', |
|
1240 | + 'name' => __( 'Right', 'aesop-core' ) |
|
1241 | + ), |
|
1242 | + ), |
|
1243 | + 'default' => 'center', |
|
1244 | + 'desc' => __( 'Alignment', 'lasso' ), |
|
1245 | + 'tip'=>'' |
|
1246 | + ), |
|
1247 | + 'alt' => array( |
|
1248 | + 'type' => 'text', |
|
1249 | + 'default' => '', |
|
1250 | + 'desc' => __( 'Image ALT', 'lasso' ), |
|
1251 | + 'tip' => __( 'ALT tag used for the image. Primarily used for SEO purposes.', 'lasso' ) |
|
1252 | + ), |
|
1253 | + 'caption' => array( |
|
1254 | + 'type' => 'text', |
|
1255 | + 'default' => '', |
|
1256 | + 'desc' => __( 'Caption', 'lasso' ), |
|
1257 | + 'tip' => __( 'Optional caption for the image.', 'lasso' ) |
|
1258 | + ), |
|
1259 | + 'link' => array( |
|
1260 | + 'type' => 'text', |
|
1261 | + 'default' => '', |
|
1262 | + 'desc' => __( 'Link URL', 'lasso' ), |
|
1263 | + 'tip' => __( 'Optional URL to link.', 'lasso' ) |
|
1264 | + ), |
|
1265 | 1265 | |
1266 | 1266 | |
1267 | - ), |
|
1268 | - 'desc' => __( 'A WP Image Block.', 'aesop-core' ), |
|
1269 | - 'codes' => '<script> |
|
1267 | + ), |
|
1268 | + 'desc' => __( 'A WP Image Block.', 'aesop-core' ), |
|
1269 | + 'codes' => '<script> |
|
1270 | 1270 | jQuery(document).ready(function($){ |
1271 | 1271 | |
1272 | 1272 | }); |
1273 | 1273 | </script>' |
1274 | - ) |
|
1275 | - ); |
|
1274 | + ) |
|
1275 | + ); |
|
1276 | 1276 | |
1277 | - return array_merge( $shortcodes, $custom ); |
|
1277 | + return array_merge( $shortcodes, $custom ); |
|
1278 | 1278 | } |
1279 | 1279 | |
1280 | 1280 | function add_wpcover_block_options( $shortcodes ) { |
1281 | - $custom = array( |
|
1282 | - 'wpcover-block' => array( |
|
1283 | - 'name' => __( 'Cover', 'lasso' ), |
|
1284 | - 'type' => 'single', |
|
1285 | - 'atts' => array( |
|
1286 | - 'img' => array( |
|
1287 | - 'type' => 'media_upload', |
|
1288 | - 'default' => '', |
|
1289 | - 'desc' => __( 'Image URL', 'lasso' ), |
|
1290 | - 'tip' => __( 'URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core' ) |
|
1291 | - ) |
|
1292 | - |
|
1293 | - ), |
|
1294 | - 'desc' => __( 'A WP Cover Block.', 'aesop-core' ), |
|
1295 | - 'codes' => '<script> |
|
1281 | + $custom = array( |
|
1282 | + 'wpcover-block' => array( |
|
1283 | + 'name' => __( 'Cover', 'lasso' ), |
|
1284 | + 'type' => 'single', |
|
1285 | + 'atts' => array( |
|
1286 | + 'img' => array( |
|
1287 | + 'type' => 'media_upload', |
|
1288 | + 'default' => '', |
|
1289 | + 'desc' => __( 'Image URL', 'lasso' ), |
|
1290 | + 'tip' => __( 'URL for the image. Click <em>Select Media</em> to open the WordPress Media Library.', 'aesop-core' ) |
|
1291 | + ) |
|
1292 | + |
|
1293 | + ), |
|
1294 | + 'desc' => __( 'A WP Cover Block.', 'aesop-core' ), |
|
1295 | + 'codes' => '<script> |
|
1296 | 1296 | jQuery(document).ready(function($){ |
1297 | 1297 | |
1298 | 1298 | }); |
1299 | 1299 | </script>' |
1300 | - ) |
|
1301 | - ); |
|
1300 | + ) |
|
1301 | + ); |
|
1302 | 1302 | |
1303 | - return array_merge( $shortcodes, $custom ); |
|
1303 | + return array_merge( $shortcodes, $custom ); |
|
1304 | 1304 | } |
1305 | 1305 | |
1306 | 1306 | /** |
@@ -1345,23 +1345,23 @@ discard block |
||
1345 | 1345 | * @return string |
1346 | 1346 | */ |
1347 | 1347 | function lasso_editor_adjustBrightness($hex, $steps) { |
1348 | - $steps = max(-255, min(255, $steps)); |
|
1348 | + $steps = max(-255, min(255, $steps)); |
|
1349 | 1349 | |
1350 | - // Normalize into a six character long hex string |
|
1351 | - $hex = str_replace('#', '', $hex); |
|
1352 | - if (strlen($hex) == 3) { |
|
1353 | - $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2); |
|
1354 | - } |
|
1350 | + // Normalize into a six character long hex string |
|
1351 | + $hex = str_replace('#', '', $hex); |
|
1352 | + if (strlen($hex) == 3) { |
|
1353 | + $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2); |
|
1354 | + } |
|
1355 | 1355 | |
1356 | - // Split into three parts: R, G and B |
|
1357 | - $color_parts = str_split($hex, 2); |
|
1358 | - $return = '#'; |
|
1356 | + // Split into three parts: R, G and B |
|
1357 | + $color_parts = str_split($hex, 2); |
|
1358 | + $return = '#'; |
|
1359 | 1359 | |
1360 | - foreach ($color_parts as $color) { |
|
1361 | - $color = hexdec($color); // Convert to decimal |
|
1362 | - $color = max(0,min(255,$color + $steps)); // Adjust color |
|
1363 | - $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code |
|
1364 | - } |
|
1360 | + foreach ($color_parts as $color) { |
|
1361 | + $color = hexdec($color); // Convert to decimal |
|
1362 | + $color = max(0,min(255,$color + $steps)); // Adjust color |
|
1363 | + $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code |
|
1364 | + } |
|
1365 | 1365 | |
1366 | - return $return; |
|
1366 | + return $return; |
|
1367 | 1367 | } |