This file contains 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
document.querySelectorAll('.feed-shared-social-actions').forEach(function(element) { | |
if ("true" !== element.children[0].children[0].getAttribute('aria-pressed')) { | |
element.children[0].children[0].click(); | |
} | |
}); |
This file contains 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 // functions.php | |
/** | |
* Fügt Helpful eine ID hinzu. | |
* | |
* @param string $content | |
* | |
* @return string | |
*/ | |
add_filter( 'the_content', function( $content ) { |
This file contains 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
.chosen-container { | |
width: 100%; | |
max-width: 100%; | |
position: relative; | |
display: inline-block; | |
vertical-align: middle; | |
font-size: 13px; | |
-webkit-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; |
This file contains 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 | |
/** | |
* An example class in the subfolder: core/modules/core.php | |
*/ | |
namespace NAMESPACE\Core\Modules; | |
class My_Class | |
{ | |
/** | |
* Saves an instance of the class. |
This file contains 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
/** | |
* https://fontawesome.com/icons/long-arrow-alt-right?style=solid | |
*/ | |
.long-arrow-alt-right:after { | |
content: "\f30b"; | |
font-weight: 900; | |
font-family: "Font Awesome\ 5 Free"; | |
} |
This file contains 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 | |
/** | |
* Helper for WordPress database. | |
* | |
* @author Pixelbart | |
*/ | |
class Database_Helpers | |
{ | |
/** | |
* Checks if a database exists. |
This file contains 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 | |
if ( PHP_SESSION_NONE == session_status() ) { | |
session_cache_limiter( '' ); | |
header( "Cache-Control: public, s-maxage=60" ); | |
session_start(); | |
} |
This file contains 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 | |
/** | |
* Generates random, secure bytes that will be used for the password. | |
* | |
* @param int $nbBytes | |
* @param bool $strong | |
* | |
* @return string | |
*/ | |
function get_random_bytes( $nbBytes = 32, $strong = true ) { |
This file contains 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 | |
/** | |
* Get street number from street | |
* | |
* @param string $street | |
* | |
* @return string | |
*/ | |
function get_street_number( $street ) { | |
$regex = '/\d.?[^\s]*?[a-zA-Z]?.[?ABC]/i'; |