Admin Panel Settings

/** * Plugin Name: Admin Panel Settings * Description: This plugin contains your admin panel settings. * Author: NoBull. * Version: 1.0 */ // Remove Powered By WP Bakery Builder Snippet add_action(‘wp_head’, ‘removebakery’, 1); function removebakery() { if ( class_exists(…Continue reading

Allow SVG Files Upload (copy)

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

Hide Admins from being tracked

/** * Start Tracking Tags **/ function hook_gtm_header() { if( !current_user_can(‘administrator’) && !current_user_can( ‘author’ ) && !current_user_can( ‘editor’ ) ) { ?>Continue reading

Reorder dashboard navigation

/** * Bring the order page to the front of the product page * * @param array $pages The pages. */ function add_test_page_nav( $pages ) { $order_page = array(); if ( isset( $pages[‘order’] ) ) { $order_page = $pages[‘order’]; unset(…Continue reading

Showcase IDX plugin – Replace all Permalink URLs with current URL in Schema

add_filter( ‘aioseo_schema_output’, ‘aioseo_schema_change_urls’ ); function aioseo_schema_change_urls( $graphs ) { if ( false === strpos( $_SERVER[‘REQUEST_URI’], ‘search-results/listing/’ ) ) { return $graphs; } $request_uri = explode( ‘?’, $_SERVER[‘REQUEST_URI’] ); $request_uri = explode( ‘#’, $request_uri[0] ); $url_parts = trim($request_uri[0], ‘/’); $url_parts =…Continue reading