s: Post Type Singular Name */ 'edit_item' => sprintf( esc_html__( 'Edit %s', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'update_item' => sprintf( esc_html__( 'Update %s', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'view_item' => sprintf( esc_html__( 'View %s', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Plural Name */ 'view_items' => sprintf( esc_html__( 'View %s', 'rank-math-pro' ), $plural_label ), /* translators: Post Type Singular Name */ 'search_items' => sprintf( esc_html__( 'Search %s', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'not_found' => sprintf( esc_html__( 'No %s found.', 'rank-math-pro' ), $plural_label ), /* translators: Post Type Singular Name */ 'not_found_in_trash' => sprintf( esc_html__( 'No %s found in Trash.', 'rank-math-pro' ), $plural_label ), /* translators: Post Type Singular Name */ 'item_published' => sprintf( esc_html__( '%s published.', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'item_published_privately' => sprintf( esc_html__( '%s published privately.', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'item_reverted_to_draft' => sprintf( esc_html__( '%s reverted to draft.', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'item_scheduled' => sprintf( esc_html__( '%s scheduled.', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'item_updated' => sprintf( esc_html__( '%s updated.', 'rank-math-pro' ), $this->post_singular_name ), ]; $capability = 'rank_math_general'; $args = [ 'label' => $this->post_singular_name, 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'hierarchical' => false, 'has_archive' => $post_type_slug, 'menu_icon' => 'dashicons-location', 'query_var' => true, 'show_in_rest' => true, 'rest_base' => 'rank-math-locations', 'supports' => [ 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', 'publicize' ], 'rewrite' => [ 'slug' => $post_type_slug, 'with_front' => $this->filter( 'locations/front', true ), ], 'capabilities' => [ 'edit_post' => $capability, 'read_post' => $capability, 'delete_post' => $capability, 'edit_posts' => $capability, 'edit_others_posts' => $capability, 'publish_posts' => $capability, 'read_private_posts' => $capability, 'create_posts' => $capability, ], ]; register_post_type( $this->post_type, $args ); } /** * Register Locations Category taxonomy. */ private function register_location_taxonomy() { $category_slug = esc_html( Helper::get_settings( 'titles.locations_category_base', 'locations-category' ) ); $labels = [ /* translators: Post Type Singular Name */ 'name' => sprintf( esc_html__( '%s categories', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'singular_name' => sprintf( esc_html__( '%s category', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'all_items' => sprintf( esc_html__( 'All %s categories', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'edit_item' => sprintf( esc_html__( 'Edit %s category', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'update_item' => sprintf( esc_html__( 'Update %s category', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'add_new_item' => sprintf( esc_html__( 'Add New %s category', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'new_item_name' => sprintf( esc_html__( 'New %s category', 'rank-math-pro' ), $this->post_singular_name ), /* translators: Post Type Singular Name */ 'menu_name' => sprintf( esc_html__( '%s categories', 'rank-math-pro' ), $this->post_singular_name ), 'search_items' => esc_html__( 'Search categories', 'rank-math-pro' ), 'parent_item' => esc_html__( 'Parent Category', 'rank-math-pro' ), 'parent_item_colon' => esc_html__( 'Parent Category:', 'rank-math-pro' ), ]; $args = [ 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'show_in_rest' => true, 'rewrite' => [ 'slug' => $category_slug ], ]; register_taxonomy( 'rank_math_location_category', [ $this->post_type ], $args ); } /** * Check for relevant post type before invalidation. * * @param int $post_id Post ID to possibly invalidate for. */ public function invalidate_cache( $post_id ) { if ( get_post_type( $post_id ) !== $this->post_type ) { return false; } Cache_Watcher::clear( [ 'locations' ] ); } /** * Add custom columns for post type. * * @param array $columns Current columns. * * @return array */ public function posts_columns( $columns ) { $columns['address'] = __( 'Address', 'rank-math-pro' ); $columns['telephone'] = __( 'Phone', 'rank-math-pro' ); return $columns; } /** * Add the content in the custom columns. * * @param string $column Column name. * @param int $post_id Post ID. * * @return void */ public function posts_custom_column( $column, $post_id ) { $schemas = \RankMath\Schema\DB::get_schemas( $post_id ); if ( empty( $schemas ) ) { return; } $schema = reset( $schemas ); if ( empty( $schema[ $column ] ) ) { return; } switch ( $column ) { case 'address': unset( $schema['address']['@type'] ); echo esc_html( join( ' ', $schema['address'] ) ); break; case 'telephone': echo esc_html( $schema['telephone'] ); break; } } /** * Remove unneeded bulk actions. * * @param array $actions Actions. * @return array New actions. */ public function post_bulk_actions( $actions ) { unset( $actions['rank_math_bulk_schema_none'], $actions['rank_math_bulk_schema_default'] ); return $actions; } }
Fatal error: Uncaught Error: Class 'RankMathPro\Local_Seo\Local_Seo' not found in /home/candoodesigncom/public_html/wp-content/plugins/seo-by-rank-math-pro/rank-math-pro.php:351 Stack trace: #0 /home/candoodesigncom/public_html/wp-includes/class-wp-hook.php(324): RankMathPro->init('') #1 /home/candoodesigncom/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #2 /home/candoodesigncom/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /home/candoodesigncom/public_html/wp-settings.php(555): do_action('plugins_loaded') #4 /home/candoodesigncom/public_html/wp-config.php(100): require_once('/home/candoodes...') #5 /home/candoodesigncom/public_html/wp-load.php(50): require_once('/home/candoodes...') #6 /home/candoodesigncom/public_html/wp-blog-header.php(13): require_once('/home/candoodes...') #7 /home/candoodesigncom/public_html/index.php(17): require('/home/candoodes...') #8 {main} thrown in /home/candoodesigncom/public_html/wp-content/plugins/seo-by-rank-math-pro/rank-math-pro.php on line 351