whoami7 - Manager
:
/
home
/
qbizpnmr
/
public_html
/
wp-content
/
uploads
/
wpcode
/
cache
/
library
/
Upload File:
files >> /home/qbizpnmr/public_html/wp-content/uploads/wpcode/cache/library/profile_aioseo.json
{"categories":[{"name":"AIOSEO Team","slug":"aioseo"}],"snippets":[{"library_id":2343,"title":"Disable autogenerated shipping details schema for WooCommerce","code":"add_filter( 'aioseo_schema_woocommerce_shipping_disable', '__return_true' );","note":"This code snippet will disable AIOSEO autogenerated shipping details schema for WooCommerce Products","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":2110,"title":"Disable SEO Preview feature","code":"add_action( 'init', function() {\r\n\tif ( ! function_exists( 'aioseo' ) ) {\r\n\t\treturn;\r\n\t}\r\n remove_action( 'wp', [ aioseo()->standalone->seoPreview, 'init' ] );\r\n}, 100);","note":"This code snippet can be used to remove the \"SEO Preview\" feature in All in...","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":1994,"title":"Disable Shortcode Parsing in All in One SEO","code":"add_filter( 'aioseo_disable_shortcode_parsing', '__return_true' );","note":"This filter can be used to prevent AIOSEO from parsing shortcodes.","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":1893,"title":"Enable WooCommerce Product Attributes in Search Appearance","code":"add_filter( 'aioseo_woocommerce_product_attributes', '__return_true' );","note":"By default, AIOSEO does not include support for WooCommerce Product Attributes in our Search Appearance...","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":2276,"title":"Fix LearnPress conflict that hides AIOSEO tabs on settings pages","code":"add_filter( 'learnpress\/admin\/can-load-assets\/lp-admin', 'aioseoDontLoadLearnPress', 10, 2 );\r\nadd_filter( 'learnpress\/admin\/can-load-assets\/lp-admin-notice', 'aioseoDontLoadLearnPress', 10, 2 );\r\nfunction aioseoDontLoadLearnPress( $canLoad, $currentPage ) {\r\n\tif ( false === strpos( $currentPage, 'aioseo' ) ) {\r\n\t\treturn $canLoad;\r\n\t}\r\n\r\n\treturn false;\r\n}","note":"LearnPress hides the tabs of AIOSEO by loading its Vue assets on our pages. This...","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":2366,"title":"Limit Meta Description to 160 characters","code":"add_filter( 'aioseo_description', 'aioseo_filter_description' );\r\nfunction aioseo_filter_description( $description ) {\r\n if ( strlen($description) > 160 ) {\r\n $description = substr($description, 0, 159);\r\n }\r\n return $description;\r\n}","note":"This filter limits the Meta Description to 160 characters throughout the website","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":2365,"title":"Limit SEO Title to 60 characters","code":"add_filter( 'aioseo_title', 'aioseo_filter_title' );\r\nfunction aioseo_filter_title( $title ) {\r\n if ( strlen($title) > 60 ) {\r\n $title = substr($title, 0, 60);;\r\n }\r\n return $title;\r\n}","note":"This filter limits the SEO Title length to 60 characters throughout the website","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":1995,"title":"Noindex Product Search Pages","code":"add_filter( 'aioseo_robots_meta', 'aioseo_filter_robots_meta' );\r\nfunction aioseo_filter_robots_meta( $attributes ) {\r\n\t$url = home_url( $_SERVER['REQUEST_URI'] );\r\n\tif (strpos($url,'product_search=') !== false) {\r\n\t\t$attributes['index'] = \"noindex\";\r\n\t};\r\n\treturn $attributes;\r\n}","note":"This code snippet can be used to set noindex on any URL that has the...","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":2134,"title":"Noindex Products under a Product Category","code":"add_filter( 'aioseo_robots_meta', 'aioseo_filter_robots_meta' );\r\n\r\nfunction aioseo_filter_robots_meta( $attributes ) {\r\n\tif ( has_term( 'CategoryName', 'product_cat' ) ) {\r\n\t\t$attributes['noindex'] = 'noindex';\r\n\t}\r\n\treturn $attributes;\r\n}","note":"This code snippet can be used to set noindex on all the Products under a...","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":2344,"title":"Recreate the aioseo_cache table","code":"add_action( 'init', function() {\r\n\tif ( function_exists( 'aioseo' ) ) {\r\n\t\taioseo()->preUpdates->createCacheTable();\r\n\t}\r\n});","note":"This code snippet recreates the missing 'aioseo_cache' table. This code snippet should be enabled and...","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":3513,"title":"Remove SEO Statistics from the Dashboard menu","code":"add_action( 'admin_menu', 'aioseo_hide_search_stats_menu', 99999 );\r\n\r\nfunction aioseo_hide_search_stats_menu() {\r\n\tglobal $submenu;\r\n\tif ( ! isset( $submenu['index.php'] ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tforeach ( $submenu['index.php'] as $index => $props ) {\r\n\t\tif ( ! empty( $props[2] ) && admin_url( '\/admin.php?page=aioseo-search-statistics' ) === $props[2] ) {\r\n\t\t\tunset( $submenu['index.php'][ $index ] );\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n}","note":"Code Snippet to remove SEO Statistics from the Dashboard menu","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":2008,"title":"Remove the Canonical URL for a specific URL","code":"add_filter( 'aioseo_canonical_url', 'aioseo_filter_canonical_url' );\r\nfunction aioseo_filter_canonical_url( $url ) {\r\n\tif (strpos($url,'\/properties\/') !== false) {\r\n\t\t$url = home_url( $_SERVER['REQUEST_URI'] );\r\n\t}\r\n\treturn $url;\r\n}","note":"This code snippet can be used to remove the canonical URL for a specific URL...","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":2834,"title":"Scan images from Elementor Galleries and counts them for the sitemap XML","code":"add_filter(\r\n\t'aioseo_sitemap_images',\r\n\t\/**\r\n\t * Find new images inside the post content which has Elementor galleries.\r\n\t * It only works for self-hosted attachments.\r\n\t *\r\n\t * @param array $images The images already found.\r\n\t * @param object $post The post object\r\n\t * @return array All images merged with found images.\r\n\t *\/\r\n\tfunction ( $images, $post ) {\r\n\t\tif (\r\n\t\t\t! is_array( $images ) ||\r\n\t\t\t! is_object( $post ) ||\r\n\t\t\tempty( $post->ID ) ||\r\n\t\t\tempty( $post->post_content )\r\n\t\t) {\r\n\t\t\treturn $images;\r\n\t\t}\r\n\r\n\t\t\/\/ Bail if this post is not being edited under Elementor.\r\n\t\tif ( 'builder' !== get_post_meta( $post->ID, '_elementor_edit_mode', true ) ) {\r\n\t\t\treturn $images;\r\n\t\t}\r\n\r\n\t\tpreg_match_all( '\/<a.+?href=\"(http[^\"]+)\"\\s.+?lightbox.*?>\/i', $post->post_content, $matches );\r\n\r\n\t\tif ( empty( $matches[1] ) ) {\r\n\t\t\treturn $images;\r\n\t\t}\r\n\r\n\t\tforeach ( $matches[1] as $url ) {\r\n\t\t\t$url = wp_get_attachment_url( attachment_url_to_postid( $url ) );\r\n\t\t\tif ( $url ) {\r\n\t\t\t\t$images[] = $url;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn array_unique( $images );\r\n\t},\r\n\t10,\r\n\t2\r\n);","note":"This snippet will find new images inside the post content, which has Elementor Galleries. And...","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""},{"library_id":2382,"title":"Set current URL as the Canonical URL and ignore query strings","code":"add_filter( 'aioseo_canonical_url', 'aioseo_filter_canonical_url' );\r\nfunction aioseo_filter_canonical_url( $url ) {\r\n\tif (strpos($_SERVER['REQUEST_URI'],'\/home-search\/listing\/') !== false) {\r\n\t\t$url = home_url( $_SERVER['REQUEST_URI'] );\r\n\t\tif (strpos($url,'?') !== false){\r\n\t\t\t\t$url = substr( $url, 0, strpos($url,'?') );\r\n\t\t}\r\n\t}\r\n\treturn $url;\r\n}","note":"This snippet searches for a specific string in the current URL and if found, it...","categories":["aioseo"],"code_type":"php","needs_auth":false,"max_version":""}]}
Copyright ©2021 || Defacer Indonesia