芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/www/wp-content/plugins/elementor-pro/modules/notes/database/models/note-summary.php
self::TYPE_INTEGER, ]; /** * @inheritDoc */ public function __construct( array $fields ) { // Make sure each model comes with the full url alongside with the relative url. $fields['full_url'] = get_site_url( null, $fields['url'] ); parent::__construct( $fields ); } /** * Override the default Query Builder. * * @param \wpdb|null $connection * * @return Note_Query_Builder */ public static function query( \wpdb $connection = null ) { $table_name = static::get_table(); return ( new Note_Query_Builder( $connection ) ) ->set_model( static::class ) ->from( $table_name ) ->select( [ 'title' => 'route_title', 'url' => 'route_url', ] ) ->add_count_select( "{$table_name}.id", 'notes_count' ) ->group_by( 'route_url' ); } /** * Get the notes table name. * * @return string */ public static function get_table() { return Module::TABLE_NOTES; } }