This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Exclude Element with ID (replace div with any tag) | |
| and not(ancestor::div[@id='MyID']) | |
| ## Exclude Element with Class | |
| and not(ancestor::body[contains(@class, 'My-Class')]) | |
| ## Exclude Element with Attribute (replace div or attribute/value as needed) | |
| and not(ancestor::div[@data-elementor-type='header']) | |
| and not(ancestor::div[@data-id='981cb']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Add Page Attrribute Terms (Taxonomy) to Body Tag | |
| */ | |
| function pro_page_attributes_class_to_body( $classes ){ | |
| if ( $pageTaxonomy = get_the_terms( get_the_ID(), 'page_attributes' ) ) { | |
| foreach( $taxonomyTerm as $term ){ | |
| if(is_array($term)){ | |
| if(!empty($term['slug'])){ | |
| $termClass = 'page-attribute-' . $term['slug']; | |
| array_push( $classes, $termClass ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function add_page_attributes_taxonomy() { | |
| $args = array( | |
| 'label' => __( 'Page Attributes', 'textdomain' ), | |
| 'public' => false, | |
| 'rewrite' => false, | |
| 'hierarchical' => false, | |
| 'show_ui' => true, | |
| 'show_in_quick_edit' => true, // Added this line to show in Quick Edit | |
| 'show_admin_column' => true, | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Add Page Terms (Taxonomy) to Body Tag | |
| */ | |
| function pro_page_taxonomy_class_to_body( $classes ){ | |
| if ( $pageTaxonomy = get_the_terms( get_the_ID(), 'my_taxonomy_slug' ) ) { | |
| foreach( $taxonomyTerm as $term ){ | |
| if(is_array($term)){ | |
| if(!empty($term['slug'])){ | |
| $termClass = 'mytaxonomy-' . $term['slug']; | |
| array_push( $classes, $termClass ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This bookmarklet is depreceated. Please see this GIST instead: | |
| https://gist.github.com/chris-castillo-dev/a366eac12e58ce8fa44be355063e2fa6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:!function(){var e=prompt("Please enter your selector",""),t=prompt("Would you like to label headings? (Y/N)"),o=prompt("Would you like lists hyphenated? (Y/N)"),l=prompt("Would you like to format tables as markdown? (Y/N)"),n=prompt("Would you like to inject link sources into the text? {Y/N)");null!=e&&function e(r){let a=document.querySelector(r);if(a&&window.open(document.location.href),!a){console.log("No element found with the provided selector.");return}document.querySelectorAll("script, img, picture, canvas, figure, video, iframe, embed, object, map, audio, button, svg, head, link, header, footer, google-cast-launcher, select, textarea, input, form, label, datalist, fieldset, legend, meter, optgroup, option, output, progress").forEach(e=>{"header"===e.tagName.toLowerCase()&&a.contains(e)||e.parentNode.removeChild(e)});let i=a.cloneNode(!0);document.body.innerHTML="",document.body.appendChild(i);let d=document.getElementsByTagName("*");for(let s=0;s<d.length;s++)if("a"===d[s].tagName.toLowerCa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $form.on('fluentform_submission_success', function() { | |
| // You can run your own JS and will be run on successful form submission | |
| var s = document.createElement('script'); | |
| var code = 'clarity("set", "conversionAction", "New Lead")'; | |
| try{ | |
| s.appendChild(document.createTextNode(code)); | |
| document.body.appendChild(s); | |
| } catch(e){ | |
| s.text = code; | |
| document.body.appendChild(s); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if( !wp_script_is( 'bricks-splide' ) ){ | |
| wp_enqueue_script( 'bricks-splide', '/wp-content/themes/bricks/assets/js/libs/splide.min.js', null, '4.0.6', true ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Populate Gutenberg Color Palette Colors | |
| */ | |
| function pro_populate_gutenberg_color_palette() { | |
| // Disable Custom Colors | |
| add_theme_support( 'disable-custom-colors' ); | |
| // Editor Color Palette | |
| add_theme_support( 'editor-color-palette', array( | |
| array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Function to Send Bricks Form Data to Webhook | |
| */ | |
| function pro_bricks_form_to_webhook( $form ){ | |
| $data = $form->get_fields(); | |
| // The Bricks Form ID is the last part of the CSS ID | |
| // So if a form has a CSS ID of bricks-element-fszxsr, then the form ID is fszxsr | |
| $formId = $data['formId']; |