Skip to content
Snippets Groups Projects
Commit fb325fa4 authored by Lauren's avatar Lauren
Browse files

updated classes so 20 of the same classes don't get inserted into the button

parent 2db4346d
No related branches found
No related tags found
No related merge requests found
......@@ -64,8 +64,50 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/img\/icon-grey.png": {
"fileType": 32768,
"ignore": 0,
"ignoreWasSetByUser": 0,
"initialSize": 644,
"inputAbbreviatedPath": "\/img\/icon-grey.png",
"outputAbbreviatedPath": "\/img\/icon-grey.png",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
"processed": 0
},
"\/img\/icon.png": {
"fileType": 32768,
"ignore": 0,
"ignoreWasSetByUser": 0,
"initialSize": 602,
"inputAbbreviatedPath": "\/img\/icon.png",
"outputAbbreviatedPath": "\/img\/icon.png",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
"processed": 0
},
"\/js\/lbdesign-button-shortcode.js": {
"fileType": 64,
"ignore": 0,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/js\/lbdesign-button-shortcode.js",
"outputAbbreviatedPath": "\/js\/min\/lbdesign-button-shortcode-min.js",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
"outputStyle": 0,
"syntaxCheckerStyle": 0
},
"\/lbdesign-button-shortcode.php": {
"fileType": 8192,
"ignore": 0,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/lbdesign-button-shortcode.php",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/sass\/lbdesign_button_shortcode.scss": {
"createSourceMap": 1,
"createSourceMap": 0,
"debugStyle": 0,
"decimalPrecision": 10,
"fileType": 4,
......
......@@ -24,11 +24,12 @@
name: 'type',
label: 'Button Type',
'values': [
{text: 'Default', value: 'lbdesign_type_default'},
{text: 'Primary', value: 'lbdesign_primary'},
{text: 'Action', value: 'lbdesign_action'},
{text: 'Warning', value: 'lbdesign_warning'},
{text: 'Info', value: 'lbdesign_info'}
{text: 'Default', value: 'default'},
{text: 'Primary', value: 'primary'},
{text: 'Action', value: 'action'},
{text: 'Highlight', value: 'highlight'},
{text: 'Warning', value: 'warning'},
{text: 'Info', value: 'info'}
]
},
{type: 'listbox',
......@@ -87,11 +88,7 @@
longname : 'LBDesign Button Shortcode',
author : 'Lauren Pittenger @ LBDesign',
authorurl : 'http://lbdesign.tv',
<<<<<<< bdbecb7874ddd861c8eac12cf604da212f5ae2c9
version : "1.0"
=======
version : "0.1"
>>>>>>> Added popup window with inputs for tinymce
};
}
});
......
......@@ -11,13 +11,17 @@
/* our main shortcode function */
function lbdesign_button($atts, $content = null) {
$atts = shortcode_atts(array(
<<<<<<< 2db4346d677cd58e67000fec313b61777284bdc2
<<<<<<< b96576ece5a9af761cf8a31ef8f8331b3f62ee71
=======
>>>>>>> updated classes so 20 of the same classes don't get inserted into the button
'link' => null,
'type' => 'default',
'color' => 'default',
'size' => 'default',
'style' => 'default',
'custom_class' => null,
<<<<<<< 2db4346d677cd58e67000fec313b61777284bdc2
=======
'link' => '#',
'type' => 'lbdesign_type_default',
......@@ -26,6 +30,8 @@ function lbdesign_button($atts, $content = null) {
'custom_class' => '',
'full_width' => '',
>>>>>>> Changed button classes to prevent conflicts with other themes, plugins etc. Changed labels of popup 'add button' window. Added custom button class and full width option to insert window
=======
>>>>>>> updated classes so 20 of the same classes don't get inserted into the button
), $atts, 'lbdesign_button');
// check if we want the button to be full width. if yes, set up lbdesign_full_width class. if not, leave empty
......@@ -35,7 +41,10 @@ function lbdesign_button($atts, $content = null) {
$full_width = '';
}
<<<<<<< 2db4346d677cd58e67000fec313b61777284bdc2
<<<<<<< b96576ece5a9af761cf8a31ef8f8331b3f62ee71
=======
>>>>>>> updated classes so 20 of the same classes don't get inserted into the button
foreach ($atts as $key => $att) {
if( $key !== 'link' && $att !== null && $att !== '' && $att !== 'default' ) {
......@@ -44,9 +53,12 @@ function lbdesign_button($atts, $content = null) {
}
return '<a class="lbdesign_button '.implode($classes, " ").' '.$full_width.'" href="'.$atts['link'].'">'.do_shortcode($content).'</a>';
<<<<<<< 2db4346d677cd58e67000fec313b61777284bdc2
=======
return '<a class="lbdesign_button ' . $atts['type'] . ' ' . $atts['color'] . ' ' . $atts['size'] . ' ' . $atts['custom_class'] . $full_width . '" href="'.$atts['link'].'">' . do_shortcode($content) . '</a>';
>>>>>>> Changed button classes to prevent conflicts with other themes, plugins etc. Changed labels of popup 'add button' window. Added custom button class and full width option to insert window
=======
>>>>>>> updated classes so 20 of the same classes don't get inserted into the button
}
add_shortcode('button', 'lbdesign_button');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment