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
//@prepros-prepend "jquery.js" | |
//@prepros-prepend "affix.js" | |
//@prepros-prepend "transition.js" | |
//@prepros-prepend "tooltip.js" | |
//@prepros-prepend "alert.js" | |
//@prepros-prepend "button.js" | |
//@prepros-prepend "carousel.js" | |
//@prepros-prepend "collapse.js" | |
//@prepros-prepend "dropdown.js" | |
//@prepros-prepend "modal.js" |
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
<?php | |
// Place this script in a page template and navigate to it. Script will correct counts for comments and categories. | |
include("wp-config.php"); | |
if (!mysql_connect(DB_HOST, DB_USER, DB_PASSWORD)) { die('Could not connect: ' . mysql_error()); } | |
if (!mysql_select_db(DB_NAME)) { die('Could not connect: ' . mysql_error()); } | |
$result = mysql_query("SELECT term_taxonomy_id FROM ".$table_prefix."term_taxonomy"); | |
while ($row = mysql_fetch_array($result)) { | |
$term_taxonomy_id = $row['term_taxonomy_id']; |
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
/** | |
* Alphanumeric Hyphenated Strings | |
*/ | |
function tidyString($string) { | |
//Lower case everything | |
$string = strtolower($string); | |
//Make alphanumeric (removes all other characters) | |
$string = preg_replace("/[^a-z0-9_\s-]/", "", $string); | |
//Clean up multiple dashes or whitespaces | |
$string = preg_replace("/[\s-]+/", " ", $string); |
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 list_enqueued_scripts() { | |
global $wp_scripts; | |
foreach( $wp_scripts->queue as $handle ) : | |
echo $handle . ', '; | |
endforeach; | |
} | |
add_action( 'wp_print_scripts', __NAMESPACE__ . '\\list_enqueued_scripts()' ); |
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
// Remove the default plugin settings | |
remove_action('admin_menu', 'wp_page_numbers_add_to_menu'); | |
// Overide the the settings with the correct capability 'administrator' instead of numerical value | |
function overide_wp_page_numbers_add_to_menu() { | |
add_submenu_page('options-general.php', 'WP Page Numbers Options', 'Page Numbers', 'administrator', __FILE__, 'wp_page_numbers_settings'); | |
} | |
// Apply the settings | |
add_action('admin_menu', 'overide_wp_page_numbers_add_to_menu'); |
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
include(locate_template('your-template-name.php')); |
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
$("a").click(function(e){ | |
e.preventDefault(); | |
var target = $(this).attr('href'); | |
$('html, body').animate({ | |
scrollTop: $(target).offset().top | |
}, 1000); | |
}); |
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
/** | |
* Formatted Phone Link | |
*/ | |
function format_phone_link($phone) { | |
$phone = preg_replace('/[^0-9]/', '', $phone); | |
$length = strlen($phone); | |
switch ($length) { | |
case 7: | |
$phone_formatted = preg_replace('/([0-9]{3})([0-9]{4})/', '$1 $2', $phone); | |
break; |
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
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="300 300 1400 1400"> | |
<g id="Drums"> | |
<g> | |
<path id="Drum-Shadow" opacity="0.1" fill="#333333" d="M1626.6,1282.8c0,45.4-280.5,82.1-626.6,82.1 | |
c-346,0-626.6-36.8-626.6-82.1c0-45.4,280.5-82.1,626.6-82.1C1346,1200.6,1626.6,1237.4,1626.6,1282.8z"/> | |
<g id="Snare"> | |
<g id="Snare-Drum"> | |
<rect x="1219" y="885" fill="#0BC1F8" stroke="#333333" stroke-width="8" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" width="223" height="110"/> | |
<line fill="none" stroke="#0891BA" stroke-width="8" stroke-miterlimit="10" x1="1438" y1="914" x2="1223" y2="914"/> |
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
extends CollisionPolygon2D | |
@export var animatedSprite2D: AnimatedSprite2D | |
# Programatically Create CollisionPolygon2D based on AnimatedSprite2D | |
func update_collision_polygon() -> void: | |
var data = ( | |
animatedSprite2D |