Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LBDesign Button Shortcode
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
plugins
LBDesign Button Shortcode
Commits
fb325fa4
Commit
fb325fa4
authored
9 years ago
by
Lauren
Browse files
Options
Downloads
Patches
Plain Diff
updated classes so 20 of the same classes don't get inserted into the button
parent
2db4346d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config.codekit
+43
-1
43 additions, 1 deletion
config.codekit
js/lbdesign-button-shortcode.js
+6
-9
6 additions, 9 deletions
js/lbdesign-button-shortcode.js
lbdesign-button-shortcode.php
+12
-0
12 additions, 0 deletions
lbdesign-button-shortcode.php
with
61 additions
and
10 deletions
config.codekit
+
43
−
1
View file @
fb325fa4
...
...
@@ -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,
...
...
This diff is collapsed.
Click to expand it.
js/lbdesign-button-shortcode.js
+
6
−
9
View file @
fb325fa4
...
...
@@ -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
};
}
});
...
...
This diff is collapsed.
Click to expand it.
lbdesign-button-shortcode.php
+
12
−
0
View file @
fb325fa4
...
...
@@ -11,13 +11,17 @@
/* our main shortcode function */
function
lbdesign_button
(
$atts
,
$content
=
null
)
{
$atts
=
shortcode_atts
(
array
(
<<<<<<<
2
db4346d677cd58e67000fec313b61777284bdc2
<<<<<<<
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>'
;
<<<<<<<
2
db4346d677cd58e67000fec313b61777284bdc2
=======
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
');
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment