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 | |
| /** | |
| * Remove schema attributes from custom logo html | |
| * | |
| * @param string $html | |
| * @return string | |
| */ | |
| function op_remove_custom_logo_schema_attr( $html ) { | |
| return str_replace( array( 'itemprop="url"', 'itemprop="logo"' ), '', $html ); | |
| } |
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 | |
| /** | |
| * Make custom images sizes selectable | |
| * | |
| * @param array $sizes | |
| * @return array | |
| */ | |
| function op_selectable_image_sizes( $sizes ) { | |
| return array_merge( $sizes, array( | |
| 'twentyseventeen-thumbnail-avatar' => __( 'Thumbnail Avatar', 'twentyseventeen' ), |
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 | |
| /** | |
| * World's simplest secondary The Loop | |
| */ | |
| $posts = get_posts( $args ); | |
| if ( count( $posts ) ) : | |
| global $post; | |
| foreach ( $posts as $post ) : |
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 | |
| /** | |
| * Show only top level district or division | |
| * that means district without any parent district | |
| * | |
| * @param array $args | |
| * @return array $args | |
| */ | |
| function op_page_attributes_dropdown_pages_args( $args ) { | |
| if ( 'district' === $args['post_type'] ) { |
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 | |
| /** | |
| * Enqueue scripts | |
| */ | |
| function op_enqueue_scripts() { | |
| $suffix = '.min'; | |
| if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { | |
| $suffix = ''; | |
| } | |
| wp_enqueue_script( |
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 | |
| /** | |
| * WooCommerce template overriding class | |
| * | |
| * @author obiPlabon | |
| */ | |
| class WC_Template_Override { | |
| /** |
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
| @-webkit-keyframes spin { | |
| 100% { | |
| -webkit-transform:rotate(360deg); | |
| transform:rotate(360deg) | |
| } | |
| } | |
| @keyframes spin { | |
| 100% { | |
| -webkit-transform:rotate(360deg); | |
| transform:rotate(360deg) |
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 | |
| function op_enqueue_scripts() { | |
| wp_enqueue_style( | |
| 'op-ie8', | |
| get_template_directory_uri() . '/assets/css/ie8.css', | |
| array(), | |
| '0.0.7' | |
| ); | |
| wp_style_add_data( 'op-ie8', 'conditional', 'IE 8' ); | |
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 | |
| /** | |
| * Restrict category term relation to only parent-child | |
| * | |
| * @see https://wpseek.com/hook/post_edit_category_parent_dropdown_args/ | |
| * @see https://wpseek.com/hook/taxonomy_parent_dropdown_args// | |
| * | |
| * @param array $args | |
| * @return array Modified arguments | |
| */ |
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 | |
| function op_register_metaboxes( $options ) { | |
| $options = array(); | |
| if ( 'page' === get_option( 'show_on_front' ) | |
| && ( $page_id = get_option( 'page_on_front' ) ) | |
| && isset( $_GET['post'] ) | |
| && $_GET['post'] === $page_id ) { | |
| $options[] = array( |