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_action('admin_enqueue_scripts', 'unload_all_jquery'); | |
function unload_all_jquery() { | |
$jquery_ui = array( | |
"jquery-ui-widget", | |
"jquery-ui-mouse", | |
"jquery-ui-core", | |
"jquery-ui-accordion", | |
"jquery-ui-autocomplete", | |
"jquery-ui-slider", | |
"jquery-ui-tabs", |
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_styles_scripts(){ | |
//Jquery | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', array(), null); | |
wp_enqueue_script('jquery'); | |
} | |
add_action( 'wp_enqueue_scripts', 'add_styles_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
@media screen and (max-width: 1023px) { | |
} |
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 | |
$args = array( | |
'number' => 2, | |
'post_id' => get_the_ID(), | |
'orderby' => 'comment_date', | |
'order' => 'DESC', | |
'status' => 'approve', | |
'type' => 'comment', | |
); | |
$comments = get_comments($args); |
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 | |
add_action( 'wp_head', 'morkovin_opengraph_add_head' ); | |
function morkovin_opengraph_add_head(){ | |
if(function_exists('show_morkovniy_opengraph')) { show_morkovniy_opengraph(); } | |
} | |
function show_morkovniy_opengraph() { | |
if ( is_single() ) { | |
$title = get_the_title(); | |
$post = get_post( get_the_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
function mihdan_add_async_attribute( $tag, $handle ) { | |
if ( 'my-js-handle' !== $handle ) { | |
return $tag; | |
} | |
return str_replace( ' src', ' async="async" src', $tag ); | |
} | |
add_filter( 'script_loader_tag', 'mihdan_add_async_attribute', 10, 2 ); |
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 | |
class AbcCategory { | |
private $cat_id; | |
function __construct($cat_id) { | |
$this->cat_id = $cat_id; | |
} | |
public static function sorting( & $array ) { | |
$memory = NULL; |
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 | |
class RecentPosts_Morkovin_Widget extends WP_Widget { | |
/** | |
* Register widget with WordPress. | |
*/ | |
function __construct() { | |
parent::__construct( | |
'recentpost_morkovin', // Base ID | |
__( 'Свежие публикации Морковина', 'text_domain' ), // Name |