Clean Super Sites

  • Portfolio
  • Articles
  • Code
  • Tools
  • Contact
  • YouTube
    • Jumpstart Configurations

AJAX Test

Delete Flamingo Spam

DELETE FROM wp_posts WHERE post_status LIKE ‘flamingo_spam’ or to complete claer flamingo content DELETE FROM wp_posts WHERE post_type LIKE ‘%flamingo%’

Read More

Block Color Picker

Within the edit function of block.js

JavaScript
0
1
2
3
4
5
6
7
 
var el = wp.element.createElement,
    Fragment = wp.element.Fragment,
    registerBlockType = wp.blocks.registerBlockType,
    InspectorControls = wp.editor.InspectorControls,
    RadioControl = wp.components.RadioControl,
    ColorPicker = wp.components.ColorPicker;//this this
 

JavaScript
0
1
2
3
4
5
6
7
8
9
10
11
12
 
                el('div', {}, 'Menu Background'),
                el(ColorPicker, {
                    type: 'color',
                    color: menu_bg,
                    onChangeComplete: function(newValue) {
                        props.setAttributes({
                            menu_bg: newValue.hex
                        });
                    },
                    disableAlpha: true
                }),
 

Read More

Add Arguments to WordPress Hooks

PHP
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
function jma_gbs_template_redirect()
{
 
    $body = true;
    add_action(
        'genesis_before_sidebar_widget_area',
           function () use ($body) {
               jma_gbs_open_div($body);
           }
    );
    add_action(
       'genesis_before_loop',
          function () use ($body) {
              jma_gbs_open_div($body);
          }
    );
    add_action(
        'genesis_after_sidebar_widget_area',
           function () use ($body) {
               jma_gbs_close_div($body);
           }
    );
    add_action(
       'genesis_after_loop',
          function () use ($body) {
              jma_gbs_close_div($body);
          }
    );
}
add_action('template_redirect', 'jma_gbs_template_redirect');
 

Read More

Debug

PHP
0
1
2
3
4
 
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
 

Read More

Custom Fontawesome Icons for Lists

Add to functions.php

PHP
0
1
2
3
4
5
6
 
function jma_child_scripts()
{
    wp_add_inline_script('fontawesome', 'window.FontAwesomeConfig={searchPseudoElements:true}', 'before');
}
add_action('wp_enqueue_scripts', 'jma_child_scripts');
 

The Css:

CSS
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
/* get rid of the bullets */
#content ul li {
    list-style-type: none;
}
 
/* suppress the default fontawesome behavior */
#content ul li::before {
    display: none;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}
 
/* add your icon (right-angle here) */
#content ul li::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: '\f105';
}
 
/* fontawesome hijacks the before pseudo element so we have to position w/ the class that they add */
#content ul li .svg-inline--fa {
    margin: 0 5px 0 -20px;
}
 

Read More
123›»
© 2021  Clean Super Sites
11882 W Stanford Place
Morrison, CO   80465
[email protected]
Phone: 720.549.0023
x
Top